@aquera/nile-elements 1.5.9 → 1.6.1

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 (111) hide show
  1. package/README.md +6 -0
  2. package/dist/index.cjs.js +1 -1
  3. package/dist/index.esm.js +1 -1
  4. package/dist/index.js +382 -227
  5. package/dist/nile-floating-panel/index.cjs.js +1 -1
  6. package/dist/nile-floating-panel/index.esm.js +1 -1
  7. package/dist/nile-floating-panel/nile-floating-panel.cjs.js +1 -1
  8. package/dist/nile-floating-panel/nile-floating-panel.cjs.js.map +1 -1
  9. package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js +1 -1
  10. package/dist/nile-floating-panel/nile-floating-panel.css.cjs.js.map +1 -1
  11. package/dist/nile-floating-panel/nile-floating-panel.css.esm.js +137 -21
  12. package/dist/nile-floating-panel/nile-floating-panel.esm.js +1 -1
  13. package/dist/nile-lite-tooltip/index.cjs.js +1 -1
  14. package/dist/nile-lite-tooltip/index.esm.js +1 -1
  15. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js +1 -1
  16. package/dist/nile-lite-tooltip/nile-lite-tooltip.cjs.js.map +1 -1
  17. package/dist/nile-lite-tooltip/nile-lite-tooltip.esm.js +1 -1
  18. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js +1 -1
  19. package/dist/nile-rich-text-editor/nile-rich-text-editor.cjs.js.map +1 -1
  20. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js +1 -1
  21. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.cjs.js.map +1 -1
  22. package/dist/nile-rich-text-editor/nile-rich-text-editor.css.esm.js +24 -0
  23. package/dist/nile-rich-text-editor/nile-rich-text-editor.esm.js +1 -1
  24. package/dist/nile-rich-text-editor/nile-rte-link.cjs.js +1 -1
  25. package/dist/nile-rich-text-editor/nile-rte-link.cjs.js.map +1 -1
  26. package/dist/nile-rich-text-editor/nile-rte-link.esm.js +59 -44
  27. package/dist/nile-rich-text-editor/utils/inline-utils.cjs.js +1 -1
  28. package/dist/nile-rich-text-editor/utils/inline-utils.cjs.js.map +1 -1
  29. package/dist/nile-rich-text-editor/utils/inline-utils.esm.js +1 -1
  30. package/dist/src/index.d.ts +1 -1
  31. package/dist/src/index.js +1 -1
  32. package/dist/src/index.js.map +1 -1
  33. package/dist/src/nile-floating-panel/index.js.map +1 -1
  34. package/dist/src/nile-floating-panel/nile-floating-panel.css.d.ts +1 -1
  35. package/dist/src/nile-floating-panel/nile-floating-panel.css.js +147 -20
  36. package/dist/src/nile-floating-panel/nile-floating-panel.css.js.map +1 -1
  37. package/dist/src/nile-floating-panel/nile-floating-panel.d.ts +90 -24
  38. package/dist/src/nile-floating-panel/nile-floating-panel.js +478 -159
  39. package/dist/src/nile-floating-panel/nile-floating-panel.js.map +1 -1
  40. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js +24 -0
  41. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.css.js.map +1 -1
  42. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.d.ts +6 -0
  43. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js +62 -24
  44. package/dist/src/nile-rich-text-editor/nile-rich-text-editor.js.map +1 -1
  45. package/dist/src/nile-rich-text-editor/nile-rte-link.d.ts +12 -0
  46. package/dist/src/nile-rich-text-editor/nile-rte-link.js +239 -130
  47. package/dist/src/nile-rich-text-editor/nile-rte-link.js.map +1 -1
  48. package/dist/src/nile-rich-text-editor/nile-rte-link.test.d.ts +1 -0
  49. package/dist/src/nile-rich-text-editor/nile-rte-link.test.js +469 -0
  50. package/dist/src/nile-rich-text-editor/nile-rte-link.test.js.map +1 -0
  51. package/dist/src/nile-rich-text-editor/utils/inline-utils.js +13 -4
  52. package/dist/src/nile-rich-text-editor/utils/inline-utils.js.map +1 -1
  53. package/dist/src/version.js +1 -1
  54. package/dist/src/version.js.map +1 -1
  55. package/dist/tippy.esm-57628c2b.esm.js +1 -0
  56. package/dist/tippy.esm-78baa8f2.cjs.js +2 -0
  57. package/dist/tippy.esm-78baa8f2.cjs.js.map +1 -0
  58. package/dist/tsconfig.tsbuildinfo +1 -1
  59. package/package.json +4 -3
  60. package/src/index.ts +2 -2
  61. package/src/nile-floating-panel/index.ts +0 -1
  62. package/src/nile-floating-panel/nile-floating-panel.css.ts +149 -21
  63. package/src/nile-floating-panel/nile-floating-panel.ts +489 -190
  64. package/src/nile-rich-text-editor/nile-rich-text-editor.css.ts +24 -0
  65. package/src/nile-rich-text-editor/nile-rich-text-editor.ts +66 -26
  66. package/src/nile-rich-text-editor/nile-rte-link.test.ts +682 -0
  67. package/src/nile-rich-text-editor/nile-rte-link.ts +195 -100
  68. package/src/nile-rich-text-editor/utils/inline-utils.ts +11 -4
  69. package/vscode-html-custom-data.json +229 -25
  70. package/dist/nile-floating-panel/anchor-manager.cjs.js +0 -2
  71. package/dist/nile-floating-panel/anchor-manager.cjs.js.map +0 -1
  72. package/dist/nile-floating-panel/anchor-manager.esm.js +0 -1
  73. package/dist/nile-floating-panel/content-manager.cjs.js +0 -2
  74. package/dist/nile-floating-panel/content-manager.cjs.js.map +0 -1
  75. package/dist/nile-floating-panel/content-manager.esm.js +0 -1
  76. package/dist/nile-floating-panel/event-manager.cjs.js +0 -2
  77. package/dist/nile-floating-panel/event-manager.cjs.js.map +0 -1
  78. package/dist/nile-floating-panel/event-manager.esm.js +0 -1
  79. package/dist/nile-floating-panel/position-manager.cjs.js +0 -2
  80. package/dist/nile-floating-panel/position-manager.cjs.js.map +0 -1
  81. package/dist/nile-floating-panel/position-manager.esm.js +0 -1
  82. package/dist/nile-floating-panel/style-manager.cjs.js +0 -2
  83. package/dist/nile-floating-panel/style-manager.cjs.js.map +0 -1
  84. package/dist/nile-floating-panel/style-manager.esm.js +0 -1
  85. package/dist/nile-floating-panel/types.cjs.js +0 -2
  86. package/dist/nile-floating-panel/types.cjs.js.map +0 -1
  87. package/dist/nile-floating-panel/types.esm.js +0 -1
  88. package/dist/src/nile-floating-panel/anchor-manager.d.ts +0 -6
  89. package/dist/src/nile-floating-panel/anchor-manager.js +0 -27
  90. package/dist/src/nile-floating-panel/anchor-manager.js.map +0 -1
  91. package/dist/src/nile-floating-panel/content-manager.d.ts +0 -5
  92. package/dist/src/nile-floating-panel/content-manager.js +0 -44
  93. package/dist/src/nile-floating-panel/content-manager.js.map +0 -1
  94. package/dist/src/nile-floating-panel/event-manager.d.ts +0 -14
  95. package/dist/src/nile-floating-panel/event-manager.js +0 -52
  96. package/dist/src/nile-floating-panel/event-manager.js.map +0 -1
  97. package/dist/src/nile-floating-panel/position-manager.d.ts +0 -17
  98. package/dist/src/nile-floating-panel/position-manager.js +0 -72
  99. package/dist/src/nile-floating-panel/position-manager.js.map +0 -1
  100. package/dist/src/nile-floating-panel/style-manager.d.ts +0 -9
  101. package/dist/src/nile-floating-panel/style-manager.js +0 -44
  102. package/dist/src/nile-floating-panel/style-manager.js.map +0 -1
  103. package/dist/src/nile-floating-panel/types.d.ts +0 -11
  104. package/dist/src/nile-floating-panel/types.js +0 -2
  105. package/dist/src/nile-floating-panel/types.js.map +0 -1
  106. package/src/nile-floating-panel/anchor-manager.ts +0 -33
  107. package/src/nile-floating-panel/content-manager.ts +0 -54
  108. package/src/nile-floating-panel/event-manager.ts +0 -74
  109. package/src/nile-floating-panel/position-manager.ts +0 -102
  110. package/src/nile-floating-panel/style-manager.ts +0 -54
  111. package/src/nile-floating-panel/types.ts +0 -15
