@aquera/nile-elements 0.1.28 → 0.1.29-beta-1.2

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 (77) hide show
  1. package/demo/index.html +0 -97
  2. package/dist/nile-accordion/nile-accordion.cjs.js +1 -1
  3. package/dist/nile-accordion/nile-accordion.cjs.js.map +1 -1
  4. package/dist/nile-accordion/nile-accordion.esm.js +2 -2
  5. package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js +1 -1
  6. package/dist/nile-circular-progressbar/nile-circular-progressbar.cjs.js.map +1 -1
  7. package/dist/nile-circular-progressbar/nile-circular-progressbar.css.cjs.js +1 -1
  8. package/dist/nile-circular-progressbar/nile-circular-progressbar.css.cjs.js.map +1 -1
  9. package/dist/nile-circular-progressbar/nile-circular-progressbar.css.esm.js +47 -29
  10. package/dist/nile-circular-progressbar/nile-circular-progressbar.esm.js +16 -13
  11. package/dist/nile-progress-bar/nile-progress-bar.cjs.js +1 -1
  12. package/dist/nile-progress-bar/nile-progress-bar.cjs.js.map +1 -1
  13. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js +1 -1
  14. package/dist/nile-progress-bar/nile-progress-bar.css.cjs.js.map +1 -1
  15. package/dist/nile-progress-bar/nile-progress-bar.css.esm.js +16 -3
  16. package/dist/nile-progress-bar/nile-progress-bar.esm.js +3 -3
  17. package/dist/nile-stepper/nile-stepper.cjs.js +1 -1
  18. package/dist/nile-stepper/nile-stepper.cjs.js.map +1 -1
  19. package/dist/nile-stepper/nile-stepper.css.cjs.js +1 -1
  20. package/dist/nile-stepper/nile-stepper.css.cjs.js.map +1 -1
  21. package/dist/nile-stepper/nile-stepper.css.esm.js +8 -2
  22. package/dist/nile-stepper/nile-stepper.esm.js +3 -3
  23. package/dist/nile-stepper-item/nile-stepper-item.cjs.js +1 -1
  24. package/dist/nile-stepper-item/nile-stepper-item.cjs.js.map +1 -1
  25. package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js +1 -1
  26. package/dist/nile-stepper-item/nile-stepper-item.css.cjs.js.map +1 -1
  27. package/dist/nile-stepper-item/nile-stepper-item.css.esm.js +37 -16
  28. package/dist/nile-stepper-item/nile-stepper-item.esm.js +20 -17
  29. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js +1 -1
  30. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.cjs.js.map +1 -1
  31. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.css.cjs.js +1 -1
  32. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.css.cjs.js.map +1 -1
  33. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.css.esm.js +28 -14
  34. package/dist/nile-vertical-stepper-item/nile-vertical-stepper-item.esm.js +11 -13
  35. package/dist/src/nile-accordion/nile-accordion.d.ts +6 -5
  36. package/dist/src/nile-accordion/nile-accordion.js +19 -6
  37. package/dist/src/nile-accordion/nile-accordion.js.map +1 -1
  38. package/dist/src/nile-circular-progressbar/nile-circular-progressbar.css.d.ts +5 -5
  39. package/dist/src/nile-circular-progressbar/nile-circular-progressbar.css.js +52 -34
  40. package/dist/src/nile-circular-progressbar/nile-circular-progressbar.css.js.map +1 -1
  41. package/dist/src/nile-circular-progressbar/nile-circular-progressbar.d.ts +6 -2
  42. package/dist/src/nile-circular-progressbar/nile-circular-progressbar.js +47 -32
  43. package/dist/src/nile-circular-progressbar/nile-circular-progressbar.js.map +1 -1
  44. package/dist/src/nile-progress-bar/nile-progress-bar.css.js +14 -1
  45. package/dist/src/nile-progress-bar/nile-progress-bar.css.js.map +1 -1
  46. package/dist/src/nile-progress-bar/nile-progress-bar.d.ts +1 -0
  47. package/dist/src/nile-progress-bar/nile-progress-bar.js +6 -1
  48. package/dist/src/nile-progress-bar/nile-progress-bar.js.map +1 -1
  49. package/dist/src/nile-stepper/nile-stepper.css.js +6 -0
  50. package/dist/src/nile-stepper/nile-stepper.css.js.map +1 -1
  51. package/dist/src/nile-stepper/nile-stepper.d.ts +2 -2
  52. package/dist/src/nile-stepper/nile-stepper.js +8 -8
  53. package/dist/src/nile-stepper/nile-stepper.js.map +1 -1
  54. package/dist/src/nile-stepper-item/nile-stepper-item.css.js +37 -16
  55. package/dist/src/nile-stepper-item/nile-stepper-item.css.js.map +1 -1
  56. package/dist/src/nile-stepper-item/nile-stepper-item.d.ts +5 -1
  57. package/dist/src/nile-stepper-item/nile-stepper-item.js +33 -14
  58. package/dist/src/nile-stepper-item/nile-stepper-item.js.map +1 -1
  59. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.js +28 -14
  60. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.js.map +1 -1
  61. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.d.ts +1 -0
  62. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js +10 -8
  63. package/dist/src/nile-vertical-stepper-item/nile-vertical-stepper-item.js.map +1 -1
  64. package/dist/tsconfig.tsbuildinfo +1 -1
  65. package/package.json +1 -1
  66. package/src/nile-accordion/nile-accordion.ts +13 -2
  67. package/src/nile-circular-progressbar/nile-circular-progressbar.css.ts +48 -31
  68. package/src/nile-circular-progressbar/nile-circular-progressbar.ts +49 -26
  69. package/src/nile-progress-bar/nile-progress-bar.css.ts +15 -2
  70. package/src/nile-progress-bar/nile-progress-bar.ts +6 -1
  71. package/src/nile-stepper/nile-stepper.css.ts +6 -0
  72. package/src/nile-stepper/nile-stepper.ts +11 -11
  73. package/src/nile-stepper-item/nile-stepper-item.css.ts +37 -16
  74. package/src/nile-stepper-item/nile-stepper-item.ts +34 -17
  75. package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.css.ts +28 -14
  76. package/src/nile-vertical-stepper-item/nile-vertical-stepper-item.ts +12 -8
  77. package/vscode-html-custom-data.json +30 -9
package/demo/index.html CHANGED
@@ -35,103 +35,6 @@
35
35
  </div>
36
36
 
37
37
  <script>
38
- const tourElement = document.getElementById("tour");
39
-
40
- function startTour() {
41
- console.log("Starting tour...");
42
- tourElement.startTour();
43
- }
44
-
45
- // Initialize tour steps
46
- window.onload = () => {
47
- tourElement.stepsJson = [
48
- {
49
- stepNo: 1,
50
- element: "button1",
51
- title: "Welcome to Reports",
52
- content: "This is the title section for setting up reports.",
53
- position: "bottom-middle-aligned",
54
- disablePrev: true,
55
- beforeChange: () => {
56
- console.log("Before moving from Step 1");
57
- return true; // Return false to prevent moving forward
58
- },
59
- afterChange: () => {
60
- console.log("After arriving at Step 1");
61
- }
62
- },
63
- {
64
- stepNo: 2,
65
- element: "button2",
66
- title: "Checkbox",
67
- content: "Select this checkbox for additional options.",
68
- position: "bottom-middle-aligned",
69
- beforeChange: () => {
70
- console.log("Before moving from Step 2");
71
- return true;
72
- },
73
- afterChange: () => {
74
- console.log("After arriving at Step 2");
75
- }
76
- },
77
- {
78
- stepNo: 3,
79
- element: "button3",
80
- title: "Text Area",
81
- content: "Provide additional details about the report in this text area.",
82
- position: "bottom-middle-aligned",
83
- beforeChange: () => {
84
- console.log("Before moving from Step 3");
85
- return true;
86
- },
87
- afterChange: () => {
88
- console.log("After arriving at Step 3");
89
- }
90
- },
91
- {
92
- stepNo: 4,
93
- element: "button4",
94
- title: "Actions",
95
- content: "Use the Save, Reset, and Help buttons to manage your actions.",
96
- position: "bottom-middle-aligned",
97
- disableNext: true,
98
- beforeChange: () => {
99
- console.log("Before moving from Step 4");
100
- return true;
101
- },
102
- afterChange: () => {
103
- console.log("After arriving at Step 4");
104
- }
105
- }
106
- ];
107
-
108
- setTimeout(startTour, 1000);
109
- };
110
-
111
- // Add new buttons dynamically after 5 seconds
112
- setTimeout(() => {
113
- const container = document.getElementById("button-container");
114
-
115
- const button3 = document.createElement("nile-button");
116
- button3.id = "button3";
117
- button3.setAttribute("data-tour", "button3");
118
- button3.setAttribute("variant", "primary");
119
- button3.textContent = "Button 3";
120
- container.appendChild(button3);
121
-
122
- const button4 = document.createElement("nile-button");
123
- button4.id = "button4";
124
- button4.setAttribute("data-tour", "button4");
125
- button4.setAttribute("variant", "primary");
126
- button4.textContent = "Button 4";
127
- container.appendChild(button4);
128
-
129
- // Wait for buttons to be added before updating the tour
130
- // setTimeout(() => {
131
- // console.log(tourElement);
132
- // startTour();
133
- // }, 500);
134
- }, 7000);
135
38
  </script>
136
39
 
