@aquera/nile-elements 1.7.9 → 1.8.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 (90) hide show
  1. package/README.md +3 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +697 -502
  5. package/dist/nile-context-menu/index.cjs.js +2 -0
  6. package/dist/nile-context-menu/index.cjs.js.map +1 -0
  7. package/dist/nile-context-menu/index.esm.js +1 -0
  8. package/dist/nile-context-menu/nile-context-menu.cjs.js +2 -0
  9. package/dist/nile-context-menu/nile-context-menu.cjs.js.map +1 -0
  10. package/dist/nile-context-menu/nile-context-menu.css.cjs.js +2 -0
  11. package/dist/nile-context-menu/nile-context-menu.css.cjs.js.map +1 -0
  12. package/dist/nile-context-menu/nile-context-menu.css.esm.js +51 -0
  13. package/dist/nile-context-menu/nile-context-menu.esm.js +25 -0
  14. package/dist/nile-context-menu-group/index.cjs.js +2 -0
  15. package/dist/nile-context-menu-group/index.cjs.js.map +1 -0
  16. package/dist/nile-context-menu-group/index.esm.js +1 -0
  17. package/dist/nile-context-menu-group/nile-context-menu-group.cjs.js +2 -0
  18. package/dist/nile-context-menu-group/nile-context-menu-group.cjs.js.map +1 -0
  19. package/dist/nile-context-menu-group/nile-context-menu-group.css.cjs.js +2 -0
  20. package/dist/nile-context-menu-group/nile-context-menu-group.css.cjs.js.map +1 -0
  21. package/dist/nile-context-menu-group/nile-context-menu-group.css.esm.js +20 -0
  22. package/dist/nile-context-menu-group/nile-context-menu-group.esm.js +11 -0
  23. package/dist/nile-context-menu-item/index.cjs.js +2 -0
  24. package/dist/nile-context-menu-item/index.cjs.js.map +1 -0
  25. package/dist/nile-context-menu-item/index.esm.js +1 -0
  26. package/dist/nile-context-menu-item/nile-context-menu-item.cjs.js +2 -0
  27. package/dist/nile-context-menu-item/nile-context-menu-item.cjs.js.map +1 -0
  28. package/dist/nile-context-menu-item/nile-context-menu-item.css.cjs.js +2 -0
  29. package/dist/nile-context-menu-item/nile-context-menu-item.css.cjs.js.map +1 -0
  30. package/dist/nile-context-menu-item/nile-context-menu-item.css.esm.js +72 -0
  31. package/dist/nile-context-menu-item/nile-context-menu-item.esm.js +20 -0
  32. package/dist/nile-context-submenu/index.cjs.js +2 -0
  33. package/dist/nile-context-submenu/index.cjs.js.map +1 -0
  34. package/dist/nile-context-submenu/index.esm.js +1 -0
  35. package/dist/nile-context-submenu/nile-context-submenu.cjs.js +2 -0
  36. package/dist/nile-context-submenu/nile-context-submenu.cjs.js.map +1 -0
  37. package/dist/nile-context-submenu/nile-context-submenu.esm.js +3 -0
  38. package/dist/src/index.d.ts +3 -0
  39. package/dist/src/index.js +3 -0
  40. package/dist/src/index.js.map +1 -1
  41. package/dist/src/nile-context-menu/index.d.ts +3 -0
  42. package/dist/src/nile-context-menu/index.js +4 -0
  43. package/dist/src/nile-context-menu/index.js.map +1 -0
  44. package/dist/src/nile-context-menu/nile-context-menu.css.d.ts +10 -0
  45. package/dist/src/nile-context-menu/nile-context-menu.css.js +127 -0
  46. package/dist/src/nile-context-menu/nile-context-menu.css.js.map +1 -0
  47. package/dist/src/nile-context-menu/nile-context-menu.d.ts +123 -0
  48. package/dist/src/nile-context-menu/nile-context-menu.js +625 -0
  49. package/dist/src/nile-context-menu/nile-context-menu.js.map +1 -0
  50. package/dist/src/nile-context-menu-group/index.d.ts +1 -0
  51. package/dist/src/nile-context-menu-group/index.js +2 -0
  52. package/dist/src/nile-context-menu-group/index.js.map +1 -0
  53. package/dist/src/nile-context-menu-group/nile-context-menu-group.css.d.ts +9 -0
  54. package/dist/src/nile-context-menu-group/nile-context-menu-group.css.js +29 -0
  55. package/dist/src/nile-context-menu-group/nile-context-menu-group.css.js.map +1 -0
  56. package/dist/src/nile-context-menu-group/nile-context-menu-group.d.ts +28 -0
  57. package/dist/src/nile-context-menu-group/nile-context-menu-group.js +55 -0
  58. package/dist/src/nile-context-menu-group/nile-context-menu-group.js.map +1 -0
  59. package/dist/src/nile-context-menu-item/index.d.ts +1 -0
  60. package/dist/src/nile-context-menu-item/index.js +2 -0
  61. package/dist/src/nile-context-menu-item/index.js.map +1 -0
  62. package/dist/src/nile-context-menu-item/nile-context-menu-item.css.d.ts +9 -0
  63. package/dist/src/nile-context-menu-item/nile-context-menu-item.css.js +81 -0
  64. package/dist/src/nile-context-menu-item/nile-context-menu-item.css.js.map +1 -0
  65. package/dist/src/nile-context-menu-item/nile-context-menu-item.d.ts +45 -0
  66. package/dist/src/nile-context-menu-item/nile-context-menu-item.js +96 -0
  67. package/dist/src/nile-context-menu-item/nile-context-menu-item.js.map +1 -0
  68. package/dist/src/nile-context-submenu/index.d.ts +1 -0
  69. package/dist/src/nile-context-submenu/index.js +2 -0
  70. package/dist/src/nile-context-submenu/index.js.map +1 -0
  71. package/dist/src/nile-context-submenu/nile-context-submenu.d.ts +60 -0
  72. package/dist/src/nile-context-submenu/nile-context-submenu.js +324 -0
  73. package/dist/src/nile-context-submenu/nile-context-submenu.js.map +1 -0
  74. package/dist/src/version.js +1 -1
  75. package/dist/src/version.js.map +1 -1
  76. package/dist/tsconfig.tsbuildinfo +1 -1
  77. package/package.json +1 -1
  78. package/src/index.ts +3 -0
  79. package/src/nile-context-menu/index.ts +12 -0
  80. package/src/nile-context-menu/nile-context-menu.css.ts +130 -0
  81. package/src/nile-context-menu/nile-context-menu.ts +698 -0
  82. package/src/nile-context-menu-group/index.ts +1 -0
  83. package/src/nile-context-menu-group/nile-context-menu-group.css.ts +31 -0
  84. package/src/nile-context-menu-group/nile-context-menu-group.ts +55 -0
  85. package/src/nile-context-menu-item/index.ts +5 -0
  86. package/src/nile-context-menu-item/nile-context-menu-item.css.ts +83 -0
  87. package/src/nile-context-menu-item/nile-context-menu-item.ts +112 -0
  88. package/src/nile-context-submenu/index.ts +1 -0
  89. package/src/nile-context-submenu/nile-context-submenu.ts +322 -0
  90. package/vscode-html-custom-data.json +82 -4
