@aquera/nile-elements 0.0.80 → 0.0.81

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 (78) hide show
  1. package/README.md +3 -0
  2. package/dist/fixture-6f853cbd.esm.js +569 -0
  3. package/dist/fixture-b1476eef.cjs.js +395 -0
  4. package/dist/fixture-b1476eef.cjs.js.map +1 -0
  5. package/dist/index.cjs.js +1 -1
  6. package/dist/index.esm.js +1 -1
  7. package/dist/index.iife.js +171 -65
  8. package/dist/internal/drag.cjs.js +2 -0
  9. package/dist/internal/drag.cjs.js.map +1 -0
  10. package/dist/internal/drag.esm.js +1 -0
  11. package/dist/internal/math.cjs.js +2 -0
  12. package/dist/internal/math.cjs.js.map +1 -0
  13. package/dist/internal/math.esm.js +1 -0
  14. package/dist/nile-checkbox/nile-checkbox.test.cjs.js +1 -394
  15. package/dist/nile-checkbox/nile-checkbox.test.cjs.js.map +1 -1
  16. package/dist/nile-checkbox/nile-checkbox.test.esm.js +3 -571
  17. package/dist/nile-empty-state/nile-empty-state.test.cjs.js +2 -0
  18. package/dist/nile-empty-state/nile-empty-state.test.cjs.js.map +1 -0
  19. package/dist/nile-empty-state/nile-empty-state.test.esm.js +9 -0
  20. package/dist/nile-hero/nile-hero.test.cjs.js +2 -0
  21. package/dist/nile-hero/nile-hero.test.cjs.js.map +1 -0
  22. package/dist/nile-hero/nile-hero.test.esm.js +14 -0
  23. package/dist/nile-split-panel/index.cjs.js +2 -0
  24. package/dist/nile-split-panel/index.cjs.js.map +1 -0
  25. package/dist/nile-split-panel/index.esm.js +1 -0
  26. package/dist/nile-split-panel/nile-split-panel.cjs.js +2 -0
  27. package/dist/nile-split-panel/nile-split-panel.cjs.js.map +1 -0
  28. package/dist/nile-split-panel/nile-split-panel.css.cjs.js +2 -0
  29. package/dist/nile-split-panel/nile-split-panel.css.cjs.js.map +1 -0
  30. package/dist/nile-split-panel/nile-split-panel.css.esm.js +87 -0
  31. package/dist/nile-split-panel/nile-split-panel.esm.js +21 -0
  32. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  33. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  34. package/dist/nile-stepper/nile-stepper.esm.js +1 -1
  35. package/dist/nile-stepper/nile-stepper.test.cjs.js +2 -0
  36. package/dist/nile-stepper/nile-stepper.test.cjs.js.map +1 -0
  37. package/dist/nile-stepper/nile-stepper.test.esm.js +1 -0
  38. package/dist/src/index.d.ts +1 -0
  39. package/dist/src/index.js +1 -0
  40. package/dist/src/index.js.map +1 -1
  41. package/dist/src/internal/drag.d.ts +15 -0
  42. package/dist/src/internal/drag.js +28 -0
  43. package/dist/src/internal/drag.js.map +1 -0
  44. package/dist/src/internal/math.d.ts +2 -0
  45. package/dist/src/internal/math.js +12 -0
  46. package/dist/src/internal/math.js.map +1 -0
  47. package/dist/src/nile-empty-state/nile-empty-state.test.d.ts +1 -0
  48. package/dist/src/nile-empty-state/nile-empty-state.test.js +63 -0
  49. package/dist/src/nile-empty-state/nile-empty-state.test.js.map +1 -0
  50. package/dist/src/nile-hero/nile-hero.test.d.ts +1 -0
  51. package/dist/src/nile-hero/nile-hero.test.js +42 -0
  52. package/dist/src/nile-hero/nile-hero.test.js.map +1 -0
  53. package/dist/src/nile-split-panel/index.d.ts +1 -0
  54. package/dist/src/nile-split-panel/index.js +2 -0
  55. package/dist/src/nile-split-panel/index.js.map +1 -0
  56. package/dist/src/nile-split-panel/nile-split-panel.css.d.ts +12 -0
  57. package/dist/src/nile-split-panel/nile-split-panel.css.js +99 -0
  58. package/dist/src/nile-split-panel/nile-split-panel.css.js.map +1 -0
  59. package/dist/src/nile-split-panel/nile-split-panel.d.ts +78 -0
  60. package/dist/src/nile-split-panel/nile-split-panel.js +251 -0
  61. package/dist/src/nile-split-panel/nile-split-panel.js.map +1 -0
  62. package/dist/src/nile-stepper/nile-stepper.js +1 -1
  63. package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
  64. package/dist/src/nile-stepper/nile-stepper.test.d.ts +0 -0
  65. package/dist/src/nile-stepper/nile-stepper.test.js +165 -0
  66. package/dist/src/nile-stepper/nile-stepper.test.js.map +1 -0
  67. package/dist/tsconfig.tsbuildinfo +1 -1
  68. package/package.json +1 -1
  69. package/src/index.ts +2 -1
  70. package/src/internal/drag.ts +45 -0
  71. package/src/internal/math.ts +14 -0
  72. package/src/nile-empty-state/nile-empty-state.test.ts +69 -0
  73. package/src/nile-hero/nile-hero.test.ts +45 -0
  74. package/src/nile-split-panel/index.ts +1 -0
  75. package/src/nile-split-panel/nile-split-panel.css.ts +101 -0
  76. package/src/nile-split-panel/nile-split-panel.ts +285 -0
  77. package/src/nile-stepper/nile-stepper.test.ts +174 -0
  78. package/src/nile-stepper/nile-stepper.ts +2 -2