137
40
  </body>
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var i,a,t,s,e,r,o,n,c,h,d,l,m,p,f,_templateObject,y;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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 asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){i=_tslib.__decorate;},function(_lit){a=_lit.html;},function(_nileAccordionCssCjsJs){t=_nileAccordionCssCjsJs.s;},function(_internalNileElementCjsJs){s=_internalNileElementCjsJs.N;},function(_internalAnimateCjsJs){e=_internalAnimateCjsJs.s;r=_internalAnimateCjsJs.a;o=_internalAnimateCjsJs.b;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){c=_litDecoratorsJs.query;h=_litDecoratorsJs.property;d=_litDecoratorsJs.customElement;},function(_utilitiesAnimationRegistryCjsJs){l=_utilitiesAnimationRegistryCjsJs.s;m=_utilitiesAnimationRegistryCjsJs.g;},function(_internalEventCjsJs){p=_internalEventCjsJs.w;},function(_internalWatchCjsJs){f=_internalWatchCjsJs.w;}],execute:function execute(){_export("N",y=/*#__PURE__*/function(_s){function y(){var _this;_classCallCheck(this,y);_this=_callSuper(this,y,arguments),_this.open=!1,_this.variant="light",_this.expandIconPlacement="right",_this.size="md",_this.disabled=!1;return _this;}_inherits(y,_s);return _createClass(y,[{key:"firstUpdated",value:function firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0";}},{key:"handleSummaryClick",value:function handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus());}},{key:"handleSummaryKeyDown",value:function handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show());}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _m,_i,_a,_m2,_i2,_a2;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!this.open){_context2.next=13;break;}if(!this.emit("nile-show",{cancelable:!0}).defaultPrevented){_context2.next=3;break;}return _context2.abrupt("return",void(this.open=!1));case 3:_context2.next=5;return e(this.body);case 5:this.body.hidden=!1;_m=m(this,"accordian.show",{dir:"ltr"}),_i=_m.keyframes,_a=_m.options;_context2.next=9;return r(this.body,o(_i,this.body.scrollHeight),_a);case 9:this.body.style.height="auto";this.emit("nile-after-show");_context2.next=23;break;case 13:if(!this.emit("nile-hide",{cancelable:!0}).defaultPrevented){_context2.next=15;break;}return _context2.abrupt("return",void(this.open=!0));case 15:_context2.next=17;return e(this.body);case 17:_m2=m(this,"accordian.hide",{dir:"ltr"}),_i2=_m2.keyframes,_a2=_m2.options;_context2.next=20;return r(this.body,o(_i2,this.body.scrollHeight),_a2);case 20:this.body.hidden=!0;this.body.style.height="auto";this.emit("nile-after-hide");case 23:case"end":return _context2.stop();}},_callee,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!(!this.open&&!this.disabled)){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!0,p(this,"nile-after-show")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this.open&&!this.disabled)){_context4.next=2;break;}return _context4.abrupt("return",(this.open=!1,p(this,"nile-after-hide")));case 2:case"end":return _context4.stop();}},_callee3,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"render",value:function render(){return a(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"","\"\n role=\"button\"\n aria-expanded=","\n aria-controls=\"content\"\n aria-disabled=","\n tabindex=","\n @click=","\n @keydown=","\n >\n <slot name=\"summary\" part=\"summary\" class=\"accordian__summary\">","</slot>\n\n <span part=\"summary-icon\" class=\"accordian__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"accordian__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" \n class=\"","\"></slot>\n </div>\n </div>\n "])),n({accordian:!0,"accordian--open":this.open,"accordian--disabled":this.disabled,"accordian--sm":"sm"==this.size,"accordian--md":"md"==this.size,"accordian--lg":"lg"==this.size}),n({accordian__header:!0,"accordian__header--dark":"dark"==this.variant,"accordian__header--arrow-left":"left"==this.expandIconPlacement}),this.open?"true":"false",this.disabled?"true":"false",this.disabled?"-1":"0",this.handleSummaryClick,this.handleSummaryKeyDown,this.summary,n({accordian__content:!0,"accordian__content--arrow-left":"left"==this.expandIconPlacement}));}}]);}(s));y.styles=t,i([c(".accordian")],y.prototype,"accordian",void 0),i([c(".accordian__header")],y.prototype,"header",void 0),i([c(".accordian__body")],y.prototype,"body",void 0),i([c(".accordian__expand-icon-slot")],y.prototype,"expandIconSlot",void 0),i([h({type:Boolean,reflect:!0})],y.prototype,"open",void 0),i([h({reflect:!0})],y.prototype,"variant",void 0),i([h({reflect:!0})],y.prototype,"expandIconPlacement",void 0),i([h({reflect:!0})],y.prototype,"size",void 0),i([h()],y.prototype,"summary",void 0),i([h({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),i([f("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),_export("N",y=i([d("nile-accordion")],y)),l("accordian.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),l("accordian.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","./nile-accordion.css.cjs.js","../internal/nile-element.cjs.js","../internal/animate.cjs.js","lit/directives/class-map.js","lit/decorators.js","../utilities/animation-registry.cjs.js","../internal/event.cjs.js","../internal/watch.cjs.js"],function(_export,_context){"use strict";var i,t,a,s,e,o,r,n,c,h,d,l,m,p,f,_templateObject,u;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}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 asyncGeneratorStep(n,t,e,r,o,a,c){try{var i=n[a](c),u=i.value;}catch(n){return void e(n);}i.done?t(u):Promise.resolve(u).then(r,o);}function _asyncToGenerator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function _next(n){asyncGeneratorStep(a,r,o,_next,_throw,"next",n);}function _throw(n){asyncGeneratorStep(a,r,o,_next,_throw,"throw",n);}_next(void 0);});};}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){i=_tslib.__decorate;},function(_lit){t=_lit.html;},function(_nileAccordionCssCjsJs){a=_nileAccordionCssCjsJs.s;},function(_internalNileElementCjsJs){s=_internalNileElementCjsJs.N;},function(_internalAnimateCjsJs){e=_internalAnimateCjsJs.s;o=_internalAnimateCjsJs.a;r=_internalAnimateCjsJs.b;},function(_litDirectivesClassMapJs){n=_litDirectivesClassMapJs.classMap;},function(_litDecoratorsJs){c=_litDecoratorsJs.query;h=_litDecoratorsJs.property;d=_litDecoratorsJs.customElement;},function(_utilitiesAnimationRegistryCjsJs){l=_utilitiesAnimationRegistryCjsJs.s;m=_utilitiesAnimationRegistryCjsJs.g;},function(_internalEventCjsJs){p=_internalEventCjsJs.w;},function(_internalWatchCjsJs){f=_internalWatchCjsJs.w;}],execute:function execute(){_export("N",u=/*#__PURE__*/function(_s){function u(){var _this;_classCallCheck(this,u);_this=_callSuper(this,u,arguments),_this.open=!1,_this.variant="light",_this.expandIconPlacement="right",_this.size="md",_this.disabled=!1;return _this;}_inherits(u,_s);return _createClass(u,[{key:"firstUpdated",value:function firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0";}},{key:"handleSummaryClick",value:function handleSummaryClick(i){var t=i.composedPath(),a=t.indexOf(this.summarySlot);if(-1!==a)for(var _i=0;_i<a;_i++){var _a=t[_i];if(_a instanceof Element&&_a.matches("input, button, select, textarea, a, label"))return;}this.disabled||(this.open?this.hide():this.show(),this.header.focus());}},{key:"handleSummaryKeyDown",value:function handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show());}},{key:"handleOpenChange",value:function(){var _handleOpenChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){var _m,_i2,_t,_m2,_i3,_t2;return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:if(!this.open){_context2.next=13;break;}if(!this.emit("nile-show",{cancelable:!0}).defaultPrevented){_context2.next=3;break;}return _context2.abrupt("return",void(this.open=!1));case 3:_context2.next=5;return e(this.body);case 5:this.body.hidden=!1;_m=m(this,"accordian.show",{dir:"ltr"}),_i2=_m.keyframes,_t=_m.options;_context2.next=9;return o(this.body,r(_i2,this.body.scrollHeight),_t);case 9:this.body.style.height="auto";this.emit("nile-after-show");_context2.next=23;break;case 13:if(!this.emit("nile-hide",{cancelable:!0}).defaultPrevented){_context2.next=15;break;}return _context2.abrupt("return",void(this.open=!0));case 15:_context2.next=17;return e(this.body);case 17:_m2=m(this,"accordian.hide",{dir:"ltr"}),_i3=_m2.keyframes,_t2=_m2.options;_context2.next=20;return o(this.body,r(_i3,this.body.scrollHeight),_t2);case 20:this.body.hidden=!0;this.body.style.height="auto";this.emit("nile-after-hide");case 23:case"end":return _context2.stop();}},_callee,this);}));function handleOpenChange(){return _handleOpenChange.apply(this,arguments);}return handleOpenChange;}()},{key:"show",value:function(){var _show=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2(){return _regeneratorRuntime().wrap(function _callee2$(_context3){while(1)switch(_context3.prev=_context3.next){case 0:if(!(!this.open&&!this.disabled)){_context3.next=2;break;}return _context3.abrupt("return",(this.open=!0,p(this,"nile-after-show")));case 2:case"end":return _context3.stop();}},_callee2,this);}));function show(){return _show.apply(this,arguments);}return show;}()},{key:"hide",value:function(){var _hide=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3(){return _regeneratorRuntime().wrap(function _callee3$(_context4){while(1)switch(_context4.prev=_context4.next){case 0:if(!(this.open&&!this.disabled)){_context4.next=2;break;}return _context4.abrupt("return",(this.open=!1,p(this,"nile-after-hide")));case 2:case"end":return _context4.stop();}},_callee3,this);}));function hide(){return _hide.apply(this,arguments);}return hide;}()},{key:"render",value:function render(){return t(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"base\"\n class=","\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"","\"\n role=\"button\"\n aria-expanded=","\n aria-controls=\"content\"\n aria-disabled=","\n tabindex=","\n @click=","\n @keydown=","\n >\n <slot name=\"summary\" part=\"summary\" class=\"accordian__summary\">","</slot>\n\n <span part=\"summary-icon\" class=\"accordian__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"accordian__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" \n class=\"","\"></slot>\n </div>\n </div>\n "])),n({accordian:!0,"accordian--open":this.open,"accordian--disabled":this.disabled,"accordian--sm":"sm"==this.size,"accordian--md":"md"==this.size,"accordian--lg":"lg"==this.size}),n({accordian__header:!0,"accordian__header--dark":"dark"==this.variant,"accordian__header--arrow-left":"left"==this.expandIconPlacement}),this.open?"true":"false",this.disabled?"true":"false",this.disabled?"-1":"0",this.handleSummaryClick,this.handleSummaryKeyDown,this.summary,n({accordian__content:!0,"accordian__content--arrow-left":"left"==this.expandIconPlacement}));}}]);}(s));u.styles=a,i([c(".accordian")],u.prototype,"accordian",void 0),i([c(".accordian__header")],u.prototype,"header",void 0),i([c(".accordian__body")],u.prototype,"body",void 0),i([c(".accordian__expand-icon-slot")],u.prototype,"expandIconSlot",void 0),i([c('slot[name="summary"]')],u.prototype,"summarySlot",void 0),i([h({type:Boolean,reflect:!0})],u.prototype,"open",void 0),i([h({reflect:!0})],u.prototype,"variant",void 0),i([h({reflect:!0})],u.prototype,"expandIconPlacement",void 0),i([h({reflect:!0})],u.prototype,"size",void 0),i([h()],u.prototype,"summary",void 0),i([h({type:Boolean,reflect:!0})],u.prototype,"disabled",void 0),i([f("open",{waitUntilFirstUpdate:!0})],u.prototype,"handleOpenChange",null),_export("N",u=i([d("nile-accordion")],u)),l("accordian.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),l("accordian.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});}};});
2
2
  //# sourceMappingURL=nile-accordion.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-accordion.cjs.js","sources":["../../../src/nile-accordion/nile-accordion.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, CSSResultArray, TemplateResult} from 'lit';\nimport {styles} from './nile-accordion.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileAccordion extends NileElement {\n\n/**\n * @summary Accordian show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The accordian' main content.\n * @slot summary - The accordian' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the accordian opens.\n * @event nile-after-show - Emitted after the accordian opens and all animations are complete.\n * @event nile-hide - Emitted when the accordian closes.\n * @event nile-after-hide - Emitted after the accordian closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The accordian content.\n *\n * @animation accordian.show - The animation to use when showing accordian. You can use `height: auto` with this animation.\n * @animation accordian.hide - The animation to use when hiding accordian. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\n\n@query('.accordian') accordian: HTMLElement;\n@query('.accordian__header') header: HTMLElement;\n@query('.accordian__body') body: HTMLElement;\n@query('.accordian__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n\n/**\n * Indicates whether or not the accordian is open. You can toggle this attribute to show and hide the accordian, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the accordian' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/**\n * Indicates the visual style of the accordian component. Accepted values are `'dark'` or `'light'`.\n * Defaults to `'light'`.\n */\n@property({ reflect: true }) variant: 'dark' | 'light' = 'light';\n\n/**\n * Specifies the direction of the arrow indicator. Accepted values are `'left'` or `'right'`.\n * Defaults to `'right'`.\n */\n@property({ reflect: true }) expandIconPlacement: 'left' | 'right' = 'right';\n\n/**\n * Specifies the size of the accordian component. Accepted values are `'sm'`, `'md'`, or `'lg'`.\n * Defaults to `'md'`.\n */\n@property({ reflect: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the accordian so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\nprivate handleSummaryClick() {\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'accordian.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'accordian.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the accordian. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the accordian */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = true;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n accordian: true,\n 'accordian--open': this.open,\n 'accordian--disabled': this.disabled,\n 'accordian--sm':this.size=='sm',\n 'accordian--md':this.size=='md',\n 'accordian--lg':this.size=='lg',\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"${classMap({\n 'accordian__header':true,\n 'accordian__header--dark':this.variant=='dark',\n 'accordian__header--arrow-left':'left'==this.expandIconPlacement\n })}\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"accordian__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"accordian__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"accordian__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" \n class=\"${classMap({\n 'accordian__content':true,\n 'accordian__content--arrow-left':this.expandIconPlacement=='left'\n })}\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('accordian.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('accordian.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileAccordion;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileAccordion;\n }\n}\n"],"names":["NileAccordion","y","constructor","this","open","variant","expandIconPlacement","size","disabled","_this","_inherits","_s","_createClass","key","value","firstUpdated","body","hidden","style","height","handleSummaryClick","hide","show","header","focus","handleSummaryKeyDown","event","preventDefault","_handleOpenChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_m","_i","_a","_m2","_i2","_a2","wrap","_callee$","_context2","prev","next","emit","cancelable","defaultPrevented","stopAnimations","getAnimation","dir","keyframes","options","animateTo","shimKeyframesHeightAuto","scrollHeight","abrupt","stop","handleOpenChange","_callee2","_callee2$","_context3","waitForEvent","_callee3","_callee3$","_context4","render","html","_templateObject","_taggedTemplateLiteral","classMap","accordian","accordian__header","summary","accordian__content","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","watch","waitUntilFirstUpdate","customElement","setDefaultAnimation","opacity","duration","easing"],"mappings":"quXAyBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAuCqCC,KAAAA,CAAIC,IAAAA,CAAAA,CAAG,CAMtBD,CAAAA,KAAAA,CAAOE,OAAqB,CAAA,OAAA,CAM5BF,KAAAA,CAAmBG,mBAAAA,CAAqB,OAMxCH,CAAAA,KAAAA,CAAII,IAAuB,CAAA,IAAA,CAMZJ,KAAAA,CAAQK,QAAAA,CAAAA,CAAG,CAuJtD,QAAAC,KAAA,EArJDC,SAAA,CAAAT,CAAA,CAAAU,EAAA,SAAAC,YAAA,CAAAX,CAAA,GAAAY,GAAA,gBAAAC,KAAA,UAAAC,YAAAA,CAAAA,CAAAA,CACEZ,IAAKa,CAAAA,IAAAA,CAAKC,MAAUd,CAAAA,CAAAA,IAAAA,CAAKC,IACzBD,CAAAA,IAAAA,CAAKa,IAAKE,CAAAA,KAAAA,CAAMC,MAAShB,CAAAA,IAAAA,CAAKC,IAAO,CAAA,MAAA,CAAS,GAC/C,EAEO,GAAAS,GAAA,sBAAAC,KAAA,UAAAM,kBAAAA,CAAAA,CAAAA,CACDjB,IAAKK,CAAAA,QAAAA,GACJL,IAAKC,CAAAA,IAAAA,CACPD,IAAKkB,CAAAA,IAAAA,CAAAA,CAAAA,CAELlB,IAAKmB,CAAAA,IAAAA,CAAAA,CAAAA,CAGPnB,IAAKoB,CAAAA,MAAAA,CAAOC,KAEf,CAAA,CAAA,CAAA,EAEO,GAAAX,GAAA,wBAAAC,KAAA,UAAAW,oBAAAA,CAAqBC,CACT,CAAA,CAAA,OAAA,GAAdA,CAAMb,CAAAA,GAAAA,EAAiC,GAAda,GAAAA,CAAAA,CAAMb,GACjCa,GAAAA,CAAAA,CAAMC,cAEFxB,CAAAA,C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3CG,CAAS,CAAA,CAAEC,KAAMC,OAASC,CAAAA,OAAAA,CAAAA,CAAS,CAAyBlF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA8E,UAAA,UAAA,CAAA,IAAA,EAAA,CAAA,CA0CvDF,CAAA,CAAA,CADLO,EAAM,MAAQ,CAAA,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAmCtCpF,EAAA8E,SAAA,CAAA,kBAAA,CAAA,IA3IY9E,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAa4E,EAAA,CADzBS,CAAAA,CAAc,gBACFrF,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,EAwNbsF,EAAoB,gBAAkB,CAAA,CACtCpC,SAAW,CAAA,CACT,CAAE/B,MAAQ,CAAA,GAAA,CAAKoE,OAAS,CAAA,GAAA,CAAA,CACxB,CAAEpE,MAAQ,CAAA,MAAA,CAAQoE,OAAS,CAAA,GAAA,CAAA,CAAA,CAE7BpC,QAAS,CAAEqC,QAAAA,CAAU,GAAKC,CAAAA,MAAAA,CAAQ,YAGlCH,CAAoB,CAAA,gBAAA,CAAkB,CACtCpC,SAAAA,CAAW,CACT,CAAE/B,MAAAA,CAAQ,MAAQoE,CAAAA,OAAAA,CAAS,KAC3B,CAAEpE,MAAAA,CAAQ,GAAKoE,CAAAA,OAAAA,CAAS,MAE1BpC,OAAS,CAAA,CAAEqC,QAAU,CAAA,GAAA,CAAKC,OAAQ"}