@@ -1,2 +1,2 @@
1
- System.register(["./nile-floating-panel.cjs.js","tslib","lit","lit/decorators.js","./nile-floating-panel.css.cjs.js","../internal/nile-element.cjs.js","./position-manager.cjs.js","../floating-ui.dom-007bbe96.cjs.js","./style-manager.cjs.js","./content-manager.cjs.js","./anchor-manager.cjs.js","./event-manager.cjs.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileFloatingPanelCjsJs){_export("NileFloatingPanel",_nileFloatingPanelCjsJs.N);},function(_tslib){},function(_lit){},function(_litDecoratorsJs){},function(_nileFloatingPanelCssCjsJs){},function(_internalNileElementCjsJs){},function(_positionManagerCjsJs){},function(_floatingUiDom001CjsJs){},function(_styleManagerCjsJs){},function(_contentManagerCjsJs){},function(_anchorManagerCjsJs){},function(_eventManagerCjsJs){},function(_utilitiesVisibilityManagerCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-floating-panel.cjs.js","tslib","lit/decorators.js","./nile-floating-panel.css.cjs.js","lit","../internal/nile-element.cjs.js","../tippy.esm-78baa8f2.cjs.js","../nile-lite-tooltip/utils.cjs.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileFloatingPanelCjsJs){_export("NileFloatingPanel",_nileFloatingPanelCjsJs.N);},function(_tslib){},function(_litDecoratorsJs){},function(_nileFloatingPanelCssCjsJs){},function(_lit){},function(_internalNileElementCjsJs){},function(_tippyEsm005CjsJs){},function(_nileLiteTooltipUtilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileFloatingPanel}from"./nile-floating-panel.esm.js";import"tslib";import"lit";import"lit/decorators.js";import"./nile-floating-panel.css.esm.js";import"../internal/nile-element.esm.js";import"./position-manager.esm.js";import"../floating-ui.dom-cc9126da.esm.js";import"./style-manager.esm.js";import"./content-manager.esm.js";import"./anchor-manager.esm.js";import"./event-manager.esm.js";import"../utilities/visibility-manager.esm.js";
1
+ export{N as NileFloatingPanel}from"./nile-floating-panel.esm.js";import"tslib";import"lit/decorators.js";import"./nile-floating-panel.css.esm.js";import"lit";import"../internal/nile-element.esm.js";import"../tippy.esm-57628c2b.esm.js";import"../nile-lite-tooltip/utils.esm.js";import"../utilities/visibility-manager.esm.js";
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-floating-panel.css.cjs.js","../internal/nile-element.cjs.js","./position-manager.cjs.js","./style-manager.cjs.js","./content-manager.cjs.js","./anchor-manager.cjs.js","./event-manager.cjs.js","../utilities/visibility-manager.cjs.js","../floating-ui.dom-007bbe96.cjs.js"],function(_export,_context){"use strict";var t,i,s,e,n,h,o,l,r,a,c,u,_templateObject,m;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){i=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.property;e=_litDecoratorsJs.customElement;},function(_nileFloatingPanelCssCjsJs){n=_nileFloatingPanelCssCjsJs.s;},function(_internalNileElementCjsJs){h=_internalNileElementCjsJs.N;},function(_positionManagerCjsJs){o=_positionManagerCjsJs.P;},function(_styleManagerCjsJs){l=_styleManagerCjsJs.S;},function(_contentManagerCjsJs){r=_contentManagerCjsJs.C;},function(_anchorManagerCjsJs){a=_anchorManagerCjsJs.A;},function(_eventManagerCjsJs){c=_eventManagerCjsJs.E;},function(_utilitiesVisibilityManagerCjsJs){u=_utilitiesVisibilityManagerCjsJs.V;},function(_floatingUiDom001CjsJs){}],execute:function execute(){_export("N",m=/*#__PURE__*/function(_h){function m(){var _this;_classCallCheck(this,m);_this=_callSuper(this,m,arguments),_this.anchor=null,_this.position="bottom",_this.open=!1,_this.closeOnOutsideClick=!0,_this.enableVisibilityEffect=!0,_this.enableTabClose=!1,_this.panelContainer=null,_this.positionManager=null,_this.styleManager=new l(),_this.eventManager=new c(_assertThisInitialized(_this)),_this.handleSlotChange=function(){_this.open&&_this.panelContainer&&_this.updatePanelContent();};return _this;}_inherits(m,_h);return _createClass(m,[{key:"connectedCallback",value:function connectedCallback(){_superPropGet(m,"connectedCallback",this,3)([]);}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$visibilityManag;_superPropGet(m,"disconnectedCallback",this,3)([]),this.cleanupPanel(),(_this$visibilityManag=this.visibilityManager)===null||_this$visibilityManag===void 0?void 0:_this$visibilityManag.cleanup();}},{key:"updated",value:function updated(t){var _this$visibilityManag2,_this$visibilityManag3;_superPropGet(m,"updated",this,3)([t]),t.has("open")&&(this.open?(this.emit("nile-show"),this.setupPanel(),(_this$visibilityManag2=this.visibilityManager)===null||_this$visibilityManag2===void 0?void 0:_this$visibilityManag2.setup()):(this.emit("nile-hide"),(_this$visibilityManag3=this.visibilityManager)!==null&&_this$visibilityManag3!==void 0&&_this$visibilityManag3.cleanup(),this.cleanupPanel())),t.has("closeOnOutsideClick")&&this.open&&this.panelContainer&&this.eventManager.updateOutsideClickHandler(this.panelContainer,this.closeOnOutsideClick,this.open),t.has("anchor")&&this.open&&(this.cleanupPanel(),this.setupPanel()),(t.has("enableVisibilityEffect")||t.has("enableTabClose"))&&this.open&&this.setupVisibilityManager(),t.has("position")&&this.open&&this.positionManager&&this.positionManager.updatePosition(this.position),t.has("open")&&this.open&&this.panelContainer&&this.updatePanelContent();}},{key:"setupPanel",value:function setupPanel(){var _this2=this;if(this.panelContainer)return;var t=this.constructor.styles;t&&this.styleManager.injectStyles(t),this.panelContainer=document.createElement("div"),this.panelContainer.setAttribute("part","panel"),this.panelContainer.className="nile-floating-panel__container",this.updatePanelContent();var i=a.resolveAnchor(this.anchor);a.appendToAnchor(i,this.panelContainer),requestAnimationFrame(function(){_this2.setupPositionManager(),_this2.setupEventHandlers(),_this2.setupVisibilityManager();});}},{key:"setupEventHandlers",value:function setupEventHandlers(){var _this3=this;this.panelContainer&&this.eventManager.setupOutsideClickHandler(this.panelContainer,this.closeOnOutsideClick,this.open,function(){_this3.open=!1;});}},{key:"setupPositionManager",value:function setupPositionManager(){if(!this.panelContainer)return;var t=this.findTriggerElement()||this;this.positionManager=new o(t,this.panelContainer,this.position),this.positionManager.reposition(),this.positionManager.setupAutoUpdate();}},{key:"findTriggerElement",value:function findTriggerElement(){var t=this.nextElementSibling;for(;t;){if(t instanceof HTMLElement)return t;t=t.nextElementSibling;}var i=this.previousElementSibling;for(;i;){if(i instanceof HTMLElement)return i;i=i.previousElementSibling;}return null;}},{key:"setupVisibilityManager",value:function setupVisibilityManager(){var _this4=this;if(!this.enableVisibilityEffect)return;var t=this.findTriggerElement();this.visibilityManager&&this.visibilityManager.cleanup(),this.visibilityManager=new u({host:this,target:t||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:function isOpen(){return _this4.open;},onAnchorOutOfView:function onAnchorOutOfView(){_this4.open=!1,_this4.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"});},onDocumentHidden:function onDocumentHidden(){_this4.open=!1,_this4.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"});},emit:function emit(t,i){return _this4.emit("nile-".concat(t),i);}}),this.open&&this.visibilityManager.setup();}},{key:"updatePanelContent",value:function updatePanelContent(){var _this$shadowRoot;if(!this.panelContainer)return;var t=((_this$shadowRoot=this.shadowRoot)===null||_this$shadowRoot===void 0?void 0:_this$shadowRoot.querySelector("slot"))||null;r.updatePanelContent(this.panelContainer,t,"");}},{key:"reposition",value:function reposition(){this.positionManager&&this.positionManager.reposition();}},{key:"cleanupPanel",value:function cleanupPanel(){this.eventManager.destroy(),this.positionManager&&(this.positionManager.destroy(),this.positionManager=null),this.panelContainer&&a.removeFromAnchor(this.panelContainer),this.panelContainer=null,this.styleManager.cleanupStyles();}},{key:"render",value:function render(){return i(_templateObject||(_templateObject=_taggedTemplateLiteral([" <slot @slotchange=","></slot> "])),this.handleSlotChange);}}],[{key:"styles",get:function get(){return[n];}}]);}(h));t([s()],m.prototype,"anchor",void 0),t([s()],m.prototype,"position",void 0),t([s({type:Boolean,reflect:!0,attribute:!0})],m.prototype,"open",void 0),t([s({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:{fromAttribute:function fromAttribute(t){return!(!t||"false"===t);},toAttribute:function toAttribute(t){return t?"true":"false";}}})],m.prototype,"closeOnOutsideClick",void 0),t([s({type:Boolean,reflect:!0})],m.prototype,"enableVisibilityEffect",void 0),t([s({type:Boolean,reflect:!0})],m.prototype,"enableTabClose",void 0),_export("N",m=t([e("nile-floating-panel")],m));}};});
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/decorators.js","./nile-floating-panel.css.cjs.js","../internal/nile-element.cjs.js","../tippy.esm-78baa8f2.cjs.js","../nile-lite-tooltip/utils.cjs.js","../utilities/visibility-manager.cjs.js","lit"],function(_export,_context){"use strict";var t,i,e,s,n,h,o,r,l,a,d,_c,p;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(_litDecoratorsJs){i=_litDecoratorsJs.property;e=_litDecoratorsJs.customElement;},function(_nileFloatingPanelCssCjsJs){s=_nileFloatingPanelCssCjsJs.s;},function(_internalNileElementCjsJs){n=_internalNileElementCjsJs.N;},function(_tippyEsm005CjsJs){h=_tippyEsm005CjsJs.R;o=_tippyEsm005CjsJs.f;r=_tippyEsm005CjsJs.t;},function(_nileLiteTooltipUtilsCjsJs){l=_nileLiteTooltipUtilsCjsJs.p;a=_nileLiteTooltipUtilsCjsJs.a;},function(_utilitiesVisibilityManagerCjsJs){d=_utilitiesVisibilityManagerCjsJs.V;},function(_lit){}],execute:function execute(){_export("N",p=_c=/*#__PURE__*/function(_n){function c(){var _this;_classCallCheck(this,c);_this=_callSuper(this,c,arguments),_this.placement="bottom",_this.trigger="click",_this.distance=12,_this.skidding=0,_this.arrow="round",_this.animation="fade",_this.duration=200,_this.delay=0,_this.interactive=!0,_this.interactiveBorder=2,_this.maxWidth="none",_this.zIndex=9999,_this.followCursor=!1,_this.hideOnClick=!0,_this.inertia=!1,_this.allowHTML=!1,_this.flip=!0,_this["for"]=null,_this.open=!1,_this.preventOverlayClose=!1,_this.title="",_this.disabled=!1,_this.group=null,_this.closeOnEscape=!0,_this.enableVisibilityEffect=!1,_this.enableTabClose=!1,_this.tippyInstance=null,_this.panelContainer=null,_this.anchorEl=null,_this._suppressOpenWatch=!1,_this._panelId="nile-fp-".concat(Math.random().toString(36).slice(2,9)),_this._boundEscHandler=_this._handleEscapeKey.bind(_assertThisInitialized(_this)),_this._pendingShowListener=null,_this._pendingHideListener=null;return _this;}_inherits(c,_n);return _createClass(c,[{key:"createRenderRoot",value:function createRenderRoot(){return this;}},{key:"firstUpdated",value:function firstUpdated(){var _this2=this;this._buildDOM(),this._attachTippy(),this._joinGroup(),this.visibilityManager=new d({host:this,target:this.anchorEl||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:function isOpen(){return _this2.open;},onAnchorOutOfView:function onAnchorOutOfView(){var _this2$tippyInstance;_this2._setOpen(!1),(_this2$tippyInstance=_this2.tippyInstance)!==null&&_this2$tippyInstance!==void 0&&_this2$tippyInstance.hide(),_this2.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"});},onDocumentHidden:function onDocumentHidden(){var _this2$tippyInstance2;_this2._setOpen(!1),(_this2$tippyInstance2=_this2.tippyInstance)!==null&&_this2$tippyInstance2!==void 0&&_this2$tippyInstance2.hide(),_this2.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"});},emit:function emit(t,i){return _this2.emit("nile-".concat(t),i);}}),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){var _this$visibilityManag;_superPropGet(c,"disconnectedCallback",this,3)([]),this._cleanupPendingShowListener(),this._cleanupPendingHideListener(),(_this$visibilityManag=this.visibilityManager)!==null&&_this$visibilityManag!==void 0&&_this$visibilityManag.cleanup(),this._leaveGroup(),this._removeEscListener(),this._destroyTippy(),this.emit("nile-destroy");}},{key:"updated",value:function updated(t){var _this$visibilityManag2,_this3=this,_this$visibilityManag3,_this$tippyInstance;if(_superPropGet(c,"updated",this,3)([t]),!this.panelContainer)return;t.has("open")&&!this._suppressOpenWatch&&(this.open?((_this$visibilityManag2=this.visibilityManager)!==null&&_this$visibilityManag2!==void 0&&_this$visibilityManag2.setup(),queueMicrotask(function(){var _this3$tippyInstance;return(_this3$tippyInstance=_this3.tippyInstance)===null||_this3$tippyInstance===void 0?void 0:_this3$tippyInstance.show();})):((_this$visibilityManag3=this.visibilityManager)!==null&&_this$visibilityManag3!==void 0&&_this$visibilityManag3.cleanup(),(_this$tippyInstance=this.tippyInstance)===null||_this$tippyInstance===void 0?void 0:_this$tippyInstance.hide())),t.has("group")&&(this._leaveGroup(t.get("group")),this._joinGroup());["placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","preventOverlayClose","disabled","width","height"].some(function(i){return t.has(i);})&&this._attachTippy();}},{key:"show",value:function show(){var _this4=this;return this.open=!0,new Promise(function(t){_this4._cleanupPendingShowListener();var i=function i(){_this4._pendingShowListener=null,t();};_this4._pendingShowListener=i,_this4.addEventListener("nile-after-show",i,{once:!0});});}},{key:"hide",value:function hide(){var _this5=this;return this.open=!1,new Promise(function(t){_this5._cleanupPendingHideListener();var i=function i(){_this5._pendingHideListener=null,t();};_this5._pendingHideListener=i,_this5.addEventListener("nile-after-hide",i,{once:!0});});}},{key:"_cleanupPendingShowListener",value:function _cleanupPendingShowListener(){this._pendingShowListener&&(this.removeEventListener("nile-after-show",this._pendingShowListener),this._pendingShowListener=null);}},{key:"_cleanupPendingHideListener",value:function _cleanupPendingHideListener(){this._pendingHideListener&&(this.removeEventListener("nile-after-hide",this._pendingHideListener),this._pendingHideListener=null);}},{key:"toggle",value:function toggle(){this.open=!this.open;}},{key:"refresh",value:function refresh(){this._attachTippy();}},{key:"getCurrentPlacement",value:function getCurrentPlacement(){var _this$tippyInstance2,_i$dataset$placement;var t=(_this$tippyInstance2=this.tippyInstance)===null||_this$tippyInstance2===void 0?void 0:_this$tippyInstance2.popper,i=t===null||t===void 0?void 0:t.querySelector(".tippy-box");return(_i$dataset$placement=i===null||i===void 0?void 0:i.dataset.placement)!==null&&_i$dataset$placement!==void 0?_i$dataset$placement:this.placement;}},{key:"isPositioningOptimal",value:function isPositioningOptimal(){return this.getCurrentPlacement()===this.placement;}},{key:"_joinGroup",value:function _joinGroup(){if(!this.group)return;var t=_c._groups.get(this.group);t||(t=new Set(),_c._groups.set(this.group,t)),t.add(this);}},{key:"_leaveGroup",value:function _leaveGroup(t){var i=t!==null&&t!==void 0?t:this.group;if(!i)return;var e=_c._groups.get(i);e&&(e["delete"](this),0===e.size&&_c._groups["delete"](i));}},{key:"_hideGroupSiblings",value:function _hideGroupSiblings(){var _this6=this;if(!this.group)return;var t=_c._groups.get(this.group);t&&t.forEach(function(t){var _t$tippyInstance;t!==_this6&&t.open&&(t._setOpen(!1),(_t$tippyInstance=t.tippyInstance)===null||_t$tippyInstance===void 0?void 0:_t$tippyInstance.hide());});}},{key:"_addEscListener",value:function _addEscListener(){this.closeOnEscape&&document.addEventListener("keydown",this._boundEscHandler);}},{key:"_removeEscListener",value:function _removeEscListener(){document.removeEventListener("keydown",this._boundEscHandler);}},{key:"_handleEscapeKey",value:function _handleEscapeKey(t){var _this$tippyInstance3;"Escape"===t.key&&this.open&&(this._setOpen(!1),(_this$tippyInstance3=this.tippyInstance)===null||_this$tippyInstance3===void 0?void 0:_this$tippyInstance3.hide());}},{key:"_applyAria",value:function _applyAria(){this.anchorEl&&this.panelContainer&&(this.panelContainer.setAttribute("role","dialog"),this.panelContainer.id=this._panelId,this.anchorEl.setAttribute("aria-haspopup","dialog"),this._syncAriaExpanded());}},{key:"_syncAriaExpanded",value:function _syncAriaExpanded(){var _this$anchorEl,_this$anchorEl2,_this$anchorEl3;(_this$anchorEl=this.anchorEl)!==null&&_this$anchorEl!==void 0&&_this$anchorEl.setAttribute("aria-expanded",String(this.open)),this.open?(_this$anchorEl2=this.anchorEl)===null||_this$anchorEl2===void 0?void 0:_this$anchorEl2.setAttribute("aria-describedby",this._panelId):(_this$anchorEl3=this.anchorEl)===null||_this$anchorEl3===void 0?void 0:_this$anchorEl3.removeAttribute("aria-describedby");}},{key:"_buildDOM",value:function _buildDOM(){var t=Array.from(this.childNodes);this.anchorEl=null;var i=[],e=[],s=[];var n=!1;for(var _i=0,_t=t;_i<_t.length;_i++){var _h=_t[_i];if(_h instanceof HTMLElement){var _t2=_h.getAttribute("slot");if("title"===_t2){_h.removeAttribute("slot"),i.push(_h);continue;}if("action"===_t2){_h.removeAttribute("slot"),e.push(_h);continue;}if(!n&&!this["for"]){this.anchorEl=_h,n=!0;continue;}}s.push(_h);}if(this["for"]){var _t3=document.getElementById(this["for"]);_t3&&(this.anchorEl=_t3);}for(;this.firstChild;)this.removeChild(this.firstChild);this.anchorEl&&!this["for"]&&this.appendChild(this.anchorEl),this.panelContainer=document.createElement("div"),this.panelContainer.className="nile-floating-panel__content",this.panelContainer.style.display="none";var h=document.createElement("div");if(h.className="nile-floating-panel__body",i.length>0||this.title){var _t4=document.createElement("div");_t4.className="nile-floating-panel__title",this.title?_t4.textContent=this.title:i.forEach(function(i){return _t4.appendChild(i);}),h.appendChild(_t4);}if(s.length>0){var _t5=document.createElement("div");_t5.className="nile-floating-panel__main",s.forEach(function(i){return _t5.appendChild(i);}),h.appendChild(_t5);}if(e.length>0){var _t6=document.createElement("div");_t6.className="nile-floating-panel__action",e.forEach(function(i){return _t6.appendChild(i);}),h.appendChild(_t6);}this.panelContainer.appendChild(h),this.appendChild(this.panelContainer),this._applyAria();}},{key:"_resolveArrow",value:function _resolveArrow(){switch(this.arrow){case"round":return h;case"none":return!1;default:return!0;}}},{key:"_setOpen",value:function _setOpen(t){this._suppressOpenWatch=!0,this.open=t,this._syncAriaExpanded(),this._suppressOpenWatch=!1;}},{key:"_getEffectiveDuration",value:function _getEffectiveDuration(){return _c.prefersReducedMotion?0:l(this.duration);}},{key:"_getEffectiveAnimation",value:function _getEffectiveAnimation(){return!_c.prefersReducedMotion&&this.animation;}},{key:"_attachTippy",value:function _attachTippy(){var _this7=this;if(this._destroyTippy(),this.disabled||!this.anchorEl||!this.panelContainer)return;var t=a(this.followCursor),i=!this.preventOverlayClose&&this.hideOnClick,e={content:this.panelContainer,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"floating-panel",animation:this._getEffectiveAnimation(),interactive:this.interactive,arrow:this._resolveArrow(),duration:this._getEffectiveDuration(),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:i,inertia:!_c.prefersReducedMotion&&this.inertia,interactiveBorder:this.interactiveBorder,appendTo:document.body,followCursor:t,plugins:t?[o]:[],popperOptions:{modifiers:[{name:"flip",enabled:this.flip}]},onMount:function onMount(){_this7.panelContainer&&(_this7.panelContainer.style.display="");},onShow:function onShow(t){_this7.panelContainer&&(_this7.panelContainer.style.display="");var i=t.popper.querySelector(".tippy-content");i&&(_this7.width&&(i.style.width=_this7.width),_this7.height&&(i.style.height=_this7.height,i.style.overflow="auto")),_this7._hideGroupSiblings(),_this7._setOpen(!0),_this7._addEscListener(),_this7.dispatchEvent(new CustomEvent("nile-show",{detail:{instance:t,target:t.reference}})),_this7.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!0,instance:t,target:t.reference}}));},onShown:function onShown(t){_this7.dispatchEvent(new CustomEvent("nile-after-show",{detail:{instance:t,target:t.reference}}));},onHide:function onHide(t){_this7._setOpen(!1),_this7._removeEscListener(),_this7.dispatchEvent(new CustomEvent("nile-hide",{detail:{instance:t,target:t.reference}})),_this7.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!1,instance:t,target:t.reference}}));},onHidden:function onHidden(t){_this7.panelContainer&&(_this7.panelContainer.style.display="none"),_this7.dispatchEvent(new CustomEvent("nile-after-hide",{detail:{instance:t,target:t.reference}}));}};this.tippyInstance=r(this.anchorEl,e),this.open&&queueMicrotask(function(){var _this7$tippyInstance;return(_this7$tippyInstance=_this7.tippyInstance)===null||_this7$tippyInstance===void 0?void 0:_this7$tippyInstance.show();});}},{key:"_destroyTippy",value:function _destroyTippy(){this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.panelContainer&&(this.panelContainer.style.display="none",this.panelContainer.parentElement!==this&&this.appendChild(this.panelContainer));}}],[{key:"prefersReducedMotion",get:function get(){return _c._reducedMotionQuery||(_c._reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)")),_c._reducedMotionQuery.matches;}},{key:"styles",get:function get(){return[s];}}]);}(n));p._groups=new Map(),p._reducedMotionQuery=null,t([i({type:String})],p.prototype,"placement",void 0),t([i({type:String})],p.prototype,"trigger",void 0),t([i({type:Number})],p.prototype,"distance",void 0),t([i({type:Number})],p.prototype,"skidding",void 0),t([i({type:String,reflect:!0})],p.prototype,"arrow",void 0),t([i({type:String,reflect:!0})],p.prototype,"animation",void 0),t([i({type:String,reflect:!0})],p.prototype,"duration",void 0),t([i({type:String,reflect:!0})],p.prototype,"delay",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"interactive",void 0),t([i({type:Number,reflect:!0})],p.prototype,"interactiveBorder",void 0),t([i({type:String,reflect:!0})],p.prototype,"maxWidth",void 0),t([i({type:Number,reflect:!0})],p.prototype,"zIndex",void 0),t([i({type:String,reflect:!0})],p.prototype,"followCursor",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"hideOnClick",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"inertia",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"allowHTML",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"flip",void 0),t([i({type:String,attribute:"for"})],p.prototype,"for",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"open",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"preventOverlayClose",void 0),t([i({type:String,reflect:!0})],p.prototype,"title",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([i({type:String,reflect:!0})],p.prototype,"width",void 0),t([i({type:String,reflect:!0})],p.prototype,"height",void 0),t([i({type:String,reflect:!0})],p.prototype,"group",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"closeOnEscape",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableVisibilityEffect",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableTabClose",void 0),_export("N",p=_c=t([e("nile-floating-panel")],p));}};});
2
2
  //# sourceMappingURL=nile-floating-panel.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-floating-panel.cjs.js","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"sourcesContent":["import {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n PropertyValues,\n} from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport { PositionManager } from './position-manager';\nimport { StyleManager } from './style-manager';\nimport { ContentManager } from './content-manager';\nimport { AnchorManager } from './anchor-manager';\nimport { EventManager } from './event-manager';\nimport { VisibilityManager } from '../utilities/visibility-manager';\nimport type { FloatingPanelPosition, FloatingPanelAnchor } from './types';\n\n/**\n * Nile floating panel component.\n *\n * @tag nile-floating-panel\n * @event nile-show - Emitted when the panel opens.\n * @event nile-hide - Emitted when the panel closes.\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @property() anchor: FloatingPanelAnchor = null;\n\n @property() position: FloatingPanelPosition = 'bottom';\n\n @property({ type: Boolean, reflect: true, attribute: true }) open = false;\n\n @property({\n type: Boolean,\n reflect: true,\n attribute: 'close-on-outside-click',\n converter: {\n fromAttribute: (value: string | null) => (!value || value === 'false' ? false : true),\n toAttribute: (value: boolean) => (value ? 'true' : 'false'),\n },\n })\n closeOnOutsideClick = true;\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = true;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n private panelContainer: HTMLElement | null = null;\n private positionManager: PositionManager | null = null;\n private styleManager: StyleManager = new StyleManager();\n private eventManager: EventManager = new EventManager(this);\n private visibilityManager?: VisibilityManager;\n\n connectedCallback() {\n super.connectedCallback();\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.cleanupPanel();\n this.visibilityManager?.cleanup();\n }\n\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties);\n\n if (changedProperties.has('open')) {\n if (this.open) {\n this.emit('nile-show');\n this.setupPanel();\n this.visibilityManager?.setup();\n } else {\n this.emit('nile-hide');\n this.visibilityManager?.cleanup();\n this.cleanupPanel();\n }\n }\n\n if (\n changedProperties.has('closeOnOutsideClick') &&\n this.open &&\n this.panelContainer\n ) {\n this.eventManager.updateOutsideClickHandler(\n this.panelContainer,\n this.closeOnOutsideClick,\n this.open\n );\n }\n\n if (changedProperties.has('anchor') && this.open) {\n this.cleanupPanel();\n this.setupPanel();\n }\n\n if (\n (changedProperties.has('enableVisibilityEffect') ||\n changedProperties.has('enableTabClose')) &&\n this.open\n ) {\n this.setupVisibilityManager();\n }\n\n if (\n changedProperties.has('position') &&\n this.open &&\n this.positionManager\n ) {\n this.positionManager.updatePosition(this.position);\n }\n\n if (changedProperties.has('open') && this.open && this.panelContainer) {\n this.updatePanelContent();\n }\n }\n\n private setupPanel() {\n if (this.panelContainer) {\n return;\n }\n\n const componentStyles = (this.constructor as typeof NileFloatingPanel)\n .styles;\n if (componentStyles) {\n this.styleManager.injectStyles(componentStyles);\n }\n\n this.panelContainer = document.createElement('div');\n this.panelContainer.setAttribute('part', 'panel');\n this.panelContainer.className = 'nile-floating-panel__container';\n\n this.updatePanelContent();\n\n const anchorElement = AnchorManager.resolveAnchor(this.anchor);\n AnchorManager.appendToAnchor(anchorElement, this.panelContainer);\n\n requestAnimationFrame(() => {\n this.setupPositionManager();\n this.setupEventHandlers();\n this.setupVisibilityManager();\n });\n }\n\n private setupEventHandlers() {\n if (!this.panelContainer) {\n return;\n }\n\n this.eventManager.setupOutsideClickHandler(\n this.panelContainer,\n this.closeOnOutsideClick,\n this.open,\n () => {\n this.open = false;\n }\n );\n }\n\n private setupPositionManager() {\n if (!this.panelContainer) {\n return;\n }\n\n const referenceElement = this.findTriggerElement() || this;\n this.positionManager = new PositionManager(\n referenceElement,\n this.panelContainer,\n this.position\n );\n\n this.positionManager.reposition();\n this.positionManager.setupAutoUpdate();\n }\n\n private findTriggerElement(): HTMLElement | null {\n // Try to find the next sibling element as the trigger\n let nextSibling = this.nextElementSibling;\n while (nextSibling) {\n if (nextSibling instanceof HTMLElement) {\n return nextSibling;\n }\n nextSibling = nextSibling.nextElementSibling;\n }\n\n // Try to find the previous sibling element\n let previousSibling = this.previousElementSibling;\n while (previousSibling) {\n if (previousSibling instanceof HTMLElement) {\n return previousSibling;\n }\n previousSibling = previousSibling.previousElementSibling;\n }\n\n return null;\n }\n\n private setupVisibilityManager(): void {\n if (!this.enableVisibilityEffect) {\n return;\n }\n\n const triggerElement = this.findTriggerElement();\n \n // Cleanup existing visibility manager if it exists\n if (this.visibilityManager) {\n this.visibilityManager.cleanup();\n }\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: triggerElement || null,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.open,\n onAnchorOutOfView: () => {\n this.open = false;\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this.open = false;\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n\n if (this.open) {\n this.visibilityManager.setup();\n }\n }\n\n private updatePanelContent() {\n if (!this.panelContainer) {\n return;\n }\n\n const slot = this.shadowRoot?.querySelector('slot') || null;\n ContentManager.updatePanelContent(this.panelContainer, slot, '');\n }\n\n private reposition() {\n if (this.positionManager) {\n this.positionManager.reposition();\n }\n }\n\n private cleanupPanel() {\n this.eventManager.destroy();\n\n if (this.positionManager) {\n this.positionManager.destroy();\n this.positionManager = null;\n }\n\n if (this.panelContainer) {\n AnchorManager.removeFromAnchor(this.panelContainer);\n }\n\n this.panelContainer = null;\n\n this.styleManager.cleanupStyles();\n }\n\n public render(): TemplateResult {\n return html` <slot @slotchange=${this.handleSlotChange}></slot> `;\n }\n\n private handleSlotChange = () => {\n if (this.open && this.panelContainer) {\n this.updatePanelContent();\n }\n };\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n"],"names":["NileFloatingPanel","_h","m","this","anchor","position","open","closeOnOutsideClick","enableVisibilityEffect","enableTabClose","panelContainer","positionManager","styleManager","StyleManager","eventManager","EventManager","handleSlotChange","updatePanelContent","_this","_inherits","_createClass","key","value","connectedCallback","super","disconnectedCallback","cleanupPanel","visibilityManager","cleanup","updated","changedProperties","has","emit","setupPanel","setup","_this$visibilityManag3","updateOutsideClickHandler","setupVisibilityManager","updatePosition","componentStyles","constructor","styles","injectStyles","document","createElement","setAttribute","className","anchorElement","AnchorManager","resolveAnchor","appendToAnchor","requestAnimationFrame","setupPositionManager","setupEventHandlers","setupOutsideClickHandler","referenceElement","findTriggerElement","PositionManager","reposition","setupAutoUpdate","nextSibling","nextElementSibling","HTMLElement","previousSibling","previousElementSibling","triggerElement","VisibilityManager","host","target","isOpen","onAnchorOutOfView","visible","reason","onDocumentHidden","event","detail","slot","shadowRoot","querySelector","ContentManager","destroy","removeFromAnchor","cleanupStyles","render","html","_templateObject","_taggedTemplateLiteral","get","NileElement","__decorate","property","prototype","type","Boolean","reflect","attribute","converter","fromAttribute","toAttribute","_export","customElement"],"mappings":"0wIA0BaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAKOC,KAAAA,CAAMC,MAAAA,CAAwB,IAE9BD,CAAAA,KAAAA,CAAQE,QAA0B,CAAA,QAAA,CAEeF,KAAAA,CAAIG,IAAAA,CAAAA,CAAG,CAWpEH,CAAAA,KAAAA,CAAmBI,mBAAG,CAAA,CAAA,CAAA,CAEsBJ,KAAAA,CAAsBK,sBAAAA,CAAAA,CAAG,EAEzBL,KAAAA,CAAcM,cAAAA,CAAAA,CAAG,CAErDN,CAAAA,KAAAA,CAAcO,cAAuB,CAAA,IAAA,CACrCP,KAAAA,CAAeQ,eAAAA,CAA2B,IAC1CR,CAAAA,KAAAA,CAAAS,YAA6B,CAAA,GAAIC,CAAAA,CACjCV,CADiCU,CACjCV,CAAAA,KAAAA,CAAAW,YAA6B,CAAA,GAAIC,CAAAA,+BA8NjCZ,CAAAA,CAAAA,KAAAA,CAAgBa,gBAAG,CAAA,UAAA,CACrBb,KAA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OAAA,GAAVA,CACpD4E,CAAAA,GAAAA,WAAAA,CAAc5E,QAAd4E,CAAAA,WAAAA,CAAc5E,CAAoBA,QAAAA,CAAAA,CAAAA,CAAQ,OAAS,OAG5BtB,GAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2F,SAAA,CAAA,qBAAA,CAAA,IAAA,EAEiBF,CAAAA,CAAAA,CAAAA,CAAA,CAA3CC,CAAAA,CAAS,CAAEE,IAAAA,CAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,CAAsC9F,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2F,SAAA,CAAA,wBAAA,CAAA,IAAA,IAE9BF,CAAA,CAAA,CAA3CC,CAAS,CAAA,CAAEE,IAAMC,CAAAA,OAAAA,CAASC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B9F,CAAA2F,CAAAA,SAAAA,CAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,CAAAQ,OAAA,KAxBxDnG,CAAiByF,CAAAA,CAAAA,CAAA,CAD7BW,CAAAA,CAAc,wBACFpG"}