@@ -0,0 +1,2 @@
1
+ System.register(["./nile-context-menu.cjs.js","../nile-context-menu-group/nile-context-menu-group.cjs.js","../nile-context-menu-item/nile-context-menu-item.cjs.js","tslib","lit","lit/decorators.js","./nile-context-menu.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","../nile-floating-panel/nile-floating-panel.cjs.js","../nile-floating-panel/nile-floating-panel.css.cjs.js","../tippy.esm-78baa8f2.cjs.js","../nile-lite-tooltip/utils.cjs.js","../utilities/visibility-manager.cjs.js","../nile-context-submenu/nile-context-submenu.cjs.js","../nile-context-menu-group/nile-context-menu-group.css.cjs.js","../nile-context-menu-item/nile-context-menu-item.css.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileContextMenuCjsJs){_export("NileContextMenu",_nileContextMenuCjsJs.N);},function(_nileContextMenuGroupNileContextMenuGroupCjsJs){_export("NileContextMenuGroup",_nileContextMenuGroupNileContextMenuGroupCjsJs.N);},function(_nileContextMenuItemNileContextMenuItemCjsJs){_export("NileContextMenuItem",_nileContextMenuItemNileContextMenuItemCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileContextMenuCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_nileFloatingPanelNileFloatingPanelCjsJs){},function(_nileFloatingPanelNileFloatingPanelCssCjsJs){},function(_tippyEsm006CjsJs){},function(_nileLiteTooltipUtilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){},function(_nileContextSubmenuNileContextSubmenuCjsJs){},function(_nileContextMenuGroupNileContextMenuGroupCssCjsJs){},function(_nileContextMenuItemNileContextMenuItemCssCjsJs){}],execute:function execute(){}};});
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export{N as NileContextMenu}from"./nile-context-menu.esm.js";export{N as NileContextMenuGroup}from"../nile-context-menu-group/nile-context-menu-group.esm.js";export{N as NileContextMenuItem}from"../nile-context-menu-item/nile-context-menu-item.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-context-menu.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";import"../nile-floating-panel/nile-floating-panel.esm.js";import"../nile-floating-panel/nile-floating-panel.css.esm.js";import"../tippy.esm-57628c2b.esm.js";import"../nile-lite-tooltip/utils.esm.js";import"../utilities/visibility-manager.esm.js";import"../nile-context-submenu/nile-context-submenu.esm.js";import"../nile-context-menu-group/nile-context-menu-group.css.esm.js";import"../nile-context-menu-item/nile-context-menu-item.css.esm.js";
@@ -0,0 +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-context-menu.css.cjs.js","../internal/nile-element.cjs.js","../nile-floating-panel/nile-floating-panel.cjs.js","../nile-context-menu-group/nile-context-menu-group.cjs.js","../nile-context-menu-item/nile-context-menu-item.cjs.js","../nile-context-submenu/nile-context-submenu.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js","../nile-floating-panel/nile-floating-panel.css.cjs.js","../tippy.esm-78baa8f2.cjs.js","../nile-lite-tooltip/utils.cjs.js","../utilities/visibility-manager.cjs.js","../nile-context-menu-group/nile-context-menu-group.css.cjs.js","../nile-context-menu-item/nile-context-menu-item.css.cjs.js"],function(_export,_context){"use strict";var t,i,e,s,n,o,r,h,_templateObject,_c,l,u,a,m,d,p;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function ownKeys(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable;})),t.push.apply(t,o);}return t;}function _objectSpread(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?ownKeys(Object(t),!0).forEach(function(r){_defineProperty(e,r,t[r]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):ownKeys(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r));});}return e;}function _defineProperty(e,r,t){return(r=_toPropertyKey(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e;}function _createForOfIteratorHelper(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var n=0,F=function F(){};return{s:F,n:function(_n){function n(){return _n.apply(this,arguments);}n.toString=function(){return _n.toString();};return n;}(function(){return n>=r.length?{done:!0}:{done:!1,value:r[n++]};}),e:function e(r){throw r;},f:F};}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t["return"]||t["return"]();}finally{if(u)throw o;}}};}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}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.query;n=_litDecoratorsJs.state;o=_litDecoratorsJs.customElement;},function(_nileContextMenuCssCjsJs){r=_nileContextMenuCssCjsJs.s;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_nileFloatingPanelNileFloatingPanelCjsJs){},function(_nileContextMenuGroupNileContextMenuGroupCjsJs){},function(_nileContextMenuItemNileContextMenuItemCjsJs){},function(_nileContextSubmenuNileContextSubmenuCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){},function(_nileFloatingPanelNileFloatingPanelCssCjsJs){},function(_tippyEsm006CjsJs){},function(_nileLiteTooltipUtilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){},function(_nileContextMenuGroupNileContextMenuGroupCssCjsJs){},function(_nileContextMenuItemNileContextMenuItemCssCjsJs){}],execute:function execute(){l="nile-context-menu-item",u="nile-context-submenu",a="nile-context-menu__menu",m=["value","disabled"];d=0,_export("N",p=_c=/*#__PURE__*/function(_h){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this["for"]="",_this.trigger="right",_this.skipOn="",_this.zIndex=9999,_this.items=[],_this._items=[],_this._open=!1,_this._openContext=null,_this._targetEl=null,_this._previouslyFocused=null,_this._proxyId="nile-context-menu-anchor-"+ ++d,_this._wasDataMode=!1,_this._menuContainerRef=null,_this._onKeydown=function(t){if(_this._open)switch(t.key){case"Escape":return t.preventDefault(),void _this.close("escape");case"Tab":return void _this.close("programmatic");case"ArrowDown":return t.preventDefault(),void _this._moveFocus(1);case"ArrowUp":return t.preventDefault(),void _this._moveFocus(-1);case"ArrowRight":{var _e$openSubmenu;var _this$_getFocusedItem=_this._getFocusedItemAnyLevel(),_i=_this$_getFocusedItem.item,_e=_i===null||_i===void 0?void 0:_i.querySelector(":scope > ".concat(u));if(!_e)return;return t.preventDefault(),(_e$openSubmenu=_e.openSubmenu)!==null&&_e$openSubmenu!==void 0&&_e$openSubmenu.call(_e),void requestAnimationFrame(function(){var _e$focusFirstItem;(_e$focusFirstItem=_e.focusFirstItem)===null||_e$focusFirstItem===void 0||_e$focusFirstItem.call(_e);});}case"ArrowLeft":{var _s$closeSubmenu,_s$parentItem;var _this$_getFocusedItem2=_this._getFocusedItemAnyLevel(),_i2=_this$_getFocusedItem2.item,_e2=_this$_getFocusedItem2.container;if(!_i2||!_e2)return;var _s=_this._findSubmenuOwning(_e2);if(!_s)return;return t.preventDefault(),(_s$closeSubmenu=_s.closeSubmenu)!==null&&_s$closeSubmenu!==void 0&&_s$closeSubmenu.call(_s),void((_s$parentItem=_s.parentItem)===null||_s$parentItem===void 0?void 0:_s$parentItem.focus());}case"Enter":case" ":{var _e3$openSubmenu;t.preventDefault();var _this$_getFocusedItem3=_this._getFocusedItemAnyLevel(),_i3=_this$_getFocusedItem3.item;if(!_i3||_i3.disabled)return;var _e3=_i3.querySelector(":scope > ".concat(u));return _e3?((_e3$openSubmenu=_e3.openSubmenu)!==null&&_e3$openSubmenu!==void 0&&_e3$openSubmenu.call(_e3),void requestAnimationFrame(function(){var _e3$shadowRoot;var t=(_e3$shadowRoot=_e3.shadowRoot)===null||_e3$shadowRoot===void 0?void 0:_e3$shadowRoot.querySelector(".".concat(a)),i=t?_this._enabledItemsIn(t)[0]:void 0;i===null||i===void 0||i.focus();})):void _this._selectItem(_i3);}}},_this._onScroll=function(t){if(!_this._open)return;var i=t.composedPath();if(!_this._menuContainerRef||!i.includes(_this._menuContainerRef)){var _iterator=_createForOfIteratorHelper(i),_step;try{for(_iterator.s();!(_step=_iterator.n()).done;){var _t$classList;var _t=_step.value;if(_t instanceof HTMLElement&&(_t$classList=_t.classList)!==null&&_t$classList!==void 0&&_t$classList.contains(a))return;}}catch(err){_iterator.e(err);}finally{_iterator.f();}_this.close("programmatic");}},_this._onOutsidePointer=function(t){if(!_this._open)return;var i=t.composedPath();if(!_this._menuContainerRef||!i.includes(_this._menuContainerRef)){var _iterator2=_createForOfIteratorHelper(i),_step2;try{for(_iterator2.s();!(_step2=_iterator2.n()).done;){var _t2$classList;var _t2=_step2.value;if(_t2 instanceof HTMLElement&&(_t2$classList=_t2.classList)!==null&&_t2$classList!==void 0&&_t2$classList.contains(a))return;}}catch(err){_iterator2.e(err);}finally{_iterator2.f();}_this.close("outside-click");}},_this._onDescendantSelect=function(t){var _t$detail;"click"===((_t$detail=t.detail)===null||_t$detail===void 0?void 0:_t$detail.type)&&_this.close("select");},_this._onPanelShown=function(t){t.stopPropagation();},_this._onMenuMouseOver=function(t){var i=t.composedPath().find(function(t){return t instanceof HTMLElement&&t.tagName.toLowerCase()===l;});i&&!i.disabled&&i.focus();},_this._onMenuClick=function(t){var i=t.composedPath().find(function(t){return t instanceof HTMLElement&&t.tagName.toLowerCase()===l;});i&&!i.disabled&&(i.querySelector(":scope > ".concat(u))||_this._selectItem(i));};return _this;}_inherits(c,_h);return _createClass(c,[{key:"_isDataMode",get:function get(){return Array.isArray(this.items)&&this.items.length>0;}},{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(c,"connectedCallback",this,3)([]),this._ensureProxy(),this._resolveTarget(),this._attachTriggers(),this._lightObserver=new MutationObserver(function(){_this2._isDataMode||_this2._relocateLightChildren();}),this._lightObserver.observe(this,{childList:!0});}},{key:"updated",value:function updated(t){_superPropGet(c,"updated",this,3)([t]),(t.has("for")||t.has("trigger")||t.has("skipOn"))&&this._open&&this.close("programmatic"),t.has("for")?(this._resolveTarget(),this._attachTriggers()):(t.has("trigger")||t.has("skipOn"))&&this._attachTriggers(),t.has("items")&&this._menuContainerRef&&(this._isDataMode?(this._renderDataItems(),this._wasDataMode=!0):this._wasDataMode&&(this._renderDataItems(),this._wasDataMode=!1));}},{key:"_resolveTarget",value:function _resolveTarget(){var _this$for,_this$getRootNode;var t=(_this$for=this["for"])===null||_this$for===void 0?void 0:_this$for.trim();if(!t)return void(this._targetEl=null);var i=(_this$getRootNode=this.getRootNode())!==null&&_this$getRootNode!==void 0?_this$getRootNode:document;/^[#.\[:]/.test(t)?this._targetEl=i.querySelector(t):this._targetEl="getElementById"in i?i.getElementById(t):document.getElementById(t);}},{key:"targetElement",get:function get(){return this._targetEl;}},{key:"_attachTriggers",value:function _attachTriggers(){var _this$_detachTriggers,_this3=this;(_this$_detachTriggers=this._detachTriggers)!==null&&_this$_detachTriggers!==void 0&&_this$_detachTriggers.call(this),this._detachTriggers=void 0;var t=this.trigger;if("manual"===t)return;var i=[];if("global"===t){var _this$skipOn$trim,_this$skipOn;var _t3=(_this$skipOn$trim=(_this$skipOn=this.skipOn)===null||_this$skipOn===void 0?void 0:_this$skipOn.trim())!==null&&_this$skipOn$trim!==void 0?_this$skipOn$trim:"",_e4=function _e4(i){return!(!i||!_t3)&&!!i.closest(_t3);},_s2=function _s2(t){var _i$target;var i=t;_e4(i.target)||(i.preventDefault(),_this3._open||_this3.open({x:i.clientX,y:i.clientY,target:(_i$target=i.target)!==null&&_i$target!==void 0?_i$target:void 0,originalEvent:i}));};return window.addEventListener("contextmenu",_s2,!0),i.push(function(){return window.removeEventListener("contextmenu",_s2,!0);}),void(this._detachTriggers=function(){return i.forEach(function(t){return t();});});}var e=this._targetEl;if(!e)return;var s="left"===t||"both"===t;if("right"===t||"both"===t){var _t4=function _t4(t){var i=t;i.preventDefault(),_this3.open({x:i.clientX,y:i.clientY,target:e,originalEvent:i});};e.addEventListener("contextmenu",_t4),i.push(function(){return e.removeEventListener("contextmenu",_t4);});}if(s){var _t5=function _t5(t){var i=t;_this3.open({x:i.clientX,y:i.clientY,target:e,originalEvent:i});};e.addEventListener("click",_t5),i.push(function(){return e.removeEventListener("click",_t5);});}0!==i.length&&(this._detachTriggers=function(){return i.forEach(function(t){return t();});});}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$_detachTriggers2,_this$_lightObserver,_this$_menuObserver,_this$_menuContainerR,_this$_menuContainerR2,_this$_menuContainerR3,_this$_proxyEl;_superPropGet(c,"disconnectedCallback",this,3)([]),_c._openInstances["delete"](this),this._open=!1,(_this$_detachTriggers2=this._detachTriggers)!==null&&_this$_detachTriggers2!==void 0&&_this$_detachTriggers2.call(this),this._detachTriggers=void 0,(_this$_lightObserver=this._lightObserver)!==null&&_this$_lightObserver!==void 0&&_this$_lightObserver.disconnect(),this._lightObserver=void 0,(_this$_menuObserver=this._menuObserver)!==null&&_this$_menuObserver!==void 0&&_this$_menuObserver.disconnect(),this._menuObserver=void 0,(_this$_menuContainerR=this._menuContainerRef)!==null&&_this$_menuContainerR!==void 0&&_this$_menuContainerR.removeEventListener("click",this._onMenuClick),(_this$_menuContainerR2=this._menuContainerRef)!==null&&_this$_menuContainerR2!==void 0&&_this$_menuContainerR2.removeEventListener("mouseover",this._onMenuMouseOver),(_this$_menuContainerR3=this._menuContainerRef)!==null&&_this$_menuContainerR3!==void 0&&_this$_menuContainerR3.removeEventListener("nile-change",this._onDescendantSelect),document.removeEventListener("pointerdown",this._onOutsidePointer,!0),document.removeEventListener("keydown",this._onKeydown,!0),window.removeEventListener("scroll",this._onScroll,!0),(_this$_proxyEl=this._proxyEl)!==null&&_this$_proxyEl!==void 0&&_this$_proxyEl.remove(),this._proxyEl=void 0;}},{key:"firstUpdated",value:function firstUpdated(){var _this4=this;this._menuContainerRef=this.renderRoot.querySelector(".nile-context-menu__menu"),this._isDataMode?(this._renderDataItems(),this._wasDataMode=!0):this._relocateLightChildren(),this._menuContainerRef&&(this._menuObserver=new MutationObserver(function(){return _this4._parseChildren();}),this._menuObserver.observe(this._menuContainerRef,{childList:!0,subtree:!0,attributes:!0,attributeFilter:m}),this._menuContainerRef.addEventListener("click",this._onMenuClick),this._menuContainerRef.addEventListener("mouseover",this._onMenuMouseOver),this._menuContainerRef.addEventListener("nile-change",this._onDescendantSelect)),this._parseChildren();}},{key:"_ensureProxy",value:function _ensureProxy(){if(this._proxyEl)return;var t=document.createElement("div");t.id=this._proxyId,t.setAttribute("aria-hidden","true"),t.style.cssText="position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none;",document.body.appendChild(t),this._proxyEl=t;}},{key:"_positionProxyAt",value:function _positionProxyAt(t,i){this._proxyEl&&(this._proxyEl.style.left="".concat(t,"px"),this._proxyEl.style.top="".concat(i,"px"));}},{key:"_relocateLightChildren",value:function _relocateLightChildren(){if(!this._menuContainerRef)return;var t=Array.from(this.children);if(0!==t.length){var _iterator3=_createForOfIteratorHelper(t),_step3;try{for(_iterator3.s();!(_step3=_iterator3.n()).done;){var _i4=_step3.value;this._menuContainerRef.appendChild(_i4);}}catch(err){_iterator3.e(err);}finally{_iterator3.f();}}}},{key:"_renderDataItems",value:function _renderDataItems(){var t=this._menuContainerRef;if(t){for(;t.firstChild;)t.removeChild(t.firstChild);var _iterator4=_createForOfIteratorHelper(this.items),_step4;try{for(_iterator4.s();!(_step4=_iterator4.n()).done;){var _i5=_step4.value;var _e5=this._createDataNode(_i5);_e5&&t.appendChild(_e5);}}catch(err){_iterator4.e(err);}finally{_iterator4.f();}}}},{key:"_createDataNode",value:function _createDataNode(t){if("group"===t.type){var _t$data;var _i6=document.createElement("nile-context-menu-group");t.name&&(_i6.label=t.name);var _iterator5=_createForOfIteratorHelper((_t$data=t.data)!==null&&_t$data!==void 0?_t$data:[]),_step5;try{for(_iterator5.s();!(_step5=_iterator5.n()).done;){var _e6=_step5.value;_i6.appendChild(this._createItemNode(_e6));}}catch(err){_iterator5.e(err);}finally{_iterator5.f();}return _i6;}return null;}},{key:"_createItemNode",value:function _createItemNode(t){var _ref,_t$value;var i=document.createElement("nile-context-menu-item");if(t.id&&(i.id=t.id),i.value=(_ref=(_t$value=t.value)!==null&&_t$value!==void 0?_t$value:t.id)!==null&&_ref!==void 0?_ref:"",t.disabled&&(i.disabled=!0),t.icon){var _e7=document.createElement("nile-glyph");_e7.setAttribute("slot","icon"),_e7.setAttribute("name",t.icon),t.iconSet&&_e7.setAttribute("set",t.iconSet),t.iconSize&&_e7.setAttribute("size",t.iconSize),t.iconMethod&&_e7.setAttribute("method",t.iconMethod),t.iconColor&&_e7.setAttribute("color",t.iconColor),i.appendChild(_e7);}if(i.appendChild(document.createTextNode(t.label)),t.submenu&&t.submenu.length>0){var _e8=document.createElement("nile-context-submenu");var _iterator6=_createForOfIteratorHelper(t.submenu),_step6;try{for(_iterator6.s();!(_step6=_iterator6.n()).done;){var _i7=_step6.value;var _t6=this._createDataNode(_i7);_t6&&_e8.appendChild(_t6);}}catch(err){_iterator6.e(err);}finally{_iterator6.f();}i.appendChild(_e8);}return i;}},{key:"_parseChildren",value:function _parseChildren(){var _this$_menuContainerR4,_this5=this;var t=(_this$_menuContainerR4=this._menuContainerRef)!==null&&_this$_menuContainerR4!==void 0?_this$_menuContainerR4:this,i=Array.from(t.querySelectorAll(l));this._items=i.filter(function(i){return!_this5._isInsideDescendantSubmenu(i,t);});}},{key:"_isInsideDescendantSubmenu",value:function _isInsideDescendantSubmenu(t,i){var e=t.parentElement;for(;e&&e!==i;){if(e.tagName.toLowerCase()===u)return!0;e=e.parentElement;}return!1;}},{key:"menuItems",get:function get(){return this._items;}},{key:"getItemByValue",value:function getItemByValue(t){return this._items.find(function(i){return i.value===t;});}},{key:"isOpen",get:function get(){return this._open;}},{key:"open",value:function open(t){var _this6=this;if(!this._open){var _t$target,_t$originalEvent;var _iterator7=_createForOfIteratorHelper(_c._openInstances),_step7;try{for(_iterator7.s();!(_step7=_iterator7.n()).done;){var _t7=_step7.value;_t7!==this&&_t7.close("programmatic");}}catch(err){_iterator7.e(err);}finally{_iterator7.f();}this._previouslyFocused=document.activeElement,this._openContext={x:t.x,y:t.y,target:(_t$target=t.target)!==null&&_t$target!==void 0?_t$target:null,originalEvent:(_t$originalEvent=t.originalEvent)!==null&&_t$originalEvent!==void 0?_t$originalEvent:null},this._ensureProxy(),this._positionProxyAt(t.x,t.y),this._open=!0,_c._openInstances.add(this),document.addEventListener("pointerdown",this._onOutsidePointer,!0),document.addEventListener("keydown",this._onKeydown,!0),requestAnimationFrame(function(){_this6._open&&window.addEventListener("scroll",_this6._onScroll,!0);}),this.emit("nile-change",_objectSpread({type:"open"},this._openContext));}}},{key:"close",value:function close(){var _this$_menuContainerR5,_this$_previouslyFocu,_this$_previouslyFocu2;var t=arguments.length>0&&arguments[0]!==undefined?arguments[0]:"programmatic";if(!this._open)return;this._open=!1,this._openContext=null,_c._openInstances["delete"](this);var i=(_this$_menuContainerR5=this._menuContainerRef)===null||_this$_menuContainerR5===void 0?void 0:_this$_menuContainerR5.querySelectorAll(u);i!==null&&i!==void 0&&i.forEach(function(t){var _t$closeSubmenu;return(_t$closeSubmenu=t.closeSubmenu)===null||_t$closeSubmenu===void 0?void 0:_t$closeSubmenu.call(t);}),document.removeEventListener("pointerdown",this._onOutsidePointer,!0),document.removeEventListener("keydown",this._onKeydown,!0),window.removeEventListener("scroll",this._onScroll,!0);var e=document.activeElement;(e===this||this._items.some(function(t){var _t$shadowRoot;return t===e||((_t$shadowRoot=t.shadowRoot)===null||_t$shadowRoot===void 0?void 0:_t$shadowRoot.contains(e));}))&&(_this$_previouslyFocu=this._previouslyFocused)!==null&&_this$_previouslyFocu!==void 0&&(_this$_previouslyFocu2=_this$_previouslyFocu.focus)!==null&&_this$_previouslyFocu2!==void 0&&_this$_previouslyFocu2.call(_this$_previouslyFocu),this._previouslyFocused=null,this.emit("nile-change",{type:"close",reason:t});}},{key:"_enabledItems",value:function _enabledItems(){return this._items.filter(function(t){return!t.disabled;});}},{key:"_getFocusedItem",value:function _getFocusedItem(){var t=document.activeElement;var _iterator8=_createForOfIteratorHelper(this._items),_step8;try{for(_iterator8.s();!(_step8=_iterator8.n()).done;){var _i8$shadowRoot;var _i8=_step8.value;if(_i8===t||(_i8$shadowRoot=_i8.shadowRoot)!==null&&_i8$shadowRoot!==void 0&&_i8$shadowRoot.contains(t))return _i8;}}catch(err){_iterator8.e(err);}finally{_iterator8.f();}return null;}},{key:"_getFocusedItemAnyLevel",value:function _getFocusedItemAnyLevel(){var t=document.activeElement;for(;t&&((_t$tagName=t.tagName)===null||_t$tagName===void 0?void 0:_t$tagName.toLowerCase())!==l;){var _t$tagName;var _i9=t.getRootNode();t=_i9 instanceof ShadowRoot?_i9.host:t.parentElement;}if(!t)return{item:null,container:null};var i=t.closest(".".concat(a));return{item:t,container:i};}},{key:"_enabledItemsIn",value:function _enabledItemsIn(t){var _this7=this;return Array.from(t.querySelectorAll(l)).filter(function(i){return!i.disabled&&!_this7._isInsideDescendantSubmenu(i,t);});}},{key:"_focusFirstEnabled",value:function _focusFirstEnabled(){var _t$;var t=this._enabledItems();(_t$=t[0])===null||_t$===void 0||_t$.focus();}},{key:"_moveFocus",value:function _moveFocus(t){var _ref2;var _this$_getFocusedItem4=this._getFocusedItemAnyLevel(),i=_this$_getFocusedItem4.item,e=_this$_getFocusedItem4.container,s=(_ref2=e!==null&&e!==void 0?e:this._menuContainerRef)!==null&&_ref2!==void 0?_ref2:this,n=this._enabledItemsIn(s);if(0===n.length)return;var o=i?n.indexOf(i):-1;n[((o+t)%n.length+n.length)%n.length].focus();}},{key:"_findSubmenuOwning",value:function _findSubmenuOwning(t){var _i$findByContainer,_i$findByContainer2;var i=window.customElements.get(u);return(_i$findByContainer=i===null||i===void 0||(_i$findByContainer2=i.findByContainer)===null||_i$findByContainer2===void 0?void 0:_i$findByContainer2.call(i,t))!==null&&_i$findByContainer!==void 0?_i$findByContainer:null;}},{key:"_stop",value:function _stop(t){t.stopPropagation();}},{key:"_selectItem",value:function _selectItem(t){var _t$textContent,_this$_openContext$ta,_this$_openContext,_this$_openContext$or,_this$_openContext2;var i={id:t.id,value:t.value,name:((_t$textContent=t.textContent)!==null&&_t$textContent!==void 0?_t$textContent:"").trim(),target:(_this$_openContext$ta=(_this$_openContext=this._openContext)===null||_this$_openContext===void 0?void 0:_this$_openContext.target)!==null&&_this$_openContext$ta!==void 0?_this$_openContext$ta:null,originalEvent:(_this$_openContext$or=(_this$_openContext2=this._openContext)===null||_this$_openContext2===void 0?void 0:_this$_openContext2.originalEvent)!==null&&_this$_openContext$or!==void 0?_this$_openContext$or:null};try{var _t$onSelect;(_t$onSelect=t.onSelect)===null||_t$onSelect===void 0||_t$onSelect.call(t,i);}catch(t){console.error("[nile-context-menu] onSelect callback threw:",t);}this.emit("nile-change",_objectSpread({type:"click"},i)),this.close("select");}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <nile-floating-panel\n for=","\n trigger=\"manual\"\n placement=\"bottom-start\"\n panelClass=\"nile-context-menu-panel\"\n .zIndex=","\n ?open=","\n .interactive=","\n .hideOnClick=","\n .closeOnEscape=","\n .arrow=","\n .distance=","\n @nile-init=","\n @nile-destroy=","\n @nile-show=","\n @nile-hide=","\n @nile-after-show=","\n @nile-after-hide=","\n @nile-toggle=","\n @nile-visibility-change=","\n >\n <div class=\"nile-context-menu__menu\" role=\"menu\"></div>\n </nile-floating-panel>\n "])),this._proxyId,this.zIndex,this._open,!0,!1,!1,"none",0,this._stop,this._stop,this._stop,this._stop,this._onPanelShown,this._stop,this._stop,this._stop);}}],[{key:"styles",get:function get(){return[r];}}]);}(h));p._openInstances=new Set(),t([e({attribute:!0,type:String,reflect:!0})],p.prototype,"for",void 0),t([e({attribute:!0,type:String,reflect:!0})],p.prototype,"trigger",void 0),t([e({attribute:!0,type:String,reflect:!0})],p.prototype,"skipOn",void 0),t([e({attribute:!0,type:Number,reflect:!0})],p.prototype,"zIndex",void 0),t([e({attribute:!1})],p.prototype,"items",void 0),t([s("nile-floating-panel")],p.prototype,"_floatingPanel",void 0),t([n()],p.prototype,"_items",void 0),t([n()],p.prototype,"_open",void 0),_export("N",p=_c=t([o("nile-context-menu")],p));}};});
2
+ //# sourceMappingURL=nile-context-menu.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-context-menu.cjs.js","sources":["../../../src/nile-context-menu/nile-context-menu.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2026\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 type { PropertyValues } from 'lit';\nimport { customElement, property, query, state } from 'lit/decorators.js';\nimport { styles } from './nile-context-menu.css';\nimport NileElement from '../internal/nile-element';\nimport type { NileContextMenuItem } from '../nile-context-menu-item';\nimport type { NileContextMenuGroup } from '../nile-context-menu-group';\nimport '../nile-floating-panel';\nimport '../nile-context-menu-group';\nimport '../nile-context-menu-item';\nimport '../nile-context-submenu';\n\n// Data-driven menu entry\nexport interface NileContextMenuItemData {\n type: 'item';\n id: string;\n label: string;\n value?: string;\n disabled?: boolean;\n icon?: string;\n iconSet?: string;\n iconSize?: string;\n iconMethod?: 'fill' | 'stroke' | string;\n iconColor?: string;\n submenu?: NileContextMenuData[];\n}\n\nexport interface NileContextMenuGroupData {\n type: 'group';\n name?: string;\n data: NileContextMenuItemData[];\n}\n\nexport type NileContextMenuData = NileContextMenuGroupData;\n\nconst ITEM_TAG = 'nile-context-menu-item';\nconst SUBMENU_TAG = 'nile-context-submenu';\nconst MENU_CONTAINER_CLASS = 'nile-context-menu__menu';\nconst OBSERVED_ITEM_ATTRS = ['value', 'disabled'];\n\nexport type NileContextMenuTrigger = 'right' | 'left' | 'both' | 'manual' | 'global';\n\nexport interface NileContextMenuOpenOptions {\n x: number;\n y: number;\n target?: Element;\n originalEvent?: Event;\n}\n\nexport type NileContextMenuCloseReason =\n | 'select'\n | 'outside-click'\n | 'escape'\n | 'programmatic';\n\ninterface NileContextMenuOpenContext {\n x: number;\n y: number;\n target: Element | null;\n originalEvent: Event | null;\n}\n\nlet proxyIdSeq = 0;\n\n/**\n * Nile context-menu component.\n *\n * @tag nile-context-menu\n *\n * @slot Default menu content.\n *\n * @event nile-change Fired on menu lifecycle and selection. `detail.type` is one of\n * `'open'`, `'click'`, or `'close'`; remaining fields depend on the type.\n */\n@customElement('nile-context-menu')\nexport class NileContextMenu extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n \n @property({ attribute: true, type: String, reflect: true }) for = '';\n \n @property({ attribute: true, type: String, reflect: true }) trigger: NileContextMenuTrigger = 'right';\n \n @property({ attribute: true, type: String, reflect: true }) skipOn = '';\n \n @property({ attribute: true, type: Number, reflect: true }) zIndex = 9999;\n \n @property({ attribute: false }) public items: NileContextMenuData[] = [];\n \n private get _isDataMode(): boolean {\n return Array.isArray(this.items) && this.items.length > 0;\n }\n @query('nile-floating-panel') private _floatingPanel?: HTMLElement;\n \n @state() private _items: NileContextMenuItem[] = [];\n \n @state() private _open = false;\n \n protected _openContext: NileContextMenuOpenContext | null = null;\n \n protected _targetEl: Element | null = null;\n \n private _previouslyFocused: HTMLElement | null = null;\n \n private static _openInstances = new Set<NileContextMenu>();\n \n private _detachTriggers?: () => void;\n private _lightObserver?: MutationObserver;\n private _menuObserver?: MutationObserver;\n \n private _proxyEl?: HTMLDivElement;\n private readonly _proxyId = `nile-context-menu-anchor-${++proxyIdSeq}`;\n \n private _wasDataMode = false;\n\n public override connectedCallback(): void {\n super.connectedCallback();\n this._ensureProxy();\n this._resolveTarget();\n this._attachTriggers();\n this._lightObserver = new MutationObserver(() => {\n if (this._isDataMode) return;\n this._relocateLightChildren();\n });\n this._lightObserver.observe(this, { childList: true });\n }\n\n protected override updated(changed: PropertyValues): void {\n super.updated(changed);\n if ((changed.has('for') || changed.has('trigger') || changed.has('skipOn')) && this._open) {\n this.close('programmatic');\n }\n if (changed.has('for')) {\n this._resolveTarget();\n this._attachTriggers();\n } else if (changed.has('trigger') || changed.has('skipOn')) {\n this._attachTriggers();\n }\n if (changed.has('items') && this._menuContainerRef) {\n if (this._isDataMode) {\n this._renderDataItems();\n this._wasDataMode = true;\n } else if (this._wasDataMode) {\n this._renderDataItems();\n this._wasDataMode = false;\n }\n }\n }\n\n private _resolveTarget(): void {\n const value = this.for?.trim();\n if (!value) {\n this._targetEl = null;\n return;\n }\n const root = (this.getRootNode() as Document | ShadowRoot) ?? document;\n if (/^[#.\\[:]/.test(value)) {\n this._targetEl = (root as ParentNode).querySelector(value);\n } else if ('getElementById' in root) {\n this._targetEl = (root as Document | ShadowRoot).getElementById(value);\n } else {\n this._targetEl = document.getElementById(value);\n }\n }\n\n public get targetElement(): Element | null {\n return this._targetEl;\n }\n\n private _attachTriggers(): void {\n this._detachTriggers?.();\n this._detachTriggers = undefined;\n\n const trigger = this.trigger;\n if (trigger === 'manual') return;\n\n const cleanups: Array<() => void> = [];\n\n if (trigger === 'global') {\n const skipSelector = this.skipOn?.trim() ?? '';\n const isInteractive = (el: Element | null): boolean => {\n if (!el || !skipSelector) return false;\n return !!el.closest(skipSelector);\n };\n const handler = (e: Event) => {\n const me = e as MouseEvent;\n if (isInteractive(me.target as Element | null)) return;\n me.preventDefault();\n if (this._open) return;\n this.open({\n x: me.clientX,\n y: me.clientY,\n target: (me.target as Element | null) ?? undefined,\n originalEvent: me,\n });\n };\n window.addEventListener('contextmenu', handler, true);\n cleanups.push(() => window.removeEventListener('contextmenu', handler, true));\n this._detachTriggers = () => cleanups.forEach(fn => fn());\n return;\n }\n\n const target = this._targetEl;\n if (!target) return;\n\n const wantsContext = trigger === 'right' || trigger === 'both';\n const wantsClick = trigger === 'left' || trigger === 'both';\n\n if (wantsContext) {\n const handler = (e: Event) => {\n const me = e as MouseEvent;\n me.preventDefault();\n this.open({\n x: me.clientX,\n y: me.clientY,\n target,\n originalEvent: me,\n });\n };\n target.addEventListener('contextmenu', handler);\n cleanups.push(() => target.removeEventListener('contextmenu', handler));\n }\n\n if (wantsClick) {\n const handler = (e: Event) => {\n const me = e as MouseEvent;\n this.open({\n x: me.clientX,\n y: me.clientY,\n target,\n originalEvent: me,\n });\n };\n target.addEventListener('click', handler);\n cleanups.push(() => target.removeEventListener('click', handler));\n }\n\n if (cleanups.length === 0) return;\n this._detachTriggers = () => cleanups.forEach(fn => fn());\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n NileContextMenu._openInstances.delete(this);\n this._open = false;\n this._detachTriggers?.();\n this._detachTriggers = undefined;\n this._lightObserver?.disconnect();\n this._lightObserver = undefined;\n this._menuObserver?.disconnect();\n this._menuObserver = undefined;\n this._menuContainerRef?.removeEventListener('click', this._onMenuClick);\n this._menuContainerRef?.removeEventListener('mouseover', this._onMenuMouseOver);\n this._menuContainerRef?.removeEventListener(\n 'nile-change',\n this._onDescendantSelect as EventListener,\n );\n document.removeEventListener('pointerdown', this._onOutsidePointer, true);\n document.removeEventListener('keydown', this._onKeydown, true);\n window.removeEventListener('scroll', this._onScroll, true);\n this._proxyEl?.remove();\n this._proxyEl = undefined;\n }\n\n private _menuContainerRef: HTMLDivElement | null = null;\n\n protected override firstUpdated(): void {\n this._menuContainerRef = this.renderRoot.querySelector('.nile-context-menu__menu') as HTMLDivElement | null;\n if (this._isDataMode) {\n this._renderDataItems();\n this._wasDataMode = true;\n } else {\n this._relocateLightChildren();\n }\n if (this._menuContainerRef) {\n this._menuObserver = new MutationObserver(() => this._parseChildren());\n this._menuObserver.observe(this._menuContainerRef, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: OBSERVED_ITEM_ATTRS,\n });\n this._menuContainerRef.addEventListener('click', this._onMenuClick);\n this._menuContainerRef.addEventListener('mouseover', this._onMenuMouseOver);\n this._menuContainerRef.addEventListener(\n 'nile-change',\n this._onDescendantSelect as EventListener,\n );\n }\n this._parseChildren();\n }\n\n private _ensureProxy(): void {\n if (this._proxyEl) return;\n const el = document.createElement('div');\n el.id = this._proxyId;\n el.setAttribute('aria-hidden', 'true');\n el.style.cssText =\n 'position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none;';\n document.body.appendChild(el);\n this._proxyEl = el;\n }\n\n private _positionProxyAt(x: number, y: number): void {\n if (!this._proxyEl) return;\n this._proxyEl.style.left = `${x}px`;\n this._proxyEl.style.top = `${y}px`;\n }\n\n private _relocateLightChildren(): void {\n if (!this._menuContainerRef) return;\n const kids = Array.from(this.children);\n if (kids.length === 0) return;\n for (const kid of kids) {\n this._menuContainerRef.appendChild(kid);\n }\n }\n\n private _renderDataItems(): void {\n const container = this._menuContainerRef;\n if (!container) return;\n while (container.firstChild) container.removeChild(container.firstChild);\n for (const entry of this.items) {\n const node = this._createDataNode(entry);\n if (node) container.appendChild(node);\n }\n }\n\n private _createDataNode(entry: NileContextMenuData): HTMLElement | null {\n if (entry.type === 'group') {\n const group = document.createElement('nile-context-menu-group') as NileContextMenuGroup;\n if (entry.name) group.label = entry.name;\n for (const item of entry.data ?? []) {\n group.appendChild(this._createItemNode(item));\n }\n return group;\n }\n return null;\n }\n\n private _createItemNode(data: NileContextMenuItemData): NileContextMenuItem {\n const item = document.createElement('nile-context-menu-item') as NileContextMenuItem;\n if (data.id) item.id = data.id;\n item.value = data.value ?? data.id ?? '';\n if (data.disabled) item.disabled = true;\n if (data.icon) {\n const glyph = document.createElement('nile-glyph');\n glyph.setAttribute('slot', 'icon');\n glyph.setAttribute('name', data.icon);\n if (data.iconSet) glyph.setAttribute('set', data.iconSet);\n if (data.iconSize) glyph.setAttribute('size', data.iconSize);\n if (data.iconMethod) glyph.setAttribute('method', data.iconMethod);\n if (data.iconColor) glyph.setAttribute('color', data.iconColor);\n item.appendChild(glyph);\n }\n item.appendChild(document.createTextNode(data.label));\n if (data.submenu && data.submenu.length > 0) {\n const submenu = document.createElement('nile-context-submenu');\n for (const entry of data.submenu) {\n const node = this._createDataNode(entry);\n if (node) submenu.appendChild(node);\n }\n item.appendChild(submenu);\n }\n return item;\n }\n\n private _parseChildren(): void {\n const root: Element = this._menuContainerRef ?? this;\n const all = Array.from(root.querySelectorAll(ITEM_TAG)) as NileContextMenuItem[];\n this._items = all.filter(item => !this._isInsideDescendantSubmenu(item, root));\n }\n\n private _isInsideDescendantSubmenu(item: Element, container: Element): boolean {\n let cur: Element | null = item.parentElement;\n while (cur && cur !== container) {\n if (cur.tagName.toLowerCase() === SUBMENU_TAG) return true;\n cur = cur.parentElement;\n }\n return false;\n }\n\n public get menuItems(): readonly NileContextMenuItem[] {\n return this._items;\n }\n\n public getItemByValue(value: string): NileContextMenuItem | undefined {\n return this._items.find(item => item.value === value);\n }\n\n public get isOpen(): boolean {\n return this._open;\n }\n\n public open(options: NileContextMenuOpenOptions): void {\n if (this._open) return;\n for (const other of NileContextMenu._openInstances) {\n if (other !== this) other.close('programmatic');\n }\n this._previouslyFocused = document.activeElement as HTMLElement | null;\n this._openContext = {\n x: options.x,\n y: options.y,\n target: options.target ?? null,\n originalEvent: options.originalEvent ?? null,\n };\n this._ensureProxy();\n this._positionProxyAt(options.x, options.y);\n this._open = true;\n NileContextMenu._openInstances.add(this);\n document.addEventListener('pointerdown', this._onOutsidePointer, true);\n document.addEventListener('keydown', this._onKeydown, true);\n requestAnimationFrame(() => {\n if (this._open) window.addEventListener('scroll', this._onScroll, true);\n });\n this.emit('nile-change', { type: 'open', ...this._openContext });\n }\n\n public close(reason: NileContextMenuCloseReason = 'programmatic'): void {\n if (!this._open) return;\n this._open = false;\n this._openContext = null;\n NileContextMenu._openInstances.delete(this);\n const subs = this._menuContainerRef?.querySelectorAll(SUBMENU_TAG);\n subs?.forEach(s => (s as unknown as { closeSubmenu?: () => void }).closeSubmenu?.());\n document.removeEventListener('pointerdown', this._onOutsidePointer, true);\n document.removeEventListener('keydown', this._onKeydown, true);\n window.removeEventListener('scroll', this._onScroll, true);\n const active = document.activeElement;\n const focusInMenu =\n active === this ||\n this._items.some(item => item === active || item.shadowRoot?.contains(active as Node));\n if (focusInMenu) {\n this._previouslyFocused?.focus?.();\n }\n this._previouslyFocused = null;\n this.emit('nile-change', { type: 'close', reason });\n }\n\n private _enabledItems(): NileContextMenuItem[] {\n return this._items.filter(item => !item.disabled);\n }\n\n private _getFocusedItem(): NileContextMenuItem | null {\n const active = document.activeElement;\n for (const item of this._items) {\n if (item === active || item.shadowRoot?.contains(active as Node)) return item;\n }\n return null;\n }\n\n private _getFocusedItemAnyLevel(): {\n item: NileContextMenuItem | null;\n container: Element | null;\n } {\n let node: Element | null = document.activeElement as Element | null;\n while (node && node.tagName?.toLowerCase() !== ITEM_TAG) {\n const root = node.getRootNode();\n node = root instanceof ShadowRoot ? root.host : node.parentElement;\n }\n if (!node) return { item: null, container: null };\n const container = node.closest(`.${MENU_CONTAINER_CLASS}`);\n return { item: node as NileContextMenuItem, container };\n }\n\n private _enabledItemsIn(container: Element): NileContextMenuItem[] {\n const all = Array.from(container.querySelectorAll(ITEM_TAG)) as NileContextMenuItem[];\n return all.filter(item => {\n if (item.disabled) return false;\n return !this._isInsideDescendantSubmenu(item, container);\n });\n }\n\n private _focusFirstEnabled(): void {\n const enabled = this._enabledItems();\n enabled[0]?.focus();\n }\n\n private _moveFocus(delta: number): void {\n const { item: focused, container } = this._getFocusedItemAnyLevel();\n const root: Element = container ?? this._menuContainerRef ?? this;\n const enabled = this._enabledItemsIn(root);\n if (enabled.length === 0) return;\n const current = focused ? enabled.indexOf(focused) : -1;\n const next = current + delta;\n const wrapped = ((next % enabled.length) + enabled.length) % enabled.length;\n enabled[wrapped].focus();\n }\n\n private _onKeydown = (e: KeyboardEvent): void => {\n if (!this._open) return;\n switch (e.key) {\n case 'Escape':\n e.preventDefault();\n this.close('escape');\n return;\n case 'Tab':\n this.close('programmatic');\n return;\n case 'ArrowDown':\n e.preventDefault();\n this._moveFocus(1);\n return;\n case 'ArrowUp':\n e.preventDefault();\n this._moveFocus(-1);\n return;\n case 'ArrowRight': {\n const { item } = this._getFocusedItemAnyLevel();\n const sub = item?.querySelector(`:scope > ${SUBMENU_TAG}`) as\n | (HTMLElement & { openSubmenu?: () => void })\n | null;\n if (!sub) return;\n e.preventDefault();\n sub.openSubmenu?.();\n requestAnimationFrame(() => {\n (sub as unknown as { focusFirstItem?: () => void }).focusFirstItem?.();\n });\n return;\n }\n case 'ArrowLeft': {\n const { item, container } = this._getFocusedItemAnyLevel();\n if (!item || !container) return;\n const sub = this._findSubmenuOwning(container);\n if (!sub) return;\n e.preventDefault();\n sub.closeSubmenu?.();\n sub.parentItem?.focus();\n return;\n }\n case 'Enter':\n case ' ': {\n e.preventDefault();\n const { item } = this._getFocusedItemAnyLevel();\n if (!item || item.disabled) return;\n const sub = item.querySelector(`:scope > ${SUBMENU_TAG}`) as\n | (HTMLElement & { openSubmenu?: () => void })\n | null;\n if (sub) {\n sub.openSubmenu?.();\n requestAnimationFrame(() => {\n const panel = sub.shadowRoot?.querySelector(`.${MENU_CONTAINER_CLASS}`);\n const first = panel\n ? (this._enabledItemsIn(panel)[0] as NileContextMenuItem | undefined)\n : undefined;\n first?.focus();\n });\n return;\n }\n this._selectItem(item);\n return;\n }\n }\n };\n\n private _findSubmenuOwning(container: Element):\n | (HTMLElement & { closeSubmenu?: () => void; parentItem?: NileContextMenuItem | null })\n | null {\n type SubCtor = {\n findByContainer?: (c: Element) => HTMLElement & {\n closeSubmenu?: () => void;\n parentItem?: NileContextMenuItem | null;\n } | null;\n };\n const customElements = window.customElements;\n const ctor = customElements.get(SUBMENU_TAG) as unknown as SubCtor | undefined;\n return ctor?.findByContainer?.(container) ?? null;\n }\n\n private _onScroll = (e: Event): void => {\n if (!this._open) return;\n const path = e.composedPath();\n // Scroll inside the root menu container?\n if (this._menuContainerRef && path.includes(this._menuContainerRef)) return;\n // Scroll inside any descendant submenu's portaled panel?\n for (const node of path) {\n if (node instanceof HTMLElement && node.classList?.contains(MENU_CONTAINER_CLASS)) {\n return;\n }\n }\n this.close('programmatic');\n };\n\n private _onOutsidePointer = (e: Event): void => {\n if (!this._open) return;\n const path = e.composedPath();\n if (this._menuContainerRef && path.includes(this._menuContainerRef)) return;\n for (const node of path) {\n if (\n node instanceof HTMLElement &&\n node.classList?.contains(MENU_CONTAINER_CLASS)\n ) {\n return;\n }\n }\n this.close('outside-click');\n };\n\n private _onDescendantSelect = (e: CustomEvent): void => {\n if (e.detail?.type !== 'click') return;\n this.close('select');\n };\n private _stop(e: Event): void {\n e.stopPropagation();\n }\n\n private _onPanelShown = (e: Event): void => {\n e.stopPropagation();\n };\n\n private _onMenuMouseOver = (e: MouseEvent): void => {\n const item = e\n .composedPath()\n .find(\n node =>\n node instanceof HTMLElement &&\n node.tagName.toLowerCase() === ITEM_TAG\n ) as NileContextMenuItem | undefined;\n if (!item || item.disabled) return;\n item.focus();\n };\n\n private _onMenuClick = (e: MouseEvent): void => {\n const item = e\n .composedPath()\n .find(\n node =>\n node instanceof HTMLElement &&\n node.tagName.toLowerCase() === ITEM_TAG\n ) as NileContextMenuItem | undefined;\n\n if (!item || item.disabled) return;\n if (item.querySelector(`:scope > ${SUBMENU_TAG}`)) return;\n this._selectItem(item);\n };\n\n private _selectItem(item: NileContextMenuItem): void {\n const detail = {\n id: item.id,\n value: item.value,\n name: (item.textContent ?? '').trim(),\n target: this._openContext?.target ?? null,\n originalEvent: this._openContext?.originalEvent ?? null,\n };\n try {\n item.onSelect?.(detail);\n } catch (err) {\n console.error('[nile-context-menu] onSelect callback threw:', err);\n }\n this.emit('nile-change', { type: 'click', ...detail });\n this.close('select');\n }\n\n public render(): TemplateResult {\n return html`\n <nile-floating-panel\n for=${this._proxyId}\n trigger=\"manual\"\n placement=\"bottom-start\"\n panelClass=\"nile-context-menu-panel\"\n .zIndex=${this.zIndex}\n ?open=${this._open}\n .interactive=${true}\n .hideOnClick=${false}\n .closeOnEscape=${false}\n .arrow=${'none'}\n .distance=${0}\n @nile-init=${this._stop}\n @nile-destroy=${this._stop}\n @nile-show=${this._stop}\n @nile-hide=${this._stop}\n @nile-after-show=${this._onPanelShown}\n @nile-after-hide=${this._stop}\n @nile-toggle=${this._stop}\n @nile-visibility-change=${this._stop}\n >\n <div class=\"nile-context-menu__menu\" role=\"menu\"></div>\n </nile-floating-panel>\n `;\n }\n}\n\nexport default NileContextMenu;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-context-menu': NileContextMenu;\n }\n}\n"],"names":["ITEM_TAG","SUBMENU_TAG","MENU_CONTAINER_CLASS","OBSERVED_ITEM_ATTRS","proxyIdSeq","NileContextMenu","NileContextMenu_1","c","this","trigger","skipOn","zIndex","items","_items","_open","_openContext","_targetEl","_previouslyFocused","_proxyId","_wasDataMode","_menuContainerRef","_onKeydown","e","key","preventDefault","close","_moveFocus","_e$openSubmenu","_this$_getFocusedItem","_getFocusedItemAnyLevel","sub","item","querySelector","concat","openSubmenu","requestAnimationFrame","focusFirstItem","_s$closeSubmenu","_s$parentItem","_this$_getFocusedItem2","container","_findSubmenuOwning","closeSubmenu","parentItem","focus","_e3$openSubmenu","_this$_getFocusedItem3","disabled","_e3$shadowRoot","panel","shadowRoot","first","_enabledItemsIn","undefined","_selectItem","_onScroll","path","composedPath","includes","_iterator","_createForOfIteratorHelper","_step","s","n","done","_t$classList","node","HTMLElement","classList","contains","_onOutsidePointer","_iterator2","_step2","_t2$classList","_onDescendantSelect","_t$detail","detail","type","_onPanelShown","stopPropagation","_onMenuMouseOver","find","tagName","toLowerCase","_onMenuClick","_this","_inherits","_h","_createClass","get","Array","isArray","length","value","connectedCallback","super","_ensureProxy","_resolveTarget","_attachTriggers","_lightObserver","MutationObserver","_isDataMode","_relocateLightChildren","observe","childList","updated","changed","has","_renderDataItems","trim","root","getRootNode","document","test","getElementById","targetElement","_detachTriggers","cleanups","_this$skipOn$trim","_this$skipOn","skipSelector","isInteractive","el","closest","handler","me","target","open","x","clientX","y","clientY","originalEvent","window","addEventListener","push","removeEventListener","forEach","fn","wantsClick","disconnectedCallback","_openInstances","disconnect","_menuObserver","_this$_proxyEl","_proxyEl","remove","firstUpdated","renderRoot","_parseChildren","subtree","attributes","attributeFilter","createElement","id","setAttribute","style","cssText","body","appendChild","_positionProxyAt","left","top","kids","from","children","_iterator3","_step3","kid","err","f","firstChild","removeChild","_iterator4","_step4","entry","_createDataNode","_t$data","group","name","label","_iterator5","data","_step5","_createItemNode","icon","glyph","iconSet","iconSize","iconMethod","iconColor","createTextNode","submenu","_iterator6","_step6","_this$_menuContainerR4","_this5","all","querySelectorAll","filter","_isInsideDescendantSubmenu","cur","parentElement","menuItems","getItemByValue","options","_t$target","_t$originalEvent","_iterator7","_step7","other","activeElement","add","emit","_this$_menuContainerR5","_this$_previouslyFocu","_this$_previouslyFocu2","reason","arguments","delete","subs","active","some","_enabledItems","_getFocusedItem","_iterator8","_step8","_i8$shadowRoot","_t$tagName","ShadowRoot","host","_focusFirstEnabled","enabled","_t$","delta","_ref2","_this$_getFocusedItem4","focused","current","indexOf","ctor","customElements","_i$findByContainer","findByContainer","_stop","_t$textContent","_this$_openContext$ta","_this$_openContext","_this$_openContext$or","_this$_openContext2","textContent","onSelect","console","error","_objectSpread","render","html","_templateObject","_taggedTemplateLiteral","styles","NileElement","Set","__decorate","property","attribute","String","reflect","prototype","Number","query","state","customElement"],"mappings":"ohOA0CMA,EAAW,wBACXC,CAAAA,CAAAA,CAAc,uBACdC,CAAuB,CAAA,yBAAA,CACvBC,EAAsB,CAAC,OAAA,CAAS,YAwBlCC,CAAAA,CAAa,cAaJC,CAAeC,CAAAA,EAAAA,uBAAAA,EAAAA,EAArB,SAAAC,EAAA,uEAMuDC,KAAAA,OAAM,CAAA,EAAA,CAENA,KAAAA,CAAOC,OA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,CAAS,CAAA,CAAEC,WAAW,CAAM3L,CAAAA,IAAAA,CAAM4L,OAAQC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoBrQ,EAAAsQ,SAAA,CAAA,QAAA,CAAA,IAAA,EAEZL,CAAAA,CAAAA,CAAAA,CAAA,CAA3DC,CAAAA,CAAS,CAAEC,SAAW,CAAA,CAAA,CAAA,CAAM3L,KAAM+L,MAAQF,CAAAA,OAAAA,CAAAA,CAAS,KAAsBrQ,CAAAsQ,CAAAA,SAAAA,CAAA,aAAA,EAEnCL,CAAAA,CAAAA,CAAAA,CAAA,CAAtCC,CAAS,CAAA,CAAEC,WAAW,CAAkDnQ,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsQ,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAKnCL,CAAA,CAAA,CAArCO,CAAM,CAAA,qBAAA,CAAA,CAAA,CAA4DxQ,EAAAsQ,SAAA,CAAA,gBAAA,CAAA,IAAA,IAElDL,CAAA,CAAA,CAAhBQ,KAAmDzQ,CAAAsQ,CAAAA,SAAAA,CAAA,QAAA,CAAA,IAAA,EAAA,CAAA,CAEnCL,CAAA,CAAA,CAAhBQ,KAA8BzQ,CAAAsQ,CAAAA,SAAAA,CAAA,YAAA,EAvBpBtQ,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAeC,GAAAgQ,CAAA,CAAA,CAD3BS,CAAc,CAAA,mBAAA,CAAA,CAAA,CACF1Q"}
@@ -0,0 +1,2 @@
1
+ System.register(["lit"],function(_export,_context){"use strict";var n,_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){n=_lit.css;}],execute:function execute(){_export("s",e=n(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n display: block;\n }\n\n .nile-context-menu__menu {\n display: none;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n .nile-context-menu__menu {\n min-width: 200px;\n max-width: 540px;\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-none, var(--ng-spacing-none));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-border-surface, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));\n box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08),\n 0px 8px 8px -4px rgba(16, 24, 40, 0.03);\n overflow: hidden;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n user-select: none;\n }\n\n .nile-context-menu__menu nile-context-menu-group + nile-context-menu-group {\n position: relative;\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n }\n .nile-context-menu__menu nile-context-menu-group + nile-context-menu-group::before {\n content: '';\n position: absolute;\n top: 0;\n left: var(--nile-spacing-lg, var(--ng-spacing-lg));\n right: var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: 1px;\n background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n"]))));!function(_document$head){if("undefined"==typeof document)return;var n="nile-context-menu-overrides";if(document.getElementById(n))return;var e=document.createElement("style");e.id=n,e.textContent="\n .nile-context-menu-panel .nile-floating-panel__body {\n min-width: 0;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n .nile-context-menu-panel .nile-floating-panel__main {\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n .nile-context-menu-panel .tippy-box[data-theme~='floating-panel'] {\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n background: transparent;\n border: none;\n border-radius: var(--nile-radius-none, var(--ng-radius-none));\n box-shadow: none;\n }\n .nile-context-menu__menu[role='menu'] {\n min-width: 200px;\n max-width: 540px;\n max-height: min(60vh, 400px);\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-none, var(--ng-spacing-none));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-border-surface, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));\n box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08),\n 0px 8px 8px -4px rgba(16, 24, 40, 0.03);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n user-select: none;\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-item,\n .nile-context-menu__menu[role='menu'] nile-context-menu-group {\n font-family: inherit;\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-group + nile-context-menu-group {\n position: relative;\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-group + nile-context-menu-group::before {\n content: '';\n position: absolute;\n top: 0;\n left: var(--nile-spacing-xl, var(--ng-spacing-lg));\n right: var(--nile-spacing-xl, var(--ng-spacing-lg));\n height: 1px;\n background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n",(_document$head=document.head)===null||_document$head===void 0?void 0:_document$head.appendChild(e);}();}};});
2
+ //# sourceMappingURL=nile-context-menu.css.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-context-menu.css.cjs.js","sources":["../../../src/nile-context-menu/nile-context-menu.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2026\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 box-sizing: border-box;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n display: block;\n }\n\n .nile-context-menu__menu {\n display: none;\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n .nile-context-menu__menu {\n min-width: 200px;\n max-width: 540px;\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-none, var(--ng-spacing-none));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-border-surface, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));\n box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08),\n 0px 8px 8px -4px rgba(16, 24, 40, 0.03);\n overflow: hidden;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n user-select: none;\n }\n\n .nile-context-menu__menu nile-context-menu-group + nile-context-menu-group {\n position: relative;\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n }\n .nile-context-menu__menu nile-context-menu-group + nile-context-menu-group::before {\n content: '';\n position: absolute;\n top: 0;\n left: var(--nile-spacing-lg, var(--ng-spacing-lg));\n right: var(--nile-spacing-lg, var(--ng-spacing-lg));\n height: 1px;\n background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n`;\n\nconst GLOBAL_OVERRIDE_CSS = `\n .nile-context-menu-panel .nile-floating-panel__body {\n min-width: 0;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n .nile-context-menu-panel .nile-floating-panel__main {\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n .nile-context-menu-panel .tippy-box[data-theme~='floating-panel'] {\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n background: transparent;\n border: none;\n border-radius: var(--nile-radius-none, var(--ng-radius-none));\n box-shadow: none;\n }\n .nile-context-menu__menu[role='menu'] {\n min-width: 200px;\n max-width: 540px;\n max-height: min(60vh, 400px);\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-none, var(--ng-spacing-none));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-border-surface, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));\n box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08),\n 0px 8px 8px -4px rgba(16, 24, 40, 0.03);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n user-select: none;\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-item,\n .nile-context-menu__menu[role='menu'] nile-context-menu-group {\n font-family: inherit;\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-group + nile-context-menu-group {\n position: relative;\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-group + nile-context-menu-group::before {\n content: '';\n position: absolute;\n top: 0;\n left: var(--nile-spacing-xl, var(--ng-spacing-lg));\n right: var(--nile-spacing-xl, var(--ng-spacing-lg));\n height: 1px;\n background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n`;\n\nexport function injectGlobalContextMenuOverrides(): void {\n if (typeof document === 'undefined') return;\n const STYLE_ID = 'nile-context-menu-overrides';\n if (document.getElementById(STYLE_ID)) return;\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = GLOBAL_OVERRIDE_CSS;\n document.head?.appendChild(style);\n}\n\ninjectGlobalContextMenuOverrides();\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral","document","STYLE_ID","getElementById","style","createElement","id","textContent","head","appendChild","injectGlobalContextMenuOverrides"],"mappings":"oTASaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,6+DA6GvB,GAAwB,WAAA,EAAA,MAAbC,CAAAA,QAA0B,CAAA,OACrC,GAAMC,CAAAA,CAAAA,CAAW,6BACjB,CAAA,GAAID,QAASE,CAAAA,cAAAA,CAAeD,CAAW,CAAA,CAAA,OACvC,GAAME,CAAAA,CAAAA,CAAQH,QAASI,CAAAA,aAAAA,CAAc,OACrCD,CAAAA,CAAAA,CAAAA,CAAME,EAAKJ,CAAAA,CAAAA,CACXE,CAAMG,CAAAA,WAAAA,CA9DoB,k+EA+D1BN,EAAAA,cAAAA,CAAAA,QAAAA,CAASO,IAAMC,UAAAA,cAAAA,iBAAfR,cAAAA,CAAeQ,WAAAA,CAAYL,CAC7B,CAAA,EAEAM"}
@@ -0,0 +1,51 @@
1
+ import{css as n}from"lit";const e=n`
2
+ :host {
3
+ box-sizing: border-box;
4
+ -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
5
+ -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
6
+ text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
7
+ display: block;
8
+ }
9
+
10
+ .nile-context-menu__menu {
11
+ display: none;
12
+ }
13
+
14
+ :host *,
15
+ :host *::before,
16
+ :host *::after {
17
+ box-sizing: inherit;
18
+ }
19
+
20
+ .nile-context-menu__menu {
21
+ min-width: 200px;
22
+ max-width: 540px;
23
+ padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-none, var(--ng-spacing-none));
24
+ background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
25
+ border: solid 1px var(--nile-colors-border-surface, var(--ng-colors-border-secondary-alt));
26
+ border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));
27
+ box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08),
28
+ 0px 8px 8px -4px rgba(16, 24, 40, 0.03);
29
+ overflow: hidden;
30
+ font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));
31
+ font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));
32
+ line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));
33
+ color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));
34
+ user-select: none;
35
+ }
36
+
37
+ .nile-context-menu__menu nile-context-menu-group + nile-context-menu-group {
38
+ position: relative;
39
+ margin-top: var(--nile-spacing-xs, var(--ng-spacing-xs));
40
+ padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));
41
+ }
42
+ .nile-context-menu__menu nile-context-menu-group + nile-context-menu-group::before {
43
+ content: '';
44
+ position: absolute;
45
+ top: 0;
46
+ left: var(--nile-spacing-lg, var(--ng-spacing-lg));
47
+ right: var(--nile-spacing-lg, var(--ng-spacing-lg));
48
+ height: 1px;
49
+ background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));
50
+ }
51
+ `;!function(){if("undefined"==typeof document)return;const n="nile-context-menu-overrides";if(document.getElementById(n))return;const e=document.createElement("style");e.id=n,e.textContent="\n .nile-context-menu-panel .nile-floating-panel__body {\n min-width: 0;\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n gap: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n .nile-context-menu-panel .nile-floating-panel__main {\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n margin: var(--nile-spacing-none, var(--ng-spacing-none));\n }\n .nile-context-menu-panel .tippy-box[data-theme~='floating-panel'] {\n padding: var(--nile-spacing-none, var(--ng-spacing-none));\n background: transparent;\n border: none;\n border-radius: var(--nile-radius-none, var(--ng-radius-none));\n box-shadow: none;\n }\n .nile-context-menu__menu[role='menu'] {\n min-width: 200px;\n max-width: 540px;\n max-height: min(60vh, 400px);\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-none, var(--ng-spacing-none));\n background: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-border-surface, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-radius-lg, var(--ng-radius-md));\n box-shadow: 0px 20px 24px -4px rgba(16, 24, 40, 0.08),\n 0px 8px 8px -4px rgba(16, 24, 40, 0.03);\n overflow-y: auto;\n overflow-x: hidden;\n font-family: var(--nile-font-family-sans-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n user-select: none;\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-item,\n .nile-context-menu__menu[role='menu'] nile-context-menu-group {\n font-family: inherit;\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-group + nile-context-menu-group {\n position: relative;\n margin-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n padding-top: var(--nile-spacing-xs, var(--ng-spacing-xs));\n }\n .nile-context-menu__menu[role='menu'] nile-context-menu-group + nile-context-menu-group::before {\n content: '';\n position: absolute;\n top: 0;\n left: var(--nile-spacing-xl, var(--ng-spacing-lg));\n right: var(--nile-spacing-xl, var(--ng-spacing-lg));\n height: 1px;\n background: var(--nile-colors-neutral-400, var(--ng-colors-border-secondary));\n }\n",document.head?.appendChild(e)}();export{e as s};
@@ -0,0 +1,25 @@
1
+ import{__decorate as t}from"tslib";import{html as i}from"lit";import{property as e,query as s,state as n,customElement as o}from"lit/decorators.js";import{s as r}from"./nile-context-menu.css.esm.js";import{N as h}from"../internal/nile-element.esm.js";import"../nile-floating-panel/nile-floating-panel.esm.js";import"../nile-context-menu-group/nile-context-menu-group.esm.js";import"../nile-context-menu-item/nile-context-menu-item.esm.js";import"../nile-context-submenu/nile-context-submenu.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";import"../nile-floating-panel/nile-floating-panel.css.esm.js";import"../tippy.esm-57628c2b.esm.js";import"../nile-lite-tooltip/utils.esm.js";import"../utilities/visibility-manager.esm.js";import"../nile-context-menu-group/nile-context-menu-group.css.esm.js";import"../nile-context-menu-item/nile-context-menu-item.css.esm.js";var c;const l="nile-context-menu-item",u="nile-context-submenu",a="nile-context-menu__menu",m=["value","disabled"];let d=0,p=c=class extends h{constructor(){super(...arguments),this.for="",this.trigger="right",this.skipOn="",this.zIndex=9999,this.items=[],this._items=[],this._open=!1,this._openContext=null,this._targetEl=null,this._previouslyFocused=null,this._proxyId="nile-context-menu-anchor-"+ ++d,this._wasDataMode=!1,this._menuContainerRef=null,this._onKeydown=t=>{if(this._open)switch(t.key){case"Escape":return t.preventDefault(),void this.close("escape");case"Tab":return void this.close("programmatic");case"ArrowDown":return t.preventDefault(),void this._moveFocus(1);case"ArrowUp":return t.preventDefault(),void this._moveFocus(-1);case"ArrowRight":{const{item:i}=this._getFocusedItemAnyLevel(),e=i?.querySelector(`:scope > ${u}`);if(!e)return;return t.preventDefault(),e.openSubmenu?.(),void requestAnimationFrame((()=>{e.focusFirstItem?.()}))}case"ArrowLeft":{const{item:i,container:e}=this._getFocusedItemAnyLevel();if(!i||!e)return;const s=this._findSubmenuOwning(e);if(!s)return;return t.preventDefault(),s.closeSubmenu?.(),void s.parentItem?.focus()}case"Enter":case" ":{t.preventDefault();const{item:i}=this._getFocusedItemAnyLevel();if(!i||i.disabled)return;const e=i.querySelector(`:scope > ${u}`);return e?(e.openSubmenu?.(),void requestAnimationFrame((()=>{const t=e.shadowRoot?.querySelector(`.${a}`),i=t?this._enabledItemsIn(t)[0]:void 0;i?.focus()}))):void this._selectItem(i)}}},this._onScroll=t=>{if(!this._open)return;const i=t.composedPath();if(!this._menuContainerRef||!i.includes(this._menuContainerRef)){for(const t of i)if(t instanceof HTMLElement&&t.classList?.contains(a))return;this.close("programmatic")}},this._onOutsidePointer=t=>{if(!this._open)return;const i=t.composedPath();if(!this._menuContainerRef||!i.includes(this._menuContainerRef)){for(const t of i)if(t instanceof HTMLElement&&t.classList?.contains(a))return;this.close("outside-click")}},this._onDescendantSelect=t=>{"click"===t.detail?.type&&this.close("select")},this._onPanelShown=t=>{t.stopPropagation()},this._onMenuMouseOver=t=>{const i=t.composedPath().find((t=>t instanceof HTMLElement&&t.tagName.toLowerCase()===l));i&&!i.disabled&&i.focus()},this._onMenuClick=t=>{const i=t.composedPath().find((t=>t instanceof HTMLElement&&t.tagName.toLowerCase()===l));i&&!i.disabled&&(i.querySelector(`:scope > ${u}`)||this._selectItem(i))}}static get styles(){return[r]}get _isDataMode(){return Array.isArray(this.items)&&this.items.length>0}connectedCallback(){super.connectedCallback(),this._ensureProxy(),this._resolveTarget(),this._attachTriggers(),this._lightObserver=new MutationObserver((()=>{this._isDataMode||this._relocateLightChildren()})),this._lightObserver.observe(this,{childList:!0})}updated(t){super.updated(t),(t.has("for")||t.has("trigger")||t.has("skipOn"))&&this._open&&this.close("programmatic"),t.has("for")?(this._resolveTarget(),this._attachTriggers()):(t.has("trigger")||t.has("skipOn"))&&this._attachTriggers(),t.has("items")&&this._menuContainerRef&&(this._isDataMode?(this._renderDataItems(),this._wasDataMode=!0):this._wasDataMode&&(this._renderDataItems(),this._wasDataMode=!1))}_resolveTarget(){const t=this.for?.trim();if(!t)return void(this._targetEl=null);const i=this.getRootNode()??document;/^[#.\[:]/.test(t)?this._targetEl=i.querySelector(t):this._targetEl="getElementById"in i?i.getElementById(t):document.getElementById(t)}get targetElement(){return this._targetEl}_attachTriggers(){this._detachTriggers?.(),this._detachTriggers=void 0;const t=this.trigger;if("manual"===t)return;const i=[];if("global"===t){const t=this.skipOn?.trim()??"",e=i=>!(!i||!t)&&!!i.closest(t),s=t=>{const i=t;e(i.target)||(i.preventDefault(),this._open||this.open({x:i.clientX,y:i.clientY,target:i.target??void 0,originalEvent:i}))};return window.addEventListener("contextmenu",s,!0),i.push((()=>window.removeEventListener("contextmenu",s,!0))),void(this._detachTriggers=()=>i.forEach((t=>t())))}const e=this._targetEl;if(!e)return;const s="left"===t||"both"===t;if("right"===t||"both"===t){const t=t=>{const i=t;i.preventDefault(),this.open({x:i.clientX,y:i.clientY,target:e,originalEvent:i})};e.addEventListener("contextmenu",t),i.push((()=>e.removeEventListener("contextmenu",t)))}if(s){const t=t=>{const i=t;this.open({x:i.clientX,y:i.clientY,target:e,originalEvent:i})};e.addEventListener("click",t),i.push((()=>e.removeEventListener("click",t)))}0!==i.length&&(this._detachTriggers=()=>i.forEach((t=>t())))}disconnectedCallback(){super.disconnectedCallback(),c._openInstances.delete(this),this._open=!1,this._detachTriggers?.(),this._detachTriggers=void 0,this._lightObserver?.disconnect(),this._lightObserver=void 0,this._menuObserver?.disconnect(),this._menuObserver=void 0,this._menuContainerRef?.removeEventListener("click",this._onMenuClick),this._menuContainerRef?.removeEventListener("mouseover",this._onMenuMouseOver),this._menuContainerRef?.removeEventListener("nile-change",this._onDescendantSelect),document.removeEventListener("pointerdown",this._onOutsidePointer,!0),document.removeEventListener("keydown",this._onKeydown,!0),window.removeEventListener("scroll",this._onScroll,!0),this._proxyEl?.remove(),this._proxyEl=void 0}firstUpdated(){this._menuContainerRef=this.renderRoot.querySelector(".nile-context-menu__menu"),this._isDataMode?(this._renderDataItems(),this._wasDataMode=!0):this._relocateLightChildren(),this._menuContainerRef&&(this._menuObserver=new MutationObserver((()=>this._parseChildren())),this._menuObserver.observe(this._menuContainerRef,{childList:!0,subtree:!0,attributes:!0,attributeFilter:m}),this._menuContainerRef.addEventListener("click",this._onMenuClick),this._menuContainerRef.addEventListener("mouseover",this._onMenuMouseOver),this._menuContainerRef.addEventListener("nile-change",this._onDescendantSelect)),this._parseChildren()}_ensureProxy(){if(this._proxyEl)return;const t=document.createElement("div");t.id=this._proxyId,t.setAttribute("aria-hidden","true"),t.style.cssText="position: fixed; top: 0; left: 0; width: 0; height: 0; pointer-events: none;",document.body.appendChild(t),this._proxyEl=t}_positionProxyAt(t,i){this._proxyEl&&(this._proxyEl.style.left=`${t}px`,this._proxyEl.style.top=`${i}px`)}_relocateLightChildren(){if(!this._menuContainerRef)return;const t=Array.from(this.children);if(0!==t.length)for(const i of t)this._menuContainerRef.appendChild(i)}_renderDataItems(){const t=this._menuContainerRef;if(t){for(;t.firstChild;)t.removeChild(t.firstChild);for(const i of this.items){const e=this._createDataNode(i);e&&t.appendChild(e)}}}_createDataNode(t){if("group"===t.type){const i=document.createElement("nile-context-menu-group");t.name&&(i.label=t.name);for(const e of t.data??[])i.appendChild(this._createItemNode(e));return i}return null}_createItemNode(t){const i=document.createElement("nile-context-menu-item");if(t.id&&(i.id=t.id),i.value=t.value??t.id??"",t.disabled&&(i.disabled=!0),t.icon){const e=document.createElement("nile-glyph");e.setAttribute("slot","icon"),e.setAttribute("name",t.icon),t.iconSet&&e.setAttribute("set",t.iconSet),t.iconSize&&e.setAttribute("size",t.iconSize),t.iconMethod&&e.setAttribute("method",t.iconMethod),t.iconColor&&e.setAttribute("color",t.iconColor),i.appendChild(e)}if(i.appendChild(document.createTextNode(t.label)),t.submenu&&t.submenu.length>0){const e=document.createElement("nile-context-submenu");for(const i of t.submenu){const t=this._createDataNode(i);t&&e.appendChild(t)}i.appendChild(e)}return i}_parseChildren(){const t=this._menuContainerRef??this,i=Array.from(t.querySelectorAll(l));this._items=i.filter((i=>!this._isInsideDescendantSubmenu(i,t)))}_isInsideDescendantSubmenu(t,i){let e=t.parentElement;for(;e&&e!==i;){if(e.tagName.toLowerCase()===u)return!0;e=e.parentElement}return!1}get menuItems(){return this._items}getItemByValue(t){return this._items.find((i=>i.value===t))}get isOpen(){return this._open}open(t){if(!this._open){for(const t of c._openInstances)t!==this&&t.close("programmatic");this._previouslyFocused=document.activeElement,this._openContext={x:t.x,y:t.y,target:t.target??null,originalEvent:t.originalEvent??null},this._ensureProxy(),this._positionProxyAt(t.x,t.y),this._open=!0,c._openInstances.add(this),document.addEventListener("pointerdown",this._onOutsidePointer,!0),document.addEventListener("keydown",this._onKeydown,!0),requestAnimationFrame((()=>{this._open&&window.addEventListener("scroll",this._onScroll,!0)})),this.emit("nile-change",{type:"open",...this._openContext})}}close(t="programmatic"){if(!this._open)return;this._open=!1,this._openContext=null,c._openInstances.delete(this);const i=this._menuContainerRef?.querySelectorAll(u);i?.forEach((t=>t.closeSubmenu?.())),document.removeEventListener("pointerdown",this._onOutsidePointer,!0),document.removeEventListener("keydown",this._onKeydown,!0),window.removeEventListener("scroll",this._onScroll,!0);const e=document.activeElement;(e===this||this._items.some((t=>t===e||t.shadowRoot?.contains(e))))&&this._previouslyFocused?.focus?.(),this._previouslyFocused=null,this.emit("nile-change",{type:"close",reason:t})}_enabledItems(){return this._items.filter((t=>!t.disabled))}_getFocusedItem(){const t=document.activeElement;for(const i of this._items)if(i===t||i.shadowRoot?.contains(t))return i;return null}_getFocusedItemAnyLevel(){let t=document.activeElement;for(;t&&t.tagName?.toLowerCase()!==l;){const i=t.getRootNode();t=i instanceof ShadowRoot?i.host:t.parentElement}if(!t)return{item:null,container:null};const i=t.closest(`.${a}`);return{item:t,container:i}}_enabledItemsIn(t){return Array.from(t.querySelectorAll(l)).filter((i=>!i.disabled&&!this._isInsideDescendantSubmenu(i,t)))}_focusFirstEnabled(){const t=this._enabledItems();t[0]?.focus()}_moveFocus(t){const{item:i,container:e}=this._getFocusedItemAnyLevel(),s=e??this._menuContainerRef??this,n=this._enabledItemsIn(s);if(0===n.length)return;const o=i?n.indexOf(i):-1;n[((o+t)%n.length+n.length)%n.length].focus()}_findSubmenuOwning(t){const i=window.customElements.get(u);return i?.findByContainer?.(t)??null}_stop(t){t.stopPropagation()}_selectItem(t){const i={id:t.id,value:t.value,name:(t.textContent??"").trim(),target:this._openContext?.target??null,originalEvent:this._openContext?.originalEvent??null};try{t.onSelect?.(i)}catch(t){console.error("[nile-context-menu] onSelect callback threw:",t)}this.emit("nile-change",{type:"click",...i}),this.close("select")}render(){return i`
2
+ <nile-floating-panel
3
+ for=${this._proxyId}
4
+ trigger="manual"
5
+ placement="bottom-start"
6
+ panelClass="nile-context-menu-panel"
7
+ .zIndex=${this.zIndex}
8
+ ?open=${this._open}
9
+ .interactive=${!0}
10
+ .hideOnClick=${!1}
11
+ .closeOnEscape=${!1}
12
+ .arrow=${"none"}
13
+ .distance=${0}
14
+ @nile-init=${this._stop}
15
+ @nile-destroy=${this._stop}
16
+ @nile-show=${this._stop}
17
+ @nile-hide=${this._stop}
18
+ @nile-after-show=${this._onPanelShown}
19
+ @nile-after-hide=${this._stop}
20
+ @nile-toggle=${this._stop}
21
+ @nile-visibility-change=${this._stop}
22
+ >
23
+ <div class="nile-context-menu__menu" role="menu"></div>
24
+ </nile-floating-panel>
25
+ `}};p._openInstances=new Set,t([e({attribute:!0,type:String,reflect:!0})],p.prototype,"for",void 0),t([e({attribute:!0,type:String,reflect:!0})],p.prototype,"trigger",void 0),t([e({attribute:!0,type:String,reflect:!0})],p.prototype,"skipOn",void 0),t([e({attribute:!0,type:Number,reflect:!0})],p.prototype,"zIndex",void 0),t([e({attribute:!1})],p.prototype,"items",void 0),t([s("nile-floating-panel")],p.prototype,"_floatingPanel",void 0),t([n()],p.prototype,"_items",void 0),t([n()],p.prototype,"_open",void 0),p=c=t([o("nile-context-menu")],p);export{p as N};
@@ -0,0 +1,2 @@
1
+ System.register(["./nile-context-menu-group.cjs.js","tslib","lit","lit/decorators.js","./nile-context-menu-group.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileContextMenuGroupCjsJs){_export("NileContextMenuGroup",_nileContextMenuGroupCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileContextMenuGroupCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export{N as NileContextMenuGroup}from"./nile-context-menu-group.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-context-menu-group.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
@@ -0,0 +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-context-menu-group.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,e,s,r,i,l,_templateObject,_templateObject2,_o,n;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){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;r=_litDecoratorsJs.customElement;},function(_nileContextMenuGroupCssCjsJs){i=_nileContextMenuGroupCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",n=_o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.label="",_this._labelId="nile-context-menu-group-label-"+ ++_o._idSeq;return _this;}_inherits(o,_l);return _createClass(o,[{key:"render",value:function render(){var t=this.label||this.id;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"group\"\n class=\"group\"\n role=\"group\"\n aria-labelledby=","\n >\n ","\n <slot></slot>\n </div>\n "])),t?this._labelId:void 0,t?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<div part=\"label\" class=\"label\" id=",">","</div>"])),this._labelId,t):null);}}],[{key:"styles",get:function get(){return[i];}}]);}(l));n._idSeq=0,t([s({attribute:!0,type:String,reflect:!0})],n.prototype,"label",void 0),_export("N",n=_o=t([r("nile-context-menu-group")],n));}};});
2
+ //# sourceMappingURL=nile-context-menu-group.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-context-menu-group.cjs.js","sources":["../../../src/nile-context-menu-group/nile-context-menu-group.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2026\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-context-menu-group.css';\nimport NileElement from '../internal/nile-element';\n\n/**\n * Nile context-menu group. Groups related items inside a `nile-context-menu`.\n *\n * @tag nile-context-menu-group\n *\n * @slot - Default slot for `nile-context-menu-item` children.\n */\n@customElement('nile-context-menu-group')\nexport class NileContextMenuGroup extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ attribute: true, type: String, reflect: true }) label = '';\n\n private static _idSeq = 0;\n private readonly _labelId = `nile-context-menu-group-label-${++NileContextMenuGroup._idSeq}`;\n\n public render(): TemplateResult {\n const heading = this.label || this.id;\n return html`\n <div\n part=\"group\"\n class=\"group\"\n role=\"group\"\n aria-labelledby=${heading ? this._labelId : undefined}\n >\n ${heading\n ? html`<div part=\"label\" class=\"label\" id=${this._labelId}>${heading}</div>`\n : null}\n <slot></slot>\n </div>\n `;\n }\n}\n\nexport default NileContextMenuGroup;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-context-menu-group': NileContextMenuGroup;\n }\n}\n"],"names":["NileContextMenuGroup","NileContextMenuGroup_1","o","constructor","this","label","_labelId","_idSeq","_this","_inherits","_l","_createClass","key","value","render","heading","id","html","_templateObject","_taggedTemplateLiteral","undefined","_templateObject2","get","styles","NileElement","__decorate","property","attribute","type","String","reflect","prototype","customElement"],"mappings":"k+GAoBaA,CAAAA,CAAoBC,6BAA1B,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAKuDC,KAAAA,CAAKC,KAAG,CAAA,EAAA,CAGnDD,KAAAA,CAAAE,QAAW,CAAA,gCAAA,CAAA,GAAmCL,GAAqBM,MAkBrF,QAAAC,KAAA,EAzBQC,SAAA,CAAAP,CAAA,CAAAQ,EAAA,SAAAC,YAAA,CAAAT,CAAA,GAAAU,GAAA,UAAAC,KAAA,CASA,SAAAC,MAAAA,CAAAA,EACL,GAAMC,CAAAA,CAAAA,CAAUX,KAAKC,KAASD,EAAAA,IAAAA,CAAKY,EACnC,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,2LAKWJ,CAAAA,CAAUX,KAAKE,QAAWc,CAAAA,IAAAA,EAAAA,CAE1CL,CAAAA,CACEE,CAAI,CAAAI,gBAAA,GAAAA,gBAAA,CAAAF,sBAAA,4DAAsCf,IAAKE,CAAAA,QAAAA,CAAYS,CAC3D,EAAA,IAAA,EAIT,CAlBcf,KAAAA,GAAAA,UAAAA,GAAAA,CANR,SAAAsB,IAAA,CAAWC,CAChB,MAAO,CAACA,EACT,EAOM,MAViCC,CAAAA,CAOzBxB,EAAAA,CAAAA,CAAMO,OAAG,CAFoCkB,CAAAA,CAAAA,CAAA,CAA3DC,CAAS,CAAA,CAAEC,SAAW,CAAA,CAAA,CAAA,CAAMC,IAAMC,CAAAA,MAAAA,CAAQC,SAAS,CAAmB9B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA+B,SAAA,CAAA,OAAA,CAAA,IAAA,EAL5D/B,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAoBC,GAAAwB,CAAA,CAAA,CADhCO,CAAc,CAAA,yBAAA,CAAA,CAAA,CACFhC"}
@@ -0,0 +1,2 @@
1
+ System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,i;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",i=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n display: block;\n }\n\n .group {\n display: flex;\n flex-direction: column;\n }\n\n .label {\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-xl, var(--ng-spacing-xl));\n font-family: inherit;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-placeholder-subtle));\n }\n"]))));}};});
2
+ //# sourceMappingURL=nile-context-menu-group.css.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-context-menu-group.css.cjs.js","sources":["../../../src/nile-context-menu-group/nile-context-menu-group.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2026\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 box-sizing: border-box;\n display: block;\n }\n\n .group {\n display: flex;\n flex-direction: column;\n }\n\n .label {\n padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-xl, var(--ng-spacing-xl));\n font-family: inherit;\n font-size: var(--nile-type-scale-3, var(--ng-font-size-text-xs));\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n color: var(--nile-colors-neutral-500, var(--ng-colors-text-placeholder-subtle));\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTASaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -0,0 +1,20 @@
1
+ import{css as e}from"lit";const i=e`
2
+ :host {
3
+ box-sizing: border-box;
4
+ display: block;
5
+ }
6
+
7
+ .group {
8
+ display: flex;
9
+ flex-direction: column;
10
+ }
11
+
12
+ .label {
13
+ padding: var(--nile-spacing-xs, var(--ng-spacing-xs)) var(--nile-spacing-xl, var(--ng-spacing-xl));
14
+ font-family: inherit;
15
+ font-size: var(--nile-type-scale-3, var(--ng-font-size-text-xs));
16
+ font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));
17
+ line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));
18
+ color: var(--nile-colors-neutral-500, var(--ng-colors-text-placeholder-subtle));
19
+ }
20
+ `;export{i as s};
@@ -0,0 +1,11 @@
1
+ import{__decorate as t}from"tslib";import{html as e}from"lit";import{property as s,customElement as r}from"lit/decorators.js";import{s as i}from"./nile-context-menu-group.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";var o;let n=o=class extends l{constructor(){super(...arguments),this.label="",this._labelId="nile-context-menu-group-label-"+ ++o._idSeq}static get styles(){return[i]}render(){const t=this.label||this.id;return e`
2
+ <div
3
+ part="group"
4
+ class="group"
5
+ role="group"
6
+ aria-labelledby=${t?this._labelId:void 0}
7
+ >
8
+ ${t?e`<div part="label" class="label" id=${this._labelId}>${t}</div>`:null}
9
+ <slot></slot>
10
+ </div>
11
+ `}};n._idSeq=0,t([s({attribute:!0,type:String,reflect:!0})],n.prototype,"label",void 0),n=o=t([r("nile-context-menu-group")],n);export{n as N};
@@ -0,0 +1,2 @@
1
+ System.register(["./nile-context-menu-item.cjs.js","tslib","lit","lit/decorators.js","./nile-context-menu-item.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileContextMenuItemCjsJs){_export("NileContextMenuItem",_nileContextMenuItemCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileContextMenuItemCssCjsJs){},function(_internalNileElementCjsJs){},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){}};});
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export{N as NileContextMenuItem}from"./nile-context-menu-item.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-context-menu-item.css.esm.js";import"../internal/nile-element.esm.js";import"../internal/accessibility/a11y.state.enum.esm.js";import"../internal/accessibility/a11y.property.enum.esm.js";import"../internal/accessibility/role.enum.esm.js";
@@ -0,0 +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-context-menu-item.css.cjs.js","../internal/nile-element.cjs.js","../internal/accessibility/a11y.state.enum.cjs.js","../internal/accessibility/a11y.property.enum.cjs.js","../internal/accessibility/role.enum.cjs.js"],function(_export,_context){"use strict";var t,e,s,i,a,n,r,o,_templateObject,_templateObject2,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 _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;s=_lit.nothing;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;a=_litDecoratorsJs.state;n=_litDecoratorsJs.customElement;},function(_nileContextMenuItemCssCjsJs){r=_nileContextMenuItemCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;},function(_internalAccessibilityA11yStateEnumCjsJs){},function(_internalAccessibilityA11yPropertyEnumCjsJs){},function(_internalAccessibilityRoleEnumCjsJs){}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_o){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value="",_this.disabled=!1,_this._hasSubmenu=!1,_this._hasIcon=!1,_this._submenuExpanded=!1,_this._onSlotChange=function(t){var e=t.target.assignedElements({flatten:!0});_this._hasSubmenu=e.some(function(t){return"nile-context-submenu"===t.tagName.toLowerCase();});},_this._onIconSlotChange=function(t){var e=t.target;_this._hasIcon=e.assignedNodes({flatten:!0}).some(function(t){var _t$textContent;return t.nodeType===Node.ELEMENT_NODE||""!==((_t$textContent=t.textContent)!==null&&_t$textContent!==void 0?_t$textContent:"").trim();});};return _this;}_inherits(l,_o);return _createClass(l,[{key:"setSubmenuExpanded",value:function setSubmenuExpanded(t){this._submenuExpanded=t;}},{key:"focus",value:function focus(t){var _this$shadowRoot;var e=(_this$shadowRoot=this.shadowRoot)===null||_this$shadowRoot===void 0?void 0:_this$shadowRoot.querySelector(".item");e===null||e===void 0||e.focus(t);}},{key:"hasSubmenu",get:function get(){return this._hasSubmenu;}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"item\"\n class=\"item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n aria-disabled=","\n aria-haspopup=","\n aria-expanded=","\n data-has-submenu=","\n >\n <span part=\"icon\" class=\"icon\" data-empty=",">\n <slot name=\"icon\" @slotchange=","></slot>\n </span>\n <span part=\"label\" class=\"label\"><slot @slotchange=","></slot></span>\n ","\n </div>\n "])),this.disabled?"true":"false",this._hasSubmenu?"menu":s,this._hasSubmenu?String(this._submenuExpanded):s,this._hasSubmenu?"true":"false",this._hasIcon?"false":"true",this._onIconSlotChange,this._onSlotChange,this._hasSubmenu?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<span part=\"chevron\" class=\"chevron\" aria-hidden=\"true\">\n <nile-glyph name=\"ng-chevron-right\" size=\"16\"></nile-glyph>\n </span>"]))):"");}}],[{key:"styles",get:function get(){return[r];}}]);}(o));t([i({attribute:!0,type:String,reflect:!0})],l.prototype,"value",void 0),t([i({attribute:!0,type:Boolean,reflect:!0})],l.prototype,"disabled",void 0),t([a()],l.prototype,"_hasSubmenu",void 0),t([a()],l.prototype,"_hasIcon",void 0),t([a()],l.prototype,"_submenuExpanded",void 0),_export("N",l=t([n("nile-context-menu-item")],l));}};});
2
+ //# sourceMappingURL=nile-context-menu-item.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-context-menu-item.cjs.js","sources":["../../../src/nile-context-menu-item/nile-context-menu-item.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2026\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { html, CSSResultArray, TemplateResult, nothing } from 'lit';\nimport { customElement, property, state } from 'lit/decorators.js';\nimport { styles } from './nile-context-menu-item.css';\nimport NileElement from '../internal/nile-element';\n\n//Data passed to an item's `onSelect` callback. Matches the `nile-context-menu:select` event detail.\nexport interface NileContextMenuItemSelectDetail {\n id: string;\n value: string;\n name: string;\n target: Element | null;\n originalEvent: Event | null;\n}\n\nexport type NileContextMenuItemSelectHandler = (\n detail: NileContextMenuItemSelectDetail\n) => void;\n\n/**\n * Nile context-menu item. A clickable entry inside `nile-context-menu`.\n *\n * @tag nile-context-menu-item\n *\n * @slot - Default slot for the visible label.\n * @slot icon - Optional leading icon (e.g. a `<nile-glyph slot=\"icon\">`).\n */\n@customElement('nile-context-menu-item')\nexport class NileContextMenuItem extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ attribute: true, type: String, reflect: true }) value = '';\n\n @property({ attribute: true, type: Boolean, reflect: true }) disabled = false;\n\n public onSelect?: NileContextMenuItemSelectHandler;\n\n @state() private _hasSubmenu = false;\n\n @state() private _hasIcon = false;\n\n @state() private _submenuExpanded = false;\n\n public setSubmenuExpanded(expanded: boolean): void {\n this._submenuExpanded = expanded;\n }\n\n public override focus(options?: FocusOptions): void {\n const inner = this.shadowRoot?.querySelector('.item') as HTMLElement | null;\n inner?.focus(options);\n }\n\n public get hasSubmenu(): boolean {\n return this._hasSubmenu;\n }\n\n private _onSlotChange = (e: Event): void => {\n const slot = e.target as HTMLSlotElement;\n const nodes = slot.assignedElements({ flatten: true });\n this._hasSubmenu = nodes.some(\n n => n.tagName.toLowerCase() === 'nile-context-submenu'\n );\n };\n\n private _onIconSlotChange = (e: Event): void => {\n const slot = e.target as HTMLSlotElement;\n this._hasIcon = slot.assignedNodes({ flatten: true }).some(\n n => n.nodeType === Node.ELEMENT_NODE || (n.textContent ?? '').trim() !== ''\n );\n };\n\n public render(): TemplateResult {\n return html`\n <div\n part=\"item\"\n class=\"item\"\n role=\"menuitem\"\n tabindex=\"-1\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-haspopup=${this._hasSubmenu ? 'menu' : nothing}\n aria-expanded=${this._hasSubmenu ? String(this._submenuExpanded) : nothing}\n data-has-submenu=${this._hasSubmenu ? 'true' : 'false'}\n >\n <span part=\"icon\" class=\"icon\" data-empty=${this._hasIcon ? 'false' : 'true'}>\n <slot name=\"icon\" @slotchange=${this._onIconSlotChange}></slot>\n </span>\n <span part=\"label\" class=\"label\"><slot @slotchange=${this._onSlotChange}></slot></span>\n ${this._hasSubmenu\n ? html`<span part=\"chevron\" class=\"chevron\" aria-hidden=\"true\">\n <nile-glyph name=\"ng-chevron-right\" size=\"16\"></nile-glyph>\n </span>`\n : ''}\n </div>\n `;\n }\n}\n\nexport default NileContextMenuItem;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-context-menu-item': NileContextMenuItem;\n }\n}\n"],"names":["NileContextMenuItem","l","constructor","this","value","disabled","_hasSubmenu","_hasIcon","_submenuExpanded","_onSlotChange","e","nodes","target","assignedElements","flatten","some","n","tagName","toLowerCase","_onIconSlotChange","slot","assignedNodes","nodeType","Node","ELEMENT_NODE","textContent","_t$textContent","trim","_this","_inherits","_o","_createClass","key","setSubmenuExpanded","expanded","focus","options","_this$shadowRoot","inner","shadowRoot","querySelector","get","render","html","_templateObject","_taggedTemplateLiteral","nothing","String","_templateObject2","__decorate","styles","NileElement","property","attribute","type","reflect","prototype","Boolean","state","customElement"],"mappings":"wgHAkCaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAKuDC,KAAAA,CAAKC,KAAAA,CAAG,EAEPD,CAAAA,KAAAA,CAAQE,QAAG,CAAA,CAAA,CAAA,CAIvDF,KAAAA,CAAWG,WAAG,CAAA,CAAA,CAAA,CAEdH,KAAAA,CAAQI,QAAAA,CAAAA,CAAG,CAEXJ,CAAAA,KAAAA,CAAgBK,gBAAG,CAAA,CAAA,CAAA,CAe5BL,KAAAA,CAAAM,aAAAA,CAAiBC,SAAAA,CACvB,CAAA,CAAA,GACMC,CAAAA,CADOD,CAAAA,CAAAA,CAAEE,MACIC,CAAAA,gBAAAA,CAAiB,CAAEC,OAAAA,CAAAA,CAAS,CAC/CX,CAAAA,CAAAA,CAAAA,KAAAA,CAAKG,WAAcK,CAAAA,CAAAA,CAAMI,IACvBC,CAAAA,SAAAA,CAAAA,QAAiC,sBAA5BA,GAAAA,CAAAA,CAAEC,OAAQC,CAAAA,WAAAA,CAAAA,CAAAA,EAAAA,CAChB,EAGKf,CAAAA,KAAAA,CAAAgB,kBAAqBT,SAAAA,CAC3B,CAAA,CAAA,GAAMU,CAAAA,CAAOV,CAAAA,CAAAA,CAAEE,MACfT,CAAAA,KAAAA,CAAKI,QAAWa,CAAAA,CAAAA,CAAKC,aAAc,CAAA,CAAEP,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQC,IACpDC,CAAAA,SAAAA,CAAAA,MAAAA,cAAAA,OAAKA,CAAAA,CAAEM,CAAAA,QAAAA,GAAaC,IAAKC,CAAAA,YAAAA,EAAiD,EAAhCR,GAAAA,E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HqC,CAAI,CAAAK,gBAAA,GAAAA,gBAAA,CAAAH,sBAAA,2KAGJ,EAAA,EAGT,CA/D2DI,KAAAA,GAAAA,UAAAA,GAAAA,CAJrD,SAAAR,IAAA,CACL,CAAA,MAAO,CAACS,CAAAA,CACT,EAcM,MAjBgCC,CAAAA,GAKqBF,CAAAA,CAAA,CAA3DG,CAAAA,CAAS,CAAEC,SAAAA,CAAAA,CAAW,EAAMC,IAAMP,CAAAA,MAAAA,CAAQQ,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmBvD,CAAAwD,CAAAA,SAAAA,CAAA,YAAA,EAEVP,CAAAA,CAAAA,CAAAA,CAAA,CAA5DG,CAAAA,CAAS,CAAEC,SAAAA,CAAAA,CAAW,CAAMC,CAAAA,IAAAA,CAAMG,OAASF,CAAAA,OAAAA,CAAAA,CAAS,CAAyBvD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwD,SAAA,CAAA,UAAA,CAAA,IAAA,IAI7DP,CAAA,CAAA,CAAhBS,CAAoC1D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwD,SAAA,CAAA,aAAA,CAAA,IAAA,IAEpBP,CAAA,CAAA,CAAhBS,CAAiC1D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwD,SAAA,CAAA,UAAA,CAAA,IAAA,IAEjBP,CAAA,CAAA,CAAhBS,CAAyC1D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAwD,SAAA,CAAA,kBAAA,CAAA,IAAA,EAf/BxD,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAmBiD,CAAA,CAAA,CAD/BU,CAAc,CAAA,wBAAA,CAAA,CAAA,CACF3D"}
@@ -0,0 +1,2 @@
1
+ System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,n;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",n=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host {\n box-sizing: border-box;\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n .item {\n position: relative;\n display: flex;\n align-items: center;\n min-height: 40px;\n padding: var(--nile-spacing-none, var(--ng-spacing-none)) var(--nile-spacing-xl, var(--ng-spacing-xl));\n font-family: inherit;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n letter-spacing: normal;\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n transition: 150ms fill;\n }\n\n .item:hover,\n .item:focus,\n .item:focus-visible {\n outline: none;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-hover));\n }\n\n .item[aria-disabled='true'] {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .icon {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n margin-right: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .icon[data-empty='true'] {\n display: none;\n }\n\n .label {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .chevron {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n margin-left: var(--nile-spacing-md, var(--ng-spacing-md));\n line-height: 1;\n opacity: 0.6;\n }\n"]))));}};});
2
+ //# sourceMappingURL=nile-context-menu-item.css.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-context-menu-item.css.cjs.js","sources":["../../../src/nile-context-menu-item/nile-context-menu-item.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2026\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 box-sizing: border-box;\n display: block;\n -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));\n -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));\n text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));\n }\n\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n .item {\n position: relative;\n display: flex;\n align-items: center;\n min-height: 40px;\n padding: var(--nile-spacing-none, var(--ng-spacing-none)) var(--nile-spacing-xl, var(--ng-spacing-xl));\n font-family: inherit;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));\n letter-spacing: normal;\n color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));\n cursor: pointer;\n white-space: nowrap;\n user-select: none;\n transition: 150ms fill;\n }\n\n .item:hover,\n .item:focus,\n .item:focus-visible {\n outline: none;\n background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-hover));\n }\n\n .item[aria-disabled='true'] {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n }\n\n .icon {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n margin-right: var(--nile-spacing-md, var(--ng-spacing-md));\n }\n\n .icon[data-empty='true'] {\n display: none;\n }\n\n .label {\n flex: 1 1 auto;\n min-width: 0;\n }\n\n .chevron {\n flex: 0 0 auto;\n display: inline-flex;\n align-items: center;\n margin-left: var(--nile-spacing-md, var(--ng-spacing-md));\n line-height: 1;\n opacity: 0.6;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTASaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -0,0 +1,72 @@
1
+ import{css as e}from"lit";const n=e`
2
+ :host {
3
+ box-sizing: border-box;
4
+ display: block;
5
+ -webkit-font-smoothing: var(--nile-webkit-font-smoothing, var(--ng-webkit-font-smoothing));
6
+ -moz-osx-font-smoothing: var(--nile-moz-osx-font-smoothing, var(--ng-moz-osx-font-smoothing));
7
+ text-rendering: var(--nile-text-rendering, var(--ng-text-rendering));
8
+ }
9
+
10
+ :host *,
11
+ :host *::before,
12
+ :host *::after {
13
+ box-sizing: inherit;
14
+ }
15
+
16
+ .item {
17
+ position: relative;
18
+ display: flex;
19
+ align-items: center;
20
+ min-height: 40px;
21
+ padding: var(--nile-spacing-none, var(--ng-spacing-none)) var(--nile-spacing-xl, var(--ng-spacing-xl));
22
+ font-family: inherit;
23
+ font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));
24
+ font-weight: var(--nile-font-weight-regular, var(--ng-font-weight-semibold));
25
+ line-height: var(--nile-line-height-1-8, var(--ng-line-height-text-md));
26
+ letter-spacing: normal;
27
+ color: var(--nile-colors-text-default, var(--ng-colors-text-secondary-700));
28
+ cursor: pointer;
29
+ white-space: nowrap;
30
+ user-select: none;
31
+ transition: 150ms fill;
32
+ }
33
+
34
+ .item:hover,
35
+ .item:focus,
36
+ .item:focus-visible {
37
+ outline: none;
38
+ background-color: var(--nile-colors-neutral-100, var(--ng-colors-bg-primary-hover));
39
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-secondary-hover));
40
+ }
41
+
42
+ .item[aria-disabled='true'] {
43
+ opacity: 0.5;
44
+ cursor: not-allowed;
45
+ pointer-events: none;
46
+ }
47
+
48
+ .icon {
49
+ flex: 0 0 auto;
50
+ display: inline-flex;
51
+ align-items: center;
52
+ margin-right: var(--nile-spacing-md, var(--ng-spacing-md));
53
+ }
54
+
55
+ .icon[data-empty='true'] {
56
+ display: none;
57
+ }
58
+
59
+ .label {
60
+ flex: 1 1 auto;
61
+ min-width: 0;
62
+ }
63
+
64
+ .chevron {
65
+ flex: 0 0 auto;
66
+ display: inline-flex;
67
+ align-items: center;
68
+ margin-left: var(--nile-spacing-md, var(--ng-spacing-md));
69
+ line-height: 1;
70
+ opacity: 0.6;
71
+ }
72
+ `;export{n as s};