1
+ {"version":3,"file":"nile-accordion.cjs.js","sources":["../../../src/nile-accordion/nile-accordion.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, CSSResultArray, TemplateResult} from 'lit';\nimport {styles} from './nile-accordion.css';\nimport NileElement from '../internal/nile-element';\nimport { animateTo, shimKeyframesHeightAuto, stopAnimations } from '../internal/animate';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport { getAnimation, setDefaultAnimation } from '../utilities/animation-registry';\nimport { waitForEvent } from '../internal/event';\nimport { watch } from '../internal/watch';\nimport type { CSSResultGroup } from 'lit';\n\n/**\n * Nile detail component.\n *\n * @tag nile-accordion\n *\n */\n@customElement('nile-accordion')\nexport class NileAccordion extends NileElement {\n\n/**\n * @summary Accordian show a brief summary and expand to show additional content.\n *\n * @dependency nile-icon\n *\n * @slot - The accordian' main content.\n * @slot summary - The accordian' summary. Alternatively, you can use the `summary` attribute.\n * @slot expand-icon - Optional expand icon to use instead of the default. Works best with `<nile-icon>`.\n * @slot collapse-icon - Optional collapse icon to use instead of the default. Works best with `<nile-icon>`.\n *\n * @event nile-show - Emitted when the accordian opens.\n * @event nile-after-show - Emitted after the accordian opens and all animations are complete.\n * @event nile-hide - Emitted when the accordian closes.\n * @event nile-after-hide - Emitted after the accordian closes and all animations are complete.\n *\n * @csspart base - The component's base wrapper.\n * @csspart header - The header that wraps both the summary and the expand/collapse icon.\n * @csspart summary - The container that wraps the summary.\n * @csspart summary-icon - The container that wraps the expand/collapse icons.\n * @csspart content - The accordian content.\n *\n * @animation accordian.show - The animation to use when showing accordian. You can use `height: auto` with this animation.\n * @animation accordian.hide - The animation to use when hiding accordian. You can use `height: auto` with this animation.\n */\n\nstatic styles: CSSResultGroup = styles;\n\n\n@query('.accordian') accordian: HTMLElement;\n@query('.accordian__header') header: HTMLElement;\n@query('.accordian__body') body: HTMLElement;\n@query('.accordian__expand-icon-slot') expandIconSlot: HTMLSlotElement;\n@query('slot[name=\"summary\"]') summarySlot: HTMLSlotElement; \n\n/**\n * Indicates whether or not the accordian is open. You can toggle this attribute to show and hide the accordian, or you\n * can use the `show()` and `hide()` methods and this attribute will reflect the accordian' open state.\n */\n@property({ type: Boolean, reflect: true }) open = false;\n\n/**\n * Indicates the visual style of the accordian component. Accepted values are `'dark'` or `'light'`.\n * Defaults to `'light'`.\n */\n@property({ reflect: true }) variant: 'dark' | 'light' = 'light';\n\n/**\n * Specifies the direction of the arrow indicator. Accepted values are `'left'` or `'right'`.\n * Defaults to `'right'`.\n */\n@property({ reflect: true }) expandIconPlacement: 'left' | 'right' = 'right';\n\n/**\n * Specifies the size of the accordian component. Accepted values are `'sm'`, `'md'`, or `'lg'`.\n * Defaults to `'md'`.\n */\n@property({ reflect: true }) size: 'sm' | 'md' | 'lg' = 'md';\n\n/** The summary to show in the header. If you need to display HTML, use the `summary` slot instead. */\n@property() summary: string;\n\n/** Disables the accordian so it can't be toggled. */\n@property({ type: Boolean, reflect: true }) disabled = false;\n\nfirstUpdated() {\n this.body.hidden = !this.open;\n this.body.style.height = this.open ? 'auto' : '0';\n}\n\n private handleSummaryClick(event: MouseEvent) {\n const path = event.composedPath();\n const slotIndex = path.indexOf(this.summarySlot);\n if (slotIndex !== -1) {\n for (let i = 0; i < slotIndex; i++) {\n const el = path[i];\n if (el instanceof Element && el.matches('input, button, select, textarea, a, label')) {\n return; \n }\n }\n }\n if (!this.disabled) {\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n\n this.header.focus();\n }\n}\n\nprivate handleSummaryKeyDown(event: KeyboardEvent) {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n\n if (this.open) {\n this.hide();\n } else {\n this.show();\n }\n }\n\n if (event.key === 'ArrowUp' || event.key === 'ArrowLeft') {\n event.preventDefault();\n this.hide();\n }\n\n if (event.key === 'ArrowDown' || event.key === 'ArrowRight') {\n event.preventDefault();\n this.show();\n }\n}\n\n@watch('open', { waitUntilFirstUpdate: true })\nasync handleOpenChange() {\n if (this.open) {\n // Show\n const nileShow = this.emit('nile-show', { cancelable: true });\n if (nileShow.defaultPrevented) {\n this.open = false;\n return;\n }\n\n await stopAnimations(this.body);\n this.body.hidden = false;\n\n const { keyframes, options } = getAnimation(this, 'accordian.show', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.style.height = 'auto';\n\n this.emit('nile-after-show');\n } else {\n // Hide\n const nileHide = this.emit('nile-hide', { cancelable: true });\n if (nileHide.defaultPrevented) {\n this.open = true;\n return;\n }\n\n await stopAnimations(this.body);\n\n const { keyframes, options } = getAnimation(this, 'accordian.hide', { dir: 'ltr' });\n await animateTo(this.body, shimKeyframesHeightAuto(keyframes, this.body.scrollHeight), options);\n this.body.hidden = true;\n this.body.style.height = 'auto';\n\n this.emit('nile-after-hide');\n }\n}\n\n/** Shows the accordian. */\nasync show() {\n if (this.open || this.disabled) {\n return undefined;\n }\n\n this.open = true;\n return waitForEvent(this, 'nile-after-show');\n}\n\n/** Hides the accordian */\nasync hide() {\n if (!this.open || this.disabled) {\n return undefined;\n }\n\n this.open = false;\n return waitForEvent(this, 'nile-after-hide');\n}\n\nrender() {\n const isRtl = true;\n\n return html`\n <div\n part=\"base\"\n class=${classMap({\n accordian: true,\n 'accordian--open': this.open,\n 'accordian--disabled': this.disabled,\n 'accordian--sm':this.size=='sm',\n 'accordian--md':this.size=='md',\n 'accordian--lg':this.size=='lg',\n })}\n >\n <div\n part=\"header\"\n id=\"header\"\n class=\"${classMap({\n 'accordian__header':true,\n 'accordian__header--dark':this.variant=='dark',\n 'accordian__header--arrow-left':'left'==this.expandIconPlacement\n })}\"\n role=\"button\"\n aria-expanded=${this.open ? 'true' : 'false'}\n aria-controls=\"content\"\n aria-disabled=${this.disabled ? 'true' : 'false'}\n tabindex=${this.disabled ? '-1' : '0'}\n @click=${this.handleSummaryClick}\n @keydown=${this.handleSummaryKeyDown}\n >\n <slot name=\"summary\" part=\"summary\" class=\"accordian__summary\">${this.summary}</slot>\n\n <span part=\"summary-icon\" class=\"accordian__summary-icon\">\n <slot name=\"expand-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n <slot name=\"collapse-icon\">\n <nile-icon name=\"arrowright\"></nile-icon>\n </slot>\n </span>\n </div>\n\n <div class=\"accordian__body\" role=\"region\" aria-labelledby=\"header\">\n <slot part=\"content\" id=\"content\" \n class=\"${classMap({\n 'accordian__content':true,\n 'accordian__content--arrow-left':this.expandIconPlacement=='left'\n })}\"></slot>\n </div>\n </div>\n `;\n}\n}\n\nsetDefaultAnimation('accordian.show', {\nkeyframes: [\n { height: '0', opacity: '0' },\n { height: 'auto', opacity: '1' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nsetDefaultAnimation('accordian.hide', {\nkeyframes: [\n { height: 'auto', opacity: '1' },\n { height: '0', opacity: '0' }\n],\noptions: { duration: 250, easing: 'linear' }\n});\n\nexport default NileAccordion;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-accordion': NileAccordion;\n }\n}\n"],"names":["NileAccordion","_s","u","this","open","variant","expandIconPlacement","size","disabled","_this","_inherits","_createClass","key","value","firstUpdated","body","hidden","style","height","handleSummaryClick","event","path","composedPath","slotIndex","indexOf","summarySlot","i","el","Element","matches","hide","show","header","focus","handleSummaryKeyDown","preventDefault","_handleOpenChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","_m","_i2","_t","_m2","_i3","_t2","wrap","_callee$","_context2","prev","next","emit","cancelable","defaultPrevented","stopAnimations","getAnimation","dir","keyframes","options","animateTo","shimKeyframesHeightAuto","scrollHeight","stop","handleOpenChange","_callee2","_callee2$","_context3","waitForEvent","_callee3","_callee3$","_context4","render","html","_templateObject","_taggedTemplateLiteral","classMap","accordian","accordian__header","summary","accordian__content","NileElement","styles","__decorate","query","prototype","property","type","Boolean","reflect","watch","waitUntilFirstUpdate","customElement","setDefaultAnimation","opacity","duration","easing"],"mappings":"quXAyBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAwCqCC,KAAAA,CAAIC,IAAAA,CAAAA,CAAG,CAMtBD,CAAAA,KAAAA,CAAOE,OAAqB,CAAA,OAAA,CAM5BF,KAAAA,CAAmBG,mBAAAA,CAAqB,QAMxCH,KAAAA,CAAII,IAAAA,CAAuB,IAMZJ,CAAAA,KAAAA,CAAQK,QAAG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,CAAAA,CAAAA,CAAAqF,SAAA,CAAA,UAAA,CAAA,IAAA,IAoDvDF,CAAA,CAAA,CADLO,CAAM,CAAA,MAAA,CAAQ,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAmCtC3F,CAAAqF,CAAAA,SAAAA,CAAA,mBAAA,IAtJYrF,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAamF,EAAA,CADzBS,CAAAA,CAAc,mBACF5F,CAmOb6F,CAAAA,EAAAA,CAAAA,CAAoB,gBAAkB,CAAA,CACtCnC,UAAW,CACT,CAAExC,MAAQ,CAAA,GAAA,CAAK4E,QAAS,GACxB,CAAA,CAAA,CAAE5E,MAAQ,CAAA,MAAA,CAAQ4E,QAAS,GAE7BnC,CAAAA,CAAAA,CAAAA,OAAAA,CAAS,CAAEoC,QAAU,CAAA,GAAA,CAAKC,OAAQ,QAGlCH,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAoB,gBAAkB,CAAA,CACtCnC,UAAW,CACT,CAAExC,MAAQ,CAAA,MAAA,CAAQ4E,QAAS,GAC3B,CAAA,CAAA,CAAE5E,MAAQ,CAAA,GAAA,CAAK4E,QAAS,GAE1BnC,CAAAA,CAAAA,CAAAA,OAAAA,CAAS,CAAEoC,QAAU,CAAA,GAAA,CAAKC,OAAQ"}
@@ -1,4 +1,4 @@
1
- import{__decorate as i}from"tslib";import{html as a}from"lit";import{s as t}from"./nile-accordion.css.esm.js";import{N as s}from"../internal/nile-element.esm.js";import{s as e,a as r,b as o}from"../internal/animate.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{query as c,property as h,customElement as d}from"lit/decorators.js";import{s as l,g as m}from"../utilities/animation-registry.esm.js";import{w as p}from"../internal/event.esm.js";import{w as f}from"../internal/watch.esm.js";let y=class extends s{constructor(){super(...arguments),this.open=!1,this.variant="light",this.expandIconPlacement="right",this.size="md",this.disabled=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0"}handleSummaryClick(){this.disabled||(this.open?this.hide():this.show(),this.header.focus())}handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("nile-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await e(this.body),this.body.hidden=!1;const{keyframes:i,options:a}=m(this,"accordian.show",{dir:"ltr"});await r(this.body,o(i,this.body.scrollHeight),a),this.body.style.height="auto",this.emit("nile-after-show")}else{if(this.emit("nile-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await e(this.body);const{keyframes:i,options:a}=m(this,"accordian.hide",{dir:"ltr"});await r(this.body,o(i,this.body.scrollHeight),a),this.body.hidden=!0,this.body.style.height="auto",this.emit("nile-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,p(this,"nile-after-show")}async hide(){if(this.open&&!this.disabled)return this.open=!1,p(this,"nile-after-hide")}render(){return a`
1
+ import{__decorate as i}from"tslib";import{html as t}from"lit";import{s as a}from"./nile-accordion.css.esm.js";import{N as e}from"../internal/nile-element.esm.js";import{s,a as o,b as r}from"../internal/animate.esm.js";import{classMap as n}from"lit/directives/class-map.js";import{query as c,property as h,customElement as d}from"lit/decorators.js";import{s as l,g as m}from"../utilities/animation-registry.esm.js";import{w as p}from"../internal/event.esm.js";import{w as f}from"../internal/watch.esm.js";let u=class extends e{constructor(){super(...arguments),this.open=!1,this.variant="light",this.expandIconPlacement="right",this.size="md",this.disabled=!1}firstUpdated(){this.body.hidden=!this.open,this.body.style.height=this.open?"auto":"0"}handleSummaryClick(i){const t=i.composedPath(),a=t.indexOf(this.summarySlot);if(-1!==a)for(let i=0;i<a;i++){const a=t[i];if(a instanceof Element&&a.matches("input, button, select, textarea, a, label"))return}this.disabled||(this.open?this.hide():this.show(),this.header.focus())}handleSummaryKeyDown(i){"Enter"!==i.key&&" "!==i.key||(i.preventDefault(),this.open?this.hide():this.show()),"ArrowUp"!==i.key&&"ArrowLeft"!==i.key||(i.preventDefault(),this.hide()),"ArrowDown"!==i.key&&"ArrowRight"!==i.key||(i.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.emit("nile-show",{cancelable:!0}).defaultPrevented)return void(this.open=!1);await s(this.body),this.body.hidden=!1;const{keyframes:i,options:t}=m(this,"accordian.show",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.style.height="auto",this.emit("nile-after-show")}else{if(this.emit("nile-hide",{cancelable:!0}).defaultPrevented)return void(this.open=!0);await s(this.body);const{keyframes:i,options:t}=m(this,"accordian.hide",{dir:"ltr"});await o(this.body,r(i,this.body.scrollHeight),t),this.body.hidden=!0,this.body.style.height="auto",this.emit("nile-after-hide")}}async show(){if(!this.open&&!this.disabled)return this.open=!0,p(this,"nile-after-show")}async hide(){if(this.open&&!this.disabled)return this.open=!1,p(this,"nile-after-hide")}render(){return t`
2
2
  <div
3
3
  part="base"
4
4
  class=${n({accordian:!0,"accordian--open":this.open,"accordian--disabled":this.disabled,"accordian--sm":"sm"==this.size,"accordian--md":"md"==this.size,"accordian--lg":"lg"==this.size})}
@@ -32,4 +32,4 @@ import{__decorate as i}from"tslib";import{html as a}from"lit";import{s as t}from
32
32
  class="${n({accordian__content:!0,"accordian__content--arrow-left":"left"==this.expandIconPlacement})}"></slot>
33
33
  </div>
34
34
  </div>
35
- `}};y.styles=t,i([c(".accordian")],y.prototype,"accordian",void 0),i([c(".accordian__header")],y.prototype,"header",void 0),i([c(".accordian__body")],y.prototype,"body",void 0),i([c(".accordian__expand-icon-slot")],y.prototype,"expandIconSlot",void 0),i([h({type:Boolean,reflect:!0})],y.prototype,"open",void 0),i([h({reflect:!0})],y.prototype,"variant",void 0),i([h({reflect:!0})],y.prototype,"expandIconPlacement",void 0),i([h({reflect:!0})],y.prototype,"size",void 0),i([h()],y.prototype,"summary",void 0),i([h({type:Boolean,reflect:!0})],y.prototype,"disabled",void 0),i([f("open",{waitUntilFirstUpdate:!0})],y.prototype,"handleOpenChange",null),y=i([d("nile-accordion")],y),l("accordian.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),l("accordian.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});export{y as N};
35
+ `}};u.styles=a,i([c(".accordian")],u.prototype,"accordian",void 0),i([c(".accordian__header")],u.prototype,"header",void 0),i([c(".accordian__body")],u.prototype,"body",void 0),i([c(".accordian__expand-icon-slot")],u.prototype,"expandIconSlot",void 0),i([c('slot[name="summary"]')],u.prototype,"summarySlot",void 0),i([h({type:Boolean,reflect:!0})],u.prototype,"open",void 0),i([h({reflect:!0})],u.prototype,"variant",void 0),i([h({reflect:!0})],u.prototype,"expandIconPlacement",void 0),i([h({reflect:!0})],u.prototype,"size",void 0),i([h()],u.prototype,"summary",void 0),i([h({type:Boolean,reflect:!0})],u.prototype,"disabled",void 0),i([f("open",{waitUntilFirstUpdate:!0})],u.prototype,"handleOpenChange",null),u=i([d("nile-accordion")],u),l("accordian.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}}),l("accordian.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});export{u as N};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-circular-progressbar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var s,r,t,e,i,c,l,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){s=_tslib.__decorate;},function(_lit){r=_lit.html;},function(_litDecoratorsJs){t=_litDecoratorsJs.query;e=_litDecoratorsJs.property;i=_litDecoratorsJs.customElement;},function(_nileCircularProgressbarCssCjsJs){c=_nileCircularProgressbarCssCjsJs.s;},function(_internalNileElementCjsJs){l=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",o=/*#__PURE__*/function(_l){function o(){var _this;_classCallCheck(this,o);_this=_callSuper(this,o,arguments),_this.progress=50;return _this;}_inherits(o,_l);return _createClass(o,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(o,"connectedCallback",this,3)([]),this.updateComplete.then(function(){_this2.progress<0&&(_this2.progress=0),_this2.progress>100&&(_this2.progress=100),_this2.setProgress(_this2.progress);});}},{key:"setProgress",value:function setProgress(s){var r=2*this.progressCircle.r.baseVal.value*Math.PI;this.progressCircle.style.strokeDasharray=r,this.progressCircle.style.strokeDashoffset=r-s/100*r;}},{key:"render",value:function render(){return r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <svg width=\"40\" height=\"40\">\n <circle r=\"19\" cx=\"20\" cy=\"20\" class=\"track\"></circle>\n <circle r=\"19\" cx=\"20\" cy=\"20\" class=\"progress\"></circle>\n <text\n x=\"50%\"\n y=\"50%\"\n text-anchor=\"middle\"\n alignment-baseline=\"middle\"\n class=\"circle__text\"\n >\n "," %\n </text>\n </svg>\n "])),this.progress);}}],[{key:"styles",get:function get(){return[c];}}]);}(l));s([t(".progress")],o.prototype,"progressCircle",void 0),s([e({type:Number,reflect:!0})],o.prototype,"progress",void 0),_export("N",o=s([i("nile-circular-progressbar")],o));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","lit/decorators.js","./nile-circular-progressbar.css.cjs.js","../internal/nile-element.cjs.js"],function(_export,_context){"use strict";var t,e,s,i,r,c,o,_templateObject,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _superPropGet(t,o,e,r){var p=_get(_getPrototypeOf(1&r?t.prototype:t),o,e);return 2&r&&"function"==typeof p?function(t){return p.apply(e,t);}:p;}function _get(){return _get="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var p=_superPropBase(e,t);if(p){var n=Object.getOwnPropertyDescriptor(p,t);return n.get?n.get.call(arguments.length<3?e:r):n.value;}},_get.apply(null,arguments);}function _superPropBase(t,o){for(;!{}.hasOwnProperty.call(t,o)&&null!==(t=_getPrototypeOf(t)););return t;}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_lit){e=_lit.html;},function(_litDecoratorsJs){s=_litDecoratorsJs.query;i=_litDecoratorsJs.property;r=_litDecoratorsJs.customElement;},function(_nileCircularProgressbarCssCjsJs){c=_nileCircularProgressbarCssCjsJs.s;},function(_internalNileElementCjsJs){o=_internalNileElementCjsJs.N;}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_o){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value=0,_this.size=40;return _this;}_inherits(l,_o);return _createClass(l,[{key:"circleSize",get:function get(){return{radius:this.size/2-4,viewBox:this.size,fontSize:.25*this.size+"px"};}},{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_superPropGet(l,"connectedCallback",this,3)([]),this.updateComplete.then(function(){_this2.value=Math.max(0,Math.min(100,_this2.value)),_this2.setProgress(_this2.value);});}},{key:"setProgress",value:function setProgress(t){if(this.progressCircle){var _e=2*this.progressCircle.r.baseVal.value*Math.PI;this.progressCircle.style.transition="stroke-dashoffset 0.8s ease-in-out",this.progressCircle.style.strokeDasharray="".concat(_e),this.progressCircle.style.strokeDashoffset=""+(_e-t/100*_e);}}},{key:"updated",value:function updated(t){t.has("value")&&this.setProgress(this.value);}},{key:"render",value:function render(){var _this$content;var _this$circleSize=this.circleSize,t=_this$circleSize.radius,s=_this$circleSize.viewBox,i=_this$circleSize.fontSize,r=(_this$content=this.content)!==null&&_this$content!==void 0?_this$content:"".concat(Math.round(this.value),"%");return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <svg width=\"","\" height=\"","\" viewBox=\"0 0 "," ","\">\n <circle r=\"","\" cx=\"","\" cy=\"","\" class=\"track\"></circle>\n <circle r=\"","\" cx=\"","\" cy=\"","\" class=\"progress\"></circle>\n \n \n <text\n x=\"50%\"\n y=\"53%\"\n text-anchor=\"middle\"\n alignment-baseline=\"middle\"\n class=\"circle__text\"\n style=\"font-size: ",";\"\n >\n ","\n </text>\n </svg>\n "])),s,s,s,s,t,s/2,s/2,t,s/2,s/2,i,r);}}],[{key:"styles",get:function get(){return[c];}}]);}(o));t([s(".progress")],l.prototype,"progressCircle",void 0),t([i({type:Number,reflect:!0})],l.prototype,"value",void 0),t([i({type:String,reflect:!0})],l.prototype,"content",void 0),t([i({type:Number,reflect:!0})],l.prototype,"size",void 0),_export("N",l=t([r("nile-circular-progressbar")],l));}};});
2
2
  //# sourceMappingURL=nile-circular-progressbar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-circular-progressbar.cjs.js","sources":["../../../src/nile-circular-progressbar/nile-circular-progressbar.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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-circular-progressbar.css';\nimport NileElement from '../internal/nile-element';\nimport logInfo from '../nile-icon/icons/svg/log-info';\n\n/**\n * Nile icon component.\n *\n * @tag nile-progressbar\n *\n */\n@customElement('nile-circular-progressbar')\nexport class NileCircularProgressbar extends NileElement {\n /**\n * The styles for Progressbar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n @query('.progress') progressCircle: any;\n @property({ type: Number, reflect: true }) progress = 50;\n\n /* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n // make reactive to pass through\n\n connectedCallback() {\n super.connectedCallback();\n this.updateComplete.then(() => {\n if (this.progress < 0) {\n this.progress = 0;\n }\n if (this.progress > 100) {\n this.progress = 100;\n }\n this.setProgress(this.progress);\n });\n }\n private setProgress(percent: number) {\n const circleRadius = this.progressCircle.r.baseVal.value;\n let circumference = circleRadius * 2 * Math.PI;\n this.progressCircle.style.strokeDasharray = circumference;\n this.progressCircle.style.strokeDashoffset =\n circumference - (percent / 100) * circumference;\n }\n\n public render(): TemplateResult {\n return html`\n <svg width=\"40\" height=\"40\">\n <circle r=\"19\" cx=\"20\" cy=\"20\" class=\"track\"></circle>\n <circle r=\"19\" cx=\"20\" cy=\"20\" class=\"progress\"></circle>\n <text\n x=\"50%\"\n y=\"50%\"\n text-anchor=\"middle\"\n alignment-baseline=\"middle\"\n class=\"circle__text\"\n >\n ${this.progress} %\n </text>\n </svg>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileCircularProgressbar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-circular-progressbar': NileCircularProgressbar;\n }\n}\n"],"names":["NileCircularProgressbar","_l","o","constructor","this","progress","_this","_inherits","_createClass","key","value","connectedCallback","super","updateComplete","then","setProgress","percent","circumference","progressCircle","r","baseVal","Math","PI","style","strokeDasharray","strokeDashoffset","render","html","_templateObject","_taggedTemplateLiteral","__decorate","get","styles","NileElement","query","prototype","property","type","Number","reflect","customElement"],"mappings":"2sHAyBaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,mCASsCC,EAAAA,KAAAA,CAAQC,QAAG,CAAA,EAmDvD,QAAAC,KAAA,EAvDQC,SAAA,CAAAL,CAAA,CAAAD,EAAA,SAAAO,YAAA,CAAAN,CAAA,GAAAO,GAAA,qBAAAC,KAAA,CAgBP,SAAAC,iBAAAA,CAAAA,CAAAA,KAAAA,MAAAA,MACEC,aAAAA,CAAAA,CAAAA,iCACAR,KAAKS,cAAeC,CAAAA,IAAAA,CAAK,WACnBV,MAAKC,CAAAA,QAAAA,CAAW,IAClBD,MAAKC,CAAAA,QAAAA,CAAW,CAEdD,CAAAA,CAAAA,MAAAA,CAAKC,SAAW,GAClBD,GAAAA,MAAAA,CAAKC,SAAW,GAElBD,CAAAA,CAAAA,MAAAA,CAAKW,YAAYX,MAAKC,CAAAA,QAAAA,CAAS,EAElC,CAAA,EACO,GAAAI,GAAA,eAAAC,KAAA,UAAAK,WAAAA,CAAYC,CAAAA,CAAAA,CAElB,GAAIC,CAAAA,CAA+B,CAAA,CAAA,CADdb,KAAKc,cAAeC,CAAAA,CAAAA,CAAEC,OAAQV,CAAAA,KAAAA,CACZW,KAAKC,EAC5ClB,CAAAA,IAAAA,CAAKc,eAAeK,KAAMC,CAAAA,eAAAA,CAAkBP,EAC5Cb,IAAKc,CAAAA,cAAAA,CAAeK,MAAME,gBACxBR,CAAAA,CAAAA,CAAiBD,EAAU,GAAOC,CAAAA,CACrC,EAEM,GAAAR,GAAA,UAAAC,KAAA,UAAAgB,MAAAA,CAAAA,CAAAA,CACL,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,0aAWHzB,IAAKC,CAAAA,QAAAA,EAId,CAjDmByB,KAAAA,GAAAA,UAAAA,GAAAA,CAHb,SAAAC,IAAA,CAAWC,CAChB,MAAO,CAACA,CAAAA,CACT,EAcD,MArB2CC,IAQvBH,CAAAA,CAAA,CAAnBI,CAAAA,CAAM,WAAiClC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmC,UAAA,gBAAA,CAAA,IAAA,EAAA,CAAA,CACGL,CAAA,CAAA,CAA1CM,CAAS,CAAA,CAAEC,KAAMC,MAAQC,CAAAA,OAAAA,CAAAA,CAAS,CAAsBvC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAmC,SAAA,CAAA,UAAA,CAAA,IAAA,EAT9CnC,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAuB8B,CAAA,CAAA,CADnCU,CAAc,CAAA,2BAAA,CAAA,CAAA,CACFxC"}