1
+ {"version":3,"file":"nile-floating-panel.cjs.js","sources":["../../../src/nile-floating-panel/nile-floating-panel.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { CSSResultArray, PropertyValues } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { styles } from './nile-floating-panel.css';\nimport NileElement from '../internal/nile-element';\nimport tippy, {\n Instance,\n Props,\n roundArrow,\n followCursor as followCursorPlugin,\n} from 'tippy.js';\nimport {\n parseFollowCursor,\n parseDuration,\n} from '../nile-lite-tooltip/utils';\nimport { VisibilityManager } from '../utilities/visibility-manager.js';\n\n/**\n * Nile floating-panel component.\n *\n * A popover that supports rich content (title, body, actions).\n *\n * **Wrapper mode** (default): first child element is the trigger.\n * **For mode**: set `for=\"elementId\"` to attach to an external element.\n *\n * @tag nile-floating-panel\n *\n * @fires nile-init - Component initialized.\n * @fires nile-destroy - Component destroyed.\n * @fires nile-show - Panel opened.\n * @fires nile-hide - Panel closed.\n * @fires nile-after-show - Panel fully visible after animation.\n * @fires nile-after-hide - Panel fully hidden after animation.\n * @fires nile-toggle - Open/close transition (detail.open).\n * @fires nile-visibility-change - Hidden by scroll/tab change.\n */\n@customElement('nile-floating-panel')\nexport class NileFloatingPanel extends NileElement {\n private static _groups = new Map<string, Set<NileFloatingPanel>>();\n\n private static _reducedMotionQuery: MediaQueryList | null = null;\n\n private static get prefersReducedMotion(): boolean {\n if (!NileFloatingPanel._reducedMotionQuery) {\n NileFloatingPanel._reducedMotionQuery =\n window.matchMedia('(prefers-reduced-motion: reduce)');\n }\n return NileFloatingPanel._reducedMotionQuery.matches;\n }\n\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n protected createRenderRoot() {\n return this;\n }\n\n // ─── Tippy.js props ───\n\n @property({ type: String })\n placement:\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'right'\n | 'right-start'\n | 'right-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'auto'\n | 'auto-start'\n | 'auto-end' = 'bottom';\n\n @property({ type: String }) trigger: string = 'click';\n\n @property({ type: Number }) distance = 12;\n\n @property({ type: Number }) skidding = 0;\n\n @property({ type: String, reflect: true })\n arrow: 'round' | 'default' | 'none' = 'round';\n\n @property({ type: String, reflect: true }) animation: string = 'fade';\n\n @property({ type: String, reflect: true }) duration:\n | string\n | number\n | [number, number] = 200;\n\n @property({ type: String, reflect: true }) delay:\n | number\n | [number, number] = 0;\n\n @property({ type: Boolean, reflect: true }) interactive = true;\n\n @property({ type: Number, reflect: true }) interactiveBorder = 2;\n\n @property({ type: String, reflect: true }) maxWidth: string | number = 'none';\n\n @property({ type: Number, reflect: true }) zIndex = 9999;\n\n @property({ type: String, reflect: true })\n followCursor:\n | boolean\n | 'initial'\n | 'horizontal'\n | 'vertical'\n | 'true'\n | 'false' = false;\n\n @property({ type: Boolean, reflect: true }) hideOnClick:\n | boolean\n | 'toggle' = true;\n\n @property({ type: Boolean, reflect: true }) inertia = false;\n\n @property({ type: Boolean, reflect: true }) allowHTML = false;\n\n @property({ type: Boolean, reflect: true }) flip = true;\n\n // ─── Popover-like props ───\n\n @property({ type: String, attribute: 'for' }) for: string | null = null;\n\n @property({ type: Boolean, reflect: true }) open = false;\n\n @property({ type: Boolean, reflect: true }) preventOverlayClose = false;\n\n @property({ type: String, reflect: true }) title = '';\n\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n @property({ type: String, reflect: true }) width?: string;\n\n @property({ type: String, reflect: true }) height?: string;\n\n /** When set, only one panel in the same group can be open at a time. */\n @property({ type: String, reflect: true }) group: string | null = null;\n\n /** Close the panel when Escape is pressed. */\n @property({ type: Boolean, reflect: true }) closeOnEscape = true;\n\n // ─── Visibility manager props ───\n\n @property({ type: Boolean, reflect: true }) enableVisibilityEffect = false;\n\n @property({ type: Boolean, reflect: true }) enableTabClose = false;\n\n // ─── Internal state ───\n\n private tippyInstance: Instance | null = null;\n private visibilityManager?: VisibilityManager;\n private panelContainer: HTMLElement | null = null;\n private anchorEl: HTMLElement | null = null;\n private _suppressOpenWatch = false;\n private _panelId = `nile-fp-${Math.random().toString(36).slice(2, 9)}`;\n private _boundEscHandler = this._handleEscapeKey.bind(this);\n private _pendingShowListener: (() => void) | null = null;\n private _pendingHideListener: (() => void) | null = null;\n\n // ─── Lifecycle ───\n\n protected firstUpdated(): void {\n this._buildDOM();\n this._attachTippy();\n this._joinGroup();\n\n this.visibilityManager = new VisibilityManager({\n host: this,\n target: this.anchorEl || null,\n enableVisibilityEffect: this.enableVisibilityEffect,\n enableTabClose: this.enableTabClose,\n isOpen: () => this.open,\n onAnchorOutOfView: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'anchor-out-of-view',\n });\n },\n onDocumentHidden: () => {\n this._setOpen(false);\n this.tippyInstance?.hide();\n this.emit('nile-visibility-change', {\n visible: false,\n reason: 'document-hidden',\n });\n },\n emit: (event, detail) => this.emit(`nile-${event}`, detail),\n });\n\n this.emit('nile-init');\n }\n\n disconnectedCallback(): void {\n super.disconnectedCallback();\n this._cleanupPendingShowListener();\n this._cleanupPendingHideListener();\n this.visibilityManager?.cleanup();\n this._leaveGroup();\n this._removeEscListener();\n this._destroyTippy();\n this.emit('nile-destroy');\n }\n\n updated(changed: PropertyValues): void {\n super.updated(changed);\n\n if (!this.panelContainer) return;\n\n if (changed.has('open') && !this._suppressOpenWatch) {\n if (this.open) {\n this.visibilityManager?.setup();\n queueMicrotask(() => this.tippyInstance?.show());\n } else {\n this.visibilityManager?.cleanup();\n this.tippyInstance?.hide();\n }\n }\n\n if (changed.has('group')) {\n this._leaveGroup(changed.get('group') as string | null);\n this._joinGroup();\n }\n\n const rebuildProps: string[] = [\n 'placement', 'trigger', 'distance', 'skidding', 'arrow',\n 'animation', 'duration', 'delay', 'interactive', 'interactiveBorder',\n 'maxWidth', 'zIndex', 'followCursor', 'hideOnClick', 'inertia',\n 'allowHTML', 'flip', 'preventOverlayClose', 'disabled', 'width', 'height',\n ];\n\n if (rebuildProps.some(p => changed.has(p))) {\n this._attachTippy();\n }\n }\n\n // ─── Public API ───\n\n /** Programmatically shows the panel. Returns a promise that resolves after the show animation. */\n public show(): Promise<void> {\n this.open = true;\n return new Promise<void>(resolve => {\n this._cleanupPendingShowListener();\n const handler = () => {\n this._pendingShowListener = null;\n resolve();\n };\n this._pendingShowListener = handler;\n this.addEventListener('nile-after-show', handler, { once: true });\n });\n }\n\n /** Programmatically hides the panel. Returns a promise that resolves after the hide animation. */\n public hide(): Promise<void> {\n this.open = false;\n return new Promise<void>(resolve => {\n this._cleanupPendingHideListener();\n const handler = () => {\n this._pendingHideListener = null;\n resolve();\n };\n this._pendingHideListener = handler;\n this.addEventListener('nile-after-hide', handler, { once: true });\n });\n }\n\n private _cleanupPendingShowListener(): void {\n if (this._pendingShowListener) {\n this.removeEventListener('nile-after-show', this._pendingShowListener);\n this._pendingShowListener = null;\n }\n }\n\n private _cleanupPendingHideListener(): void {\n if (this._pendingHideListener) {\n this.removeEventListener('nile-after-hide', this._pendingHideListener);\n this._pendingHideListener = null;\n }\n }\n\n public toggle(): void {\n this.open = !this.open;\n }\n\n public refresh(): void {\n this._attachTippy();\n }\n\n /** Returns the current resolved placement from Tippy/Popper. */\n public getCurrentPlacement(): string {\n const popper = this.tippyInstance?.popper;\n const box = popper?.querySelector('.tippy-box') as HTMLElement | null;\n return box?.dataset.placement ?? this.placement;\n }\n\n /** Returns true if the resolved placement matches the requested placement. */\n public isPositioningOptimal(): boolean {\n return this.getCurrentPlacement() === this.placement;\n }\n\n // ─── Group management ───\n\n private _joinGroup(): void {\n if (!this.group) return;\n let set = NileFloatingPanel._groups.get(this.group);\n if (!set) {\n set = new Set();\n NileFloatingPanel._groups.set(this.group, set);\n }\n set.add(this);\n }\n\n private _leaveGroup(oldGroup?: string | null): void {\n const key = oldGroup ?? this.group;\n if (!key) return;\n const set = NileFloatingPanel._groups.get(key);\n if (set) {\n set.delete(this);\n if (set.size === 0) NileFloatingPanel._groups.delete(key);\n }\n }\n\n private _hideGroupSiblings(): void {\n if (!this.group) return;\n const set = NileFloatingPanel._groups.get(this.group);\n if (!set) return;\n set.forEach(panel => {\n if (panel !== this && panel.open) {\n panel._setOpen(false);\n panel.tippyInstance?.hide();\n }\n });\n }\n\n // ─── Escape key ───\n\n private _addEscListener(): void {\n if (this.closeOnEscape) {\n document.addEventListener('keydown', this._boundEscHandler);\n }\n }\n\n private _removeEscListener(): void {\n document.removeEventListener('keydown', this._boundEscHandler);\n }\n\n private _handleEscapeKey(e: KeyboardEvent): void {\n if (e.key === 'Escape' && this.open) {\n this._setOpen(false);\n this.tippyInstance?.hide();\n }\n }\n\n // ─── ARIA ───\n\n private _applyAria(): void {\n if (!this.anchorEl || !this.panelContainer) return;\n this.panelContainer.setAttribute('role', 'dialog');\n this.panelContainer.id = this._panelId;\n this.anchorEl.setAttribute('aria-haspopup', 'dialog');\n this._syncAriaExpanded();\n }\n\n private _syncAriaExpanded(): void {\n this.anchorEl?.setAttribute('aria-expanded', String(this.open));\n if (this.open) {\n this.anchorEl?.setAttribute('aria-describedby', this._panelId);\n } else {\n this.anchorEl?.removeAttribute('aria-describedby');\n }\n }\n\n // ─── DOM construction ───\n\n private _buildDOM(): void {\n const children = Array.from(this.childNodes);\n\n this.anchorEl = null;\n const titleNodes: Node[] = [];\n const actionNodes: Node[] = [];\n const bodyNodes: Node[] = [];\n let firstElementSeen = false;\n\n for (const child of children) {\n if (child instanceof HTMLElement) {\n const slot = child.getAttribute('slot');\n if (slot === 'title') {\n child.removeAttribute('slot');\n titleNodes.push(child);\n continue;\n }\n if (slot === 'action') {\n child.removeAttribute('slot');\n actionNodes.push(child);\n continue;\n }\n if (!firstElementSeen && !this.for) {\n this.anchorEl = child;\n firstElementSeen = true;\n continue;\n }\n }\n bodyNodes.push(child);\n }\n\n if (this.for) {\n const anchor = document.getElementById(this.for);\n if (anchor) {\n this.anchorEl = anchor;\n }\n }\n\n while (this.firstChild) {\n this.removeChild(this.firstChild);\n }\n\n if (this.anchorEl && !this.for) {\n this.appendChild(this.anchorEl);\n }\n\n this.panelContainer = document.createElement('div');\n this.panelContainer.className = 'nile-floating-panel__content';\n this.panelContainer.style.display = 'none';\n\n const body = document.createElement('div');\n body.className = 'nile-floating-panel__body';\n\n if (titleNodes.length > 0 || this.title) {\n const titleDiv = document.createElement('div');\n titleDiv.className = 'nile-floating-panel__title';\n if (this.title) {\n titleDiv.textContent = this.title;\n } else {\n titleNodes.forEach(n => titleDiv.appendChild(n));\n }\n body.appendChild(titleDiv);\n }\n\n if (bodyNodes.length > 0) {\n const mainDiv = document.createElement('div');\n mainDiv.className = 'nile-floating-panel__main';\n bodyNodes.forEach(n => mainDiv.appendChild(n));\n body.appendChild(mainDiv);\n }\n\n if (actionNodes.length > 0) {\n const actionDiv = document.createElement('div');\n actionDiv.className = 'nile-floating-panel__action';\n actionNodes.forEach(n => actionDiv.appendChild(n));\n body.appendChild(actionDiv);\n }\n\n this.panelContainer.appendChild(body);\n this.appendChild(this.panelContainer);\n\n this._applyAria();\n }\n\n // ─── Tippy management ───\n\n private _resolveArrow() {\n switch (this.arrow) {\n case 'round': return roundArrow;\n case 'none': return false as const;\n default: return true as const;\n }\n }\n\n private _setOpen(value: boolean): void {\n this._suppressOpenWatch = true;\n this.open = value;\n this._syncAriaExpanded();\n this._suppressOpenWatch = false;\n }\n\n private _getEffectiveDuration(): number | [number, number] {\n if (NileFloatingPanel.prefersReducedMotion) return 0;\n return parseDuration(this.duration);\n }\n\n private _getEffectiveAnimation(): string | false {\n if (NileFloatingPanel.prefersReducedMotion) return false;\n return this.animation;\n }\n\n private _attachTippy(): void {\n this._destroyTippy();\n\n if (this.disabled || !this.anchorEl || !this.panelContainer) return;\n\n const resolvedFollowCursor = parseFollowCursor(this.followCursor);\n const effectiveHideOnClick = this.preventOverlayClose ? false : this.hideOnClick;\n\n const options: Partial<Props> = {\n content: this.panelContainer,\n placement: this.placement,\n trigger: this.trigger,\n offset: [this.skidding, this.distance],\n theme: 'floating-panel',\n animation: this._getEffectiveAnimation(),\n interactive: this.interactive,\n arrow: this._resolveArrow(),\n duration: this._getEffectiveDuration(),\n allowHTML: this.allowHTML,\n delay: this.delay as any,\n maxWidth: this.maxWidth,\n zIndex: this.zIndex,\n hideOnClick: effectiveHideOnClick,\n inertia: NileFloatingPanel.prefersReducedMotion ? false : this.inertia,\n interactiveBorder: this.interactiveBorder,\n appendTo: document.body,\n followCursor: resolvedFollowCursor,\n plugins: resolvedFollowCursor ? [followCursorPlugin] : [],\n popperOptions: {\n modifiers: [{ name: 'flip', enabled: this.flip }],\n },\n onMount: () => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n },\n onShow: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = '';\n const tc = instance.popper.querySelector('.tippy-content') as HTMLElement | null;\n if (tc) {\n if (this.width) tc.style.width = this.width;\n if (this.height) { tc.style.height = this.height; tc.style.overflow = 'auto'; }\n }\n this._hideGroupSiblings();\n this._setOpen(true);\n this._addEscListener();\n this.dispatchEvent(new CustomEvent('nile-show', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: true, instance, target: instance.reference } }));\n return undefined;\n },\n onShown: (instance) => {\n this.dispatchEvent(new CustomEvent('nile-after-show', { detail: { instance, target: instance.reference } }));\n },\n onHide: (instance) => {\n this._setOpen(false);\n this._removeEscListener();\n this.dispatchEvent(new CustomEvent('nile-hide', { detail: { instance, target: instance.reference } }));\n this.dispatchEvent(new CustomEvent('nile-toggle', { detail: { open: false, instance, target: instance.reference } }));\n return undefined;\n },\n onHidden: (instance) => {\n if (this.panelContainer) this.panelContainer.style.display = 'none';\n this.dispatchEvent(new CustomEvent('nile-after-hide', { detail: { instance, target: instance.reference } }));\n },\n };\n\n this.tippyInstance = tippy(this.anchorEl, options);\n\n if (this.open) {\n queueMicrotask(() => this.tippyInstance?.show());\n }\n }\n\n private _destroyTippy(): void {\n if (this.tippyInstance) {\n this.tippyInstance.destroy();\n this.tippyInstance = null;\n }\n if (this.panelContainer) {\n this.panelContainer.style.display = 'none';\n if (this.panelContainer.parentElement !== this) {\n this.appendChild(this.panelContainer);\n }\n }\n }\n}\n\nexport default NileFloatingPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-floating-panel': NileFloatingPanel;\n }\n}\n"],"names":["NileFloatingPanel","NileFloatingPanel_1","_n","c","constructor","this","placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","open","preventOverlayClose","title","disabled","group","closeOnEscape","enableVisibilityEffect","enableTabClose","tippyInstance","panelContainer","anchorEl","_suppressOpenWatch","_panelId","concat","Math","random","toString","slice","_boundEscHandler","_handleEscapeKey","bind","_pendingShowListener","_pendingHideListener","_this","_inherits","_createClass","key","value","createRenderRoot","firstUpdated","_buildDOM","_attachTippy","_joinGroup","visibilityManager","VisibilityManager","host","target","isOpen","onAnchorOutOfView","_setOpen","hide","emit","visible","reason","onDocumentHidden","event","detail","disconnectedCallback","super","_cleanupPendingShowListener","_cleanupPendingHideListener","cleanup","_leaveGroup","_removeEscListener","_destroyTippy","updated","changed","_this$visibilityManag2","_this3","_this$visibilityManag3","_this$tippyInstance","has","setup","queueMicrotask","_this3$tippyInstance","show","get","some","p","Promise","resolve","handler","addEventListener","once","_this5","i","removeEventListener","toggle","refresh","getCurrentPlacement","popper","box","querySelector","_i$dataset$placement","dataset","isPositioningOptimal","set","_groups","Set","add","oldGroup","delete","size","_hideGroupSiblings","_this6","forEach","panel","_t$tippyInstance","_addEscListener","document","e","_this$tippyInstance3","_applyAria","setAttribute","id","_syncAriaExpanded","String","removeAttribute","children","Array","from","childNodes","titleNodes","actionNodes","bodyNodes","firstElementSeen","_i","_t","length","child","HTMLElement","slot","getAttribute","push","for","anchor","getElementById","firstChild","removeChild","appendChild","createElement","className","style","display","body","titleDiv","textContent","n","mainDiv","actionDiv","_resolveArrow","roundArrow","_getEffectiveDuration","prefersReducedMotion","parseDuration","_getEffectiveAnimation","_this7","resolvedFollowCursor","parseFollowCursor","effectiveHideOnClick","options","content","offset","theme","appendTo","plugins","followCursorPlugin","popperOptions","modifiers","name","enabled","onMount","onShow","instance","tc","width","height","overflow","dispatchEvent","CustomEvent","reference","onShown","onHide","onHidden","tippy","_this7$tippyInstance","destroy","parentElement","_reducedMotionQuery","window","matchMedia","matches","styles","NileElement","Map","__decorate","property","type","prototype","Number","reflect","Boolean","attribute","customElement"],"mappings":"04HA2CaA,EAAiBC,EAAvB,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCAwBLC,EAAAA,KAAAA,CAASC,UAeQ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CAAA,IAAA,IAEfH,CAAA,CAAA,CAA1CC,EAAS,CAAEC,IAAAA,CAAMjF,OAAQoF,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAwBrN,EAAAmN,SAAA,CAAA,QAAA,CAAA,IAAA,IAGhBH,CAAA,CAAA,CAA1CC,EAAS,CAAEC,IAAAA,CAAMjF,OAAQoF,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoCrN,EAAAmN,SAAA,CAAA,OAAA,CAAA,IAAA,IAG3BH,CAAA,CAAA,CAA3CC,EAAS,CAAEC,IAAAA,CAAMI,QAASD,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA6BrN,EAAAmN,SAAA,CAAA,eAAA,CAAA,IAAA,IAIrBH,CAAA,CAAA,CAA3CC,EAAS,CAAEC,IAAAA,CAAMI,QAASD,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAuCrN,EAAAmN,SAAA,CAAA,wBAAA,CAAA,IAAA,IAE/BH,CAAA,CAAA,CAA3CC,EAAS,CAAEC,IAAAA,CAAMI,QAASD,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+BrN,EAAAmN,SAAA,CAAA,gBAAA,CAAA,IAAA,gBAlHxDnN,CAAiBC,CAAAA,EAAAA,CAAA+M,EAAA,CAD7BQ,CAAAA,CAAc,wBACFxN"}
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var n,_templateObject,_templateObject2,o,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){n=_lit.css;}],execute:function execute(){_export("s",o=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: inline-block;\n position: relative;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n slot {\n display: none;\n }\n"])))),_export("p",i=n(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n .nile-floating-panel__container {\n position: fixed;\n box-sizing: border-box;\n z-index: 800;\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n min-width: var(--nile-width-352px, var(--ng-width-80));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));\n }\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var t,_templateObject,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){t=_lit.css;}],execute:function execute(){_export("s",a=t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n nile-floating-panel {\n display: inline-block;\n }\n\n .tippy-box[data-theme~='floating-panel'] {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));\n padding: 0;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-inertia][data-state='visible'] {\n transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-content {\n position: relative;\n z-index: 1;\n padding: 0;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {\n fill: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {\n color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .nile-floating-panel__body {\n display: flex;\n flex-direction: column;\n height: auto;\n min-width: var(--nile-width-352px, var(--ng-width-80));\n gap: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .nile-floating-panel__title {\n display: block;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));\n }\n\n .nile-floating-panel__title:empty {\n display: none;\n }\n\n .nile-floating-panel__action {\n align-self: end;\n display: inline;\n }\n\n .nile-floating-panel__action:empty {\n display: none;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow { bottom: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow:after,\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow > svg {\n top: 16px;\n transform: rotate(180deg);\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow { top: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow > svg { bottom: 16px; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow { right: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow:after,\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow > svg {\n transform: rotate(90deg);\n top: calc(50% - 3px);\n left: 11px;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow { left: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow:after,\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow > svg {\n transform: rotate(-90deg);\n top: calc(50% - 3px);\n right: 11px;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {\n width: 16px;\n height: 16px;\n text-align: initial;\n position: absolute;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg {\n position: absolute;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow {\n bottom: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow {\n top: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow {\n right: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow {\n left: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {\n width: 16px;\n height: 16px;\n color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before {\n content: '';\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n"]))));!function(_document$head){if("undefined"==typeof document)return;var t="nile-floating-panel-styles";if(document.getElementById(t))return;var e=document.createElement("style");e.id=t,e.textContent=a.cssText,(_document$head=document.head)===null||_document$head===void 0?void 0:_document$head.appendChild(e);}();}};});
2
2
  //# sourceMappingURL=nile-floating-panel.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-floating-panel.css.cjs.js","sources":["../../../src/nile-floating-panel/nile-floating-panel.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\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: inline-block;\n position: relative;\n }\n\n :host([hidden]) {\n display: none;\n }\n\n slot {\n display: none;\n }\n`;\n\nexport const panelContainerStyles = css`\n .nile-floating-panel__container {\n position: fixed;\n box-sizing: border-box;\n z-index: 800;\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n min-width: var(--nile-width-352px, var(--ng-width-80));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));\n }\n`;\n\nexport default [styles];\n\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral","_export","panelContainerStyles","_templateObject2"],"mappings":"uUAQaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,mdAAAC,OAAA,KAmBZC,CAAAA,CAAuBJ,CAAG,CAAAK,gBAAA,GAAAA,gBAAA,CAAAH,sBAAA"}
