@aquera/nile-elements 0.0.59 → 0.0.61
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.
- package/README.md +7 -0
- package/demo/filenames.txt +1 -1
- package/dist/index.iife.js +97 -26
- package/dist/nile-loader/nile-loader.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.cjs.js.map +1 -1
- package/dist/nile-loader/nile-loader.css.cjs.js +1 -1
- package/dist/nile-loader/nile-loader.css.cjs.js.map +1 -1
- package/dist/nile-loader/nile-loader.css.esm.js +17 -3
- package/dist/nile-loader/nile-loader.esm.js +59 -3
- package/dist/nile-textarea/nile-textarea.cjs.js +1 -1
- package/dist/nile-textarea/nile-textarea.cjs.js.map +1 -1
- package/dist/nile-textarea/nile-textarea.esm.js +3 -2
- package/dist/src/nile-loader/nile-loader.css.js +15 -1
- package/dist/src/nile-loader/nile-loader.css.js.map +1 -1
- package/dist/src/nile-loader/nile-loader.d.ts +6 -2
- package/dist/src/nile-loader/nile-loader.js +82 -2
- package/dist/src/nile-loader/nile-loader.js.map +1 -1
- package/dist/src/nile-textarea/nile-textarea.js +3 -2
- package/dist/src/nile-textarea/nile-textarea.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/nile-loader/nile-loader.css.ts +15 -1
- package/src/nile-loader/nile-loader.ts +83 -5
- package/src/nile-textarea/nile-textarea.ts +3 -3
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-loader.css.cjs.js","lit"],function(_export,_context){"use strict";var i,t,
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-loader.css.cjs.js","lit"],function(_export,_context){"use strict";var i,t,e,r,s,o,_templateObject,_templateObject2,_templateObject3,n;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){i=_tslib.__decorate;},function(_index001CjsJs){t=_index001CjsJs.s;e=_index001CjsJs.x;},function(_litDecoratorsJs){r=_litDecoratorsJs.property;s=_litDecoratorsJs.customElement;},function(_nileLoaderCssCjsJs){o=_nileLoaderCssCjsJs.s;},function(_lit){}],execute:function(){_export("N",n=/*#__PURE__*/function(_t){_inherits(n,_t);var _super=_createSuper(n);function n(){var _this;_classCallCheck(this,n);_this=_super.apply(this,arguments),_this.height="60",_this.width="60",_this.position="absolute",_this.margin="",_this.variant="v3";return _this;}_createClass(n,[{key:"render",value:function render(){switch(this.variant){case"v1":default:return this.renderV1();case"v2":return this.renderV2();case"v3":return this.renderV3();}}},{key:"renderV1",value:function renderV1(){return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n style=\"width: ","px; height: ","px; background-size: ","px; position: ","; margin: ","\"\n class=\"nile-loader__v1\"\n ></div>\n "])),this.width,this.height,this.width,this.position,this.margin);}},{key:"renderV2",value:function renderV2(){return e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <svg\n class=\"nile-loader__v2\"\n width=\"","\"\n height=\"","\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g id=\"Loading circle\">\n <path\n id=\"Background\"\n d=\"M30 16C30 17.8385 29.6379 19.659 28.9343 21.3576C28.2308 23.0561 27.1995 24.5995 25.8995 25.8995C24.5995 27.1995 23.0561 28.2307 21.3576 28.9343C19.659 29.6379 17.8385 30 16 30C14.1615 30 12.341 29.6379 10.6424 28.9343C8.94387 28.2307 7.40052 27.1995 6.1005 25.8995C4.80048 24.5995 3.76925 23.0561 3.06569 21.3576C2.36212 19.659 2 17.8385 2 16C2 14.1615 2.36212 12.341 3.06569 10.6424C3.76926 8.94387 4.80049 7.40052 6.10051 6.1005C7.40053 4.80048 8.94388 3.76925 10.6424 3.06568C12.341 2.36212 14.1615 2 16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76926 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16Z\"\n stroke=\"#F2F4F7\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n id=\"Line\"\n d=\"M16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76925 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16\"\n stroke=\"#005EA6\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n </svg>\n "])),this.width,this.height);}},{key:"renderV3",value:function renderV3(){return e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <svg\n class=\"nile-loader__v3\"\n width=\"","\"\n height=\"","\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g id=\"Loading circle\">\n <path\n id=\"Background\"\n d=\"M30 16C30 17.8385 29.6379 19.659 28.9343 21.3576C28.2308 23.0561 27.1995 24.5995 25.8995 25.8995C24.5995 27.1995 23.0561 28.2307 21.3576 28.9343C19.659 29.6379 17.8385 30 16 30C14.1615 30 12.341 29.6379 10.6424 28.9343C8.94387 28.2307 7.40052 27.1995 6.1005 25.8995C4.80048 24.5995 3.76925 23.0561 3.06569 21.3576C2.36212 19.659 2 17.8385 2 16C2 14.1615 2.36212 12.341 3.06569 10.6424C3.76926 8.94387 4.80049 7.40052 6.10051 6.1005C7.40053 4.80048 8.94388 3.76925 10.6424 3.06568C12.341 2.36212 14.1615 2 16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76926 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16L30 16Z\"\n stroke=\"white\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n id=\"Line\"\n d=\"M6.10051 6.1005C7.66275 4.53826 9.57255 3.36793 11.6738 2.68521C13.775 2.00248 16.0079 1.82675 18.1901 2.17236C20.3722 2.51798 22.4416 3.37514 24.229 4.67376C26.0164 5.97238 27.4711 7.67559 28.4741 9.64414C29.4771 11.6127 30 13.7907 30 16C30 18.2093 29.4771 20.3873 28.4741 22.3559C27.4711 24.3244 26.0164 26.0276 24.229 27.3262C22.4416 28.6249 20.3722 29.482 18.1901 29.8276\"\n stroke=\"#005EA6\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n </svg>\n "])),this.width,this.height);}}]);return n;}(t));n.styles=o,i([r({type:String})],n.prototype,"height",void 0),i([r({type:String})],n.prototype,"width",void 0),i([r({type:String})],n.prototype,"position",void 0),i([r({type:String})],n.prototype,"margin",void 0),i([r({type:String})],n.prototype,"variant",void 0),_export("N",n=i([s("nile-loader")],n));}};});
|
2
2
|
//# sourceMappingURL=nile-loader.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-loader.cjs.js","sources":["../../../src/nile-loader/nile-loader.ts"],"sourcesContent":["import { CSSResultGroup, css } from 'lit';\nimport { LitElement, html } from 'lit-element';\nimport { customElement, property } from 'lit/decorators.js';\nimport styles from './nile-loader.css';\n\n@customElement('nile-loader')\nexport class NileLoader extends LitElement {\n
|
1
|
+
{"version":3,"file":"nile-loader.cjs.js","sources":["../../../src/nile-loader/nile-loader.ts"],"sourcesContent":["import { CSSResultGroup, css } from 'lit';\nimport { LitElement, html, TemplateResult } from 'lit-element';\nimport { customElement, property } from 'lit/decorators.js';\nimport styles from './nile-loader.css';\n\n@customElement('nile-loader')\nexport class NileLoader extends LitElement {\n @property({ type: String }) height = '60';\n @property({ type: String }) width = '60';\n @property({ type: String }) position = 'absolute';\n @property({ type: String }) margin = '';\n @property({ type: String }) variant = 'v3';\n\n static override styles: CSSResultGroup = styles;\n\n override render(): TemplateResult {\n switch (this.variant) {\n case 'v1':\n return this.renderV1();\n case 'v2':\n return this.renderV2();\n case 'v3':\n return this.renderV3();\n default:\n return this.renderV1();\n } }\n\n private renderV1(): TemplateResult {\n return html`\n <div\n style=\"width: ${this.width}px; height: ${this\n .height}px; background-size: ${this.width}px; position: ${this\n .position}; margin: ${this.margin}\"\n class=\"nile-loader__v1\"\n ></div>\n `;\n }\n\n private renderV2(): TemplateResult {\n return html`\n <svg\n class=\"nile-loader__v2\"\n width=\"${this.width}\"\n height=\"${this.height}\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g id=\"Loading circle\">\n <path\n id=\"Background\"\n d=\"M30 16C30 17.8385 29.6379 19.659 28.9343 21.3576C28.2308 23.0561 27.1995 24.5995 25.8995 25.8995C24.5995 27.1995 23.0561 28.2307 21.3576 28.9343C19.659 29.6379 17.8385 30 16 30C14.1615 30 12.341 29.6379 10.6424 28.9343C8.94387 28.2307 7.40052 27.1995 6.1005 25.8995C4.80048 24.5995 3.76925 23.0561 3.06569 21.3576C2.36212 19.659 2 17.8385 2 16C2 14.1615 2.36212 12.341 3.06569 10.6424C3.76926 8.94387 4.80049 7.40052 6.10051 6.1005C7.40053 4.80048 8.94388 3.76925 10.6424 3.06568C12.341 2.36212 14.1615 2 16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76926 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16Z\"\n stroke=\"#F2F4F7\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n id=\"Line\"\n d=\"M16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76925 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16\"\n stroke=\"#005EA6\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n </svg>\n `;\n }\n\n private renderV3(): TemplateResult {\n return html`\n <svg\n class=\"nile-loader__v3\"\n width=\"${this.width}\"\n height=\"${this.height}\"\n viewBox=\"0 0 32 32\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g id=\"Loading circle\">\n <path\n id=\"Background\"\n d=\"M30 16C30 17.8385 29.6379 19.659 28.9343 21.3576C28.2308 23.0561 27.1995 24.5995 25.8995 25.8995C24.5995 27.1995 23.0561 28.2307 21.3576 28.9343C19.659 29.6379 17.8385 30 16 30C14.1615 30 12.341 29.6379 10.6424 28.9343C8.94387 28.2307 7.40052 27.1995 6.1005 25.8995C4.80048 24.5995 3.76925 23.0561 3.06569 21.3576C2.36212 19.659 2 17.8385 2 16C2 14.1615 2.36212 12.341 3.06569 10.6424C3.76926 8.94387 4.80049 7.40052 6.10051 6.1005C7.40053 4.80048 8.94388 3.76925 10.6424 3.06568C12.341 2.36212 14.1615 2 16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76926 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16L30 16Z\"\n stroke=\"white\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n <path\n id=\"Line\"\n d=\"M6.10051 6.1005C7.66275 4.53826 9.57255 3.36793 11.6738 2.68521C13.775 2.00248 16.0079 1.82675 18.1901 2.17236C20.3722 2.51798 22.4416 3.37514 24.229 4.67376C26.0164 5.97238 27.4711 7.67559 28.4741 9.64414C29.4771 11.6127 30 13.7907 30 16C30 18.2093 29.4771 20.3873 28.4741 22.3559C27.4711 24.3244 26.0164 26.0276 24.229 27.3262C22.4416 28.6249 20.3722 29.482 18.1901 29.8276\"\n stroke=\"#005EA6\"\n stroke-width=\"4\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n />\n </g>\n </svg>\n `;\n }\n}\n"],"names":["NileLoader","_t","_inherits","n","_super","_createSuper","this","height","width","position","margin","variant","_this","_createClass","key","value","render","renderV1","renderV2","renderV3","html","_templateObject","_taggedTemplateLiteral","_templateObject2","_templateObject3","LitElement","styles","__decorate","property","type","String","prototype","customElement"],"mappings":"qqHAMaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,qEACuBG,EAAAA,KAAAA,CAAMC,MAAG,CAAA,IAAA,CACTD,KAAAA,CAAKE,KAAAA,CAAG,IACRF,CAAAA,KAAAA,CAAQG,QAAG,CAAA,UAAA,CACXH,KAAAA,CAAMI,MAAAA,CAAG,EACTJ,CAAAA,KAAAA,CAAOK,OAAG,CAAA,IA0FvC,QAAAC,KAAA,EAtFUC,YAAA,CAAAV,CAAA,GAAAW,GAAA,UAAAC,KAAA,UAAAC,OAAA,CACP,CAAA,OAAQV,IAAKK,CAAAA,OAAAA,EACX,IAAK,IAAA,CAML,QACE,MAAOL,KAAKW,CAAAA,QAAAA,CAAAA,CAAAA,CALd,IAAK,IAAA,CACH,MAAOX,KAAAA,CAAKY,QACd,CAAA,CAAA,CAAA,IAAK,IACH,CAAA,MAAOZ,KAAKa,CAAAA,QAAAA,CAAAA,CAAAA,EAGZ,CAEE,GAAAL,GAAA,YAAAC,KAAA,UAAAE,SAAA,CACN,CAAA,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,CAAAA,CAAA+B,SAAA,CAAA,QAAA,CAAA,IAAA,EACZJ,CAAAA,CAAAA,CAAAA,CAAA,CAA3BC,CAAAA,CAAS,CAAEC,IAAAA,CAAMC,MAAyB9B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA+B,SAAA,CAAA,SAAA,CAAA,IAAA,EALhC/B,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAU2B,CAAA,CAAA,CADtBK,CAAc,CAAA,aAAA,CAAA,CAAA,CACFhC"}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["lit"],function(_export,_context){"use strict";var
|
1
|
+
System.register(["lit"],function(_export,_context){"use strict";var r,_templateObject,o;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}return{setters:[function(_lit){r=_lit.css;}],execute:function(){_export("s",o=r(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n .nile-loader__v1 {\n border-radius: 50%;\n display: inline-block;\n border-top: 1px solid var(--nile-colors-blue-500);\n border-right: 1px solid var(--nile-colors-blue-500);\n box-shadow: 0 1px 1px -1px var(--nile-colors-blue-500);\n box-sizing: border-box;\n animation: rotation 0.5s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .nile-loader__v2,\n .nile-loader__v3 {\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n }\n"]))));}};});
|
2
2
|
//# sourceMappingURL=nile-loader.css.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-loader.css.cjs.js","sources":["../../../src/nile-loader/nile-loader.css.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport default css`\n .nile-
|
1
|
+
{"version":3,"file":"nile-loader.css.cjs.js","sources":["../../../src/nile-loader/nile-loader.css.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport default css`\n .nile-loader__v1 {\n border-radius: 50%;\n display: inline-block;\n border-top: 1px solid var(--nile-colors-blue-500);\n border-right: 1px solid var(--nile-colors-blue-500);\n box-shadow: 0 1px 1px -1px var(--nile-colors-blue-500);\n box-sizing: border-box;\n animation: rotation 0.5s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .nile-loader__v2,\n .nile-loader__v3 {\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n }\n`;\n"],"names":["styles","css","_templateObject","_taggedTemplateLiteral"],"mappings":"yUAEeA,CAAAA,CAAAC,CAAG,CAAAC,eAAA,GAAAA,eAAA,CAAAC,sBAAA"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import{css as
|
2
|
-
.nile-
|
1
|
+
import{css as r}from"lit";var o=r`
|
2
|
+
.nile-loader__v1 {
|
3
3
|
border-radius: 50%;
|
4
4
|
display: inline-block;
|
5
5
|
border-top: 1px solid var(--nile-colors-blue-500);
|
@@ -17,4 +17,18 @@ import{css as o}from"lit";var r=o`
|
|
17
17
|
transform: rotate(360deg);
|
18
18
|
}
|
19
19
|
}
|
20
|
-
|
20
|
+
|
21
|
+
.nile-loader__v2,
|
22
|
+
.nile-loader__v3 {
|
23
|
+
animation: spin 1.5s linear infinite;
|
24
|
+
}
|
25
|
+
|
26
|
+
@keyframes spin {
|
27
|
+
0% {
|
28
|
+
transform: translate(-50%, -50%) rotate(0deg);
|
29
|
+
}
|
30
|
+
100% {
|
31
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
32
|
+
}
|
33
|
+
}
|
34
|
+
`;export{o as s};
|
@@ -1,6 +1,62 @@
|
|
1
|
-
import{__decorate as i}from"tslib";import{s as t,x as
|
1
|
+
import{__decorate as i}from"tslib";import{s as t,x as e}from"../index-cd2f9c12.esm.js";import{property as r,customElement as s}from"lit/decorators.js";import{s as o}from"./nile-loader.css.esm.js";import"lit";let n=class extends t{constructor(){super(...arguments),this.height="60",this.width="60",this.position="absolute",this.margin="",this.variant="v3"}render(){switch(this.variant){case"v1":default:return this.renderV1();case"v2":return this.renderV2();case"v3":return this.renderV3()}}renderV1(){return e`
|
2
2
|
<div
|
3
3
|
style="width: ${this.width}px; height: ${this.height}px; background-size: ${this.width}px; position: ${this.position}; margin: ${this.margin}"
|
4
|
-
class="nile-
|
4
|
+
class="nile-loader__v1"
|
5
5
|
></div>
|
6
|
-
`}
|
6
|
+
`}renderV2(){return e`
|
7
|
+
<svg
|
8
|
+
class="nile-loader__v2"
|
9
|
+
width="${this.width}"
|
10
|
+
height="${this.height}"
|
11
|
+
viewBox="0 0 32 32"
|
12
|
+
fill="none"
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
14
|
+
>
|
15
|
+
<g id="Loading circle">
|
16
|
+
<path
|
17
|
+
id="Background"
|
18
|
+
d="M30 16C30 17.8385 29.6379 19.659 28.9343 21.3576C28.2308 23.0561 27.1995 24.5995 25.8995 25.8995C24.5995 27.1995 23.0561 28.2307 21.3576 28.9343C19.659 29.6379 17.8385 30 16 30C14.1615 30 12.341 29.6379 10.6424 28.9343C8.94387 28.2307 7.40052 27.1995 6.1005 25.8995C4.80048 24.5995 3.76925 23.0561 3.06569 21.3576C2.36212 19.659 2 17.8385 2 16C2 14.1615 2.36212 12.341 3.06569 10.6424C3.76926 8.94387 4.80049 7.40052 6.10051 6.1005C7.40053 4.80048 8.94388 3.76925 10.6424 3.06568C12.341 2.36212 14.1615 2 16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76926 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16Z"
|
19
|
+
stroke="#F2F4F7"
|
20
|
+
stroke-width="4"
|
21
|
+
stroke-linecap="round"
|
22
|
+
stroke-linejoin="round"
|
23
|
+
/>
|
24
|
+
<path
|
25
|
+
id="Line"
|
26
|
+
d="M16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76925 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16"
|
27
|
+
stroke="#005EA6"
|
28
|
+
stroke-width="4"
|
29
|
+
stroke-linecap="round"
|
30
|
+
stroke-linejoin="round"
|
31
|
+
/>
|
32
|
+
</g>
|
33
|
+
</svg>
|
34
|
+
`}renderV3(){return e`
|
35
|
+
<svg
|
36
|
+
class="nile-loader__v3"
|
37
|
+
width="${this.width}"
|
38
|
+
height="${this.height}"
|
39
|
+
viewBox="0 0 32 32"
|
40
|
+
fill="none"
|
41
|
+
xmlns="http://www.w3.org/2000/svg"
|
42
|
+
>
|
43
|
+
<g id="Loading circle">
|
44
|
+
<path
|
45
|
+
id="Background"
|
46
|
+
d="M30 16C30 17.8385 29.6379 19.659 28.9343 21.3576C28.2308 23.0561 27.1995 24.5995 25.8995 25.8995C24.5995 27.1995 23.0561 28.2307 21.3576 28.9343C19.659 29.6379 17.8385 30 16 30C14.1615 30 12.341 29.6379 10.6424 28.9343C8.94387 28.2307 7.40052 27.1995 6.1005 25.8995C4.80048 24.5995 3.76925 23.0561 3.06569 21.3576C2.36212 19.659 2 17.8385 2 16C2 14.1615 2.36212 12.341 3.06569 10.6424C3.76926 8.94387 4.80049 7.40052 6.10051 6.1005C7.40053 4.80048 8.94388 3.76925 10.6424 3.06568C12.341 2.36212 14.1615 2 16 2C17.8385 2 19.659 2.36212 21.3576 3.06569C23.0561 3.76926 24.5995 4.80049 25.8995 6.10051C27.1995 7.40053 28.2308 8.94388 28.9343 10.6424C29.6379 12.341 30 14.1615 30 16L30 16Z"
|
47
|
+
stroke="white"
|
48
|
+
stroke-width="4"
|
49
|
+
stroke-linecap="round"
|
50
|
+
stroke-linejoin="round"
|
51
|
+
/>
|
52
|
+
<path
|
53
|
+
id="Line"
|
54
|
+
d="M6.10051 6.1005C7.66275 4.53826 9.57255 3.36793 11.6738 2.68521C13.775 2.00248 16.0079 1.82675 18.1901 2.17236C20.3722 2.51798 22.4416 3.37514 24.229 4.67376C26.0164 5.97238 27.4711 7.67559 28.4741 9.64414C29.4771 11.6127 30 13.7907 30 16C30 18.2093 29.4771 20.3873 28.4741 22.3559C27.4711 24.3244 26.0164 26.0276 24.229 27.3262C22.4416 28.6249 20.3722 29.482 18.1901 29.8276"
|
55
|
+
stroke="#005EA6"
|
56
|
+
stroke-width="4"
|
57
|
+
stroke-linecap="round"
|
58
|
+
stroke-linejoin="round"
|
59
|
+
/>
|
60
|
+
</g>
|
61
|
+
</svg>
|
62
|
+
`}};n.styles=o,i([r({type:String})],n.prototype,"height",void 0),i([r({type:String})],n.prototype,"width",void 0),i([r({type:String})],n.prototype,"position",void 0),i([r({type:String})],n.prototype,"margin",void 0),i([r({type:String})],n.prototype,"variant",void 0),n=i([s("nile-loader")],n);export{n as N};
|
@@ -1,2 +1,2 @@
|
|
1
|
-
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-textarea.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","../internal/slot.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","lit/directives/unsafe-html.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,e,i,s,a,r,o,l,h,n,d,c,p,u,m,_templateObject,_templateObject2,_templateObject3,v;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){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(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(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 new 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(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(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function(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 new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function(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(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(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(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 new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;a=_litDecoratorsJs.customElement;},function(_nileTextareaCssCjsJs){r=_nileTextareaCssCjsJs.s;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){l=_internalDefaultValueCjsJs.d;},function(_internalSlotCjsJs){h=_internalSlotCjsJs.H;},function(_litDirectivesIfDefinedJs){n=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){d=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){c=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){p=_internalNileElementCjsJs.N;},function(_litDirectivesUnsafeHtmlJs){u=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_property002CjsJs){m=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",v=/*#__PURE__*/function(_p){_inherits(v,_p);var _super=_createSuper(v);function v(){var _this;_classCallCheck(this,v);_this=_super.apply(this,arguments),_this.hasSlotController=new h(_assertThisInitialized(_this),"help-text","label"),_this.hasFocus=!1,_this.title="",_this.name="",_this.value="",_this.size="medium",_this.filled=!1,_this.label="",_this.helpText="",_this.errorMessage="",_this.placeholder="",_this.rows=4,_this.resize="vertical",_this.disabled=!1,_this.readonly=!1,_this.form="",_this.required=!1,_this.warning=!1,_this.error=!1,_this.success=!1,_this.spellcheck=!0,_this.defaultValue="",_this.fullHeight=!1,_this.checkNonPrintableChar=!1,_this.hasPrintableCharacters=!1;return _this;}_createClass(v,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(v.prototype),"connectedCallback",this).call(this),this.resizeObserver=new ResizeObserver(function(){return _this2.setTextareaHeight();}),this.updateComplete.then(function(){_this2.setTextareaHeight(),_this2.resizeObserver.observe(_this2.input);}),this.fullHeight&&requestAnimationFrame(function(){var _this2$parentElement,_this2$shadowRoot;var t=(_this2$parentElement=_this2.parentElement)===null||_this2$parentElement===void 0?void 0:_this2$parentElement.getBoundingClientRect().height;t&&(t-=65,t<12&&(t=12),(_this2$shadowRoot=_this2.shadowRoot)===null||_this2$shadowRoot===void 0||(_this2$shadowRoot=_this2$shadowRoot.querySelector("textarea"))===null||_this2$shadowRoot===void 0?void 0:_this2$shadowRoot.style.setProperty("height","".concat(t,"px")));}),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(v.prototype),"disconnectedCallback",this).call(this),this.input&&this.resizeObserver.unobserve(this.input),this.emit("nile-destroy");}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value});}},{key:"handleChange",value:function handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("nile-change",{value:this.value});}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value});}},{key:"handleInput",value:function handleInput(){this.value=this.input.value,this.emit("nile-input",{value:this.value});}},{key:"setTextareaHeight",value:function setTextareaHeight(){"auto"===this.resize?(this.input.style.height="auto",this.input.style.height="".concat(this.input.scrollHeight,"px")):this.input.style.height=void 0;}},{key:"handleRowsChange",value:function handleRowsChange(){this.setTextareaHeight();}},{key:"handleValueChange",value:function(){var _handleValueChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:this.setTextareaHeight();this.checkNonPrintableChar&&this.markNonPrintableCharacters();case 4:case"end":return _context2.stop();}},_callee,this);}));function handleValueChange(){return _handleValueChange.apply(this,arguments);}return handleValueChange;}()},{key:"markNonPrintableCharacters",value:function markNonPrintableCharacters(){var t="";if(this.hasPrintableCharacters=!1,this.value)for(var _e=0,_i=this.value.length;_e<_i;_e++){var _i2=this.value.charCodeAt(_e);_i2>255&&9109!==_i2||[129,143,144,157,160].includes(_i2)?(t+="<span class=\"input__srtiked-text\">".concat(this.value.charAt(_e),"</span>"),this.hasPrintableCharacters=!0):t+=this.value.charAt(_e);}this.markedValue=t,this.emit("nile-value-marked",{value:this.markedValue,hasNonPrintableCharacters:this.hasPrintableCharacters});}},{key:"removeAllNonPrintableCharacters",value:function removeAllNonPrintableCharacters(){var t="";if(this.value)for(var _e2=0,_i3=this.value.length;_e2<_i3;_e2++){var _i4=this.value.charCodeAt(_e2);_i4>255&&9109!==_i4||[129,143,144,157,160].includes(_i4)||(t+=this.value.charAt(_e2));}this.value=t,this.emit("nile-npchar-removed",{value:this.value});}},{key:"focus",value:function focus(t){this.input.focus(t);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"select",value:function select(){this.input.select();}},{key:"scrollPosition",value:function scrollPosition(t){return t?("number"==typeof t.top&&(this.input.scrollTop=t.top),void("number"==typeof t.left&&(this.input.scrollLeft=t.left))):{top:this.input.scrollTop,left:this.input.scrollTop};}},{key:"setSelectionRange",value:function setSelectionRange(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"none";this.input.setSelectionRange(t,e,i);}},{key:"setRangeText",value:function setRangeText(t,e,i,s){this.input.setRangeText(t,e,i,s),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight());}},{key:"render",value:function render(){var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var i=!!this.label||!!t,s=!!this.helpText,a=!!this.errorMessage;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"form-control\"\n class=","\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <nile-popup\n ?active=","\n placement=\"bottom-start\"\n distance=\"5\"\n strategy=\"fixed\"\n >\n <div part=\"form-control-input\" class=\"form-control-input\" slot=\"anchor\">\n <div\n part=\"base\"\n class=","\n >\n <textarea\n part=\"textarea\"\n id=\"input\"\n class=\"textarea__control\"\n title=","\n name=","\n .value=","\n ?disabled=","\n ?readonly=","\n ?required=","\n placeholder=","\n rows=","\n minlength=","\n maxlength=","\n autocapitalize=","\n autocorrect=","\n ?autofocus=","\n spellcheck=","\n enterkeyhint=","\n inputmode=","\n aria-describedby=\"help-text\"\n @change=","\n @input=","\n @focus=","\n @blur=","\n ></textarea>\n </div>\n </div>\n\n ","\n ","\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge\n variant=\"error\"\n @click=","\n class=\"input__remove-non-printable\"\n >\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\">\n ","\n </div>\n </div>\n </nile-popup>\n </div>\n "])),o({"form-control":!0,"form-control--medium":"medium"===this.size,"form-control--has-label":i,"form-control--has-help-text":s}),i?"false":"true",this.label,this.hasPrintableCharacters,o({textarea:!0,"textarea--medium":"medium"===this.size,"textarea--warning":this.warning,"textarea--error":this.error,"textarea--success":this.success,"textarea--standard":!this.filled,"textarea--disabled":this.disabled,"textarea--focused":this.hasFocus,"textarea--empty":!this.value,"textarea--resize-none":"none"===this.resize,"textarea--resize-vertical":"vertical"===this.resize,"textarea--resize-auto":"auto"===this.resize}),this.title,n(this.name),d(this.value),this.disabled,this.readonly,this.required,n(this.placeholder),n(this.rows),n(this.minlength),n(this.maxlength),n(this.autocapitalize),n(this.autocorrect),this.autofocus,n(this.spellcheck),n(this.enterkeyhint),n(this.inputmode),this.handleChange,this.handleInput,this.handleFocus,this.handleBlur,s?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",a?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"",this.removeAllNonPrintableCharacters,u(this.markedValue));}}]);return v;}(p));v.styles=r,t([i(".textarea__control")],v.prototype,"input",void 0),t([s()],v.prototype,"hasFocus",void 0),t([m()],v.prototype,"title",void 0),t([m()],v.prototype,"name",void 0),t([m()],v.prototype,"value",void 0),t([m({reflect:!0})],v.prototype,"size",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"filled",void 0),t([m()],v.prototype,"label",void 0),t([m({attribute:"help-text"})],v.prototype,"helpText",void 0),t([m({attribute:"error-message"})],v.prototype,"errorMessage",void 0),t([m()],v.prototype,"placeholder",void 0),t([m({type:Number})],v.prototype,"rows",void 0),t([m()],v.prototype,"resize",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"readonly",void 0),t([m({reflect:!0})],v.prototype,"form",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"required",void 0),t([m({type:Number})],v.prototype,"minlength",void 0),t([m({type:Number})],v.prototype,"maxlength",void 0),t([m({type:Boolean})],v.prototype,"warning",void 0),t([m({type:Boolean})],v.prototype,"error",void 0),t([m({type:Boolean})],v.prototype,"success",void 0),t([m()],v.prototype,"autocapitalize",void 0),t([m()],v.prototype,"autocorrect",void 0),t([m()],v.prototype,"autocomplete",void 0),t([m({type:Boolean})],v.prototype,"autofocus",void 0),t([m()],v.prototype,"enterkeyhint",void 0),t([m({type:Boolean,converter:{fromAttribute:function fromAttribute(t){return!(!t||"false"===t);},toAttribute:function toAttribute(t){return t?"true":"false";}}})],v.prototype,"spellcheck",void 0),t([m()],v.prototype,"inputmode",void 0),t([l()],v.prototype,"defaultValue",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"fullHeight",void 0),t([m({type:Boolean})],v.prototype,"checkNonPrintableChar",void 0),t([s()],v.prototype,"hasPrintableCharacters",void 0),t([s()],v.prototype,"markedValue",void 0),t([c("rows",{waitUntilFirstUpdate:!0})],v.prototype,"handleRowsChange",null),t([c("value",{waitUntilFirstUpdate:!0})],v.prototype,"handleValueChange",null),_export("N",v=t([a("nile-textarea")],v));}};});
|
1
|
+
System.register(["tslib","../index-cd83c5c8.cjs.js","lit/decorators.js","./nile-textarea.css.cjs.js","lit/directives/class-map.js","../internal/default-value.cjs.js","../internal/slot.cjs.js","lit/directives/if-defined.js","lit/directives/live.js","../internal/watch.cjs.js","../internal/nile-element.cjs.js","lit/directives/unsafe-html.js","../property-0f6a51ec.cjs.js","lit"],function(_export,_context){"use strict";var t,e,i,s,a,r,o,l,h,n,d,c,p,u,m,_templateObject,_templateObject2,_templateObject3,v;function _taggedTemplateLiteral(strings,raw){if(!raw){raw=strings.slice(0);}return Object.freeze(Object.defineProperties(strings,{raw:{value:Object.freeze(raw)}}));}function _regeneratorRuntime(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */_regeneratorRuntime=function(){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(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(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 new 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(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(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval;},dispatchException:function(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 new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return handle(i.finallyLoc);}}}},abrupt:function(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(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(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(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 new Error("illegal catch attempt");},delegateYield:function(e,r,n){return this.delegate={iterator:values(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y;}},e;}function asyncGeneratorStep(gen,resolve,reject,_next,_throw,key,arg){try{var info=gen[key](arg);var value=info.value;}catch(error){reject(error);return;}if(info.done){resolve(value);}else{Promise.resolve(value).then(_next,_throw);}}function _asyncToGenerator(fn){return function(){var self=this,args=arguments;return new Promise(function(resolve,reject){var gen=fn.apply(self,args);function _next(value){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"next",value);}function _throw(err){asyncGeneratorStep(gen,resolve,reject,_next,_throw,"throw",err);}_next(undefined);});};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,_toPropertyKey(descriptor.key),descriptor);}}function _createClass(Constructor,protoProps,staticProps){if(protoProps)_defineProperties(Constructor.prototype,protoProps);if(staticProps)_defineProperties(Constructor,staticProps);Object.defineProperty(Constructor,"prototype",{writable:false});return Constructor;}function _toPropertyKey(arg){var key=_toPrimitive(arg,"string");return typeof key==="symbol"?key:String(key);}function _toPrimitive(input,hint){if(typeof input!=="object"||input===null)return input;var prim=input[Symbol.toPrimitive];if(prim!==undefined){var res=prim.call(input,hint||"default");if(typeof res!=="object")return res;throw new TypeError("@@toPrimitive must return a primitive value.");}return(hint==="string"?String:Number)(input);}function _get(){if(typeof Reflect!=="undefined"&&Reflect.get){_get=Reflect.get.bind();}else{_get=function _get(target,property,receiver){var base=_superPropBase(target,property);if(!base)return;var desc=Object.getOwnPropertyDescriptor(base,property);if(desc.get){return desc.get.call(arguments.length<3?target:receiver);}return desc.value;};}return _get.apply(this,arguments);}function _superPropBase(object,property){while(!Object.prototype.hasOwnProperty.call(object,property)){object=_getPrototypeOf(object);if(object===null)break;}return object;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function");}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,writable:true,configurable:true}});Object.defineProperty(subClass,"prototype",{writable:false});if(superClass)_setPrototypeOf(subClass,superClass);}function _setPrototypeOf(o,p){_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function _setPrototypeOf(o,p){o.__proto__=p;return o;};return _setPrototypeOf(o,p);}function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _possibleConstructorReturn(self,call){if(call&&(typeof call==="object"||typeof call==="function")){return call;}else if(call!==void 0){throw new TypeError("Derived constructors may only return object or undefined");}return _assertThisInitialized(self);}function _assertThisInitialized(self){if(self===void 0){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return self;}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}function _getPrototypeOf(o){_getPrototypeOf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function _getPrototypeOf(o){return o.__proto__||Object.getPrototypeOf(o);};return _getPrototypeOf(o);}return{setters:[function(_tslib){t=_tslib.__decorate;},function(_index001CjsJs){e=_index001CjsJs.x;},function(_litDecoratorsJs){i=_litDecoratorsJs.query;s=_litDecoratorsJs.state;a=_litDecoratorsJs.customElement;},function(_nileTextareaCssCjsJs){r=_nileTextareaCssCjsJs.s;},function(_litDirectivesClassMapJs){o=_litDirectivesClassMapJs.classMap;},function(_internalDefaultValueCjsJs){l=_internalDefaultValueCjsJs.d;},function(_internalSlotCjsJs){h=_internalSlotCjsJs.H;},function(_litDirectivesIfDefinedJs){n=_litDirectivesIfDefinedJs.ifDefined;},function(_litDirectivesLiveJs){d=_litDirectivesLiveJs.live;},function(_internalWatchCjsJs){c=_internalWatchCjsJs.w;},function(_internalNileElementCjsJs){p=_internalNileElementCjsJs.N;},function(_litDirectivesUnsafeHtmlJs){u=_litDirectivesUnsafeHtmlJs.unsafeHTML;},function(_property002CjsJs){m=_property002CjsJs.n;},function(_lit){}],execute:function(){_export("N",v=/*#__PURE__*/function(_p){_inherits(v,_p);var _super=_createSuper(v);function v(){var _this;_classCallCheck(this,v);_this=_super.apply(this,arguments),_this.hasSlotController=new h(_assertThisInitialized(_this),"help-text","label"),_this.hasFocus=!1,_this.title="",_this.name="",_this.value="",_this.size="medium",_this.filled=!1,_this.label="",_this.helpText="",_this.errorMessage="",_this.placeholder="",_this.rows=4,_this.resize="vertical",_this.disabled=!1,_this.readonly=!1,_this.form="",_this.required=!1,_this.warning=!1,_this.error=!1,_this.success=!1,_this.spellcheck=!0,_this.defaultValue="",_this.fullHeight=!1,_this.checkNonPrintableChar=!1,_this.hasPrintableCharacters=!1;return _this;}_createClass(v,[{key:"connectedCallback",value:function connectedCallback(){var _this2=this;_get(_getPrototypeOf(v.prototype),"connectedCallback",this).call(this),this.resizeObserver=new ResizeObserver(function(){return _this2.setTextareaHeight();}),this.updateComplete.then(function(){_this2.setTextareaHeight(),_this2.resizeObserver.observe(_this2.input);}),this.fullHeight&&requestAnimationFrame(function(){var _this2$parentElement,_this2$shadowRoot;var t=(_this2$parentElement=_this2.parentElement)===null||_this2$parentElement===void 0?void 0:_this2$parentElement.getBoundingClientRect().height;t&&(t-=65,t<12&&(t=12),(_this2$shadowRoot=_this2.shadowRoot)===null||_this2$shadowRoot===void 0||(_this2$shadowRoot=_this2$shadowRoot.querySelector("textarea"))===null||_this2$shadowRoot===void 0?void 0:_this2$shadowRoot.style.setProperty("height","".concat(t,"px")));}),this.emit("nile-init");}},{key:"disconnectedCallback",value:function disconnectedCallback(){_get(_getPrototypeOf(v.prototype),"disconnectedCallback",this).call(this),this.input&&this.resizeObserver.unobserve(this.input),this.emit("nile-destroy");}},{key:"handleBlur",value:function handleBlur(){this.hasFocus=!1,this.emit("nile-blur",{value:this.value});}},{key:"handleChange",value:function handleChange(){this.value=this.input.value,this.setTextareaHeight(),this.emit("nile-change",{value:this.value});}},{key:"handleFocus",value:function handleFocus(){this.hasFocus=!0,this.emit("nile-focus",{value:this.value});}},{key:"handleInput",value:function handleInput(){this.value=this.input.value,this.emit("nile-input",{value:this.value});}},{key:"setTextareaHeight",value:function setTextareaHeight(){"auto"===this.resize?(this.input.style.height="auto",this.input.style.height="".concat(this.input.scrollHeight,"px")):this.input.style.height=void 0;}},{key:"handleRowsChange",value:function handleRowsChange(){this.setTextareaHeight();}},{key:"handleValueChange",value:function(){var _handleValueChange=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(){return _regeneratorRuntime().wrap(function _callee$(_context2){while(1)switch(_context2.prev=_context2.next){case 0:_context2.next=2;return this.updateComplete;case 2:this.setTextareaHeight();this.checkNonPrintableChar&&this.markNonPrintableCharacters();case 4:case"end":return _context2.stop();}},_callee,this);}));function handleValueChange(){return _handleValueChange.apply(this,arguments);}return handleValueChange;}()},{key:"markNonPrintableCharacters",value:function markNonPrintableCharacters(){var t="";if(this.hasPrintableCharacters=!1,this.value)for(var _e=0,_i=this.value.length;_e<_i;_e++){var _i2=this.value.charCodeAt(_e);_i2>255&&9109!==_i2||[129,143,144,157,160].includes(_i2)?(t+="<span class=\"input__srtiked-text\">".concat(this.value.charAt(_e),"</span>"),this.hasPrintableCharacters=!0):t+=this.value.charAt(_e);}this.markedValue=t,this.emit("nile-value-marked",{value:this.markedValue,hasNonPrintableCharacters:this.hasPrintableCharacters});}},{key:"removeAllNonPrintableCharacters",value:function removeAllNonPrintableCharacters(){var t="";if(this.value)for(var _e2=0,_i3=this.value.length;_e2<_i3;_e2++){var _i4=this.value.charCodeAt(_e2);_i4>255&&9109!==_i4||[129,143,144,157,160].includes(_i4)||(t+=this.value.charAt(_e2));}this.value=t,this.emit("nile-npchar-removed",{value:this.value});}},{key:"focus",value:function focus(t){this.input.focus(t);}},{key:"blur",value:function blur(){this.input.blur();}},{key:"select",value:function select(){this.input.select();}},{key:"scrollPosition",value:function scrollPosition(t){return t?("number"==typeof t.top&&(this.input.scrollTop=t.top),void("number"==typeof t.left&&(this.input.scrollLeft=t.left))):{top:this.input.scrollTop,left:this.input.scrollTop};}},{key:"setSelectionRange",value:function setSelectionRange(t,e){var i=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"none";this.input.setSelectionRange(t,e,i);}},{key:"setRangeText",value:function setRangeText(t,e,i,s){this.input.setRangeText(t,e,i,s),this.value!==this.input.value&&(this.value=this.input.value),this.value!==this.input.value&&(this.value=this.input.value,this.setTextareaHeight());}},{key:"render",value:function render(){var t=this.hasSlotController.test("label");this.hasSlotController.test("help-text");var i=!!this.label||!!t,s=!!this.helpText,a=!!this.errorMessage;return e(_templateObject||(_templateObject=_taggedTemplateLiteral(["\n <div\n part=\"form-control\"\n class=","\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=","\n >\n <slot name=\"label\">","</slot>\n </label>\n\n <nile-popup\n ?active=","\n placement=\"bottom-start\"\n distance=\"5\"\n strategy=\"fixed\"\n >\n <div part=\"form-control-input\" class=\"form-control-input\" slot=\"anchor\">\n <div\n part=\"base\"\n class=","\n >\n <textarea\n part=\"textarea\"\n id=\"input\"\n class=\"textarea__control\"\n title=","\n name=","\n .value=","\n ?disabled=","\n ?readonly=","\n ?required=","\n placeholder=","\n rows=","\n minlength=","\n maxlength=","\n autocapitalize=","\n autocorrect=","\n ?autofocus=","\n spellcheck=","\n enterkeyhint=","\n inputmode=","\n aria-describedby=\"help-text\"\n @change=","\n @input=","\n @focus=","\n @blur=","\n ></textarea>\n </div>\n\n ","\n ","\n\n </div>\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge\n variant=\"error\"\n @click=","\n class=\"input__remove-non-printable\"\n >\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\">\n ","\n </div>\n </div>\n </nile-popup>\n </div>\n "])),o({"form-control":!0,"form-control--medium":"medium"===this.size,"form-control--has-label":i,"form-control--has-help-text":s}),i?"false":"true",this.label,this.hasPrintableCharacters,o({textarea:!0,"textarea--medium":"medium"===this.size,"textarea--warning":this.warning,"textarea--error":this.error,"textarea--success":this.success,"textarea--standard":!this.filled,"textarea--disabled":this.disabled,"textarea--focused":this.hasFocus,"textarea--empty":!this.value,"textarea--resize-none":"none"===this.resize,"textarea--resize-vertical":"vertical"===this.resize,"textarea--resize-auto":"auto"===this.resize}),this.title,n(this.name),d(this.value),this.disabled,this.readonly,this.required,n(this.placeholder),n(this.rows),n(this.minlength),n(this.maxlength),n(this.autocapitalize),n(this.autocorrect),this.autofocus,n(this.spellcheck),n(this.enterkeyhint),n(this.inputmode),this.handleChange,this.handleInput,this.handleFocus,this.handleBlur,s?e(_templateObject2||(_templateObject2=_taggedTemplateLiteral(["\n <nile-form-help-text>","</nile-form-help-text>\n "])),this.helpText):"",a?e(_templateObject3||(_templateObject3=_taggedTemplateLiteral(["\n <nile-form-error-message\n >","</nile-form-error-message\n >\n "])),this.errorMessage):"",this.removeAllNonPrintableCharacters,u(this.markedValue));}}]);return v;}(p));v.styles=r,t([i(".textarea__control")],v.prototype,"input",void 0),t([s()],v.prototype,"hasFocus",void 0),t([m()],v.prototype,"title",void 0),t([m()],v.prototype,"name",void 0),t([m()],v.prototype,"value",void 0),t([m({reflect:!0})],v.prototype,"size",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"filled",void 0),t([m()],v.prototype,"label",void 0),t([m({attribute:"help-text"})],v.prototype,"helpText",void 0),t([m({attribute:"error-message"})],v.prototype,"errorMessage",void 0),t([m()],v.prototype,"placeholder",void 0),t([m({type:Number})],v.prototype,"rows",void 0),t([m()],v.prototype,"resize",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"disabled",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"readonly",void 0),t([m({reflect:!0})],v.prototype,"form",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"required",void 0),t([m({type:Number})],v.prototype,"minlength",void 0),t([m({type:Number})],v.prototype,"maxlength",void 0),t([m({type:Boolean})],v.prototype,"warning",void 0),t([m({type:Boolean})],v.prototype,"error",void 0),t([m({type:Boolean})],v.prototype,"success",void 0),t([m()],v.prototype,"autocapitalize",void 0),t([m()],v.prototype,"autocorrect",void 0),t([m()],v.prototype,"autocomplete",void 0),t([m({type:Boolean})],v.prototype,"autofocus",void 0),t([m()],v.prototype,"enterkeyhint",void 0),t([m({type:Boolean,converter:{fromAttribute:function fromAttribute(t){return!(!t||"false"===t);},toAttribute:function toAttribute(t){return t?"true":"false";}}})],v.prototype,"spellcheck",void 0),t([m()],v.prototype,"inputmode",void 0),t([l()],v.prototype,"defaultValue",void 0),t([m({type:Boolean,reflect:!0})],v.prototype,"fullHeight",void 0),t([m({type:Boolean})],v.prototype,"checkNonPrintableChar",void 0),t([s()],v.prototype,"hasPrintableCharacters",void 0),t([s()],v.prototype,"markedValue",void 0),t([c("rows",{waitUntilFirstUpdate:!0})],v.prototype,"handleRowsChange",null),t([c("value",{waitUntilFirstUpdate:!0})],v.prototype,"handleValueChange",null),_export("N",v=t([a("nile-textarea")],v));}};});
|
2
2
|
//# sourceMappingURL=nile-textarea.cjs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-textarea.cjs.js","sources":["../../../src/nile-textarea/nile-textarea.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-textarea.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n/**\n * @summary Textareas collect data from the user and allow multiple lines of text.\n * @tag nile-text-area\n\n *\n * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n *\n * @event nile-blur - Emitted when the control loses focus.\n * @event nile-change - Emitted when an alteration to the control's value is committed by the user.\n * @event nile-focus - Emitted when the control gains focus.\n * @event nile-input - Emitted when the control receives input.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart textarea - The internal `<textarea>` control.\n */\n\n@customElement('nile-textarea')\nexport class NileTextarea extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');\n private resizeObserver: ResizeObserver;\n\n @query('.textarea__control') input: HTMLTextAreaElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /** The name of the textarea, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the textarea, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The textarea's size. */\n @property({ reflect: true }) size = 'medium';\n\n /** Draws a filled textarea. */\n @property({ type: Boolean, reflect: true }) filled = false;\n\n /** The textarea's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The textarea's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** The input's error message. If you need to display HTML, use the `error-message` slot instead. */\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** The number of rows to display by default. */\n @property({ type: Number }) rows = 4;\n\n /** Controls how the textarea can be resized. */\n @property() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Disables the textarea. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Makes the textarea readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the textarea a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n @property({ type: Number }) minlength: number;\n\n @property({ type: Number }) maxlength: number;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: string;\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the textarea. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n @property({ type: Boolean, reflect: true }) fullHeight = false;\n\n @property({type: Boolean}) checkNonPrintableChar: boolean = false;\n\n @state() hasPrintableCharacters: boolean = false;\n\n @state() markedValue: string;\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n this.updateComplete.then(() => {\n this.setTextareaHeight();\n this.resizeObserver.observe(this.input);\n });\n\n\n if(this.fullHeight){\n requestAnimationFrame(() => {\n let parentHeight = this.parentElement?.getBoundingClientRect().height;\n if (parentHeight) {\n parentHeight = parentHeight - 65;\n if (parentHeight<12) {\n parentHeight=12;\n }\n this.shadowRoot?.querySelector('textarea')?.style.setProperty('height', `${parentHeight}px`);\n }\n });\n }\n\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n if(this.input) {\n this.resizeObserver.unobserve(this.input);\n }\n this.emit('nile-destroy');\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.setTextareaHeight();\n this.emit('nile-change', { value: this.value });\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.emit('nile-input', { value: this.value });\n }\n\n private setTextareaHeight() {\n if (this.resize === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = `${this.input.scrollHeight}px`;\n } else {\n (this.input.style.height as string | undefined) = undefined;\n }\n }\n\n @watch('rows', { waitUntilFirstUpdate: true })\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.setTextareaHeight();\n\n if(this.checkNonPrintableChar){\n this.markNonPrintableCharacters();\n }\n }\n\n /** checks non printable characters in the value. */\n markNonPrintableCharacters() {\n let markedValue = '';\n this.hasPrintableCharacters = false;\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n if ((charCode > 255 && charCode !== 9109) || [129, 143, 144, 157, 160].includes(charCode)) {\n markedValue += `<span class=\"input__srtiked-text\">${this.value.charAt(i)}</span>`;\n this.hasPrintableCharacters = true;\n } else {\n markedValue += this.value.charAt(i);\n }\n }\n }\n\n this.markedValue = markedValue;\n this.emit('nile-value-marked', { value: this.markedValue, hasNonPrintableCharacters: this.hasPrintableCharacters });\n }\n\n\n /** Removes all non printable characters from the value. */\n removeAllNonPrintableCharacters() {\n let cleanedValue = '';\n\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n // Consider a character printable if it's not in the specified non-printable ranges\n if (!(charCode > 255 && charCode !== 9109) && ![129, 143, 144, 157, 160].includes(charCode)) {\n cleanedValue += this.value.charAt(i);\n }\n }\n }\n\n this.value = cleanedValue;\n this.emit('nile-npchar-removed', { value: this.value });\n\n }\n\n /** Sets focus on the textarea. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the textarea. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the textarea. */\n select() {\n this.input.select();\n }\n\n /** Gets or sets the textarea's scroll position. */\n scrollPosition(position?: { top?: number; left?: number }): { top: number; left: number } | undefined {\n if (position) {\n if (typeof position.top === 'number') this.input.scrollTop = position.top;\n if (typeof position.left === 'number') this.input.scrollLeft = position.left;\n return undefined;\n }\n\n return {\n top: this.input.scrollTop,\n left: this.input.scrollTop\n };\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n this.setTextareaHeight();\n }\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': this.size === 'medium',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <nile-popup\n ?active=${this.hasPrintableCharacters}\n placement=\"bottom-start\"\n distance=\"5\"\n strategy=\"fixed\"\n >\n <div part=\"form-control-input\" class=\"form-control-input\" slot=\"anchor\">\n <div\n part=\"base\"\n class=${classMap({\n textarea: true,\n 'textarea--medium': this.size === 'medium',\n 'textarea--warning': this.warning,\n 'textarea--error': this.error,\n 'textarea--success': this.success,\n 'textarea--standard': !this.filled,\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': !this.value,\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n })}\n >\n <textarea\n part=\"textarea\"\n id=\"input\"\n class=\"textarea__control\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n .value=${live(this.value)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n rows=${ifDefined(this.rows)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${ifDefined(this.spellcheck)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n ></textarea>\n </div>\n </div>\n\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge\n variant=\"error\"\n @click=${this.removeAllNonPrintableCharacters}\n class=\"input__remove-non-printable\"\n >\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\">\n ${unsafeHTML(this.markedValue)}\n </div>\n </div>\n </nile-popup>\n </div>\n `;\n }\n}\n\nexport default NileTextarea;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-textarea': NileTextarea;\n }\n}\n"],"names":["NileTextarea","_p","_inherits","v","_super","_createSuper","this","hasSlotController","HasSlotController","hasFocus","title","name","value","size","filled","label","helpText","errorMessage","placeholder","rows","resize","disabled","readonly","form","required","warning","error","success","spellcheck","defaultValue","fullHeight","checkNonPrintableChar","hasPrintableCharacters","_this","_createClass","key","connectedCallback","super","resizeObserver","ResizeObserver","setTextareaHeight","updateComplete","then","observe","input","requestAnimationFrame","_this2$parentElement","_this2$shadowRoot","parentHeight","parentElement","getBoundingClientRect","height","shadowRoot","querySelector","style","setProperty","emit","disconnectedCallback","unobserve","handleBlur","handleChange","handleFocus","handleInput","scrollHeight","undefined","handleRowsChange","_handleValueChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","markNonPrintableCharacters","stop","handleValueChange","apply","arguments","markedValue","i","n","length","charCode","charCodeAt","includes","concat","charAt","hasNonPrintableCharacters","removeAllNonPrintableCharacters","cleanedValue","focus","options","blur","select","scrollPosition","position","top","scrollTop","left","scrollLeft","setSelectionRange","selectionStart","selectionEnd","selectionDirection","setRangeText","replacement","start","end","selectMode","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","textarea","ifDefined","live","minlength","maxlength","autocapitalize","autocorrect","autofocus","enterkeyhint","inputmode","_templateObject2","_templateObject3","unsafeHTML","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","attribute","Number","converter","fromAttribute","toAttribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"qnaA2CaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,qEAGYG,EAAAA,KAAAA,CAAiBC,iBAAG,CAAA,GAAIC,CAA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AAA,IAAA,EAEzDF,CAAAA,CAAAA,CAAAA,CAAA,CAARG,CAAgD5I,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAA2I,UAAA,wBAAA,CAAA,IAAA,EAAA,CAAA,CAExCF,EAAA,CAARG,CAAAA,CAAAA,CAAAA,CAAAA,CAA4B5I,CAAA2I,CAAAA,SAAAA,CAAA,kBAAA,EAmE7BF,CAAAA,CAAAA,CAAAA,CAAA,CADCa,CAAM,CAAA,MAAA,CAAQ,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAGtCvJ,CAAA2I,CAAAA,SAAAA,CAAA,mBAAA,IAGKF,CAAAA,CAAAA,CAAAA,CAAA,CADLa,CAAM,CAAA,OAAA,CAAS,CAAEC,oBAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAQvCvJ,CAAA2I,CAAAA,SAAAA,CAAA,oBAAA,IAjMU3I,CAAAA,CAAAA,OAAAA,KAAAA,CAAAA,CAAYyI,EAAA,CADxBe,CAAAA,CAAc,kBACFxJ"}
|
1
|
+
{"version":3,"file":"nile-textarea.cjs.js","sources":["../../../src/nile-textarea/nile-textarea.ts"],"sourcesContent":["/**\n * Copyright Aquera Inc 2023\n *\n * This source code is licensed under the BSD-3-Clause license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {LitElement, html, property, CSSResultArray, TemplateResult} from 'lit-element';\nimport { customElement } from 'lit/decorators.js';\nimport {styles} from './nile-textarea.css';\nimport { classMap } from 'lit/directives/class-map.js';\nimport { query, state } from 'lit/decorators.js';\nimport { defaultValue } from '../internal/default-value';\nimport { HasSlotController } from '../internal/slot';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { watch } from '../internal/watch';\nimport NileElement from '../internal/nile-element';\nimport type { CSSResultGroup } from 'lit';\nimport { unsafeHTML } from 'lit/directives/unsafe-html.js';\n\n/**\n * @summary Textareas collect data from the user and allow multiple lines of text.\n * @tag nile-text-area\n\n *\n * @slot label - The textarea's label. Alternatively, you can use the `label` attribute.\n * @slot help-text - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n *\n * @event nile-blur - Emitted when the control loses focus.\n * @event nile-change - Emitted when an alteration to the control's value is committed by the user.\n * @event nile-focus - Emitted when the control gains focus.\n * @event nile-input - Emitted when the control receives input.\n *\n * @csspart form-control - The form control that wraps the label, input, and help text.\n * @csspart form-control-label - The label's wrapper.\n * @csspart form-control-input - The input's wrapper.\n * @csspart form-control-help-text - The help text's wrapper.\n * @csspart base - The component's base wrapper.\n * @csspart textarea - The internal `<textarea>` control.\n */\n\n@customElement('nile-textarea')\nexport class NileTextarea extends NileElement {\n static styles: CSSResultGroup = styles;\n\n private readonly hasSlotController = new HasSlotController(this, 'help-text', 'label');\n private resizeObserver: ResizeObserver;\n\n @query('.textarea__control') input: HTMLTextAreaElement;\n\n @state() private hasFocus = false;\n @property() title = ''; // make reactive to pass through\n\n /** The name of the textarea, submitted as a name/value pair with form data. */\n @property() name = '';\n\n /** The current value of the textarea, submitted as a name/value pair with form data. */\n @property() value = '';\n\n /** The textarea's size. */\n @property({ reflect: true }) size = 'medium';\n\n /** Draws a filled textarea. */\n @property({ type: Boolean, reflect: true }) filled = false;\n\n /** The textarea's label. If you need to display HTML, use the `label` slot instead. */\n @property() label = '';\n\n /** The textarea's help text. If you need to display HTML, use the `help-text` slot instead. */\n @property({ attribute: 'help-text' }) helpText = '';\n\n /** The input's error message. If you need to display HTML, use the `error-message` slot instead. */\n @property({ attribute: 'error-message' }) errorMessage = '';\n\n /** Placeholder text to show as a hint when the input is empty. */\n @property() placeholder = '';\n\n /** The number of rows to display by default. */\n @property({ type: Number }) rows = 4;\n\n /** Controls how the textarea can be resized. */\n @property() resize: 'none' | 'vertical' | 'auto' = 'vertical';\n\n /** Disables the textarea. */\n @property({ type: Boolean, reflect: true }) disabled = false;\n\n /** Makes the textarea readonly. */\n @property({ type: Boolean, reflect: true }) readonly = false;\n\n /**\n * By default, form controls are associated with the nearest containing `<form>` element. This attribute allows you\n * to place the form control outside of a form and associate it with the form that has this `id`. The form must be in\n * the same document or shadow root for this to work.\n */\n @property({ reflect: true }) form = '';\n\n /** Makes the textarea a required field. */\n @property({ type: Boolean, reflect: true }) required = false;\n\n @property({ type: Number }) minlength: number;\n\n @property({ type: Number }) maxlength: number;\n\n /** Sets the input to a warning state, changing its visual appearance. */\n @property({ type: Boolean }) warning = false;\n\n /** Sets the input to an error state, changing its visual appearance. */\n @property({ type: Boolean }) error = false;\n\n /** Sets the input to a success state, changing its visual appearance. */\n @property({ type: Boolean }) success = false;\n\n /** Controls whether and how text input is automatically capitalized as it is entered by the user. */\n @property() autocapitalize: 'off' | 'none' | 'on' | 'sentences' | 'words' | 'characters';\n\n /** Indicates whether the browser's autocorrect feature is on or off. */\n @property() autocorrect: string;\n\n /**\n * Specifies what permission the browser has to provide assistance in filling out form field values. Refer to\n * [this page on MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for available values.\n */\n @property() autocomplete: string;\n\n /** Indicates that the input should receive focus on page load. */\n @property({ type: Boolean }) autofocus: boolean;\n\n /** Used to customize the label or icon of the Enter key on virtual keyboards. */\n @property() enterkeyhint: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';\n\n /** Enables spell checking on the textarea. */\n @property({\n type: Boolean,\n converter: {\n // Allow \"true|false\" attribute values but keep the property boolean\n fromAttribute: value => (!value || value === 'false' ? false : true),\n toAttribute: value => (value ? 'true' : 'false')\n }\n })\n spellcheck = true;\n\n /**\n * Tells the browser what type of data will be entered by the user, allowing it to display the appropriate virtual\n * keyboard on supportive devices.\n */\n @property() inputmode: 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';\n\n /** The default value of the form control. Primarily used for resetting the form control. */\n @defaultValue() defaultValue = '';\n\n @property({ type: Boolean, reflect: true }) fullHeight = false;\n\n @property({type: Boolean}) checkNonPrintableChar: boolean = false;\n\n @state() hasPrintableCharacters: boolean = false;\n\n @state() markedValue: string;\n\n connectedCallback() {\n super.connectedCallback();\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());\n\n this.updateComplete.then(() => {\n this.setTextareaHeight();\n this.resizeObserver.observe(this.input);\n });\n\n\n if(this.fullHeight){\n requestAnimationFrame(() => {\n let parentHeight = this.parentElement?.getBoundingClientRect().height;\n if (parentHeight) {\n parentHeight = parentHeight - 65;\n if (parentHeight<12) {\n parentHeight=12;\n }\n this.shadowRoot?.querySelector('textarea')?.style.setProperty('height', `${parentHeight}px`);\n }\n });\n }\n\n this.emit('nile-init');\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n if(this.input) {\n this.resizeObserver.unobserve(this.input);\n }\n this.emit('nile-destroy');\n }\n\n private handleBlur() {\n this.hasFocus = false;\n this.emit('nile-blur', { value: this.value });\n }\n\n private handleChange() {\n this.value = this.input.value;\n this.setTextareaHeight();\n this.emit('nile-change', { value: this.value });\n }\n\n private handleFocus() {\n this.hasFocus = true;\n this.emit('nile-focus', { value: this.value });\n }\n\n private handleInput() {\n this.value = this.input.value;\n this.emit('nile-input', { value: this.value });\n }\n\n private setTextareaHeight() {\n if (this.resize === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = `${this.input.scrollHeight}px`;\n } else {\n (this.input.style.height as string | undefined) = undefined;\n }\n }\n\n @watch('rows', { waitUntilFirstUpdate: true })\n handleRowsChange() {\n this.setTextareaHeight();\n }\n\n @watch('value', { waitUntilFirstUpdate: true })\n async handleValueChange() {\n await this.updateComplete;\n this.setTextareaHeight();\n\n if(this.checkNonPrintableChar){\n this.markNonPrintableCharacters();\n }\n }\n\n /** checks non printable characters in the value. */\n markNonPrintableCharacters() {\n let markedValue = '';\n this.hasPrintableCharacters = false;\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n if ((charCode > 255 && charCode !== 9109) || [129, 143, 144, 157, 160].includes(charCode)) {\n markedValue += `<span class=\"input__srtiked-text\">${this.value.charAt(i)}</span>`;\n this.hasPrintableCharacters = true;\n } else {\n markedValue += this.value.charAt(i);\n }\n }\n }\n\n this.markedValue = markedValue;\n this.emit('nile-value-marked', { value: this.markedValue, hasNonPrintableCharacters: this.hasPrintableCharacters });\n }\n\n\n /** Removes all non printable characters from the value. */\n removeAllNonPrintableCharacters() {\n let cleanedValue = '';\n\n if (this.value) {\n for (let i = 0, n = this.value.length; i < n; i++) {\n const charCode = this.value.charCodeAt(i);\n\n // Consider a character printable if it's not in the specified non-printable ranges\n if (!(charCode > 255 && charCode !== 9109) && ![129, 143, 144, 157, 160].includes(charCode)) {\n cleanedValue += this.value.charAt(i);\n }\n }\n }\n\n this.value = cleanedValue;\n this.emit('nile-npchar-removed', { value: this.value });\n\n }\n /** Sets focus on the textarea. */\n focus(options?: FocusOptions) {\n this.input.focus(options);\n }\n\n /** Removes focus from the textarea. */\n blur() {\n this.input.blur();\n }\n\n /** Selects all the text in the textarea. */\n select() {\n this.input.select();\n }\n\n /** Gets or sets the textarea's scroll position. */\n scrollPosition(position?: { top?: number; left?: number }): { top: number; left: number } | undefined {\n if (position) {\n if (typeof position.top === 'number') this.input.scrollTop = position.top;\n if (typeof position.left === 'number') this.input.scrollLeft = position.left;\n return undefined;\n }\n\n return {\n top: this.input.scrollTop,\n left: this.input.scrollTop\n };\n }\n\n /** Sets the start and end positions of the text selection (0-based). */\n setSelectionRange(\n selectionStart: number,\n selectionEnd: number,\n selectionDirection: 'forward' | 'backward' | 'none' = 'none'\n ) {\n this.input.setSelectionRange(selectionStart, selectionEnd, selectionDirection);\n }\n\n /** Replaces a range of text with a new string. */\n setRangeText(\n replacement: string,\n start?: number,\n end?: number,\n selectMode?: 'select' | 'start' | 'end' | 'preserve'\n ) {\n // @ts-expect-error - start, end, and selectMode are optional\n this.input.setRangeText(replacement, start, end, selectMode);\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n }\n\n if (this.value !== this.input.value) {\n this.value = this.input.value;\n this.setTextareaHeight();\n }\n }\n\n render() {\n const hasLabelSlot = this.hasSlotController.test('label');\n const hasHelpTextSlot = this.hasSlotController.test('help-text');\n const hasLabel = this.label ? true : !!hasLabelSlot;\n\n const hasHelpText = this.helpText ? true : false;\n const hasErrorMessage = this.errorMessage ? true : false;\n\n return html`\n <div\n part=\"form-control\"\n class=${classMap({\n 'form-control': true,\n 'form-control--medium': this.size === 'medium',\n 'form-control--has-label': hasLabel,\n 'form-control--has-help-text': hasHelpText,\n })}\n >\n <label\n part=\"form-control-label\"\n class=\"form-control__label\"\n for=\"input\"\n aria-hidden=${hasLabel ? 'false' : 'true'}\n >\n <slot name=\"label\">${this.label}</slot>\n </label>\n\n <nile-popup\n ?active=${this.hasPrintableCharacters}\n placement=\"bottom-start\"\n distance=\"5\"\n strategy=\"fixed\"\n >\n <div part=\"form-control-input\" class=\"form-control-input\" slot=\"anchor\">\n <div\n part=\"base\"\n class=${classMap({\n textarea: true,\n 'textarea--medium': this.size === 'medium',\n 'textarea--warning': this.warning,\n 'textarea--error': this.error,\n 'textarea--success': this.success,\n 'textarea--standard': !this.filled,\n 'textarea--disabled': this.disabled,\n 'textarea--focused': this.hasFocus,\n 'textarea--empty': !this.value,\n 'textarea--resize-none': this.resize === 'none',\n 'textarea--resize-vertical': this.resize === 'vertical',\n 'textarea--resize-auto': this.resize === 'auto',\n })}\n >\n <textarea\n part=\"textarea\"\n id=\"input\"\n class=\"textarea__control\"\n title=${\n this\n .title /* An empty title prevents browser validation tooltips from appearing on hover */\n }\n name=${ifDefined(this.name)}\n .value=${live(this.value)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n placeholder=${ifDefined(this.placeholder)}\n rows=${ifDefined(this.rows)}\n minlength=${ifDefined(this.minlength)}\n maxlength=${ifDefined(this.maxlength)}\n autocapitalize=${ifDefined(this.autocapitalize)}\n autocorrect=${ifDefined(this.autocorrect)}\n ?autofocus=${this.autofocus}\n spellcheck=${ifDefined(this.spellcheck)}\n enterkeyhint=${ifDefined(this.enterkeyhint)}\n inputmode=${ifDefined(this.inputmode)}\n aria-describedby=\"help-text\"\n @change=${this.handleChange}\n @input=${this.handleInput}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}\n ></textarea>\n </div>\n\n ${hasHelpText\n ? html`\n <nile-form-help-text>${this.helpText}</nile-form-help-text>\n `\n : ``}\n ${hasErrorMessage\n ? html`\n <nile-form-error-message\n >${this.errorMessage}</nile-form-error-message\n >\n `\n : ``}\n\n </div>\n <div class=\"input__non-printable\">\n Non-printable character detected.\n <nile-badge\n variant=\"error\"\n @click=${this.removeAllNonPrintableCharacters}\n class=\"input__remove-non-printable\"\n >\n Remove All\n </nile-badge>\n\n <div class=\"input__srtiked-text-container\">\n ${unsafeHTML(this.markedValue)}\n </div>\n </div>\n </nile-popup>\n </div>\n `;\n }\n}\n\nexport default NileTextarea;\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nile-textarea': NileTextarea;\n }\n}\n"],"names":["NileTextarea","_p","_inherits","v","_super","_createSuper","this","hasSlotController","HasSlotController","hasFocus","title","name","value","size","filled","label","helpText","errorMessage","placeholder","rows","resize","disabled","readonly","form","required","warning","error","success","spellcheck","defaultValue","fullHeight","checkNonPrintableChar","hasPrintableCharacters","_this","_createClass","key","connectedCallback","super","resizeObserver","ResizeObserver","setTextareaHeight","updateComplete","then","observe","input","requestAnimationFrame","_this2$parentElement","_this2$shadowRoot","parentHeight","parentElement","getBoundingClientRect","height","shadowRoot","querySelector","style","setProperty","emit","disconnectedCallback","unobserve","handleBlur","handleChange","handleFocus","handleInput","scrollHeight","undefined","handleRowsChange","_handleValueChange","_asyncToGenerator","_regeneratorRuntime","mark","_callee","wrap","_callee$","_context2","prev","next","markNonPrintableCharacters","stop","handleValueChange","apply","arguments","markedValue","i","n","length","charCode","charCodeAt","includes","concat","charAt","hasNonPrintableCharacters","removeAllNonPrintableCharacters","cleanedValue","focus","options","blur","select","scrollPosition","position","top","scrollTop","left","scrollLeft","setSelectionRange","selectionStart","selectionEnd","selectionDirection","setRangeText","replacement","start","end","selectMode","render","hasLabelSlot","test","hasLabel","hasHelpText","hasErrorMessage","html","_templateObject","_taggedTemplateLiteral","classMap","textarea","ifDefined","live","minlength","maxlength","autocapitalize","autocorrect","autofocus","enterkeyhint","inputmode","_templateObject2","_templateObject3","unsafeHTML","NileElement","styles","__decorate","query","prototype","state","property","reflect","type","Boolean","attribute","Number","converter","fromAttribute","toAttribute","watch","waitUntilFirstUpdate","customElement"],"mappings":"qnaA2CaA,CAAN,uBAAAC,EAAA,EAAAC,SAAA,CAAAC,CAAA,CAAAF,EAAA,MAAAG,MAAA,CAAAC,YAAA,CAAAF,CAAA,EAAA,SAAAA,EAAA,qEAGYG,EAAAA,KAAAA,CAAiBC,iBAAG,CAAA,GAAIC,CAAAA,CAAkBF,CAAAA,sBAAAA,CAAAA,KAAAA,EAAM,WAAa,CAAA,OAAA,CAAA,CAK7DA,KAAAA,CAAQG,QAAAA,CAAAA,CAAG,EAChBH,KAAAA,CAAAI,KAAAA,CAAQ,EAGRJ,CAAAA,KAAAA,CAAIK,IAAG,CAAA,EAAA,CAGPL,KAAAA,CAAKM,KAAAA,CAAG,EAGSN,CAAAA,KAAAA,CAAIO,IAAG,CAAA,QAAA,CAGQP,KAAAA,CAAMQ,MAAAA,CAAAA,CAAG,CAGzCR,CAAAA,KAAAA,CAAKS,MAAG,EAGkBT,CAAAA,KAAAA,CAAQU,QAAG,CAAA,EAAA,CAGPV,KAAAA,CAAYW,YAAAA,CAAG,EAG7CX,CAAAA,KAAAA,CAAWY,WAAG,CAAA,EAAA,CAGEZ,KAAAA,CAAIa,IAAAA,CAAG,CAGvBb,CAAAA,KAAAA,CAAMc,MAAiC,CAAA,UAAA,CAGPd,KAAAA,CAAQe,QAAAA,CAAAA,CAAG,CAGXf,CAAAA,KAAAA,CAAQgB,QAAG,CAAA,CAAA,CAAA,CAO1BhB,KAAAA,CAAIiB,IAAAA,CAAG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-cd2f9c12.esm.js";
|
|
50
50
|
@blur=${this.handleBlur}
|
51
51
|
></textarea>
|
52
52
|
</div>
|
53
|
-
</div>
|
54
53
|
|
55
|
-
|
54
|
+
${s?e`
|
56
55
|
<nile-form-help-text>${this.helpText}</nile-form-help-text>
|
57
56
|
`:""}
|
58
57
|
${a?e`
|
@@ -60,6 +59,8 @@ import{__decorate as t}from"tslib";import{x as e}from"../index-cd2f9c12.esm.js";
|
|
60
59
|
>${this.errorMessage}</nile-form-error-message
|
61
60
|
>
|
62
61
|
`:""}
|
62
|
+
|
63
|
+
</div>
|
63
64
|
<div class="input__non-printable">
|
64
65
|
Non-printable character detected.
|
65
66
|
<nile-badge
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { css } from 'lit';
|
2
2
|
export default css `
|
3
|
-
.nile-
|
3
|
+
.nile-loader__v1 {
|
4
4
|
border-radius: 50%;
|
5
5
|
display: inline-block;
|
6
6
|
border-top: 1px solid var(--nile-colors-blue-500);
|
@@ -18,5 +18,19 @@ export default css `
|
|
18
18
|
transform: rotate(360deg);
|
19
19
|
}
|
20
20
|
}
|
21
|
+
|
22
|
+
.nile-loader__v2,
|
23
|
+
.nile-loader__v3 {
|
24
|
+
animation: spin 1.5s linear infinite;
|
25
|
+
}
|
26
|
+
|
27
|
+
@keyframes spin {
|
28
|
+
0% {
|
29
|
+
transform: translate(-50%, -50%) rotate(0deg);
|
30
|
+
}
|
31
|
+
100% {
|
32
|
+
transform: translate(-50%, -50%) rotate(360deg);
|
33
|
+
}
|
34
|
+
}
|
21
35
|
`;
|
22
36
|
//# sourceMappingURL=nile-loader.css.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"nile-loader.css.js","sourceRoot":"","sources":["../../../src/nile-loader/nile-loader.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAe,GAAG,CAAA
|
1
|
+
{"version":3,"file":"nile-loader.css.js","sourceRoot":"","sources":["../../../src/nile-loader/nile-loader.css.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,eAAe,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCjB,CAAC","sourcesContent":["import { css } from 'lit';\n\nexport default css`\n .nile-loader__v1 {\n border-radius: 50%;\n display: inline-block;\n border-top: 1px solid var(--nile-colors-blue-500);\n border-right: 1px solid var(--nile-colors-blue-500);\n box-shadow: 0 1px 1px -1px var(--nile-colors-blue-500);\n box-sizing: border-box;\n animation: rotation 0.5s linear infinite;\n }\n\n @keyframes rotation {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n }\n\n .nile-loader__v2,\n .nile-loader__v3 {\n animation: spin 1.5s linear infinite;\n }\n\n @keyframes spin {\n 0% {\n transform: translate(-50%, -50%) rotate(0deg);\n }\n 100% {\n transform: translate(-50%, -50%) rotate(360deg);\n }\n }\n`;\n"]}
|
@@ -1,10 +1,14 @@
|
|
1
1
|
import { CSSResultGroup } from 'lit';
|
2
|
-
import { LitElement } from 'lit-element';
|
2
|
+
import { LitElement, TemplateResult } from 'lit-element';
|
3
3
|
export declare class NileLoader extends LitElement {
|
4
4
|
height: string;
|
5
5
|
width: string;
|
6
6
|
position: string;
|
7
7
|
margin: string;
|
8
|
+
variant: string;
|
8
9
|
static styles: CSSResultGroup;
|
9
|
-
render():
|
10
|
+
render(): TemplateResult;
|
11
|
+
private renderV1;
|
12
|
+
private renderV2;
|
13
|
+
private renderV3;
|
10
14
|
}
|