1
+ {"version":3,"file":"nile-circular-progressbar.cjs.js","sources":["../../../src/nile-circular-progressbar/nile-circular-progressbar.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 {\n LitElement,\n html,\n CSSResultArray,\n TemplateResult,\n} from 'lit';\nimport { customElement, query, property } from 'lit/decorators.js';\nimport { styles } from './nile-circular-progressbar.css';\nimport NileElement from '../internal/nile-element';\nimport logInfo from '../nile-icon/icons/svg/log-info';\n\n/**\n * Nile icon component.\n *\n * @tag nile-progressbar\n *\n */\n@customElement('nile-circular-progressbar')\nexport class NileCircularProgressbar extends NileElement {\n /**\n * The styles for Progressbar\n * @remarks If you are extending this class you can extend the base styles with super. Eg `return [super(), myCustomStyles]`\n */\n public static get styles(): CSSResultArray {\n return [styles];\n }\n\n @query('.progress') progressCircle!: SVGCircleElement;\n \n @property({ type: Number, reflect: true }) value = 0;\n/* #endregion */\n\n /* #region Methods */\n\n /**\n * Render method\n * @slot This is a slot test\n */\n // make reactive to pass through\n @property({ type: String, reflect: true }) content?: string;\n @property({ type: Number, reflect: true }) size = 40; \n\n private get circleSize() {\n const radius = this.size / 2 - 4; \n return {\n radius,\n viewBox: this.size,\n fontSize: `${this.size * 0.25}px`, \n };\n }\n\n connectedCallback() {\n super.connectedCallback();\n this.updateComplete.then(() => {\n this.value = Math.max(0, Math.min(100, this.value));\n this.setProgress(this.value);\n });\n }\n\n private setProgress(percent: number) {\n if (this.progressCircle) {\n const circleRadius = this.progressCircle.r.baseVal.value;\n const circumference = circleRadius * 2 * Math.PI;\n\n this.progressCircle.style.transition = 'stroke-dashoffset 0.8s ease-in-out'; \n this.progressCircle.style.strokeDasharray = `${circumference}`;\n this.progressCircle.style.strokeDashoffset = `${circumference - (percent / 100) * circumference}`;\n }\n }\n\n updated(changedProperties: Map<string, any>) {\n if (changedProperties.has('value')) {\n this.setProgress(this.value);\n }\n }\n\n public render(): TemplateResult {\n const { radius, viewBox, fontSize } = this.circleSize;\n const innerText = this.content ?? `${Math.round(this.value)}%`;\n\n return html`\n <svg width=\"${viewBox}\" height=\"${viewBox}\" viewBox=\"0 0 ${viewBox} ${viewBox}\">\n <circle r=\"${radius}\" cx=\"${viewBox / 2}\" cy=\"${viewBox / 2}\" class=\"track\"></circle>\n <circle r=\"${radius}\" cx=\"${viewBox / 2}\" cy=\"${viewBox / 2}\" class=\"progress\"></circle>\n \n \n <text\n x=\"50%\"\n y=\"53%\"\n text-anchor=\"middle\"\n alignment-baseline=\"middle\"\n class=\"circle__text\"\n style=\"font-size: ${fontSize};\"\n >\n ${innerText}\n </text>\n </svg>\n `;\n }\n\n /* #endregion */\n}\n\nexport default NileCircularProgressbar;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-circular-progressbar': NileCircularProgressbar;\n }\n}\n"],"names":["NileCircularProgressbar","l","this","value","size","_this","_inherits","_o","_createClass","key","get","radius","viewBox","fontSize","connectedCallback","super","updateComplete","then","Math","max","min","setProgress","percent","progressCircle","circumference","r","baseVal","PI","style","transition","strokeDasharray","concat","strokeDashoffset","updated","changedProperties","has","render","_this$content","_this$circleSize","circleSize","innerText","content","round","html","_templateObject","_taggedTemplateLiteral","__decorate","styles","NileElement","query","prototype","property","type","Number","reflect","String","_export","customElement"],"mappings":"2sHAyBaA,CAAAA,uBAAAA,EAAAA,EAAN,SAAAC,EAAA,qEAWsCC,EAAAA,KAAAA,CAAKC,KAAG,CAAA,CAAA,CAWRD,KAAAA,CAAIE,IAAG,CAAA,EA6DnD,QAAAC,KAAA,EA9EQC,SAAA,CAAAL,CAAA,CAAAM,EAAA,SAAAC,YAAA,CAAAP,CAAA,GAAAQ,GAAA,cAAAC,GAAA,CAmBP,SAAAA,IAAA,CAEE,CAAA,MAAO,CACLC,MAAAA,CAFaT,IAAKE,CAAAA,IAAAA,CAAO,CAAI,CAAA,CAAA,CAG7BQ,QAASV,IAAKE,CAAAA,IAAAA,CACdS,QAAyB,CAAA,GAAA,CAAZX,IAAKE,CAAAA,IAAAA,CAAR,IAEb,CAAA,EAED,GAAAK,GAAA,qBAAAN,KAAA,UAAAW,iBAAAA,CAAAA,CACEC,KAAAA,MAAAA,MAAAA,aAAAA,CAAAA,CAAAA,iCACAb,IAAAA,CAAKc,cAAeC,CAAAA,IAAAA,CAAK,UACvBf,CAAAA,MAAAA,CAAKC,MAAQe,IAAKC,CAAAA,GAAAA,CAAI,CAAGD,CAAAA,IAAAA,CAAKE,IAAI,GAAKlB,CAAAA,MAAAA,CAAKC,KAC5CD,CAAAA,CAAAA,CAAAA,MAAAA,CAAKmB,YAAYnB,MAAKC,CAAAA,KAAAA,CAAM,EAE/B,CAAA,EAEO,GAAAM,GAAA,eAAAN,KAAA,U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CAAAA,CAAU,EAAUA,CAAU,CAAA,CAAA,CAC7CD,CAAeC,CAAAA,CAAAA,CAAU,EAAUA,CAAU,CAAA,CAAA,CASlCC,CAAAA,CAEpB2B,CAAAA,EAIT,CAvEmBM,KAAAA,GAAAA,UAAAA,GAAAA,CAJb,SAAApC,IAAA,EACL,MAAO,CAACqC,CACT,CAAA,EAiBD,MAxB2CC,CAAtC,GASeF,CAAAA,CAAA,CAAnBG,CAAM,CAAA,WAAA,CAAA,CAAA,CAA+CjD,EAAAkD,SAAA,CAAA,gBAAA,CAAA,IAAA,EAEXJ,CAAAA,CAAAA,CAAAA,CAAA,CAA1CK,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,MAAAA,CAAQC,SAAS,CAAkBtD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAkD,UAAA,OAAA,CAAA,IAAA,EAAA,CAAA,CAUVJ,CAAA,CAAA,CAA1CK,CAAS,CAAA,CAAEC,KAAMG,MAAQD,CAAAA,OAAAA,CAAAA,CAAS,KAAyBtD,CAAAkD,CAAAA,SAAAA,CAAA,cAAA,EACjBJ,CAAAA,CAAAA,CAAAA,CAAA,CAA1CK,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,OAAQC,OAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkBtD,CAAAkD,CAAAA,SAAAA,CAAA,MAAA,CAAA,IAAA,EAAA,CAAA,CAAAM,OAAA,KAtB1CxD,EAAuB8C,CAAA,CAAA,CADnCW,CAAc,CAAA,2BAAA,CAAA,CAAA,CACFzD"}
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",r=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n :host{\n \n }\n .track {\n stroke-width: 2px;\n stroke: var(--nile-colors-yellow-400);\n opacity: 0.5;\n fill: none;\n }\n\n .progress {\n stroke-width: 2px;\n stroke: var(--nile-colors-yellow-500);\n stroke-linecap: round;\n fill: none;\n transform: rotate(270deg);\n transform-origin: center;\n }\n\n .circle__text {\n color: var(--nile-colors-dark-900);\n text-align: center;\n font-size: var(--nile-type-scale-1);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-type-scale-1);\n letter-spacing: 0.2px;\n text-transform: uppercase;\n }\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var e,_templateObject,r;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){e=_lit.css;}],execute:function execute(){_export("s",r=e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n\n :host {\n display: inline-block;\n}\n\n.track {\n stroke-width: 4px;\n stroke: var(--nile-colors-neutral-400);\n opacity: 0.5;\n fill: none;\n}\n\n.progress {\n stroke-width: 4px;\n stroke: var(--nile-colors-primary-600);\n stroke-linecap: round;\n fill: none;\n transform: rotate(270deg);\n transform-origin: center;\n transition: stroke-dashoffset 0.8s ease-in-out; \n}\n\n.circle__text {\n fill: var(--nile-colors-dark-900);\n text-align: center;\n font-size: var(--nile-type-scale-1);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-type-scale-1);\n letter-spacing: 0.2px;\n}\n\n.nile-progress-bar__status {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.nile-progress-bar__message {\n flex-grow: 1;\n}\n\n.nile-progress-bar__percentage {\n white-space: nowrap;\n}\n\n"]))));}};});
2
2
  //# sourceMappingURL=nile-circular-progressbar.css.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-circular-progressbar.css.cjs.js","sources":["../../../src/nile-circular-progressbar/nile-circular-progressbar.css.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Progressbar CSS\n */\nexport const styles = css`\n :host{\n \n }\n .track {\n stroke-width: 2px;\n stroke: var(--nile-colors-yellow-400);\n opacity: 0.5;\n fill: none;\n }\n\n .progress {\n stroke-width: 2px;\n stroke: var(--nile-colors-yellow-500);\n stroke-linecap: round;\n fill: none;\n transform: rotate(270deg);\n transform-origin: center;\n }\n\n .circle__text {\n color: var(--nile-colors-dark-900);\n text-align: center;\n font-size: var(--nile-type-scale-1);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-type-scale-1);\n letter-spacing: 0.2px;\n text-transform: uppercase;\n }\n`;\n\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