@@ -0,0 +1,2 @@
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-b1476eef.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-empty-state.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","lit/directives/class-map.js","./nile-empty-state.css.cjs.js","../internal/nile-element.cjs.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var t,e,s,_templateObject,_templateObject2,_templateObject3,_templateObject4,_templateObject5,_templateObject6;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){t=_fixture004CjsJs.f;e=_fixture004CjsJs.a;},function(_litStaticHtmlJs){s=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileEmptyStateCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_litDirectivesClassMapJs){},function(_nileEmptyStateCssCjsJs){},function(_internalNileElementCjsJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileEmptyState",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var i;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return t(s(_templateObject||(_templateObject=_taggedTemplateLiteral(["<nile-empty-state></nile-empty-state>"]))));case 2:i=_context2.sent;e(i.size).to.equal("md"),e(i.variant).to.equal("tonal"),e(i.icon).to.equal("error"),e(i.grayscale).to.be["false"],e(i.text).to.equal("Empty State"),e(i.subText).to.equal("No Data");case 4:case"end":return _context2.stop();}},_callee);}))),it("should reflect properties to attributes",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var i,a;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:i="action";_context3.next=3;return t(s(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-empty-state size=\"sm\" variant=\"flat\" icon="," grayscale text=\"Test state text\" sub-text=\"Test sub text\"></nile-empty-state>\n "])),i));case 3:a=_context3.sent;e(a.getAttribute("size")).to.equal("sm"),e(a.getAttribute("variant")).to.equal("flat"),e(a.getAttribute("icon")).to.equal(i),e(a.hasAttribute("grayscale")).to.be["true"],e(a.getAttribute("text")).to.equal("Test state text"),e(a.getAttribute("sub-text")).to.equal("Test sub text");case 5:case"end":return _context3.stop();}},_callee2);}))),it("should render different sizes correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var i,_i2,_i,a,_i3;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:i=["sm","md","lg"];_i2=0,_i=i;case 2:if(!(_i2<_i.length)){_context4.next=11;break;}a=_i[_i2];_context4.next=6;return t(s(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["<nile-empty-state size=\"","\"></nile-empty-state>"])),a));case 6:_i3=_context4.sent.shadowRoot.querySelector(".empty-state");e(_i3.classList.contains("empty-state--".concat(a))).to.be["true"];case 8:_i2++;_context4.next=2;break;case 11:case"end":return _context4.stop();}},_callee3);}))),it("should render different variants correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4(){var i,_i5,_i4,a,_i6;return _regeneratorRuntime().wrap(function _callee4$(_context5){while(1)switch(_context5.prev=_context5.next){case 0:i=["flat","content","tonal"];_i5=0,_i4=i;case 2:if(!(_i5<_i4.length)){_context5.next=11;break;}a=_i4[_i5];_context5.next=6;return t(s(_templateObject4||(_templateObject4=_taggedTemplateLiteral(["<nile-empty-state variant=\"","\"></nile-empty-state>"])),a));case 6:_i6=_context5.sent.shadowRoot.querySelector(".empty-state__body--".concat(a));e(_i6).to.exist;case 8:_i5++;_context5.next=2;break;case 11:case"end":return _context5.stop();}},_callee4);}))),it("should render text properties correctly",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee5(){var i,a,o,r,n;return _regeneratorRuntime().wrap(function _callee5$(_context6){while(1)switch(_context6.prev=_context6.next){case 0:i="Custom Text";a="Custom SubText";_context6.next=4;return t(s(_templateObject5||(_templateObject5=_taggedTemplateLiteral(["\n <nile-empty-state text="," sub-text=","></nile-empty-state>\n "])),i,a));case 4:o=_context6.sent;r=o.shadowRoot.querySelector(".empty-state__text");n=o.shadowRoot.querySelector(".empty-state__subtext");e(r.textContent).to.equal(i),e(n.textContent).to.equal(a);case 8:case"end":return _context6.stop();}},_callee5);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee6(){var i;return _regeneratorRuntime().wrap(function _callee6$(_context7){while(1)switch(_context7.prev=_context7.next){case 0:_context7.next=2;return t(s(_templateObject6||(_templateObject6=_taggedTemplateLiteral(["\n <nile-empty-state>\n <div class=\"slot-content\">Slot Content</div>\n </nile-empty-state>\n "]))));case 2:i=_context7.sent.querySelector(".slot-content");e(i).to.exist,e(i.textContent).to.equal("Slot Content");case 4:case"end":return _context7.stop();}},_callee6);})));});}};});
2
+ //# sourceMappingURL=nile-empty-state.test.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-empty-state.test.cjs.js","sources":["../../../src/nile-empty-state/nile-empty-state.test.ts"],"sourcesContent":["import { fixture,html,expect } from \"@open-wc/testing\";\nimport './nile-empty-state';\nimport { NileEmptyState } from \"./nile-empty-state\";\n\ndescribe('NileEmptyState',()=>{\n it('renders correctly with default properties',async ()=>{\n const el=await fixture<NileEmptyState>(html`<nile-empty-state></nile-empty-state>`)\n expect(el.size).to.equal('md');\n expect(el.variant).to.equal('tonal');\n expect(el.icon).to.equal('error');\n expect(el.grayscale).to.be.false;\n expect(el.text).to.equal('Empty State');\n expect(el.subText).to.equal('No Data');\n })\n\n it('should reflect properties to attributes', async () => {\n const iconName=\"action\"\n const el = await fixture<NileEmptyState>(html`\n <nile-empty-state size=\"sm\" variant=\"flat\" icon=${iconName} grayscale text=\"Test state text\" sub-text=\"Test sub text\"></nile-empty-state>\n `);\n expect(el.getAttribute('size')).to.equal('sm');\n expect(el.getAttribute('variant')).to.equal('flat');\n expect(el.getAttribute('icon')).to.equal(iconName);\n expect(el.hasAttribute('grayscale')).to.be.true;\n expect(el.getAttribute('text')).to.equal('Test state text');\n expect(el.getAttribute('sub-text')).to.equal('Test sub text');\n });\n\n it('should render different sizes correctly', async () => {\n const sizes:Array<'sm' | 'md' | 'lg' >= ['sm', 'md', 'lg'];\n for (const size of sizes) {\n const el = await fixture<NileEmptyState>(html`<nile-empty-state size=\"${size}\"></nile-empty-state>`);\n const container = el.shadowRoot!.querySelector('.empty-state')!;\n expect(container.classList.contains(`empty-state--${size}`)).to.be.true;\n }\n });\n\n it('should render different variants correctly', async () => {\n const variants :Array<'flat' | 'content' | 'tonal' >= ['flat', 'content', 'tonal'];\n for (const variant of variants) {\n const el = await fixture<NileEmptyState>(html`<nile-empty-state variant=\"${variant}\"></nile-empty-state>`);\n const container = el.shadowRoot!.querySelector(`.empty-state__body--${variant}`)!;\n expect(container).to.exist;\n }\n });\n\n it('should render text properties correctly', async () => {\n const sampleText='Custom Text'\n const sampleSubText=\"Custom SubText\"\n const el = await fixture<NileEmptyState>(html`\n <nile-empty-state text=${sampleText} sub-text=${sampleSubText}></nile-empty-state>\n `);\n const textEl = el.shadowRoot!.querySelector('.empty-state__text')!;\n const subTextEl = el.shadowRoot!.querySelector('.empty-state__subtext')!;\n expect(textEl.textContent).to.equal(sampleText);\n expect(subTextEl.textContent).to.equal(sampleSubText);\n });\n\n it('should render slot content', async () => {\n const el = await fixture<NileEmptyState>(html`\n <nile-empty-state>\n <div class=\"slot-content\">Slot Content</div>\n </nile-empty-state>\n `);\n const slotContent = el.querySelector('.slot-content')!;\n expect(slotContent).to.exist;\n expect(slotContent.textContent).to.equal('Slot Content');\n });\n})"],"names":["iconName","describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","expect","el","size","to","equal","variant","icon","grayscale","be","text","subText","_context2","stop","_callee","_templateObject2","getAttribute","hasAttribute","true","_context3","_callee2","sizes","_i2","_i","_templateObject3","container","shadowRoot","querySelector","classList","contains","_context4","next","_callee3","variants","_i5","_i4","length","_context5","_templateObject4","exist","_callee4","sampleText","sampleSubText","_context6","_templateObject5","textEl","subTextEl","textContent","_callee5","_templateObject6","slotContent","_context7","_callee6"],"mappings":"4zBAkB4DA,oJAAAA,mBAAAA,UAAAA,oBAAAA,SAAAA,CAAAA,OAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA,MAAAA,CAAAA,SAAAA,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";import"lit/directives/unsafe-html.js";import"./nile-empty-state.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"lit/directives/class-map.js";import"./nile-empty-state.css.esm.js";import"../internal/nile-element.esm.js";import"../property-09139d3c.esm.js";describe("NileEmptyState",(()=>{it("renders correctly with default properties",(async()=>{const i=await t(s`<nile-empty-state></nile-empty-state>`);e(i.size).to.equal("md"),e(i.variant).to.equal("tonal"),e(i.icon).to.equal("error"),e(i.grayscale).to.be.false,e(i.text).to.equal("Empty State"),e(i.subText).to.equal("No Data")})),it("should reflect properties to attributes",(async()=>{const i="action",a=await t(s`
2
+ <nile-empty-state size="sm" variant="flat" icon=${i} grayscale text="Test state text" sub-text="Test sub text"></nile-empty-state>
3
+ `);e(a.getAttribute("size")).to.equal("sm"),e(a.getAttribute("variant")).to.equal("flat"),e(a.getAttribute("icon")).to.equal(i),e(a.hasAttribute("grayscale")).to.be.true,e(a.getAttribute("text")).to.equal("Test state text"),e(a.getAttribute("sub-text")).to.equal("Test sub text")})),it("should render different sizes correctly",(async()=>{const i=["sm","md","lg"];for(const a of i){const i=(await t(s`<nile-empty-state size="${a}"></nile-empty-state>`)).shadowRoot.querySelector(".empty-state");e(i.classList.contains(`empty-state--${a}`)).to.be.true}})),it("should render different variants correctly",(async()=>{const i=["flat","content","tonal"];for(const a of i){const i=(await t(s`<nile-empty-state variant="${a}"></nile-empty-state>`)).shadowRoot.querySelector(`.empty-state__body--${a}`);e(i).to.exist}})),it("should render text properties correctly",(async()=>{const i="Custom Text",a="Custom SubText",o=await t(s`
4
+ <nile-empty-state text=${i} sub-text=${a}></nile-empty-state>
5
+ `),r=o.shadowRoot.querySelector(".empty-state__text"),n=o.shadowRoot.querySelector(".empty-state__subtext");e(r.textContent).to.equal(i),e(n.textContent).to.equal(a)})),it("should render slot content",(async()=>{const i=(await t(s`
6
+ <nile-empty-state>
7
+ <div class="slot-content">Slot Content</div>
8
+ </nile-empty-state>
9
+ `)).querySelector(".slot-content");e(i).to.exist,e(i.textContent).to.equal("Slot Content")}))}));
@@ -0,0 +1,2 @@
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["../fixture-b1476eef.cjs.js","lit/static-html.js","lit/html.js","lit/directive-helpers.js","lit","lit/directives/unsafe-html.js","./nile-hero.cjs.js","tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-hero.css.cjs.js","../internal/nile-element.cjs.js","lit/directives/class-map.js","../property-217fe924.cjs.js"],function(_export,_context){"use strict";var e,i,t,_templateObject,_templateObject2,_templateObject3;function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function _regeneratorRuntime(){return e;};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value;},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function define(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e];}try{define({},"");}catch(t){define=function define(t,e,r){return t[e]=r;};}function wrap(t,e,r,n){var i=e&&e.prototype instanceof Generator?e:Generator,a=Object.create(i.prototype),c=new Context(n||[]);return o(a,"_invoke",{value:makeInvokeMethod(t,r,c)}),a;}function tryCatch(t,e,r){try{return{type:"normal",arg:t.call(e,r)};}catch(t){return{type:"throw",arg:t};}}e.wrap=wrap;var h="suspendedStart",l="suspendedYield",f="executing",s="completed",y={};function Generator(){}function GeneratorFunction(){}function GeneratorFunctionPrototype(){}var p={};define(p,a,function(){return this;});var d=Object.getPrototypeOf,v=d&&d(d(values([])));v&&v!==r&&n.call(v,a)&&(p=v);var g=GeneratorFunctionPrototype.prototype=Generator.prototype=Object.create(p);function defineIteratorMethods(t){["next","throw","return"].forEach(function(e){define(t,e,function(t){return this._invoke(e,t);});});}function AsyncIterator(t,e){function invoke(r,o,i,a){var c=tryCatch(t[r],t,o);if("throw"!==c.type){var u=c.arg,h=u.value;return h&&"object"==_typeof(h)&&n.call(h,"__await")?e.resolve(h.__await).then(function(t){invoke("next",t,i,a);},function(t){invoke("throw",t,i,a);}):e.resolve(h).then(function(t){u.value=t,i(u);},function(t){return invoke("throw",t,i,a);});}a(c.arg);}var r;o(this,"_invoke",{value:function value(t,n){function callInvokeWithMethodAndArg(){return new e(function(e,r){invoke(t,n,e,r);});}return r=r?r.then(callInvokeWithMethodAndArg,callInvokeWithMethodAndArg):callInvokeWithMethodAndArg();}});}function makeInvokeMethod(e,r,n){var o=h;return function(i,a){if(o===f)throw Error("Generator is already running");if(o===s){if("throw"===i)throw a;return{value:t,done:!0};}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=maybeInvokeDelegate(c,n);if(u){if(u===y)continue;return u;}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=s,n.arg;n.dispatchException(n.arg);}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var p=tryCatch(e,r,n);if("normal"===p.type){if(o=n.done?s:l,p.arg===y)continue;return{value:p.arg,done:n.done};}"throw"===p.type&&(o=s,n.method="throw",n.arg=p.arg);}};}function maybeInvokeDelegate(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator["return"]&&(r.method="return",r.arg=t,maybeInvokeDelegate(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=tryCatch(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y);}function pushTryEntry(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e);}function resetTryEntry(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e;}function Context(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(pushTryEntry,this),this.reset(!0);}function values(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function next(){for(;++o<e.length;)if(n.call(e,o))return next.value=e[o],next.done=!1,next;return next.value=t,next.done=!0,next;};return i.next=i;}}throw new TypeError(_typeof(e)+" is not iterable");}return GeneratorFunction.prototype=GeneratorFunctionPrototype,o(g,"constructor",{value:GeneratorFunctionPrototype,configurable:!0}),o(GeneratorFunctionPrototype,"constructor",{value:GeneratorFunction,configurable:!0}),GeneratorFunction.displayName=define(GeneratorFunctionPrototype,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===GeneratorFunction||"GeneratorFunction"===(e.displayName||e.name));},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,GeneratorFunctionPrototype):(t.__proto__=GeneratorFunctionPrototype,define(t,u,"GeneratorFunction")),t.prototype=Object.create(g),t;},e.awrap=function(t){return{__await:t};},defineIteratorMethods(AsyncIterator.prototype),define(AsyncIterator.prototype,c,function(){return this;}),e.AsyncIterator=AsyncIterator,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new AsyncIterator(wrap(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next();});},defineIteratorMethods(g),define(g,u,"Generator"),define(g,a,function(){return this;}),define(g,"toString",function(){return"[object Generator]";}),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function next(){for(;r.length;){var t=r.pop();if(t in e)return next.value=t,next.done=!1,next;}return next.done=!0,next;};},e.values=values,Context.prototype={constructor:Context,reset:function reset(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(resetTryEntry),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t);},stop:function stop(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function dispatchException(e){if(this.done)throw e;var r=this;function handle(n,o){return a.type="throw",a.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o;}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return handle("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}else if(c){if(this.prev<i.catchLoc)return handle(i.catchLoc,!0);}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function abrupt(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break;}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a);},complete:function complete(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y;},finish:function finish(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),resetTryEntry(r),y;}},"catch":function _catch(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;resetTryEntry(r);}return o;}}throw Error("illegal catch attempt");},delegateYield:function delegateYield(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}return{setters:[function(_fixture004CjsJs){e=_fixture004CjsJs.f;i=_fixture004CjsJs.a;},function(_litStaticHtmlJs){t=_litStaticHtmlJs.html;},function(_litHtmlJs){},function(_litDirectiveHelpersJs){},function(_lit){},function(_litDirectivesUnsafeHtmlJs){},function(_nileHeroCjsJs){},function(_tslib){},function(_index001CjsJs){},function(_litDecoratorsJs){},function(_nileHeroCssCjsJs){},function(_internalNileElementCjsJs){},function(_litDirectivesClassMapJs){},function(_property002CjsJs){}],execute:function execute(){describe("NileHero",function(){it("renders correctly with default properties",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var r;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return e(t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>"]))));case 2:r=_context2.sent;i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be["false"],i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot();case 4:case"end":return _context2.stop();}},_callee);}))),it("checks for collapsed state",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){var _r$shadowRoot;var r,s;return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:_context3.next=2;return e(t(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["<nile-hero></nile-hero>"]))));case 2:r=_context3.sent;r.collapse=!0;_context3.next=6;return r.updateComplete;case 6:i(r.collapse).to.be["true"];r.collapse=!0;_context3.next=10;return r.updateComplete;case 10:s=(_r$shadowRoot=r.shadowRoot)===null||_r$shadowRoot===void 0?void 0:_r$shadowRoot.querySelector(".hero__container");i(s===null||s===void 0?void 0:s.classList.contains("hero__container--collapsed")).to.be["true"];case 12:case"end":return _context3.stop();}},_callee2);}))),it("should render slot content",/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){var r,s;return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:_context4.next=2;return e(t(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n "]))));case 2:r=_context4.sent;_context4.next=5;return r.updateComplete;case 5:s=r.querySelector("nile-page-header");i(s).to.exist;case 7:case"end":return _context4.stop();}},_callee3);})));});}};});
2
+ //# sourceMappingURL=nile-hero.test.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-hero.test.cjs.js","sources":["../../../src/nile-hero/nile-hero.test.ts"],"sourcesContent":["import { fixture, html, expect, oneEvent } from '@open-wc/testing';\nimport './nile-hero';\nimport { NileHero } from './nile-hero';\n\ndescribe('NileHero', () => {\n it('renders correctly with default properties', async () => {\n const el = await fixture<NileHero>(html`\n\t\t<nile-hero icon=\"error\" hero-text=\"Test Hero\">\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>`);\n expect(el.getAttribute('icon')).to.equal('error');\n expect(el.hasAttribute('collapse')).to.be.false;\n expect(el.getAttribute('img-src')).to.equal('');\n expect(el.getAttribute('hero-text')).to.equal('Test Hero');\n expect(el).shadowDom.to.equalSnapshot();\n });\n\n it('checks for collapsed state', async () => {\n const el = await fixture<NileHero>(html`<nile-hero></nile-hero>`);\n el.collapse = true;\n await el.updateComplete;\n expect(el.collapse).to.be.true;\n el.collapse=true;\n await el.updateComplete;\n const heroContainer=el.shadowRoot?.querySelector('.hero__container');\n expect(heroContainer?.classList.contains('hero__container--collapsed')).to.be.true;\n });\n\n it('should render slot content', async () => {\n const el = await fixture<NileHero>(html`\n <nile-hero>\n <nile-page-header\n heading=\"I am heading\"\n sub-heading=\"I am subheading\"\n ></nile-page-header>\n </nile-hero>\n `);\n await el.updateComplete;\n const NilePageHeader = el.querySelector('nile-page-header')!;\n expect(NilePageHeader).to.exist;\n });\n})\n"],"names":["describe","it","_asyncToGenerator","_regeneratorRuntime","mark","async","fixture","html","_templateObject","_taggedTemplateLiteral","expect","el","getAttribute","to","equal","hasAttribute","be","false","shadowDom","equalSnapshot","_context2","stop","_callee","_templateObject2","collapse","_context3","next","updateComplete","heroContainer","shadowRoot","querySelector","classList","contains","true","_callee2","_templateObject3","NilePageHeader","exist","_context4","_callee3"],"mappings":"shTAIAA,QAAAA,CAAS,UAAY,CAAA,UAAA,CACnBC,EAAG,CAAA,2CAAA,cAAAC,iBAAA,cAAAC,mBAAA,GAAAC,IAAA,CAA6CC,SAAAA,QAAAA,MAAAA,CAAAA,QAAAA,mBAAAA,GAAAA,I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}
@@ -0,0 +1,14 @@
1
+ import{f as e,a as i}from"../fixture-6f853cbd.esm.js";import{html as t}from"lit/static-html.js";import"lit/html.js";import"lit/directive-helpers.js";import"lit";import"lit/directives/unsafe-html.js";import"./nile-hero.esm.js";import"tslib";import"../index-0a3007c5.esm.js";import"lit/decorators.js";import"./nile-hero.css.esm.js";import"../internal/nile-element.esm.js";import"lit/directives/class-map.js";import"../property-09139d3c.esm.js";describe("NileHero",(()=>{it("renders correctly with default properties",(async()=>{const r=await e(t`
2
+ <nile-hero icon="error" hero-text="Test Hero">
3
+ <nile-page-header
4
+ heading="I am heading"
5
+ sub-heading="I am subheading"
6
+ ></nile-page-header>
7
+ </nile-hero>`);i(r.getAttribute("icon")).to.equal("error"),i(r.hasAttribute("collapse")).to.be.false,i(r.getAttribute("img-src")).to.equal(""),i(r.getAttribute("hero-text")).to.equal("Test Hero"),i(r).shadowDom.to.equalSnapshot()})),it("checks for collapsed state",(async()=>{const r=await e(t`<nile-hero></nile-hero>`);r.collapse=!0,await r.updateComplete,i(r.collapse).to.be.true,r.collapse=!0,await r.updateComplete;const s=r.shadowRoot?.querySelector(".hero__container");i(s?.classList.contains("hero__container--collapsed")).to.be.true})),it("should render slot content",(async()=>{const r=await e(t`
8
+ <nile-hero>
9
+ <nile-page-header
10
+ heading="I am heading"
11
+ sub-heading="I am subheading"
12
+ ></nile-page-header>
13
+ </nile-hero>
14
+ `);await r.updateComplete;const s=r.querySelector("nile-page-header");i(s).to.exist}))}));
@@ -0,0 +1,2 @@
1
+ System.register(["./nile-split-panel.cjs.js","tslib","./nile-split-panel.css.cjs.js","../index-c7ad3b47.cjs.js","../internal/nile-element.cjs.js","lit","../internal/math.cjs.js","lit/decorators.js","../internal/drag.cjs.js","lit/directives/if-defined.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";return{setters:[function(_nileSplitPanelCjsJs){_export("NileSplitPanel",_nileSplitPanelCjsJs.N);},function(_tslib){},function(_nileSplitPanelCssCjsJs){},function(_index001CjsJs){},function(_internalNileElementCjsJs){},function(_lit){},function(_internalMathCjsJs){},function(_litDecoratorsJs){},function(_internalDragCjsJs){},function(_litDirectivesIfDefinedJs){},function(_internalWatchCjsJs){}],execute:function execute(){}};});
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export{N as NileSplitPanel}from"./nile-split-panel.esm.js";import"tslib";import"./nile-split-panel.css.esm.js";import"../index-0a3007c5.esm.js";import"../internal/nile-element.esm.js";import"lit";import"../internal/math.esm.js";import"lit/decorators.js";import"../internal/drag.esm.js";import"lit/directives/if-defined.js";import"../internal/watch.esm.js";
@@ -0,0 +1,2 @@
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","./nile-split-panel.css.cjs.js","../internal/nile-element.cjs.js","../internal/math.cjs.js","lit/decorators.js","../internal/drag.cjs.js","lit","lit/directives/if-defined.js","../internal/watch.cjs.js","../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var i,t,s,e,r,n,h,a,o,l,d,_templateObject,p;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}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(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){i=_tslib.__decorate;},function(_nileSplitPanelCssCjsJs){t=_nileSplitPanelCssCjsJs.s;},function(_internalNileElementCjsJs){s=_internalNileElementCjsJs.N;},function(_internalMathCjsJs){e=_internalMathCjsJs.c;},function(_litDecoratorsJs){r=_litDecoratorsJs.query;n=_litDecoratorsJs.property;h=_litDecoratorsJs.customElement;},function(_internalDragCjsJs){a=_internalDragCjsJs.d;},function(_lit){o=_lit.html;},function(_litDirectivesIfDefinedJs){l=_litDirectivesIfDefinedJs.ifDefined;},function(_internalWatchCjsJs){d=_internalWatchCjsJs.w;},function(_index001CjsJs){}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_s){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p,arguments),_this.position=50,_this.vertical=!1,_this.disabled=!1,_this.snapThreshold=12;return _this;}_inherits(p,_s);return _createClass(p,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(p.prototype),"connectedCallback",this).call(this),this.resizeObserver=new ResizeObserver(function(i){return _this2.handleResize(i);}),this.updateComplete.then(function(){return _this2.resizeObserver.observe(_this2);}),this.detectSize(),this.cachedPositionInPixels=this.percentageToPixels(this.position);}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(p.prototype),"disconnectedCallback",this).call(this),this.resizeObserver.unobserve(this);}},{key:"detectSize",value:function detectSize(){var _this$getBoundingClie=this.getBoundingClientRect(),i=_this$getBoundingClie.width,t=_this$getBoundingClie.height;this.size=this.vertical?t:i;}},{key:"percentageToPixels",value:function percentageToPixels(i){return this.size*(i/100);}},{key:"pixelsToPercentage",value:function pixelsToPercentage(i){return i/this.size*100;}},{key:"handleDrag",value:function handleDrag(i){var _this3=this;this.disabled||(i.cancelable&&i.preventDefault(),a(this,{onMove:function onMove(i,t){var s=_this3.vertical?t:i;if("end"===_this3.primary&&(s=_this3.size-s),_this3.snap){_this3.snap.split(" ").forEach(function(i){var t;t=i.endsWith("%")?_this3.size*(parseFloat(i)/100):parseFloat(i),s>=t-_this3.snapThreshold&&s<=t+_this3.snapThreshold&&(s=t);});}_this3.position=e(_this3.pixelsToPercentage(s),0,100);},initialEvent:i}));}},{key:"handleKeyDown",value:function handleKeyDown(i){if(!this.disabled&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(i.key)){var _t=this.position;var _s2=(i.shiftKey?10:1)*("end"===this.primary?-1:1);i.preventDefault(),("ArrowLeft"===i.key&&!this.vertical||"ArrowUp"===i.key&&this.vertical)&&(_t-=_s2),("ArrowRight"===i.key&&!this.vertical||"ArrowDown"===i.key&&this.vertical)&&(_t+=_s2),"Home"===i.key&&(_t="end"===this.primary?100:0),"End"===i.key&&(_t="end"===this.primary?0:100),this.position=e(_t,0,100);}}},{key:"handleResize",value:function handleResize(i){var _i$0$contentRect=i[0].contentRect,t=_i$0$contentRect.width,s=_i$0$contentRect.height;this.size=this.vertical?s:t,this.primary&&(this.position=this.pixelsToPercentage(this.cachedPositionInPixels));}},{key:"handlePositionChange",value:function handlePositionChange(){this.cachedPositionInPixels=this.percentageToPixels(this.position),this.positionInPixels=this.percentageToPixels(this.position),this.emit("nile-reposition");}},{key:"handlePositionInPixelsChange",value:function handlePositionInPixelsChange(){this.position=this.pixelsToPercentage(this.positionInPixels);}},{key:"handleVerticalChange",value:function handleVerticalChange(){this.detectSize();}},{key:"render",value:function render(){var i=this.vertical?"gridTemplateRows":"gridTemplateColumns",t=this.vertical?"gridTemplateColumns":"gridTemplateRows",s="\n clamp(\n 0%,\n clamp(\n var(--min),\n ".concat(this.position,"% - var(--divider-width) / 2,\n var(--max)\n ),\n calc(100% - var(--divider-width))\n )\n "),e="auto";return"end"===this.primary?this.style[i]="".concat(e," var(--divider-width) ").concat(s):this.style[i]="".concat(s," var(--divider-width) ").concat(e),this.style[t]="",o(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <slot name=\"start\" part=\"panel start\" class=\"start\"></slot>\n\n <div\n part=\"divider\"\n class=\"divider\"\n tabindex=","\n role=\"separator\"\n aria-valuenow=","\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-label=\"resize\"\n @keydown=","\n @mousedown=","\n @touchstart=","\n >\n <slot name=\"divider\"></slot>\n </div>\n\n <slot name=\"end\" part=\"panel end\" class=\"end\"></slot>\n "])),l(this.disabled?void 0:"0"),this.position,this.handleKeyDown,this.handleDrag,this.handleDrag);}}]);}(s));p.styles=t,i([r(".divider")],p.prototype,"divider",void 0),i([n({type:Number,reflect:!0})],p.prototype,"position",void 0),i([n({attribute:"position-in-pixels",type:Number})],p.prototype,"positionInPixels",void 0),i([n({type:Boolean,reflect:!0})],p.prototype,"vertical",void 0),i([n({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),i([n()],p.prototype,"primary",void 0),i([n()],p.prototype,"snap",void 0),i([n({type:Number,attribute:"snap-threshold"})],p.prototype,"snapThreshold",void 0),i([d("position")],p.prototype,"handlePositionChange",null),i([d("positionInPixels")],p.prototype,"handlePositionInPixelsChange",null),i([d("vertical")],p.prototype,"handleVerticalChange",null),_export("N",p=i([h("nile-split-panel")],p));}};});
2
+ //# sourceMappingURL=nile-split-panel.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-split-panel.cjs.js","sources":["../../../src/nile-split-panel/nile-split-panel.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, CSSResultArray, TemplateResult} from 'lit-element';\nimport {styles} from './nile-split-panel.css';\nimport NileElement from '../internal/nile-element';\n\n\nimport { clamp } from '../internal/math';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { drag } from '../internal/drag';\nimport { html } from 'lit';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * @summary Split panels display two adjacent panels, allowing the user to reposition them.\n *\n * @event nile-reposition - Emitted when the divider's position changes.\n *\n * @slot start - Content to place in the start panel.\n * @slot end - Content to place in the end panel.\n * @slot divider - The divider. Useful for slotting in a custom icon that renders as a handle.\n *\n * @csspart start - The start panel.\n * @csspart end - The end panel.\n * @csspart panel - Targets both the start and end panels.\n * @csspart divider - The divider that separates the start and end panels.\n *\n * @cssproperty [--divider-width=4px] - The width of the visible divider.\n * @cssproperty [--divider-hit-area=12px] - The invisible region around the divider where dragging can occur. This is\n * usually wider than the divider to facilitate easier dragging.\n * @cssproperty [--min=0] - The minimum allowed size of the primary panel.\n * @cssproperty [--max=100%] - The maximum allowed size of the primary panel.\n */\n@customElement('nile-split-panel')\nexport class NileSplitPanel extends NileElement {\n\n\tstatic styles: CSSResultGroup = styles;\n\n private cachedPositionInPixels: number;\n private resizeObserver: ResizeObserver;\n private size: number;\n\n @query('.divider') divider: HTMLElement;\n\n /**\n * The current position of the divider from the primary panel's edge as a percentage 0-100. Defaults to 50% of the\n * container's initial size.\n */\n @property({ type: Number, reflect: true }) position = 50;\n\n /** The current position of the divider from the primary panel's edge in pixels. */\n @property({ attribute: 'position-in-pixels', type: Number }) positionInPixels: number;\n\n /** Draws the split panel in a vertical orientation with the start and end panels stacked. */\n @property({ type: Boolean, reflect: true }) vertical = false;\n\n /** Disables resizing. Note that the position may still change as a result of resizing the host element. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /**\n * If no primary panel is designated, both panels will resize proportionally when the host element is resized. If a\n * primary panel is designated, it will maintain its size and the other panel will grow or shrink as needed when the\n * host element is resized.\n */\n @property() primary?: 'start' | 'end';\n\n /**\n * One or more space-separated values at which the divider should snap. Values can be in pixels or percentages, e.g.\n * `\"100px 50%\"`.\n */\n @property() snap?: string;\n\n /** How close the divider must be to a snap point until snapping occurs. */\n @property({ type: Number, attribute: 'snap-threshold' }) snapThreshold = 12;\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(entries => this.handleResize(entries));\n this.updateComplete.then(() => this.resizeObserver.observe(this));\n\n this.detectSize();\n this.cachedPositionInPixels = this.percentageToPixels(this.position);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n this.resizeObserver.unobserve(this);\n }\n\n private detectSize() {\n const { width, height } = this.getBoundingClientRect();\n this.size = this.vertical ? height : width;\n }\n\n private percentageToPixels(value: number) {\n return this.size * (value / 100);\n }\n\n private pixelsToPercentage(value: number) {\n return (value / this.size) * 100;\n }\n\n private handleDrag(event: PointerEvent) {\n const isRtl = false;\n\n if (this.disabled) {\n return;\n }\n\n // Prevent text selection when dragging\n if (event.cancelable) {\n event.preventDefault();\n }\n\n drag(this, {\n onMove: (x, y) => {\n let newPositionInPixels = this.vertical ? y : x;\n\n // Flip for end panels\n if (this.primary === 'end') {\n newPositionInPixels = this.size - newPositionInPixels;\n }\n\n // Check snap points\n if (this.snap) {\n const snaps = this.snap.split(' ');\n\n snaps.forEach(value => {\n let snapPoint: number;\n\n if (value.endsWith('%')) {\n snapPoint = this.size * (parseFloat(value) / 100);\n } else {\n snapPoint = parseFloat(value);\n }\n\n if (isRtl && !this.vertical) {\n snapPoint = this.size - snapPoint;\n }\n\n if (\n newPositionInPixels >= snapPoint - this.snapThreshold &&\n newPositionInPixels <= snapPoint + this.snapThreshold\n ) {\n newPositionInPixels = snapPoint;\n }\n });\n }\n\n this.position = clamp(this.pixelsToPercentage(newPositionInPixels), 0, 100);\n },\n initialEvent: event\n });\n }\n\n private handleKeyDown(event: KeyboardEvent) {\n if (this.disabled) {\n return;\n }\n\n if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {\n let newPosition = this.position;\n const incr = (event.shiftKey ? 10 : 1) * (this.primary === 'end' ? -1 : 1);\n\n event.preventDefault();\n\n if ((event.key === 'ArrowLeft' && !this.vertical) || (event.key === 'ArrowUp' && this.vertical)) {\n newPosition -= incr;\n }\n\n if ((event.key === 'ArrowRight' && !this.vertical) || (event.key === 'ArrowDown' && this.vertical)) {\n newPosition += incr;\n }\n\n if (event.key === 'Home') {\n newPosition = this.primary === 'end' ? 100 : 0;\n }\n\n if (event.key === 'End') {\n newPosition = this.primary === 'end' ? 0 : 100;\n }\n\n this.position = clamp(newPosition, 0, 100);\n }\n }\n\n private handleResize(entries: ResizeObserverEntry[]) {\n const { width, height } = entries[0].contentRect;\n this.size = this.vertical ? height : width;\n\n // Resize when a primary panel is set\n if (this.primary) {\n this.position = this.pixelsToPercentage(this.cachedPositionInPixels);\n }\n }\n\n @watch('position')\n handlePositionChange() {\n this.cachedPositionInPixels = this.percentageToPixels(this.position);\n this.positionInPixels = this.percentageToPixels(this.position);\n this.emit('nile-reposition');\n }\n\n @watch('positionInPixels')\n handlePositionInPixelsChange() {\n this.position = this.pixelsToPercentage(this.positionInPixels);\n }\n\n @watch('vertical')\n handleVerticalChange() {\n this.detectSize();\n }\n\n render() {\n const gridTemplate = this.vertical ? 'gridTemplateRows' : 'gridTemplateColumns';\n const gridTemplateAlt = this.vertical ? 'gridTemplateColumns' : 'gridTemplateRows';\n const isRtl = false;\n const primary = `\n clamp(\n 0%,\n clamp(\n var(--min),\n ${this.position}% - var(--divider-width) / 2,\n var(--max)\n ),\n calc(100% - var(--divider-width))\n )\n `;\n const secondary = 'auto';\n\n if (this.primary === 'end') {\n if (isRtl && !this.vertical) {\n this.style[gridTemplate] = `${primary} var(--divider-width) ${secondary}`;\n } else {\n this.style[gridTemplate] = `${secondary} var(--divider-width) ${primary}`;\n }\n } else {\n if (isRtl && !this.vertical) {\n this.style[gridTemplate] = `${secondary} var(--divider-width) ${primary}`;\n } else {\n this.style[gridTemplate] = `${primary} var(--divider-width) ${secondary}`;\n }\n }\n\n // Unset the alt grid template property\n this.style[gridTemplateAlt] = '';\n\n return html`\n <slot name=\"start\" part=\"panel start\" class=\"start\"></slot>\n\n <div\n part=\"divider\"\n class=\"divider\"\n tabindex=${ifDefined(this.disabled ? undefined : '0')}\n role=\"separator\"\n aria-valuenow=${this.position}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n aria-label=\"resize\"\n @keydown=${this.handleKeyDown}\n @mousedown=${this.handleDrag}\n @touchstart=${this.handleDrag}\n >\n <slot name=\"divider\"></slot>\n </div>\n\n <slot name=\"end\" part=\"panel end\" class=\"end\"></slot>\n `;\n }\n}\n\nexport default NileSplitPanel;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-split-panel': NileSplitPanel;\n }\n}\n"],"names":["NileSplitPanel","_s","p","constructor","this","position","vertical","disabled","snapThreshold","_this","_inherits","_createClass","key","value","connectedCallback","super","resizeObserver","ResizeObserver","entries","handleResize","updateComplete","then","observe","detectSize","cachedPositionInPixels","percentageToPixels","disconnectedCallback","unobserve","_this$getBoundingClie","getBoundingClientRect","width","height","size","pixelsToPercentage","handleDrag","event","cancelable","preventDefault","drag","onMove","x","y","newPositionInPixels","primary","snap","split","forEach","snapPoint","endsWith","parseFloat","clamp","initialEvent","handleKeyDown","includes","newPosition","incr","shiftKey","_i$0$contentRect","contentRect","handlePositionChange","positionInPixels","emit","handlePositionInPixelsChange","handleVerticalChange","render","gridTemplate","gridTemplateAlt","secondary","style","html","_templateObject","_taggedTemplateLiteral","ifDefined","undefined","NileElement","styles","__decorate","query","prototype","property","type","Number","reflect","attribute","Boolean","watch","customElement"],"mappings":"yjJAyCaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCAcsCC,EAAAA,KAAAA,CAAQC,SAAG,EAMVD,CAAAA,KAAAA,CAAQE,UAAG,CAGXF,CAAAA,KAAAA,CAAQG,UAAG,CAgBEH,CAAAA,KAAAA,CAAaI,cAAG,EAoM1E,QAAAC,KAAA,EAlMCC,SAAA,CAA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AAA,CAAA,cAAA,EAM1BF,CAAAA,CAAAA,CAAAA,CAAA,CAAXG,CAAAA,CAAAA,CAAAA,CAAAA,CAAyB/E,CAAA8E,CAAAA,SAAAA,CAAA,WAAA,EAG+BF,CAAAA,CAAAA,CAAAA,CAAA,CAAxDG,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,MAAQE,CAAAA,SAAAA,CAAW,gBAAuCnF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8E,SAAA,CAAA,eAAA,CAAA,IAAA,EA4H5EF,CAAAA,CAAAA,CAAAA,CAAA,CADCS,CAAM,CAAA,UAAA,CAAA,CAAA,CAKNrF,CAAA8E,CAAAA,SAAAA,CAAA,sBAAA,CAAA,IAAA,CAAA,CAGDF,CAAA,CAAA,CADCS,CAAM,CAAA,kBAAA,CAAA,CAAA,CAGNrF,CAAA8E,CAAAA,SAAAA,CAAA,8BAAA,CAAA,IAAA,CAAA,CAGDF,EAAA,CADCS,CAAAA,CAAM,UAGNrF,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8E,SAAA,CAAA,sBAAA,CAAA,IAjLU9E,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAc4E,CAAA,CAAA,CAD1BU,CAAc,CAAA,kBAAA,CAAA,CAAA,CACFtF"}
@@ -0,0 +1,2 @@
1
+ System.register(["../index-c7ad3b47.cjs.js"],function(_export,_context){"use strict";var i,_templateObject,e;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_index001CjsJs){i=_index001CjsJs.i;}],execute:function execute(){_export("s",e=i(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n box-sizing: border-box;\n --divider-width: 4px;\n --divider-hit-area: 12px;\n --min: 0%;\n --max: 100%;\n\n display: grid;\n }\n\n .start,\n .end {\n overflow: hidden;\n }\n\n .divider {\n flex: 0 0 var(--divider-width);\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n background-color: var(--nile-colors-neutral-100);\n color: var(--nile-colors-dark-900);\n z-index: 1;\n }\n\n .divider:focus {\n outline: none;\n }\n\n :host(:not([disabled])) .divider:focus-visible {\n background-color: var(--nile-colors-blue-500);\n color: var(--nile-colors-white-base);\n }\n\n :host([disabled]) .divider {\n cursor: not-allowed;\n }\n\n /* Horizontal */\n :host(:not([vertical], [disabled])) .divider {\n cursor: col-resize;\n }\n\n :host(:not([vertical])) .divider::after {\n display: flex;\n content: '';\n position: absolute;\n height: 100%;\n left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);\n width: var(--divider-hit-area);\n }\n\n /* Vertical */\n :host([vertical]) {\n flex-direction: column;\n }\n\n :host([vertical]:not([disabled])) .divider {\n cursor: row-resize;\n }\n\n :host([vertical]) .divider::after {\n content: '';\n position: absolute;\n width: 100%;\n top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);\n height: var(--divider-hit-area);\n }\n\n @media (forced-colors: active) {\n .divider {\n outline: solid 1px transparent;\n }\n }\n"]))));}};});
2
+ //# sourceMappingURL=nile-split-panel.css.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-split-panel.css.cjs.js","sources":["../../../src/nile-split-panel/nile-split-panel.css.ts"],"sourcesContent":["/**\n* Copyright Aquera Inc 2023\n*\n* This source code is licensed under the BSD-3-Clause license found in the\n* LICENSE file in the root directory of this source tree.\n*/\n\nimport {css} from 'lit-element';\n\n/**\n * SplitPanel CSS\n */\nexport const styles = css`\n :host *,\n :host *::before,\n :host *::after {\n box-sizing: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n :host {\n box-sizing: border-box;\n --divider-width: 4px;\n --divider-hit-area: 12px;\n --min: 0%;\n --max: 100%;\n\n display: grid;\n }\n\n .start,\n .end {\n overflow: hidden;\n }\n\n .divider {\n flex: 0 0 var(--divider-width);\n display: flex;\n position: relative;\n align-items: center;\n justify-content: center;\n background-color: var(--nile-colors-neutral-100);\n color: var(--nile-colors-dark-900);\n z-index: 1;\n }\n\n .divider:focus {\n outline: none;\n }\n\n :host(:not([disabled])) .divider:focus-visible {\n background-color: var(--nile-colors-blue-500);\n color: var(--nile-colors-white-base);\n }\n\n :host([disabled]) .divider {\n cursor: not-allowed;\n }\n\n /* Horizontal */\n :host(:not([vertical], [disabled])) .divider {\n cursor: col-resize;\n }\n\n :host(:not([vertical])) .divider::after {\n display: flex;\n content: '';\n position: absolute;\n height: 100%;\n left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);\n width: var(--divider-hit-area);\n }\n\n /* Vertical */\n :host([vertical]) {\n flex-direction: column;\n }\n\n :host([vertical]:not([disabled])) .divider {\n cursor: row-resize;\n }\n\n :host([vertical]) .divider::after {\n content: '';\n position: absolute;\n width: 100%;\n top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);\n height: var(--divider-hit-area);\n }\n\n @media (forced-colors: active) {\n .divider {\n outline: solid 1px transparent;\n }\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"wXAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -0,0 +1,87 @@
1
+ import{i}from"../index-0a3007c5.esm.js";const e=i`
2
+ :host *,
3
+ :host *::before,
4
+ :host *::after {
5
+ box-sizing: inherit;
6
+ }
7
+
8
+ [hidden] {
9
+ display: none !important;
10
+ }
11
+
12
+ :host {
13
+ box-sizing: border-box;
14
+ --divider-width: 4px;
15
+ --divider-hit-area: 12px;
16
+ --min: 0%;
17
+ --max: 100%;
18
+
19
+ display: grid;
20
+ }
21
+
22
+ .start,
23
+ .end {
24
+ overflow: hidden;
25
+ }
26
+
27
+ .divider {
28
+ flex: 0 0 var(--divider-width);
29
+ display: flex;
30
+ position: relative;
31
+ align-items: center;
32
+ justify-content: center;
33
+ background-color: var(--nile-colors-neutral-100);
34
+ color: var(--nile-colors-dark-900);
35
+ z-index: 1;
36
+ }
37
+
38
+ .divider:focus {
39
+ outline: none;
40
+ }
41
+
42
+ :host(:not([disabled])) .divider:focus-visible {
43
+ background-color: var(--nile-colors-blue-500);
44
+ color: var(--nile-colors-white-base);
45
+ }
46
+
47
+ :host([disabled]) .divider {
48
+ cursor: not-allowed;
49
+ }
50
+
51
+ /* Horizontal */
52
+ :host(:not([vertical], [disabled])) .divider {
53
+ cursor: col-resize;
54
+ }
55
+
56
+ :host(:not([vertical])) .divider::after {
57
+ display: flex;
58
+ content: '';
59
+ position: absolute;
60
+ height: 100%;
61
+ left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);
62
+ width: var(--divider-hit-area);
63
+ }
64
+
65
+ /* Vertical */
66
+ :host([vertical]) {
67
+ flex-direction: column;
68
+ }
69
+
70
+ :host([vertical]:not([disabled])) .divider {
71
+ cursor: row-resize;
72
+ }
73
+
74
+ :host([vertical]) .divider::after {
75
+ content: '';
76
+ position: absolute;
77
+ width: 100%;
78
+ top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);
79
+ height: var(--divider-hit-area);
80
+ }
81
+
82
+ @media (forced-colors: active) {
83
+ .divider {
84
+ outline: solid 1px transparent;
85
+ }
86
+ }
87
+ `;export{e as s};
@@ -0,0 +1,21 @@
1
+ import{__decorate as i}from"tslib";import{s as t}from"./nile-split-panel.css.esm.js";import{N as s}from"../internal/nile-element.esm.js";import{c as e}from"../internal/math.esm.js";import{query as r,property as n,customElement as h}from"lit/decorators.js";import{d as a}from"../internal/drag.esm.js";import{html as o}from"lit";import{ifDefined as l}from"lit/directives/if-defined.js";import{w as d}from"../internal/watch.esm.js";import"../index-0a3007c5.esm.js";let p=class extends s{constructor(){super(...arguments),this.position=50,this.vertical=!1,this.disabled=!1,this.snapThreshold=12}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver((i=>this.handleResize(i))),this.updateComplete.then((()=>this.resizeObserver.observe(this))),this.detectSize(),this.cachedPositionInPixels=this.percentageToPixels(this.position)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}detectSize(){const{width:i,height:t}=this.getBoundingClientRect();this.size=this.vertical?t:i}percentageToPixels(i){return this.size*(i/100)}pixelsToPercentage(i){return i/this.size*100}handleDrag(i){this.disabled||(i.cancelable&&i.preventDefault(),a(this,{onMove:(i,t)=>{let s=this.vertical?t:i;if("end"===this.primary&&(s=this.size-s),this.snap){this.snap.split(" ").forEach((i=>{let t;t=i.endsWith("%")?this.size*(parseFloat(i)/100):parseFloat(i),s>=t-this.snapThreshold&&s<=t+this.snapThreshold&&(s=t)}))}this.position=e(this.pixelsToPercentage(s),0,100)},initialEvent:i}))}handleKeyDown(i){if(!this.disabled&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(i.key)){let t=this.position;const s=(i.shiftKey?10:1)*("end"===this.primary?-1:1);i.preventDefault(),("ArrowLeft"===i.key&&!this.vertical||"ArrowUp"===i.key&&this.vertical)&&(t-=s),("ArrowRight"===i.key&&!this.vertical||"ArrowDown"===i.key&&this.vertical)&&(t+=s),"Home"===i.key&&(t="end"===this.primary?100:0),"End"===i.key&&(t="end"===this.primary?0:100),this.position=e(t,0,100)}}handleResize(i){const{width:t,height:s}=i[0].contentRect;this.size=this.vertical?s:t,this.primary&&(this.position=this.pixelsToPercentage(this.cachedPositionInPixels))}handlePositionChange(){this.cachedPositionInPixels=this.percentageToPixels(this.position),this.positionInPixels=this.percentageToPixels(this.position),this.emit("nile-reposition")}handlePositionInPixelsChange(){this.position=this.pixelsToPercentage(this.positionInPixels)}handleVerticalChange(){this.detectSize()}render(){const i=this.vertical?"gridTemplateRows":"gridTemplateColumns",t=this.vertical?"gridTemplateColumns":"gridTemplateRows",s=`\n clamp(\n 0%,\n clamp(\n var(--min),\n ${this.position}% - var(--divider-width) / 2,\n var(--max)\n ),\n calc(100% - var(--divider-width))\n )\n `,e="auto";return"end"===this.primary?this.style[i]=`${e} var(--divider-width) ${s}`:this.style[i]=`${s} var(--divider-width) ${e}`,this.style[t]="",o`
2
+ <slot name="start" part="panel start" class="start"></slot>
3
+
4
+ <div
5
+ part="divider"
6
+ class="divider"
7
+ tabindex=${l(this.disabled?void 0:"0")}
8
+ role="separator"
9
+ aria-valuenow=${this.position}
10
+ aria-valuemin="0"
11
+ aria-valuemax="100"
12
+ aria-label="resize"
13
+ @keydown=${this.handleKeyDown}
14
+ @mousedown=${this.handleDrag}
15
+ @touchstart=${this.handleDrag}
16
+ >
17
+ <slot name="divider"></slot>
18
+ </div>
19
+
20
+ <slot name="end" part="panel end" class="end"></slot>
21
+ `}};p.styles=t,i([r(".divider")],p.prototype,"divider",void 0),i([n({type:Number,reflect:!0})],p.prototype,"position",void 0),i([n({attribute:"position-in-pixels",type:Number})],p.prototype,"positionInPixels",void 0),i([n({type:Boolean,reflect:!0})],p.prototype,"vertical",void 0),i([n({type:Boolean,reflect:!0})],p.prototype,"disabled",void 0),i([n()],p.prototype,"primary",void 0),i([n()],p.prototype,"snap",void 0),i([n({type:Number,attribute:"snap-threshold"})],p.prototype,"snapThreshold",void 0),i([d("position")],p.prototype,"handlePositionChange",null),i([d("positionInPixels")],p.prototype,"handlePositionInPixelsChange",null),i([d("vertical")],p.prototype,"handleVerticalChange",null),p=i([h("nile-split-panel")],p);export{p as N};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-stepper.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","lit/directives/class-map.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,e,s,i,r,n,l,o,_templateObject,p;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}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(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.customElement;},function(_nileStepperCssCjsJs){i=_nileStepperCssCjsJs.s;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){n=_internalWatchCjsJs.w;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_property002CjsJs){o=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_r){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p,arguments),_this.isVertical=!1,_this.contentBelow=!1,_this.currentStep=0,_this.completedStep=0,_this.size="md",_this.icon="tick";return _this;}_inherits(p,_r);return _createClass(p,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(p.prototype),"connectedCallback",this).call(this),this.updateComplete.then(function(){_this2.updateItems();});}},{key:"handleCurrentStepChanges",value:function handleCurrentStepChanges(){this.updateItems(),this.emit("nile-current-change",{value:this.currentStep});}},{key:"handleCompletedStepChanges",value:function handleCompletedStepChanges(){this.updateItems(),this.emit("nile-completed-change",{value:this.completedStep});}},{key:"updateItems",value:function updateItems(){var _this3=this;var t=_toConsumableArray(this.querySelectorAll(this.isVertical?"nile-vertical-stepper-item":"nile-stepper-item"));if(!t.length)return;var e=t.length<3,s=0==this.currentStep||this.currentStep>t.length?1:this.currentStep,i=this.completedStep>t.length||this.completedStep<s?s:this.completedStep,r=this.completedStep>t.length?0:this.completedStep;t.forEach(function(n,l){l+1<s?(n.isComplete=!0,n.isCurrent=!1):l+1==s?(n.isComplete=l+1<=i,n.isCurrent=!0):(n.isComplete=l+1<=i,n.isCurrent=!1),0==l&&(n.isFirst=!0),l==t.length-1&&(n.isLast=!0),n.currentStepValue=s,n.calculatedCompletedStepValue=i,n.completedStepValue=r,n.icon=_this3.icon,n.size=_this3.size,n.value=l+1,n.contentBelow=_this3.contentBelow,0!=l&&l!=t.length-1||(n.haveFlex=e);});}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div class=","> \n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=","\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t\t"])),l({"nile-stepper":!0,"nile-stepper--horizontal":!this.isVertical,"nile-stepper--vertical":this.isVertical}),this.updateItems);}}],[{key:"styles",get:function get(){return[i];}}]);}(r));t([o({type:Boolean,attribute:"vertical"})],p.prototype,"isVertical",void 0),t([o({type:Boolean,attribute:"content-below"})],p.prototype,"contentBelow",void 0),t([o({type:Number,attribute:"current-step"})],p.prototype,"currentStep",void 0),t([o({type:Number,attribute:"completed-step"})],p.prototype,"completedStep",void 0),t([o({type:String,attribute:"size"})],p.prototype,"size",void 0),t([o()],p.prototype,"icon",void 0),t([n("currentStep")],p.prototype,"handleCurrentStepChanges",null),t([n("completedStep")],p.prototype,"handleCompletedStepChanges",null),_export("N",p=t([s("nile-stepper")],p));}};});
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","../index-c7ad3b47.cjs.js","lit/decorators.js","./nile-stepper.css.cjs.js","../internal/nile-element.cjs.js","../internal/watch.cjs.js","lit/directives/class-map.js","../property-217fe924.cjs.js","lit"],function(_export,_context){"use strict";var t,e,s,i,r,n,l,o,_templateObject,p;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _toConsumableArray(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i<len;i++)arr2[i]=arr[i];return arr2;}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}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(self,call){if(call&&(_typeof(call)==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){s=_litDecoratorsJs.customElement;},function(_nileStepperCssCjsJs){i=_nileStepperCssCjsJs.s;},function(_internalNileElementCjsJs){r=_internalNileElementCjsJs.N;},function(_internalWatchCjsJs){n=_internalWatchCjsJs.w;},function(_litDirectivesClassMapJs){l=_litDirectivesClassMapJs.classMap;},function(_property002CjsJs){o=_property002CjsJs.n;},function(_lit){}],execute:function execute(){_export("N",p=/*#__PURE__*/function(_r){function p(){var _this;_classCallCheck(this,p);_this=_callSuper(this,p,arguments),_this.isVertical=!1,_this.contentBelow=!1,_this.currentStep=0,_this.completedStep=0,_this.size="md",_this.icon="tick";return _this;}_inherits(p,_r);return _createClass(p,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(p.prototype),"connectedCallback",this).call(this),this.updateComplete.then(function(){_this2.updateItems();});}},{key:"handleCurrentStepChanges",value:function handleCurrentStepChanges(){this.updateItems(),this.emit("nile-current-change",{value:this.currentStep});}},{key:"handleCompletedStepChanges",value:function handleCompletedStepChanges(){this.updateItems(),this.emit("nile-completed-change",{value:this.completedStep});}},{key:"updateItems",value:function updateItems(){var _this3=this;var t=_toConsumableArray(this.querySelectorAll(this.isVertical?"nile-vertical-stepper-item":"nile-stepper-item"));if(!t.length)return;var e=t.length<3,s=0==this.currentStep||this.currentStep>t.length?1:this.currentStep,i=this.completedStep>t.length||this.completedStep<s?s:this.completedStep,r=this.completedStep>t.length?0:this.completedStep;t.forEach(function(n,l){l+1<s?(n.isComplete=!0,n.isCurrent=!1):l+1==s?(n.isComplete=l+1<=i,n.isCurrent=!0):(n.isComplete=l+1<=i,n.isCurrent=!1),0==l&&(n.isFirst=!0),l==t.length-1&&(n.isLast=!0),n.currentStepValue=s,n.calculatedCompletedStepValue=i,n.completedStepValue=r,n.icon=_this3.icon,n.size=_this3.size,n.value=l+1,n.contentBelow=_this3.contentBelow,0!=l&&l!=t.length-1||(n.haveFlex=e);});}},{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\t\t\t<div class=",">\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=","\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t\t"])),l({"nile-stepper":!0,"nile-stepper--horizontal":!this.isVertical,"nile-stepper--vertical":this.isVertical}),this.updateItems);}}],[{key:"styles",get:function get(){return[i];}}]);}(r));t([o({type:Boolean,attribute:"vertical"})],p.prototype,"isVertical",void 0),t([o({type:Boolean,attribute:"content-below"})],p.prototype,"contentBelow",void 0),t([o({type:Number,attribute:"current-step"})],p.prototype,"currentStep",void 0),t([o({type:Number,attribute:"completed-step"})],p.prototype,"completedStep",void 0),t([o({type:String,attribute:"size"})],p.prototype,"size",void 0),t([o()],p.prototype,"icon",void 0),t([n("currentStep")],p.prototype,"handleCurrentStepChanges",null),t([n("completedStep")],p.prototype,"handleCompletedStepChanges",null),_export("N",p=t([s("nile-stepper")],p));}};});
2
2
  //# sourceMappingURL=nile-stepper.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-stepper.cjs.js","sources":["../../../src/nile-stepper/nile-stepper.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-stepper.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile stepper component.\n *\n * @tag nile-stepper\n *\n */\n@customElement('nile-stepper')\nexport class NileStepper extends NileElement {\n\n\t@property({ type: Boolean, attribute: 'vertical' }) isVertical: boolean = false;\n\t@property({ type: Boolean, attribute: 'content-below' }) contentBelow: boolean = false;\n\t@property({ type: Number, attribute: 'current-step' }) currentStep: number = 0;\n\t@property({ type: Number, attribute: 'completed-step' }) completedStep: number = 0;\n\t@property({ type: String, attribute: 'size' }) size: 'sm' | 'md' | 'lg' = 'md';\n\t@property() icon: string = 'tick';\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.updateItems();\n\t\t});\n\t}\n\n\t@watch('currentStep')\n\thandleCurrentStepChanges() {\n\t\tthis.updateItems();\n\t\tthis.emit('nile-current-change', { value: this.currentStep });\n\t}\n\n\t@watch('completedStep')\n\thandleCompletedStepChanges() {\n\t\tthis.updateItems()\n\t\tthis.emit('nile-completed-change', { value: this.completedStep });\n\t}\n\n\tprivate updateItems() {\n\t\tconst items: any = [...this.querySelectorAll(this.isVertical?'nile-vertical-stepper-item':'nile-stepper-item')];\n\t\tif (!items.length) return;\n\t\tconst haveFlex = items.length < 3;\n\n\t\tconst current = (this.currentStep == 0 || this.currentStep > items.length) ? 1 : this.currentStep;\n\t\tconst calculatedCompleted = this.completedStep > items.length ? current : this.completedStep < current ? current : this.completedStep;\n\t\tconst completed = this.completedStep > items.length ? 0 : this.completedStep;\n\n\t\titems.forEach((el: any, index: number) => {\n\t\t\t// set item is complete and is current values\n\t\t\tif (index + 1 < current) {\n\t\t\t\tel.isComplete = true;\n\t\t\t\tel.isCurrent = false;\n\t\t\t}\n\t\t\telse if (index + 1 == current) {\n\t\t\t\tif (index + 1 <= calculatedCompleted) el.isComplete = true;\n\t\t\t\telse el.isComplete = false;\n\t\t\t\tel.isCurrent = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (index + 1 <= calculatedCompleted) el.isComplete = true;\n\t\t\t\telse el.isComplete = false;\n\t\t\t\tel.isCurrent = false;\n\t\t\t}\n\n\t\t\t// Set isLast and isFirst\n\t\t\tif (index == 0) el.isFirst = true;\n\t\t\tif (index == items.length - 1) el.isLast = true;\n\n\t\t\t// setting default values\n\t\t\tel.currentStepValue = current;\n\t\t\tel.calculatedCompletedStepValue = calculatedCompleted;\n\t\t\tel.completedStepValue = completed;\n\n\t\t\tel.icon = this.icon;\n\t\t\tel.size = this.size;\n\t\t\tel.value = index + 1;\n\t\t\tel.contentBelow = this.contentBelow\n\t\t\tif (index == 0 || index == items.length - 1) {\n\t\t\t\tel.haveFlex = haveFlex;\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * The styles for nile-stepper\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t\t<div class=${classMap({\n\t\t\t\t'nile-stepper':true,\n\t\t\t\t'nile-stepper--horizontal':!this.isVertical,\n\t\t\t\t'nile-stepper--vertical':this.isVertical\n\t\t\t})}> \n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${this.updateItems}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileStepper;\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'nile-stepper': NileStepper;\n\t}\n}"],"names":["NileStepper","p","this","isVertical","contentBelow","currentStep","completedStep","size","icon","_this","_inherits","_r","_createClass","key","value","connectedCallback","super","updateComplete","then","updateItems","handleCurrentStepChanges","emit","handleCompletedStepChanges","items","_toConsumableArray","querySelectorAll","length","haveFlex","current","calculatedCompleted","completed","forEach","el","index","isComplete","isCurrent","isFirst","isLast","currentStepValue","calculatedCompletedStepValue","completedStepValue","render","html","_templateObject","_taggedTemplateLiteral","classMap","get","styles","NileElement","__decorate","property","type","Boolean","attribute","prototype","Number","String","watch","customElement"],"mappings":"q+KAsBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEAE8CC,EAAAA,KAAAA,CAAUC,YAAY,CACjBD,CAAAA,KAAAA,CAAYE,YAAY,CAAA,CAAA,CAAA,CAC1BF,KAAAA,CAAWG,WAAAA,CAAW,EACpBH,KAAAA,CAAaI,aAAAA,CAAW,CAClCJ,CAAAA,KAAAA,CAAIK,IAAuB,CAAA,IAAA,CAC9DL,KAAAA,CAAIM,IAAW,CAAA,MAiG3B,QAAAC,KAAA,EA/FAC,SAAA,CAAAT,CAAA,CAAAU,EAAA,SAAAC,YAAA,CAAAX,CAAA,GAAAY,GAAA,qBAAAC,KAAA,UAAAC,kBAAA,CACCC,KAAAA,MAAAA,MAAAA,IAAAA,CAAAA,eAAAA,CAAAA,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CAAA,CAUlCL,CAAA,CAAA,CADCQ,EAAM,aAINzD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsD,UAAA,0BAAA,CAAA,IAAA,CAAA,CAGDL,EAAA,CADCQ,CAAAA,CAAM,kBAINzD,CAAAsD,CAAAA,SAAAA,CAAA,6BAAA,IA1BWtD,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAWiD,EAAA,CADvBS,CAAAA,CAAc,iBACF1D"}