1
+ {"version":3,"file":"nile-floating-panel.css.cjs.js","sources":["../../../src/nile-floating-panel/nile-floating-panel.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2025\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\nexport const styles = css`\n nile-floating-panel {\n display: inline-block;\n }\n\n .tippy-box[data-theme~='floating-panel'] {\n background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));\n border-radius: var(--nile-radius-sm, var(--ng-radius-md));\n box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));\n padding: 0;\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n line-height: 1.4;\n white-space: normal;\n outline: 0;\n transition-property: transform, visibility, opacity;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-animation='fade'][data-state='hidden'] {\n opacity: 0;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-inertia][data-state='visible'] {\n transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-content {\n position: relative;\n z-index: 1;\n padding: 0;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {\n fill: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {\n color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n\n .nile-floating-panel__body {\n display: flex;\n flex-direction: column;\n height: auto;\n min-width: var(--nile-width-352px, var(--ng-width-80));\n gap: var(--nile-spacing-xl, var(--ng-spacing-xl));\n padding: var(--nile-spacing-xl, var(--ng-spacing-xl));\n }\n\n .nile-floating-panel__title {\n display: block;\n color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));\n font-family: var(--nile-font-family-serif, var(--ng-font-family-body));\n font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));\n font-style: normal;\n font-weight: var(--nile-font-weight-medium, var(--ng-font-weight-semibold));\n line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));\n letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));\n }\n\n .nile-floating-panel__title:empty {\n display: none;\n }\n\n .nile-floating-panel__action {\n align-self: end;\n display: inline;\n }\n\n .nile-floating-panel__action:empty {\n display: none;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow { bottom: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow:after,\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow > svg {\n top: 16px;\n transform: rotate(180deg);\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow { top: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow > svg { bottom: 16px; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow { right: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow:after,\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow > svg {\n transform: rotate(90deg);\n top: calc(50% - 3px);\n left: 11px;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow { left: 0; }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow:after,\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow > svg {\n transform: rotate(-90deg);\n top: calc(50% - 3px);\n right: 11px;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {\n width: 16px;\n height: 16px;\n text-align: initial;\n position: absolute;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg {\n position: absolute;\n }\n\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow {\n bottom: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow:before {\n bottom: -7px;\n border-width: 8px 8px 0;\n border-top-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow {\n top: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow:before {\n top: -7px;\n border-width: 0 8px 8px;\n border-bottom-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow {\n right: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow:before {\n right: -7px;\n border-width: 8px 0 8px 8px;\n border-left-color: initial;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow {\n left: 0;\n }\n .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow:before {\n left: -7px;\n border-width: 8px 8px 8px 0;\n border-right-color: initial;\n }\n\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {\n width: 16px;\n height: 16px;\n color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));\n }\n .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before {\n content: '';\n position: absolute;\n border-color: transparent;\n border-style: solid;\n }\n`;\n\nexport function injectGlobalFloatingPanelStyles(): void {\n if (typeof document === 'undefined') return;\n\n const STYLE_ID = 'nile-floating-panel-styles';\n if (document.getElementById(STYLE_ID)) return;\n\n const style = document.createElement('style');\n style.id = STYLE_ID;\n style.textContent = styles.cssText;\n document.head?.appendChild(style);\n}\n\ninjectGlobalFloatingPanelStyles();\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral","document","STYLE_ID","getElementById","style","createElement","id","textContent","cssText","head","appendChild","injectGlobalFloatingPanelStyles"],"mappings":"oTASaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,k6KA2JvB,GAAwB,WAAA,EAAA,MAAbC,CAAAA,QAA0B,CAAA,OAErC,GAAMC,CAAAA,CAAAA,CAAW,4BACjB,CAAA,GAAID,QAASE,CAAAA,cAAAA,CAAeD,CAAW,CAAA,CAAA,OAEvC,GAAME,CAAAA,CAAAA,CAAQH,QAASI,CAAAA,aAAAA,CAAc,OACrCD,CAAAA,CAAAA,CAAAA,CAAME,EAAKJ,CAAAA,CAAAA,CACXE,CAAMG,CAAAA,WAAAA,CAAcV,CAAOW,CAAAA,OAAAA,EAAAA,cAAAA,CAC3BP,QAASQ,CAAAA,IAAAA,UAAAA,cAAAA,iBAATR,cAAAA,CAAeS,WAAYN,CAAAA,CAAAA,CAC7B,EAEAO"}
@@ -1,31 +1,55 @@
1
- import{css as n}from"lit";const o=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));
1
+ import{css as t}from"lit";const a=t`
2
+ nile-floating-panel {
7
3
  display: inline-block;
8
- position: relative;
9
- }
10
-
11
- :host([hidden]) {
12
- display: none;
13
4
  }
14
5
 
15
- slot {
16
- display: none;
17
- }
18
- `,i=n`
19
- .nile-floating-panel__container {
20
- position: fixed;
21
- box-sizing: border-box;
22
- z-index: 800;
6
+ .tippy-box[data-theme~='floating-panel'] {
23
7
  background-color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
8
+ color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
24
9
  border: solid 1px var(--nile-colors-dark-200, var(--ng-colors-border-secondary-alt));
25
10
  border-radius: var(--nile-radius-sm, var(--ng-radius-md));
26
11
  box-shadow: var(--nile-box-shadow-2, var(--ng-shadow-lg));
27
- padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
12
+ padding: 0;
13
+ font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));
14
+ line-height: 1.4;
15
+ white-space: normal;
16
+ outline: 0;
17
+ transition-property: transform, visibility, opacity;
18
+ }
19
+
20
+ .tippy-box[data-theme~='floating-panel'][data-animation='fade'][data-state='hidden'] {
21
+ opacity: 0;
22
+ }
23
+
24
+ .tippy-box[data-theme~='floating-panel'][data-inertia][data-state='visible'] {
25
+ transition-timing-function: cubic-bezier(0.54, 1.5, 0.38, 1.11);
26
+ }
27
+
28
+ .tippy-box[data-theme~='floating-panel'] > .tippy-content {
29
+ position: relative;
30
+ z-index: 1;
31
+ padding: 0;
32
+ }
33
+
34
+ .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {
35
+ fill: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
36
+ }
37
+
38
+ .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {
39
+ color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
40
+ }
41
+
42
+ .nile-floating-panel__body {
43
+ display: flex;
44
+ flex-direction: column;
45
+ height: auto;
28
46
  min-width: var(--nile-width-352px, var(--ng-width-80));
47
+ gap: var(--nile-spacing-xl, var(--ng-spacing-xl));
48
+ padding: var(--nile-spacing-xl, var(--ng-spacing-xl));
49
+ }
50
+
51
+ .nile-floating-panel__title {
52
+ display: block;
29
53
  color: var(--nile-colors-dark-900, var(--ng-colors-text-primary-900));
30
54
  font-family: var(--nile-font-family-serif, var(--ng-font-family-body));
31
55
  font-size: var(--nile-type-scale-4, var(--ng-font-size-text-sm));
@@ -34,4 +58,96 @@ import{css as n}from"lit";const o=n`
34
58
  line-height: var(--nile-line-height-xsmall, var(--ng-line-height-text-sm));