1
+ {"version":3,"file":"nile-circular-progressbar.css.cjs.js","sources":["../../../src/nile-circular-progressbar/nile-circular-progressbar.css.ts"],"sourcesContent":[" /**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css } from 'lit';\n\n/**\n * Progressbar CSS\n */\nexport const styles = css`\n\n :host {\n display: inline-block;\n}\n\n.track {\n stroke-width: 4px;\n stroke: var(--nile-colors-neutral-400);\n opacity: 0.5;\n fill: none;\n}\n\n.progress {\n stroke-width: 4px;\n stroke: var(--nile-colors-primary-600);\n stroke-linecap: round;\n fill: none;\n transform: rotate(270deg);\n transform-origin: center;\n transition: stroke-dashoffset 0.8s ease-in-out; \n}\n\n.circle__text {\n fill: var(--nile-colors-dark-900);\n text-align: center;\n font-size: var(--nile-type-scale-1);\n font-style: normal;\n font-weight: var(--nile-font-weight-regular);\n line-height: var(--nile-type-scale-1);\n letter-spacing: 0.2px;\n}\n\n.nile-progress-bar__status {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 4px;\n}\n\n.nile-progress-bar__message {\n flex-grow: 1;\n}\n\n.nile-progress-bar__percentage {\n white-space: nowrap;\n}\n\n`\nexport default [styles];\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"oTAYaA,CAAAA,CAASC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
@@ -1,31 +1,49 @@
1
1
  import{css as e}from"lit";const r=e`
2
- :host{
3
-
4
- }
5
- .track {
6
- stroke-width: 2px;
7
- stroke: var(--nile-colors-yellow-400);
8
- opacity: 0.5;
9
- fill: none;
10
- }
11
-
12
- .progress {
13
- stroke-width: 2px;
14
- stroke: var(--nile-colors-yellow-500);
15
- stroke-linecap: round;
16
- fill: none;
17
- transform: rotate(270deg);
18
- transform-origin: center;
19
- }
20
-
21
- .circle__text {
22
- color: var(--nile-colors-dark-900);
23
- text-align: center;
24
- font-size: var(--nile-type-scale-1);
25
- font-style: normal;
26
- font-weight: var(--nile-font-weight-regular);
27
- line-height: var(--nile-type-scale-1);
28
- letter-spacing: 0.2px;
29
- text-transform: uppercase;
30
- }
2
+
3
+ :host {
4
+ display: inline-block;
5
+ }
6
+
7
+ .track {
8
+ stroke-width: 4px;
9
+ stroke: var(--nile-colors-neutral-400);
10
+ opacity: 0.5;
11
+ fill: none;
12
+ }
13
+
14
+ .progress {
15
+ stroke-width: 4px;
16
+ stroke: var(--nile-colors-primary-600);
17
+ stroke-linecap: round;
18
+ fill: none;
19
+ transform: rotate(270deg);
20
+ transform-origin: center;
21
+ transition: stroke-dashoffset 0.8s ease-in-out;
22
+ }
23
+
24
+ .circle__text {
25
+ fill: var(--nile-colors-dark-900);
26
+ text-align: center;
27
+ font-size: var(--nile-type-scale-1);
28
+ font-style: normal;
29
+ font-weight: var(--nile-font-weight-regular);
30
+ line-height: var(--nile-type-scale-1);
31
+ letter-spacing: 0.2px;
32
+ }
33
+
34
+ .nile-progress-bar__status {
35
+ display: flex;
36
+ justify-content: space-between;
37
+ align-items: center;
38
+ margin-bottom: 4px;
39
+ }
40
+
41
+ .nile-progress-bar__message {
42
+ flex-grow: 1;
43
+ }
44
+
45
+ .nile-progress-bar__percentage {
46
+ white-space: nowrap;
47
+ }
48
+
31
49
  `;export{r as s};
@@ -1,15 +1,18 @@
1
- import{__decorate as s}from"tslib";import{html as r}from"lit";import{query as e,property as t,customElement as i}from"lit/decorators.js";import{s as c}from"./nile-circular-progressbar.css.esm.js";import{N as l}from"../internal/nile-element.esm.js";let o=class extends l{constructor(){super(...arguments),this.progress=50}static get styles(){return[c]}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.progress<0&&(this.progress=0),this.progress>100&&(this.progress=100),this.setProgress(this.progress)}))}setProgress(s){let r=2*this.progressCircle.r.baseVal.value*Math.PI;this.progressCircle.style.strokeDasharray=r,this.progressCircle.style.strokeDashoffset=r-s/100*r}render(){return r`
2
- <svg width="40" height="40">
3
- <circle r="19" cx="20" cy="20" class="track"></circle>
4
- <circle r="19" cx="20" cy="20" class="progress"></circle>
5
- <text
6
- x="50%"
7
- y="50%"
8
- text-anchor="middle"
9
- alignment-baseline="middle"
10
- class="circle__text"
11
- >
12
- ${this.progress} %
1
+ import{__decorate as t}from"tslib";import{html as e}from"lit";import{query as s,property as i,customElement as r}from"lit/decorators.js";import{s as c}from"./nile-circular-progressbar.css.esm.js";import{N as o}from"../internal/nile-element.esm.js";let l=class extends o{constructor(){super(...arguments),this.value=0,this.size=40}static get styles(){return[c]}get circleSize(){return{radius:this.size/2-4,viewBox:this.size,fontSize:.25*this.size+"px"}}connectedCallback(){super.connectedCallback(),this.updateComplete.then((()=>{this.value=Math.max(0,Math.min(100,this.value)),this.setProgress(this.value)}))}setProgress(t){if(this.progressCircle){const e=2*this.progressCircle.r.baseVal.value*Math.PI;this.progressCircle.style.transition="stroke-dashoffset 0.8s ease-in-out",this.progressCircle.style.strokeDasharray=`${e}`,this.progressCircle.style.strokeDashoffset=""+(e-t/100*e)}}updated(t){t.has("value")&&this.setProgress(this.value)}render(){const{radius:t,viewBox:s,fontSize:i}=this.circleSize,r=this.content??`${Math.round(this.value)}%`;return e`
2
+ <svg width="${s}" height="${s}" viewBox="0 0 ${s} ${s}">
3
+ <circle r="${t}" cx="${s/2}" cy="${s/2}" class="track"></circle>
4
+ <circle r="${t}" cx="${s/2}" cy="${s/2}" class="progress"></circle>
5
+
6
+
7
+ <text
8
+ x="50%"
9
+ y="53%"
10
+ text-anchor="middle"
11
+ alignment-baseline="middle"
12
+ class="circle__text"
13
+ style="font-size: ${i};"
14
+ >
15
+ ${r}
13
16
  </text>
14
17
  </svg>
15
- `}};s([e(".progress")],o.prototype,"progressCircle",void 0),s([t({type:Number,reflect:!0})],o.prototype,"progress",void 0),o=s([i("nile-circular-progressbar")],o);export{o as N};
18
+ `}};t([s(".progress")],l.prototype,"progressCircle",void 0),t([i({type:Number,reflect:!0})],l.prototype,"value",void 0),t([i({type:String,reflect:!0})],l.prototype,"content",void 0),t([i({type:Number,reflect:!0})],l.prototype,"size",void 0),l=t([r("nile-circular-progressbar")],l);export{l as N};
@@ -1,2 +1,2 @@
1
- function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js"],function(_export,_context){"use strict";var r,s,e,i,o,t,_templateObject,l;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_lit){s=_lit.LitElement;e=_lit.html;},function(_nileProgressBarCssCjsJs){i=_nileProgressBarCssCjsJs.s;},function(_litDecoratorsJs){o=_litDecoratorsJs.property;t=_litDecoratorsJs.customElement;}],execute:function execute(){_export("N",l=/*#__PURE__*/function(_s){function l(){var _this;_classCallCheck(this,l);_this=_callSuper(this,l,arguments),_this.value=0;return _this;}_inherits(l,_s);return _createClass(l,[{key:"render",value:function render(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-progress-bar__container\">\n <ul class=\"nile-progress-bar__progress-bar\">\n <li><span style=\"width: ","%\"></span></li>\n </ul>\n </div>\n "])),this.value);}}]);}(s));l.styles=i,r([o({type:Number})],l.prototype,"value",void 0),_export("N",l=r([t("nile-progress-bar")],l));}};});
1
+ function _typeof(o){"@babel/helpers - typeof";return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o;}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o;},_typeof(o);}System.register(["tslib","lit","./nile-progress-bar.css.cjs.js","lit/decorators.js"],function(_export,_context){"use strict";var r,s,e,t,i,o,_templateObject,a;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}function _classCallCheck(a,n){if(!(a instanceof n))throw new TypeError("Cannot call a class as a function");}function _defineProperties(e,r){for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o);}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e;}function _toPropertyKey(t){var i=_toPrimitive(t,"string");return"symbol"==_typeof(i)?i:i+"";}function _toPrimitive(t,r){if("object"!=_typeof(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.");}return("string"===r?String:Number)(t);}function _callSuper(t,o,e){return o=_getPrototypeOf(o),_possibleConstructorReturn(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],_getPrototypeOf(t).constructor):o.apply(t,e));}function _possibleConstructorReturn(t,e){if(e&&("object"==_typeof(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _assertThisInitialized(t);}function _assertThisInitialized(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e;}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}function _getPrototypeOf(t){return _getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t);},_getPrototypeOf(t);}function _inherits(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_setPrototypeOf(t,e);}function _setPrototypeOf(t,e){return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t;},_setPrototypeOf(t,e);}return{setters:[function(_tslib){r=_tslib.__decorate;},function(_lit){s=_lit.LitElement;e=_lit.html;},function(_nileProgressBarCssCjsJs){t=_nileProgressBarCssCjsJs.s;},function(_litDecoratorsJs){i=_litDecoratorsJs.property;o=_litDecoratorsJs.customElement;}],execute:function execute(){_export("N",a=/*#__PURE__*/function(_s){function a(){var _this;_classCallCheck(this,a);_this=_callSuper(this,a,arguments),_this.value=0,_this.variant="normal";return _this;}_inherits(a,_s);return _createClass(a,[{key:"render",value:function render(){var r="rounded"===this.variant?"rounded":"";return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div class=\"nile-progress-bar__container\">\n <ul class=\"nile-progress-bar__progress-bar ","\">\n <li><span style=\"width: ","%\"></span></li>\n </ul>\n </div>\n "])),r,this.value);}}]);}(s));a.styles=t,r([i({type:Number})],a.prototype,"value",void 0),r([i({type:String})],a.prototype,"variant",void 0),_export("N",a=r([o("nile-progress-bar")],a));}};});
2
2
  //# sourceMappingURL=nile-progress-bar.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nile-progress-bar.cjs.js","sources":["../../../src/nile-progress-bar/nile-progress-bar.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultGroup } from 'lit';\nimport styles from './nile-progress-bar.css';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('nile-progress-bar')\nexport class NileProgressBar extends LitElement {\n static override styles: CSSResultGroup = styles;\n\n @property({ type: Number }) value = 0;\n\n override render() {\n return html`\n <div class=\"nile-progress-bar__container\">\n <ul class=\"nile-progress-bar__progress-bar\">\n <li><span style=\"width: ${this.value}%\"></span></li>\n </ul>\n </div>\n `;\n }\n}\n"],"names":["NileProgressBar","_s","l","constructor","this","value","_this","_inherits","_createClass","key","render","html","_templateObject","_taggedTemplateLiteral","LitElement","styles","__decorate","property","type","Number","prototype","customElement"],"mappings":"ujGAKaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,CAAAC,KAAAA,KAAAA,CAAAA,eAAAA,MAAAA,CAAAA,qCAGuBC,KAAAA,CAAKC,KAAAA,CAAG,CAWrC,QAAAC,KAAA,EATUC,SAAA,CAAAL,CAAA,CAAAD,EAAA,SAAAO,YAAA,CAAAN,CAAA,GAAAO,GAAA,UAAAJ,KAAA,UAAAK,MAAAA,CAAAA,CACP,CAAA,MAAOC,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,+MAGqBT,IAAKC,CAAAA,KAAAA,EAItC,CAAA,MAbkCS,IACnBd,EAAMe,MAAmBA,CAAAA,CAAAA,CAEbC,EAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAMC,CAAAA,MAAAA,CAAAA,CAAAA,CAAAA,CAAoBnB,CAAAoB,CAAAA,SAAAA,CAAA,YAAA,EAH3BpB,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAegB,EAAA,CAD3BK,CAAAA,CAAc,sBACFrB"}