1
+ {"version":3,"file":"nile-stepper.cjs.js","sources":["../../../src/nile-stepper/nile-stepper.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { LitElement, html, property, CSSResultArray, TemplateResult } from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport { styles } from './nile-stepper.css';\nimport NileElement from '../internal/nile-element';\nimport { watch } from '../internal/watch';\nimport { classMap } from 'lit/directives/class-map.js';\n\n\n/**\n * Nile stepper component.\n *\n * @tag nile-stepper\n *\n */\n@customElement('nile-stepper')\nexport class NileStepper extends NileElement {\n\n\t@property({ type: Boolean, attribute: 'vertical' }) isVertical: boolean = false;\n\t@property({ type: Boolean, attribute: 'content-below' }) contentBelow: boolean = false;\n\t@property({ type: Number, attribute: 'current-step' }) currentStep: number = 0;\n\t@property({ type: Number, attribute: 'completed-step' }) completedStep: number = 0;\n\t@property({ type: String, attribute: 'size' }) size: 'sm' | 'md' | 'lg' = 'md';\n\t@property() icon: string = 'tick';\n\n\tconnectedCallback() {\n\t\tsuper.connectedCallback();\n\t\tthis.updateComplete.then(() => {\n\t\t\tthis.updateItems();\n\t\t});\n\t}\n\n\t@watch('currentStep')\n\thandleCurrentStepChanges() {\n\t\tthis.updateItems();\n\t\tthis.emit('nile-current-change', { value: this.currentStep });\n\t}\n\n\t@watch('completedStep')\n\thandleCompletedStepChanges() {\n\t\tthis.updateItems()\n\t\tthis.emit('nile-completed-change', { value: this.completedStep });\n\t}\n\n\tprivate updateItems() {\n\t\tconst items: any = [...this.querySelectorAll(this.isVertical?'nile-vertical-stepper-item':'nile-stepper-item')];\n\t\tif (!items.length) return;\n\t\tconst haveFlex = items.length < 3;\n\n\t\tconst current = (this.currentStep == 0 || this.currentStep > items.length) ? 1 : this.currentStep;\n\t\tconst calculatedCompleted = this.completedStep > items.length ? current : this.completedStep < current ? current : this.completedStep;\n\t\tconst completed = this.completedStep > items.length ? 0 : this.completedStep;\n\n\t\titems.forEach((el: any, index: number) => {\n\t\t\t// set item is complete and is current values\n\t\t\tif (index + 1 < current) {\n\t\t\t\tel.isComplete = true;\n\t\t\t\tel.isCurrent = false;\n\t\t\t}\n\t\t\telse if (index + 1 == current) {\n\t\t\t\tif (index + 1 <= calculatedCompleted) el.isComplete = true;\n\t\t\t\telse el.isComplete = false;\n\t\t\t\tel.isCurrent = true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (index + 1 <= calculatedCompleted) el.isComplete = true;\n\t\t\t\telse el.isComplete = false;\n\t\t\t\tel.isCurrent = false;\n\t\t\t}\n\n\t\t\t// Set isLast and isFirst\n\t\t\tif (index == 0) el.isFirst = true;\n\t\t\tif (index == items.length - 1) el.isLast = true;\n\n\t\t\t// setting default values\n\t\t\tel.currentStepValue = current;\n\t\t\tel.calculatedCompletedStepValue = calculatedCompleted;\n\t\t\tel.completedStepValue = completed;\n\n\t\t\tel.icon = this.icon;\n\t\t\tel.size = this.size;\n\t\t\tel.value = index + 1;\n\t\t\tel.contentBelow = this.contentBelow\n\t\t\tif (index == 0 || index == items.length - 1) {\n\t\t\t\tel.haveFlex = haveFlex;\n\t\t\t}\n\t\t})\n\t}\n\n\t/**\n\t * The styles for nile-stepper\n\t * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n\t */\n\tpublic static get styles(): CSSResultArray {\n\t\treturn [styles];\n\t}\n\n\t/* #endregion */\n\n\t/* #region Methods */\n\n\t/**\n\t * Render method\n\t * @slot This is a slot test\n\t */\n\tpublic render(): TemplateResult {\n\t\treturn html`\n\t\t\t<div class=${classMap({\n\t\t\t\t'nile-stepper':true,\n\t\t\t\t'nile-stepper--horizontal':!this.isVertical,\n\t\t\t\t'nile-stepper--vertical':this.isVertical\n\t\t\t})}>\n\t\t\t\t<slot\n\t\t\t\t\t@slotchange=${this.updateItems}\n\t\t\t\t></slot>\n\t\t\t</div>\n\t\t\t`;\n\t}\n\n\t/* #endregion */\n}\n\nexport default NileStepper;\n\ndeclare global {\n\tinterface HTMLElementTagNameMap {\n\t\t'nile-stepper': NileStepper;\n\t}\n}\n"],"names":["NileStepper","p","this","isVertical","contentBelow","currentStep","completedStep","size","icon","_this","_inherits","_r","_createClass","key","value","connectedCallback","super","updateComplete","then","updateItems","handleCurrentStepChanges","emit","handleCompletedStepChanges","items","_toConsumableArray","querySelectorAll","length","haveFlex","current","calculatedCompleted","completed","forEach","el","index","isComplete","isCurrent","isFirst","isLast","currentStepValue","calculatedCompletedStepValue","completedStepValue","render","html","_templateObject","_taggedTemplateLiteral","classMap","get","styles","NileElement","__decorate","property","type","Boolean","attribute","prototype","Number","String","watch","customElement"],"mappings":"q+KAsBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEAE8CC,EAAAA,KAAAA,CAAUC,YAAY,CACjBD,CAAAA,KAAAA,CAAYE,YAAY,CAAA,CAAA,CAAA,CAC1BF,KAAAA,CAAWG,WAAAA,CAAW,EACpBH,KAAAA,CAAaI,aAAAA,CAAW,CAClCJ,CAAAA,KAAAA,CAAIK,IAAuB,CAAA,IAAA,CAC9DL,KAAAA,CAAIM,IAAW,CAAA,MAiG3B,QAAAC,KAAA,EA/FAC,SAAA,CAAAT,CAAA,CAAAU,EAAA,SAAAC,YAAA,CAAAX,CAAA,GAAAY,GAAA,qBAAAC,KAAA,UAAAC,kBAAA,CACCC,KAAAA,MAAAA,MAAAA,IAAAA,CAAAA,eAAAA,CAAAA,CAAAA,CAAAA,SAAAA,4B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A,CADCQ,EAAM,aAINzD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAsD,UAAA,0BAAA,CAAA,IAAA,CAAA,CAGDL,EAAA,CADCQ,CAAAA,CAAM,kBAINzD,CAAAsD,CAAAA,SAAAA,CAAA,6BAAA,IA1BWtD,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAWiD,EAAA,CADvBS,CAAAA,CAAc,iBACF1D"}
@@ -1,5 +1,5 @@
1
1
  import{__decorate as t}from"tslib";import{x as e}from"../index-0a3007c5.esm.js";import{customElement as s}from"lit/decorators.js";import{s as i}from"./nile-stepper.css.esm.js";import{N as r}from"../internal/nile-element.esm.js";import{w as n}from"../internal/watch.esm.js";import{classMap as l}from"lit/directives/class-map.js";import{n as o}from"../property-09139d3c.esm.js";import"lit";let p=class extends r{constructor(){super(...arguments),this.isVertical=!1,this.contentBelow=!1,this.currentStep=0,this.completedStep=0,this.size="md",this.icon="tick"}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.updateItems()}))}handleCurrentStepChanges(){this.updateItems(),this.emit("nile-current-change",{value:this.currentStep})}handleCompletedStepChanges(){this.updateItems(),this.emit("nile-completed-change",{value:this.completedStep})}updateItems(){const t=[...this.querySelectorAll(this.isVertical?"nile-vertical-stepper-item":"nile-stepper-item")];if(!t.length)return;const e=t.length<3,s=0==this.currentStep||this.currentStep>t.length?1:this.currentStep,i=this.completedStep>t.length||this.completedStep<s?s:this.completedStep,r=this.completedStep>t.length?0:this.completedStep;t.forEach(((n,l)=>{l+1<s?(n.isComplete=!0,n.isCurrent=!1):l+1==s?(n.isComplete=l+1<=i,n.isCurrent=!0):(n.isComplete=l+1<=i,n.isCurrent=!1),0==l&&(n.isFirst=!0),l==t.length-1&&(n.isLast=!0),n.currentStepValue=s,n.calculatedCompletedStepValue=i,n.completedStepValue=r,n.icon=this.icon,n.size=this.size,n.value=l+1,n.contentBelow=this.contentBelow,0!=l&&l!=t.length-1||(n.haveFlex=e)}))}static get styles(){return[i]}render(){return e`
2
- <div class=${l({"nile-stepper":!0,"nile-stepper--horizontal":!this.isVertical,"nile-stepper--vertical":this.isVertical})}>
2
+ <div class=${l({"nile-stepper":!0,"nile-stepper--horizontal":!this.isVertical,"nile-stepper--vertical":this.isVertical})}>
3
3
  <slot
4
4
  @slotchange=${this.updateItems}
5
5
  ></slot>
@@ -0,0 +1,2 @@
1
+ System.register([],function(_export,_context){"use strict";return{setters:[],execute:function execute(){}};});
2
+ //# sourceMappingURL=nile-stepper.test.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nile-stepper.test.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -64,3 +64,4 @@ export { NileStepper } from './nile-stepper';
64
64
  export { NileHeroHeader } from './nile-hero-header';
65
65
  export { NileVerticalStepperItem } from './nile-vertical-stepper-item';
66
66
  export { NileFormatDate } from './nile-format-date';
67
+ export { NileSplitPanel } from './nile-split-panel';
package/dist/src/index.js CHANGED
@@ -64,4 +64,5 @@ export { NileStepper } from './nile-stepper';
64
64
  export { NileHeroHeader } from './nile-hero-header';
65
65
  export { NileVerticalStepperItem } from './nile-vertical-stepper-item';
66
66
  export { NileFormatDate } from './nile-format-date';
67
+ export { NileSplitPanel } from './nile-split-panel';
67
68
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACz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E,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileSidebarMenu } from './nile-sidebar-menu';\nexport { NileSidebarMenuItems } from './nile-sidebar-menu-items';\nexport { NileSidebarWrapper } from './nile-sidebar-wrapper';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,E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A6B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC","sourcesContent":["export { NileButton } from './nile-button';\nexport { NileHeading } from './nile-heading';\nexport { NileIcon } from './nile-icon';\nexport { NileInput } from './nile-input';\nexport { NileSidebar } from './nile-sidebar';\nexport { NileMenu } from './nile-menu';\nexport { NileBadge } from './nile-badge';\nexport { NileDrawer } from './nile-drawer';\nexport { NileCheckbox } from './nile-checkbox';\nexport { NileRadio } from './nile-radio';\nexport { NileRadioGroup } from './nile-radio-group';\nexport { NilePopup } from './nile-popup';\nexport { NileTooltip } from './nile-tooltip';\nexport { NileSlideToggle } from './nile-slide-toggle';\nexport { NileLoader } from './nile-loader';\nexport { NileProgressBar } from './nile-progress-bar';\nexport { NileSpinner } from './nile-spinner';\nexport { NileSelect } from './nile-select';\nexport { NileOption } from './nile-option';\nexport { NileTag } from './nile-tag';\nexport { NileIconButton } from './nile-icon-button';\nexport { NileMenuItem } from './nile-menu-item';\nexport { NileDropdown } from './nile-dropdown';\nexport { NileAutoComplete } from './nile-auto-complete';\nexport { NileChip } from './nile-chip';\nexport { NileTextarea } from './nile-textarea';\nexport { NileDatePicker } from './nile-date-picker';\nexport { NileErrorMessage } from './nile-error-message';\nexport { NileFormErrorMessage } from './nile-form-error-message';\nexport { NileFormHelpText } from './nile-form-help-text';\nexport { NileCalendar } from './nile-calendar';\nexport { NileLink } from './nile-link';\nexport { NileButtonToggleGroup } from './nile-button-toggle-group';\nexport { NileButtonToggle } from './nile-button-toggle';\nexport { NileSwitcher } from './nile-switcher';\nexport { NileContentEditor } from './nile-content-editor';\nexport { NileDialog } from './nile-dialog';\nexport { NileErrorNotification } from './nile-error-notification';\nexport { NileTabGroup } from './nile-tab-group';\nexport { NileTab } from './nile-tab';\nexport { NileTabPanel } from './nile-tab-panel';\nexport { NileCodeEditor } from './nile-code-editor';\nexport { NileToast } from './nile-toast';\nexport { NileBreadcrumb } from './nile-breadcrumb';\nexport { NileBreadcrumbItem } from './nile-breadcrumb-item';\nexport { NileFormGroup } from './nile-form-group';\nexport { NileCard } from './nile-card';\nexport { NilePopover } from './nile-popover';\nexport { NileButtonFilter } from './nile-button-filter';\nexport { NileCircularProgressbar } from './nile-circular-progressbar';\nexport { NileSidebarMenu } from './nile-sidebar-menu';\nexport { NileSidebarMenuItems } from './nile-sidebar-menu-items';\nexport { NileSidebarWrapper } from './nile-sidebar-wrapper';\nexport { NileTableCellItem } from './nile-table-cell-item';\nexport { NileTableRow } from './nile-table-row';\nexport { NileTableBody } from './nile-table-body';\nexport { NileTableHeaderItem } from './nile-table-header-item';\nexport { NileAvatar } from './nile-avatar';\nexport { NilePageHeader } from './nile-page-header';\nexport { NileEmptyState } from './nile-empty-state';\nexport { NileHero } from './nile-hero';\nexport { NileStepperItem } from './nile-stepper-item';\nexport { NileStepper } from './nile-stepper';\nexport { NileHeroHeader } from './nile-hero-header';\nexport { NileVerticalStepperItem } from './nile-vertical-stepper-item';\nexport { NileFormatDate } from './nile-format-date';\nexport { NileSplitPanel } from './nile-split-panel';"]}
@@ -0,0 +1,15 @@
1
+ interface DragOptions {
2
+ /** Callback that runs as dragging occurs. */
3
+ onMove: (x: number, y: number) => void;
4
+ /** Callback that runs when dragging stops. */
5
+ onStop: () => void;
6
+ /**
7
+ * When an initial event is passed, the first drag will be triggered immediately using the coordinates therein. This
8
+ * is useful when the drag is initiated by a mousedown/touchstart event but you want the initial "click" to activate
9
+ * a drag (e.g. positioning a handle initially at the click target).
10
+ */
11
+ initialEvent: PointerEvent;
12
+ }
13
+ /** Begins listening for dragging. */
14
+ export declare function drag(container: HTMLElement, options?: Partial<DragOptions>): void;
15
+ export {};