35
59
  letter-spacing: var(--nile-spacing-one-by-five-x, var(--ng-spacing-none));
36
60
  }
37
- `;export{i as p,o as s};
61
+
62
+ .nile-floating-panel__title:empty {
63
+ display: none;
64
+ }
65
+
66
+ .nile-floating-panel__action {
67
+ align-self: end;
68
+ display: inline;
69
+ }
70
+
71
+ .nile-floating-panel__action:empty {
72
+ display: none;
73
+ }
74
+
75
+ .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow { bottom: 0; }
76
+ .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow:after,
77
+ .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-svg-arrow > svg {
78
+ top: 16px;
79
+ transform: rotate(180deg);
80
+ }
81
+ .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow { top: 0; }
82
+ .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-svg-arrow > svg { bottom: 16px; }
83
+ .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow { right: 0; }
84
+ .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow:after,
85
+ .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-svg-arrow > svg {
86
+ transform: rotate(90deg);
87
+ top: calc(50% - 3px);
88
+ left: 11px;
89
+ }
90
+ .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow { left: 0; }
91
+ .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow:after,
92
+ .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-svg-arrow > svg {
93
+ transform: rotate(-90deg);
94
+ top: calc(50% - 3px);
95
+ right: 11px;
96
+ }
97
+
98
+ .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow {
99
+ width: 16px;
100
+ height: 16px;
101
+ text-align: initial;
102
+ position: absolute;
103
+ }
104
+
105
+ .tippy-box[data-theme~='floating-panel'] > .tippy-svg-arrow > svg {
106
+ position: absolute;
107
+ }
108
+
109
+ .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow {
110
+ bottom: 0;
111
+ }
112
+ .tippy-box[data-theme~='floating-panel'][data-placement^='top'] > .tippy-arrow:before {
113
+ bottom: -7px;
114
+ border-width: 8px 8px 0;
115
+ border-top-color: initial;
116
+ }
117
+ .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow {
118
+ top: 0;
119
+ }
120
+ .tippy-box[data-theme~='floating-panel'][data-placement^='bottom'] > .tippy-arrow:before {
121
+ top: -7px;
122
+ border-width: 0 8px 8px;
123
+ border-bottom-color: initial;
124
+ }
125
+ .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow {
126
+ right: 0;
127
+ }
128
+ .tippy-box[data-theme~='floating-panel'][data-placement^='left'] > .tippy-arrow:before {
129
+ right: -7px;
130
+ border-width: 8px 0 8px 8px;
131
+ border-left-color: initial;
132
+ }
133
+ .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow {
134
+ left: 0;
135
+ }
136
+ .tippy-box[data-theme~='floating-panel'][data-placement^='right'] > .tippy-arrow:before {
137
+ left: -7px;
138
+ border-width: 8px 8px 8px 0;
139
+ border-right-color: initial;
140
+ }
141
+
142
+ .tippy-box[data-theme~='floating-panel'] > .tippy-arrow {
143
+ width: 16px;
144
+ height: 16px;
145
+ color: var(--nile-colors-white-base, var(--ng-colors-bg-primary));
146
+ }
147
+ .tippy-box[data-theme~='floating-panel'] > .tippy-arrow:before {
148
+ content: '';
149
+ position: absolute;
150
+ border-color: transparent;
151
+ border-style: solid;
152
+ }
153
+ `;!function(){if("undefined"==typeof document)return;const t="nile-floating-panel-styles";if(document.getElementById(t))return;const e=document.createElement("style");e.id=t,e.textContent=a.cssText,document.head?.appendChild(e)}();export{a as s};
@@ -1 +1 @@
1
- import{__decorate as t}from"tslib";import{html as i}from"lit";import{property as s,customElement as e}from"lit/decorators.js";import{s as n}from"./nile-floating-panel.css.esm.js";import{N as h}from"../internal/nile-element.esm.js";import{P as o}from"./position-manager.esm.js";import{S as l}from"./style-manager.esm.js";import{C as r}from"./content-manager.esm.js";import{A as a}from"./anchor-manager.esm.js";import{E as m}from"./event-manager.esm.js";import{V as c}from"../utilities/visibility-manager.esm.js";import"../floating-ui.dom-cc9126da.esm.js";let u=class extends h{constructor(){super(...arguments),this.anchor=null,this.position="bottom",this.open=!1,this.closeOnOutsideClick=!0,this.enableVisibilityEffect=!0,this.enableTabClose=!1,this.panelContainer=null,this.positionManager=null,this.styleManager=new l,this.eventManager=new m(this),this.handleSlotChange=()=>{this.open&&this.panelContainer&&this.updatePanelContent()}}static get styles(){return[n]}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),this.cleanupPanel(),this.visibilityManager?.cleanup()}updated(t){super.updated(t),t.has("open")&&(this.open?(this.emit("nile-show"),this.setupPanel(),this.visibilityManager?.setup()):(this.emit("nile-hide"),this.visibilityManager?.cleanup(),this.cleanupPanel())),t.has("closeOnOutsideClick")&&this.open&&this.panelContainer&&this.eventManager.updateOutsideClickHandler(this.panelContainer,this.closeOnOutsideClick,this.open),t.has("anchor")&&this.open&&(this.cleanupPanel(),this.setupPanel()),(t.has("enableVisibilityEffect")||t.has("enableTabClose"))&&this.open&&this.setupVisibilityManager(),t.has("position")&&this.open&&this.positionManager&&this.positionManager.updatePosition(this.position),t.has("open")&&this.open&&this.panelContainer&&this.updatePanelContent()}setupPanel(){if(this.panelContainer)return;const t=this.constructor.styles;t&&this.styleManager.injectStyles(t),this.panelContainer=document.createElement("div"),this.panelContainer.setAttribute("part","panel"),this.panelContainer.className="nile-floating-panel__container",this.updatePanelContent();const i=a.resolveAnchor(this.anchor);a.appendToAnchor(i,this.panelContainer),requestAnimationFrame((()=>{this.setupPositionManager(),this.setupEventHandlers(),this.setupVisibilityManager()}))}setupEventHandlers(){this.panelContainer&&this.eventManager.setupOutsideClickHandler(this.panelContainer,this.closeOnOutsideClick,this.open,(()=>{this.open=!1}))}setupPositionManager(){if(!this.panelContainer)return;const t=this.findTriggerElement()||this;this.positionManager=new o(t,this.panelContainer,this.position),this.positionManager.reposition(),this.positionManager.setupAutoUpdate()}findTriggerElement(){let t=this.nextElementSibling;for(;t;){if(t instanceof HTMLElement)return t;t=t.nextElementSibling}let i=this.previousElementSibling;for(;i;){if(i instanceof HTMLElement)return i;i=i.previousElementSibling}return null}setupVisibilityManager(){if(!this.enableVisibilityEffect)return;const t=this.findTriggerElement();this.visibilityManager&&this.visibilityManager.cleanup(),this.visibilityManager=new c({host:this,target:t||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this.open=!1,this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this.open=!1,this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)}),this.open&&this.visibilityManager.setup()}updatePanelContent(){if(!this.panelContainer)return;const t=this.shadowRoot?.querySelector("slot")||null;r.updatePanelContent(this.panelContainer,t,"")}reposition(){this.positionManager&&this.positionManager.reposition()}cleanupPanel(){this.eventManager.destroy(),this.positionManager&&(this.positionManager.destroy(),this.positionManager=null),this.panelContainer&&a.removeFromAnchor(this.panelContainer),this.panelContainer=null,this.styleManager.cleanupStyles()}render(){return i` <slot @slotchange=${this.handleSlotChange}></slot> `}};t([s()],u.prototype,"anchor",void 0),t([s()],u.prototype,"position",void 0),t([s({type:Boolean,reflect:!0,attribute:!0})],u.prototype,"open",void 0),t([s({type:Boolean,reflect:!0,attribute:"close-on-outside-click",converter:{fromAttribute:t=>!(!t||"false"===t),toAttribute:t=>t?"true":"false"}})],u.prototype,"closeOnOutsideClick",void 0),t([s({type:Boolean,reflect:!0})],u.prototype,"enableVisibilityEffect",void 0),t([s({type:Boolean,reflect:!0})],u.prototype,"enableTabClose",void 0),u=t([e("nile-floating-panel")],u);export{u as N};
1
+ import{__decorate as t}from"tslib";import{property as i,customElement as e}from"lit/decorators.js";import{s}from"./nile-floating-panel.css.esm.js";import{N as n}from"../internal/nile-element.esm.js";import{R as h,f as o,t as r}from"../tippy.esm-57628c2b.esm.js";import{p as l,a}from"../nile-lite-tooltip/utils.esm.js";import{V as d}from"../utilities/visibility-manager.esm.js";import"lit";var c;let p=c=class extends n{constructor(){super(...arguments),this.placement="bottom",this.trigger="click",this.distance=12,this.skidding=0,this.arrow="round",this.animation="fade",this.duration=200,this.delay=0,this.interactive=!0,this.interactiveBorder=2,this.maxWidth="none",this.zIndex=9999,this.followCursor=!1,this.hideOnClick=!0,this.inertia=!1,this.allowHTML=!1,this.flip=!0,this.for=null,this.open=!1,this.preventOverlayClose=!1,this.title="",this.disabled=!1,this.group=null,this.closeOnEscape=!0,this.enableVisibilityEffect=!1,this.enableTabClose=!1,this.tippyInstance=null,this.panelContainer=null,this.anchorEl=null,this._suppressOpenWatch=!1,this._panelId=`nile-fp-${Math.random().toString(36).slice(2,9)}`,this._boundEscHandler=this._handleEscapeKey.bind(this),this._pendingShowListener=null,this._pendingHideListener=null}static get prefersReducedMotion(){return c._reducedMotionQuery||(c._reducedMotionQuery=window.matchMedia("(prefers-reduced-motion: reduce)")),c._reducedMotionQuery.matches}static get styles(){return[s]}createRenderRoot(){return this}firstUpdated(){this._buildDOM(),this._attachTippy(),this._joinGroup(),this.visibilityManager=new d({host:this,target:this.anchorEl||null,enableVisibilityEffect:this.enableVisibilityEffect,enableTabClose:this.enableTabClose,isOpen:()=>this.open,onAnchorOutOfView:()=>{this._setOpen(!1),this.tippyInstance?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"anchor-out-of-view"})},onDocumentHidden:()=>{this._setOpen(!1),this.tippyInstance?.hide(),this.emit("nile-visibility-change",{visible:!1,reason:"document-hidden"})},emit:(t,i)=>this.emit(`nile-${t}`,i)}),this.emit("nile-init")}disconnectedCallback(){super.disconnectedCallback(),this._cleanupPendingShowListener(),this._cleanupPendingHideListener(),this.visibilityManager?.cleanup(),this._leaveGroup(),this._removeEscListener(),this._destroyTippy(),this.emit("nile-destroy")}updated(t){if(super.updated(t),!this.panelContainer)return;t.has("open")&&!this._suppressOpenWatch&&(this.open?(this.visibilityManager?.setup(),queueMicrotask((()=>this.tippyInstance?.show()))):(this.visibilityManager?.cleanup(),this.tippyInstance?.hide())),t.has("group")&&(this._leaveGroup(t.get("group")),this._joinGroup());["placement","trigger","distance","skidding","arrow","animation","duration","delay","interactive","interactiveBorder","maxWidth","zIndex","followCursor","hideOnClick","inertia","allowHTML","flip","preventOverlayClose","disabled","width","height"].some((i=>t.has(i)))&&this._attachTippy()}show(){return this.open=!0,new Promise((t=>{this._cleanupPendingShowListener();const i=()=>{this._pendingShowListener=null,t()};this._pendingShowListener=i,this.addEventListener("nile-after-show",i,{once:!0})}))}hide(){return this.open=!1,new Promise((t=>{this._cleanupPendingHideListener();const i=()=>{this._pendingHideListener=null,t()};this._pendingHideListener=i,this.addEventListener("nile-after-hide",i,{once:!0})}))}_cleanupPendingShowListener(){this._pendingShowListener&&(this.removeEventListener("nile-after-show",this._pendingShowListener),this._pendingShowListener=null)}_cleanupPendingHideListener(){this._pendingHideListener&&(this.removeEventListener("nile-after-hide",this._pendingHideListener),this._pendingHideListener=null)}toggle(){this.open=!this.open}refresh(){this._attachTippy()}getCurrentPlacement(){const t=this.tippyInstance?.popper,i=t?.querySelector(".tippy-box");return i?.dataset.placement??this.placement}isPositioningOptimal(){return this.getCurrentPlacement()===this.placement}_joinGroup(){if(!this.group)return;let t=c._groups.get(this.group);t||(t=new Set,c._groups.set(this.group,t)),t.add(this)}_leaveGroup(t){const i=t??this.group;if(!i)return;const e=c._groups.get(i);e&&(e.delete(this),0===e.size&&c._groups.delete(i))}_hideGroupSiblings(){if(!this.group)return;const t=c._groups.get(this.group);t&&t.forEach((t=>{t!==this&&t.open&&(t._setOpen(!1),t.tippyInstance?.hide())}))}_addEscListener(){this.closeOnEscape&&document.addEventListener("keydown",this._boundEscHandler)}_removeEscListener(){document.removeEventListener("keydown",this._boundEscHandler)}_handleEscapeKey(t){"Escape"===t.key&&this.open&&(this._setOpen(!1),this.tippyInstance?.hide())}_applyAria(){this.anchorEl&&this.panelContainer&&(this.panelContainer.setAttribute("role","dialog"),this.panelContainer.id=this._panelId,this.anchorEl.setAttribute("aria-haspopup","dialog"),this._syncAriaExpanded())}_syncAriaExpanded(){this.anchorEl?.setAttribute("aria-expanded",String(this.open)),this.open?this.anchorEl?.setAttribute("aria-describedby",this._panelId):this.anchorEl?.removeAttribute("aria-describedby")}_buildDOM(){const t=Array.from(this.childNodes);this.anchorEl=null;const i=[],e=[],s=[];let n=!1;for(const h of t){if(h instanceof HTMLElement){const t=h.getAttribute("slot");if("title"===t){h.removeAttribute("slot"),i.push(h);continue}if("action"===t){h.removeAttribute("slot"),e.push(h);continue}if(!n&&!this.for){this.anchorEl=h,n=!0;continue}}s.push(h)}if(this.for){const t=document.getElementById(this.for);t&&(this.anchorEl=t)}for(;this.firstChild;)this.removeChild(this.firstChild);this.anchorEl&&!this.for&&this.appendChild(this.anchorEl),this.panelContainer=document.createElement("div"),this.panelContainer.className="nile-floating-panel__content",this.panelContainer.style.display="none";const h=document.createElement("div");if(h.className="nile-floating-panel__body",i.length>0||this.title){const t=document.createElement("div");t.className="nile-floating-panel__title",this.title?t.textContent=this.title:i.forEach((i=>t.appendChild(i))),h.appendChild(t)}if(s.length>0){const t=document.createElement("div");t.className="nile-floating-panel__main",s.forEach((i=>t.appendChild(i))),h.appendChild(t)}if(e.length>0){const t=document.createElement("div");t.className="nile-floating-panel__action",e.forEach((i=>t.appendChild(i))),h.appendChild(t)}this.panelContainer.appendChild(h),this.appendChild(this.panelContainer),this._applyAria()}_resolveArrow(){switch(this.arrow){case"round":return h;case"none":return!1;default:return!0}}_setOpen(t){this._suppressOpenWatch=!0,this.open=t,this._syncAriaExpanded(),this._suppressOpenWatch=!1}_getEffectiveDuration(){return c.prefersReducedMotion?0:l(this.duration)}_getEffectiveAnimation(){return!c.prefersReducedMotion&&this.animation}_attachTippy(){if(this._destroyTippy(),this.disabled||!this.anchorEl||!this.panelContainer)return;const t=a(this.followCursor),i=!this.preventOverlayClose&&this.hideOnClick,e={content:this.panelContainer,placement:this.placement,trigger:this.trigger,offset:[this.skidding,this.distance],theme:"floating-panel",animation:this._getEffectiveAnimation(),interactive:this.interactive,arrow:this._resolveArrow(),duration:this._getEffectiveDuration(),allowHTML:this.allowHTML,delay:this.delay,maxWidth:this.maxWidth,zIndex:this.zIndex,hideOnClick:i,inertia:!c.prefersReducedMotion&&this.inertia,interactiveBorder:this.interactiveBorder,appendTo:document.body,followCursor:t,plugins:t?[o]:[],popperOptions:{modifiers:[{name:"flip",enabled:this.flip}]},onMount:()=>{this.panelContainer&&(this.panelContainer.style.display="")},onShow:t=>{this.panelContainer&&(this.panelContainer.style.display="");const i=t.popper.querySelector(".tippy-content");i&&(this.width&&(i.style.width=this.width),this.height&&(i.style.height=this.height,i.style.overflow="auto")),this._hideGroupSiblings(),this._setOpen(!0),this._addEscListener(),this.dispatchEvent(new CustomEvent("nile-show",{detail:{instance:t,target:t.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!0,instance:t,target:t.reference}}))},onShown:t=>{this.dispatchEvent(new CustomEvent("nile-after-show",{detail:{instance:t,target:t.reference}}))},onHide:t=>{this._setOpen(!1),this._removeEscListener(),this.dispatchEvent(new CustomEvent("nile-hide",{detail:{instance:t,target:t.reference}})),this.dispatchEvent(new CustomEvent("nile-toggle",{detail:{open:!1,instance:t,target:t.reference}}))},onHidden:t=>{this.panelContainer&&(this.panelContainer.style.display="none"),this.dispatchEvent(new CustomEvent("nile-after-hide",{detail:{instance:t,target:t.reference}}))}};this.tippyInstance=r(this.anchorEl,e),this.open&&queueMicrotask((()=>this.tippyInstance?.show()))}_destroyTippy(){this.tippyInstance&&(this.tippyInstance.destroy(),this.tippyInstance=null),this.panelContainer&&(this.panelContainer.style.display="none",this.panelContainer.parentElement!==this&&this.appendChild(this.panelContainer))}};p._groups=new Map,p._reducedMotionQuery=null,t([i({type:String})],p.prototype,"placement",void 0),t([i({type:String})],p.prototype,"trigger",void 0),t([i({type:Number})],p.prototype,"distance",void 0),t([i({type:Number})],p.prototype,"skidding",void 0),t([i({type:String,reflect:!0})],p.prototype,"arrow",void 0),t([i({type:String,reflect:!0})],p.prototype,"animation",void 0),t([i({type:String,reflect:!0})],p.prototype,"duration",void 0),t([i({type:String,reflect:!0})],p.prototype,"delay",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"interactive",void 0),t([i({type:Number,reflect:!0})],p.prototype,"interactiveBorder",void 0),t([i({type:String,reflect:!0})],p.prototype,"maxWidth",void 0),t([i({type:Number,reflect:!0})],p.prototype,"zIndex",void 0),t([i({type:String,reflect:!0})],p.prototype,"followCursor",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"hideOnClick",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"inertia",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"allowHTML",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"flip",void 0),t([i({type:String,attribute:"for"})],p.prototype,"for",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"open",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"preventOverlayClose",void 0),t([i({type:String,reflect:!0})],p.prototype,"title",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),t([i({type:String,reflect:!0})],p.prototype,"width",void 0),t([i({type:String,reflect:!0})],p.prototype,"height",void 0),t([i({type:String,reflect:!0})],p.prototype,"group",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"closeOnEscape",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableVisibilityEffect",void 0),t([i({type:Boolean,reflect:!0})],p.prototype,"enableTabClose",void 0),p=c=t([e("nile-floating-panel")],p);export{p as N};
@@ -1,2 +1,2 @@
1
- System.register(["./nile-lite-tooltip.cjs.js","tslib","lit/decorators.js","./nile-lite-tooltip.css.cjs.js","lit","../internal/nile-element.cjs.js","./utils.cjs.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileLiteTooltipCjsJs){_export("NileliteTooltip",_nileLiteTooltipCjsJs.N);},function(_tslib){},function(_litDecoratorsJs){},function(_nileLiteTooltipCssCjsJs){},function(_lit){},function(_internalNileElementCjsJs){},function(_utilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){}],execute:function execute(){}};});
1
+ System.register(["./nile-lite-tooltip.cjs.js","tslib","lit/decorators.js","./nile-lite-tooltip.css.cjs.js","lit","../internal/nile-element.cjs.js","../tippy.esm-78baa8f2.cjs.js","./utils.cjs.js","../utilities/visibility-manager.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileLiteTooltipCjsJs){_export("NileliteTooltip",_nileLiteTooltipCjsJs.N);},function(_tslib){},function(_litDecoratorsJs){},function(_nileLiteTooltipCssCjsJs){},function(_lit){},function(_internalNileElementCjsJs){},function(_tippyEsm005CjsJs){},function(_utilsCjsJs){},function(_utilitiesVisibilityManagerCjsJs){}],execute:function execute(){}};});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- export{N as NileliteTooltip}from"./nile-lite-tooltip.esm.js";import"tslib";import"lit/decorators.js";import"./nile-lite-tooltip.css.esm.js";import"lit";import"../internal/nile-element.esm.js";import"./utils.esm.js";import"../utilities/visibility-manager.esm.js";
1
+ export{N as NileliteTooltip}from"./nile-lite-tooltip.esm.js";import"tslib";import"lit/decorators.js";import"./nile-lite-tooltip.css.esm.js";import"lit";import"../internal/nile-element.esm.js";import"../tippy.esm-57628c2b.esm.js";import"./utils.esm.js";import"../utilities/visibility-manager.esm.js";