1
+ {"version":3,"file":"nile-progress-bar.cjs.js","sources":["../../../src/nile-progress-bar/nile-progress-bar.ts"],"sourcesContent":["import { LitElement, html, css, CSSResultGroup } from 'lit';\nimport styles from './nile-progress-bar.css';\nimport { customElement, property } from 'lit/decorators.js';\n\n@customElement('nile-progress-bar')\nexport class NileProgressBar extends LitElement {\n static override styles: CSSResultGroup = styles;\n\n @property({ type: Number }) value = 0;\n @property({ type: String }) variant: 'normal' | 'rounded' = 'normal';\n\n override render() {\n const variantClass = this.variant === 'rounded' ? 'rounded' : '';\n \n \n\n return html`\n <div class=\"nile-progress-bar__container\">\n <ul class=\"nile-progress-bar__progress-bar ${variantClass}\">\n <li><span style=\"width: ${this.value}%\"></span></li>\n </ul>\n </div>\n `;\n }\n}\n"],"names":["NileProgressBar","_s","a","this","value","variant","_this","_inherits","_createClass","key","render","variantClass","html","_templateObject","_taggedTemplateLiteral","LitElement","styles","__decorate","property","type","Number","prototype","String","customElement"],"mappings":"ujGAKaA,CAAN,uBAAAC,EAAA,EAAA,SAAAC,EAAA,uEAGuBC,KAAAA,CAAKC,KAAAA,CAAG,CACRD,CAAAA,KAAAA,CAAOE,OAAyB,CAAA,QAe7D,QAAAC,KAAA,EAbUC,SAAA,CAAAL,CAAA,CAAAD,EAAA,SAAAO,YAAA,CAAAN,CAAA,GAAAO,GAAA,UAAAL,KAAA,UAAAM,MAAAA,CAAAA,CAAAA,CACP,GAAMC,CAAAA,CAAAA,CAAgC,YAAjBR,IAAKE,CAAAA,OAAAA,CAAwB,SAAY,CAAA,EAAA,CAI9D,MAAOO,CAAAA,CAAI,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA,mNAEsCH,CAAAA,CACjBR,IAAKC,CAAAA,KAAAA,EAItC,CAAA,MAlBkCW,CAA9B,GACWf,CAAMgB,CAAAA,MAAAA,CAAmBA,CAEbC,CAAAA,CAAAA,CAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,MAAoBpB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqB,SAAA,CAAA,OAAA,CAAA,IAAA,EACVJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAAA,CAAMG,MAAmDtB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAqB,SAAA,CAAA,SAAA,CAAA,IAAA,EAJ1DrB,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAeiB,CAAA,CAAA,CAD3BM,CAAc,CAAA,mBAAA,CAAA,CAAA,CACFvB"}
@@ -1,2 +1,2 @@
1
- System.register(["lit"],function(_export,_context){"use strict";var r,_templateObject,o;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){r=_lit.css;}],execute:function execute(){_export("s",o=r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n .nile-progress-bar__container {\n width: 100%;\n margin: 0 auto;\n }\n\n .nile-progress-bar__progress-bar {\n width: 100%;\n counter-reset: step;\n padding: 0;\n margin: 0 auto;\n list-style: none;\n display: flex;\n height: 2px;\n justify-content: space-between;\n }\n\n .nile-progress-bar__progress-bar li {\n position: relative;\n width: 100%;\n height: 2px;\n background-color: var(--nile-colors-neutral-400);\n }\n\n .nile-progress-bar__progress-bar li.changeColor::after {\n background-color: var(--nile-colors-primary-600);\n }\n\n .nile-progress-bar__progress-bar li span {\n position: absolute;\n top: 0;\n left: 0;\n background-color: var(--nile-colors-primary-600);\n height: 2px;\n transition: all 1s linear;\n }\n\n .nile-progress-bar__reset {\n background-color: var(--nile-colors-neutral-400);\n position: absolute;\n z-index: 1;\n }\n"]))));}};});
1
+ System.register(["lit"],function(_export,_context){"use strict";var r,_templateObject,e;function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}));}return{setters:[function(_lit){r=_lit.css;}],execute:function execute(){_export("s",e=r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n .nile-progress-bar__container {\n width: 100%;\n margin: 0 auto;\n }\n\n .nile-progress-bar__progress-bar {\n width: 100%;\n counter-reset: step;\n padding: 0;\n margin: 0 auto;\n list-style: none;\n display: flex;\n height: 2px;\n justify-content: space-between;\n }\n\n .nile-progress-bar__progress-bar li {\n position: relative;\n width: 100%;\n height: 2px;\n background-color: var(--nile-colors-neutral-400);\n transition: stroke-dashoffset 0.8s ease-in-out\n }\n\n \n .nile-progress-bar__progress-bar.rounded li {\n height: 4px; \n border-radius: 4px;\n overflow: hidden; \n }\n\n .nile-progress-bar__progress-bar li.changeColor::after {\n background-color: var(--nile-colors-primary-600);\n }\n\n .nile-progress-bar__progress-bar li span {\n position: absolute;\n top: 0;\n left: 0;\n background-color: var(--nile-colors-primary-600);\n height: 100%; \n transition: all 1s linear;\n }\n\n \n .nile-progress-bar__progress-bar.rounded li span {\n border-radius: 4px;\n }\n\n .nile-progress-bar__reset {\n background-color: var(--nile-colors-neutral-400);\n position: absolute;\n z-index: 1;\n }\n"]))));}};});
2
2
  //# sourceMappingURL=nile-progress-bar.css.cjs.js.map