UNPKG

@seniorsistemas/tecnologia-webcomponents

Version:

A webcomponents library for Senior Sistemas - Suite BPM products.

1 lines 41.2 kB
var __awaiter=this&&this.__awaiter||function(e,t,o,i){function n(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,r){function s(e){try{l(i.next(e))}catch(t){r(t)}}function a(e){try{l(i["throw"](e))}catch(t){r(t)}}function l(e){e.done?o(e.value):n(e.value).then(s,a)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(i)throw new TypeError("Generator is already executing.");while(o)try{if(i=1,n&&(r=s[0]&2?n["return"]:s[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,s[1])).done)return r;if(n=0,r)s=[s[0]&2,r.value];switch(s[0]){case 0:case 1:r=s;break;case 4:o.label++;return{value:s[1],done:false};case 5:o.label++;n=s[1];s=[0];continue;case 7:s=o.ops.pop();o.trys.pop();continue;default:if(!(r=o.trys,r=r.length>0&&r[r.length-1])&&(s[0]===6||s[0]===2)){o=0;continue}if(s[0]===3&&(!r||s[1]>r[0]&&s[1]<r[3])){o.label=s[1];break}if(s[0]===6&&o.label<r[1]){o.label=r[1];r=s;break}if(r&&o.label<r[2]){o.label=r[2];o.ops.push(s);break}if(r[2])o.ops.pop();o.trys.pop();continue}s=t.call(e,o)}catch(a){s=[6,a];n=0}finally{i=r=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};import{r as registerInstance,h,H as Host,c as createEvent,g as getElement}from"./index-5dbac1cf.js";var TecnologiaTheme;(function(e){e["light"]="light";e["dark"]="dark"})(TecnologiaTheme||(TecnologiaTheme={}));var defaultTheme=TecnologiaTheme.light;var ButtonPosition;(function(e){e["right"]="right";e["left"]="left"})(ButtonPosition||(ButtonPosition={}));var bottomBarCss='@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{height:70px}:host([theme=dark]) .container{background:#e2e8f0;color:#434548}:host([theme=light]) .container{background:#434548;color:#fff}.container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-shadow:0 -1px 6px #00000046;box-shadow:0 -1px 6px #00000046;position:-webkit-sticky;position:sticky;position:fixed;z-index:99;padding:7px 60px;-webkit-box-sizing:border-box;box-sizing:border-box;height:70px;bottom:0;left:0;right:0}.container .wrapper{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:992px;height:100%}.container .text{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;height:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.container .text span{text-overflow:ellipsis;overflow:hidden}.flex-align-center{-ms-flex-pack:center !important;justify-content:center !important}.use-animation{-webkit-animation:openBar 700ms forwards;animation:openBar 700ms forwards}@media only screen and (max-width: 992px){.wrapper{width:100% !important}.container{padding:8px 20px}}@-webkit-keyframes openBar{from{bottom:-70px}to{top:inherit}}@keyframes openBar{from{bottom:-70px}to{top:inherit}}';var BottomBar=function(){function e(e){registerInstance(this,e);this.theme=defaultTheme;this.buttonPosition=ButtonPosition.left;this.useAnimation=true}e.prototype.handleButtonPositionStyle=function(e){var t=e===ButtonPosition.left;return{flexDirection:t?"row-reverse":"row"}};e.prototype.render=function(){return h(Host,null,h("div",{class:"container "+(this.useAnimation&&"use-animation")},h("div",{style:this.handleButtonPositionStyle(this.buttonPosition),class:"wrapper "+(!this.text&&"flex-align-center")},this.text&&h("div",{class:"text",style:{margin:this.buttonPosition===ButtonPosition.left?"0 0 0 20px":"0 20px 0 0"}},h("span",{class:"text-sans text-base"},this.text)),h("div",{class:"button"},h("slot",{name:"button"})))))};return e}();BottomBar.style=bottomBarCss;var TecStatus;(function(e){e["primary"]="primary";e["secondary"]="secondary";e["success"]="success";e["danger"]="danger";e["warn"]="warn";e["info"]="info"})(TecStatus||(TecStatus={}));var TecButtonSize;(function(e){e["tiny"]="tiny";e["small"]="small";e["medium"]="medium";e["large"]="large";e["giant"]="giant"})(TecButtonSize||(TecButtonSize={}));var TecButtonMode;(function(e){e["rounded"]="rounded";e["square"]="square";e["radius"]="radius"})(TecButtonMode||(TecButtonMode={}));var TecButtonColor;(function(e){e["solid"]="solid";e["gradient"]="gradient";e["outline"]="outline";e["basic"]="basic"})(TecButtonColor||(TecButtonColor={}));var TecButtonIconMode;(function(e){e["left"]="left";e["right"]="right"})(TecButtonIconMode||(TecButtonIconMode={}));var buttonCss='@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{display:block}:host([size=tiny]) button{font-size:0.75rem;padding:0.2rem 1rem;height:30px}:host([size=small]) button{font-size:0.875rem;padding:0.313rem 1.25rem;height:38px}:host([size=medium]) button{font-size:1rem;padding:0.5rem 1.5rem;height:44px}:host([size=large]) button{font-size:1.125rem;padding:0.8rem 1.8rem;height:55px}:host([size=giant]) button{font-size:1.25rem;padding:1.2rem 2.3rem;height:65px}button{outline:none;cursor:pointer;border:none;color:#ffffff;-webkit-transition:all cubic-bezier(0.16, 0.97, 0.58, 0.94) 250ms;transition:all cubic-bezier(0.16, 0.97, 0.58, 0.94) 250ms;position:relative;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;position:relative;font-size:0.875rem;padding:0.313rem 1.25rem;height:38px}button.primary{background:#3c9bec}button.primary:hover{background:#368bd4}button.success{background:#00c99a}button.success:hover{background:#00b48a}button.responsive{width:100%}button.rounded{border-radius:5rem}button:disabled{background-color:#e2e8f0;color:#9ea2a8;cursor:not-allowed}button:disabled:hover{background:#e2e8f0}';var TecButton=function(){function e(e){var t=this;registerInstance(this,e);this.clicked=createEvent(this,"clicked",7);this.theme=defaultTheme;this.status=TecStatus.primary;this.mode=TecButtonMode.rounded;this.color=TecButtonColor.solid;this.size=TecButtonSize.small;this.disabled=false;this.fullWidth=false;this.onlyIcon=false;this.iconMode=TecButtonIconMode.left;this.loading=false;this.handleEventClick=function(e){if(!t.isDisabled)t.clicked.emit(e)}}e.prototype.componentDidLoad=function(){if(this.onlyIcon&&!this.icon){throw new Error("When 'onlyIcon' property is enabled a 'icon' should be passed!")}};Object.defineProperty(e.prototype,"isDisabled",{get:function(){return this.disabled||this.loading},enumerable:false,configurable:true});e.prototype.render=function(){var e;var t=(e={},e[this.color]=true,e[this.mode]=true,e[this.status]=true,e["disabled"]=this.isDisabled,e["responsive"]=this.fullWidth,e["text-sans"]=true,e["text-base"]=true,e);var o={reverse:!!this.icon&&this.iconMode===TecButtonIconMode.right,"no-margins":this.onlyIcon};return h(Host,null,h("button",{type:"button",id:this.buttonId,class:t,disabled:this.isDisabled,onClick:this.handleEventClick},h("span",{class:o},!!this.icon&&h("i",{class:this.icon}),!this.onlyIcon&&this.label)))};return e}();TecButton.style=buttonCss;var TecStringCase;(function(e){e["UPPERCASE"]="uppercase";e["LOWERCASE"]="lowercase";e["DEFAULT"]="default"})(TecStringCase||(TecStringCase={}));function removeStringWhiteSpace(e){return e.replace(/\s/g,"")}function caseStringHandler(e,t){if(t===TecStringCase.LOWERCASE)return e.toLowerCase();if(t===TecStringCase.UPPERCASE)return e.toUpperCase();return e}var codeInputCss='@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{display:block}:host *{outline:none}:host([theme=dark]) input{color:#f6f8fa;background:#212121;border:none}:host([theme=dark]) input:focus{-webkit-box-shadow:0 0 15px rgba(22, 22, 22, 0.87);box-shadow:0 0 15px rgba(22, 22, 22, 0.87);border:2px solid #3c9bec}:host([theme=dark]) input::-webkit-input-placeholder{color:#9ea2a8}:host([theme=dark]) input::-moz-placeholder{color:#9ea2a8}:host([theme=dark]) input:-ms-input-placeholder{color:#9ea2a8}:host([theme=dark]) input::-ms-input-placeholder{color:#9ea2a8}:host([theme=dark]) input::placeholder{color:#9ea2a8}:host([theme=light]) input{color:#434548}.wrapper{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}.wrapper input{width:7rem;height:9rem;font-weight:500;border-radius:3px;border:1px solid #e2e8f0;text-align:center;-webkit-transition:200ms ease-in;transition:200ms ease-in;-webkit-box-shadow:0 0 7px rgba(73, 73, 73, 0.061);box-shadow:0 0 7px rgba(73, 73, 73, 0.061)}.wrapper input.use-margin{margin:0 0.5rem 0 0.5rem}.wrapper input:focus{-webkit-box-shadow:0 0 15px rgba(56, 56, 56, 0.233);box-shadow:0 0 15px rgba(56, 56, 56, 0.233);border:2px solid #2e61ec}.wrapper input::-webkit-input-placeholder{color:#cbd0d8}.wrapper input::-moz-placeholder{color:#cbd0d8}.wrapper input:-ms-input-placeholder{color:#cbd0d8}.wrapper input::-ms-input-placeholder{color:#cbd0d8}.wrapper input::placeholder{color:#cbd0d8}@media (max-width: 1024px){.responsive input{width:6rem;height:8rem;font-size:6rem}}@media (max-width: 768px){.responsive input{width:5rem;height:7rem;font-size:3rem}}@media (max-width: 640px){.responsive input{width:3.5rem;height:5rem;font-size:1.875rem;line-height:0}}';var CodeInput=function(){function e(e){registerInstance(this,e);this.inputChange=createEvent(this,"inputChange",7);this.inputFocus=createEvent(this,"inputFocus",7);this.inputBlur=createEvent(this,"inputBlur",7);this.codeChange=createEvent(this,"codeChange",7);this.codeFocus=createEvent(this,"codeFocus",7);this.codeBlur=createEvent(this,"codeBlur",7);this.completed=createEvent(this,"completed",7);this.cleared=createEvent(this,"cleared",7);this.value="";this.theme=defaultTheme;this.initialValue="";this.placeholder="";this.responsive=true;this.autofocus=true;this.type="text";this.length=5;this.useMargin=true;this.case=TecStringCase.DEFAULT}e.prototype.valueChanges=function(e,t){if(e&&e!==t){this.valueChangesHandler(e)}};e.prototype.placeholderChanges=function(){this.internalPlaceholder=this.splitPlaceholder()};e.prototype.clear=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){if(this.length){this.initialValue?this.clearWithInitialValue():this.clearWithoutInitialValue();this.codeChange.emit({value:""});this.cleared.emit()}return[2]}))}))};e.prototype.componentWillLoad=function(){this.initInternalValue();this.internalPlaceholder=this.splitPlaceholder();this.value=this.initialValue};e.prototype.render=function(){var e=this;var t=function(t){var o=t.useMargin,i=o===void 0?true:o;var n={"text-mono text-8x1":true,"use-margin":i};return e.buildArrayIterator().map((function(t,o){var i;var r=e.internalPlaceholder[o]||"";var s=e.autofocus&&o===0;var a=e.internalValue[o];return h("input",{class:n,autoComplete:"false",autoCapitalize:"false",maxlength:"2",id:"field-"+o,type:e.type,placeholder:r,value:r&&!a.trim()?null:a,autoFocus:s,disabled:(i=e.disabled)!==null&&i!==void 0?i:null,onInput:function(t){return e.inputInputHandler(t,o)},onFocus:function(t){return e.inputFocusHandler(t,o)},onBlur:function(t){return e.inputBlurHandler(t,o)},onKeyDown:function(t){return e.inputKeyDown(t,o)},onKeyUp:function(t){return e.inputKeyupHandler(t,o)}})}))};var o={responsive:this.responsive,wrapper:true};return h(Host,{value:this.value},h("div",{class:o},h(t,{useMargin:this.useMargin})))};e.prototype.buildFinalValue=function(){var e=this.internalValue.join("");if(e===null||e===void 0?void 0:e.length)return e;return""};e.prototype.initInternalValue=function(){this.internalValue=this.splitInitialValue()};e.prototype.inputInputHandler=function(e,t){var o=this.getInputByIndex(t);o.value=e.data;this.inputChange.emit({event:e,value:o.value});if(o){o.value=caseStringHandler(o.value,this.case);this.internalValue[t]=o.value||" ";this.value=this.buildFinalValue()}if(e.data&&t<this.length-1){this.focusOnNextInput(t)}this.handleCompletedEvent()};e.prototype.inputFocusHandler=function(e,t){var o=this.getInputByIndex(t);if(o){o.select();this.inputFocus.emit({event:e,value:{id:o.id,index:t,value:o.value}})}this.codeFocus.emit()};e.prototype.inputKeyupHandler=function(e,t){var o=this.getInputByIndex(t);if(o)o.value=caseStringHandler(o.value,this.case)};e.prototype.inputKeyDown=function(e,t){var o=this;var i={Backspace:function(){setTimeout((function(){o.focusOnPreviousInput(t)}),20)},ArrowLeft:function(){o.focusOnPreviousInput(t)},ArrowRight:function(){o.focusOnNextInput(t)}};var n=i[e.code];if(n)n()};e.prototype.inputBlurHandler=function(e,t){var o=this.getInputByIndex(t);this.inputBlur.emit({event:e,value:{id:o===null||o===void 0?void 0:o.id,index:t,value:o===null||o===void 0?void 0:o.value}});this.codeBlur.emit()};e.prototype.inputFocusAndSelect=function(e,t){if(t===void 0){t=false}var o=this.getInputByIndex(e);if(o){o.focus();if(t){setTimeout((function(){o.select()}),30)}}return o};e.prototype.getInputByIndex=function(e){return this.element.shadowRoot.querySelector("input#field-"+e)};e.prototype.focusOnNextInput=function(e){if(e<this.length-1){return this.inputFocusAndSelect(e+1,true)}};e.prototype.focusOnPreviousInput=function(e){if(e>=0){return this.inputFocusAndSelect(e-1,true)}};e.prototype.buildArrayIterator=function(e){if(e===void 0){e=this.length}return Array(e).fill(null)};e.prototype.splitPlaceholder=function(){return this.placeholder.split("")};e.prototype.splitInitialValue=function(){var e=this.initialValue.split("");return this.buildArrayIterator().map((function(t,o){var i;return(i=e[o])!==null&&i!==void 0?i:" "}))};e.prototype.valueChangesHandler=function(e){var t=this;var o=e.split("");if(o){this.buildArrayIterator().forEach((function(e,i){var n=o[i];var r=t.getInputByIndex(i);if(r&&n){r.value=n}}));this.codeChange.emit({value:removeStringWhiteSpace(e)})}};e.prototype.clearWithInitialValue=function(){this.initInternalValue();this.internalPlaceholder=this.splitPlaceholder();this.value=this.initialValue};e.prototype.clearWithoutInitialValue=function(){var e=this;this.value="";this.initInternalValue();this.buildArrayIterator().forEach((function(t,o){var i=e.getInputByIndex(o);if(i)i.value=""}))};e.prototype.handleCompletedEvent=function(){var e=removeStringWhiteSpace(this.value).length===this.length;if(e){this.completed.emit({value:removeStringWhiteSpace(this.value)})}};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanges"],placeholder:["placeholderChanges"]}},enumerable:false,configurable:true});return e}();CodeInput.style=codeInputCss;var TecAlign;(function(e){e["left"]="left";e["center"]="center";e["right"]="right"})(TecAlign||(TecAlign={}));var TecSize;(function(e){e["tiny"]="tiny";e["small"]="small";e["medium"]="medium";e["large"]="large";e["giant"]="giant"})(TecSize||(TecSize={}));var tecModalCss='@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{display:block}:host body{overflow:hidden !important}:host([theme=light]) .modal .modal-content{background:#ffffff;color:#434548}:host([theme=dark]) .modal .modal-content{background:#434548;color:#f6f8fa;border:none}:host([theme=dark]) .modal .modal-content .modal-title{border-bottom:1px solid #5a5c60 !important}:host([theme=dark]) .modal .modal-content .modal-title h1{color:#f6f8fa !important}:host([theme=dark]) .modal .modal-content .footer{border-top:1px solid #5a5c60 !important}:host([size=tiny]) .modal-content{width:20%}:host([size=small]) .modal-content{width:30%}:host([size=medium]) .modal-content{width:40%}:host([size=large]) .modal-content{width:50%}:host([size=giant]) .modal-content{width:60%}.modal{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;align-items:center;position:fixed;z-index:100;left:0;top:0;width:100%;height:100%;overflow:auto;background-color:black;background-color:rgba(0, 0, 0, 0.6)}.modal.remove-background{-webkit-animation:remove-brackground 100ms forwards;animation:remove-brackground 100ms forwards}.modal.show-background{-webkit-animation:show-background 100ms forwards;animation:show-background 100ms forwards}.modal-content{border-radius:5px;background-color:#fefefe;border:1px solid #858585;width:30%}.modal-content.full-width{width:100% !important;border:none !important}.modal-content.open-animation{-webkit-animation:open-fade 100ms forwards;animation:open-fade 100ms forwards}.modal-content.close-animation{-webkit-animation:close-fade 100ms forwards;animation:close-fade 100ms forwards}.modal-content .modal-title{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;border-bottom:1px solid #d3d3d3;padding:0 1rem}.modal-content .modal-title h1{color:#212121}.modal-content .modal-title .close-container{margin-left:auto;border-radius:100%;min-width:28px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:150ms;transition:150ms;cursor:pointer}.modal-content .modal-title .close-container:hover{background-color:#e4e4e4}.modal-content .modal-title .close-container .close{color:#646464;font-size:22px;font-weight:bold;padding-bottom:0.125rem}.modal-content .modal-title .close-container .close:hover,.modal-content .modal-title .close-container .close:focus{text-decoration:none}.modal-content .content{padding:1rem;overflow:auto;max-height:70vh}.modal-content .footer{padding:0.7rem 1rem;border-top:1px solid #d3d3d3}.modal-content .footer.center,.modal-content .footer.left,.modal-content .footer.right{display:-ms-flexbox;display:flex}.modal-content .footer.center{-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.modal-content .footer.left .footer-content{margin-right:auto}.modal-content .footer.right .footer-content{margin-left:auto}@media (max-width: 1536px){.responsive{width:40%}:host([size=tiny]) .modal-content{width:30%}:host([size=small]) .modal-content{width:40%}:host([size=medium]) .modal-content{width:40%}:host([size=large]) .modal-content{width:50%}:host([size=giant]) .modal-content{width:60%}}@media (max-width: 1280px){.responsive{width:45%}:host([size=tiny]) .responsive{width:30%}:host([size=small]) .responsive{width:45%}:host([size=medium]) .responsive{width:55%}:host([size=large]) .responsive{width:65%}:host([size=giant]) .responsive{width:75%}}@media (max-width: 1024px){.responsive{width:50%}:host([size=tiny]) .responsive{width:40%}:host([size=small]) .responsive{width:50%}:host([size=medium]) .responsive{width:60%}:host([size=large]) .responsive{width:70%}:host([size=giant]) .responsive{width:80%}}@media (max-width: 768px){.responsive{width:60%}:host([size=tiny]) .responsive{width:50%}:host([size=small]) .responsive{width:60%}:host([size=medium]) .responsive{width:70%}:host([size=large]) .responsive{width:80%}:host([size=giant]) .responsive{width:90%}}@media (max-width: 640px){.responsive{width:70%}:host([size=tiny]) .responsive{width:70%}:host([size=small]) .responsive{width:85%}:host([size=medium]) .responsive{width:90%}:host([size=large]) .responsive{width:95%}:host([size=giant]) .responsive{width:98%}}@-webkit-keyframes open-fade{from{top:10rem;-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}to{top:inherit;-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}}@keyframes open-fade{from{top:10rem;-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}to{top:inherit;-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}}@-webkit-keyframes close-fade{from{-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}to{-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}}@keyframes close-fade{from{-webkit-transform:scale(1);transform:scale(1);opacity:1;z-index:100}to{-webkit-transform:scale(0.9);transform:scale(0.9);opacity:0;z-index:1}}@-webkit-keyframes remove-brackground{from{opacity:1}to{display:none;opacity:0}}@keyframes remove-brackground{from{opacity:1}to{display:none;opacity:0}}@-webkit-keyframes show-background{from{display:none;opacity:0}to{display:hidden;opacity:1}}@keyframes show-background{from{display:none;opacity:0}to{display:hidden;opacity:1}}';var TecModal=function(){function e(e){var t=this;registerInstance(this,e);this.hidden=createEvent(this,"hidden",7);this.clickWasInside=false;this.hasFooterContent=false;this.openedAuxiliary=false;this.theme=defaultTheme;this.opened=false;this.showCloseIcon=true;this.dismissOnBackdrop=true;this.size=TecSize.small;this.fullWidth=false;this.closeOnEscape=true;this.blockBodyScroll=true;this.responsive=true;this.footerAlign=TecAlign.right;this.handleClick=function(e){if(!t.clickWasInside&&t.dismissOnBackdrop)t.closeModal(e);t.clickWasInside=false};this.closeModal=function(e){t.opened=false;t.handleParentOverflow();t.hidden.emit(e)};this.handleKeyDown=function(e){if(t.opened&&e.key==="Escape")t.closeModal()}}e.prototype.watchOpened=function(e){var t=this;if(!e){setTimeout((function(){return t.openedAuxiliary=false}),200)}else{this.handleParentOverflow();this.openedAuxiliary=true}};e.prototype.componentWillLoad=function(){this.hasFooterContent=!!this.hostElement.querySelector('[slot="footer"]');if(this.opened)this.handleParentOverflow();this.openedAuxiliary=this.opened;if(this.closeOnEscape)document.addEventListener("keydown",this.handleKeyDown)};e.prototype.handleParentOverflow=function(){var e=this.opened&&this.blockBodyScroll?"hidden":"inherit";this.hostElement.parentElement.style.overflow=e};e.prototype.setClickWasInside=function(e){var t=this;return function(){return t.clickWasInside=e}};e.prototype.render=function(){return this.openedAuxiliary&&h(Host,null,h("div",{class:"modal "+(this.opened&&"show-background")+" "+(!this.opened&&"remove-background"),onClick:this.handleClick},h("div",{class:"modal-content "+(this.fullWidth&&"full-width")+" "+(this.opened&&"open-animation")+" "+(!this.opened&&"close-animation")+" "+(this.responsive&&"responsive"),onClick:this.setClickWasInside(true)},h("div",{class:"modal-title text-title"},h("h1",{class:"text-2x1"},this.modalTitle),this.showCloseIcon&&h("div",{class:"close-container",onClick:this.closeModal},h("span",{class:"close"},h("span",null,"×")))),h("div",{class:"content"},h("slot",{name:"content"})),this.hasFooterContent&&h("div",{class:"footer "+this.footerAlign},h("div",{class:"footer-content"},h("slot",{name:"footer"}))))))};Object.defineProperty(e.prototype,"hostElement",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{opened:["watchOpened"]}},enumerable:false,configurable:true});return e}();TecModal.style=tecModalCss;var productHeaderCss='@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{font-size:1rem;display:block}:host([theme=dark]) header{background:#434548}:host([theme=dark]) header .title{color:#f6f8fa}:host([theme=light]) header{background:#ffffff}:host([theme=light]) header .title{color:#5a5c60}:host([sticky]){position:-webkit-sticky;position:sticky;position:fixed;z-index:99;top:0;right:0;left:0;position:relative;width:100%;height:70px}header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-box-shadow:0 -1px 6px #00000046;box-shadow:0 -1px 6px #00000046;padding:1rem 1.25rem;width:100%;height:70px;top:0;left:0;height:70px}header.sticky{position:fixed}header .title{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;font-size:1.2rem;font-weight:500;margin-right:1rem;height:100%}header .content{font-size:1rem;-ms-flex:1;flex:1}';var ProductHeader=function(){function e(e){var t=this;registerInstance(this,e);this.titleClicked=createEvent(this,"title-clicked",7);this.theme=defaultTheme;this.titleCursorPointer=true;this.sticky=true;this.handleClick=function(){if(t.titleCursorPointer)t.titleClicked.emit()}}e.prototype.render=function(){return h(Host,null,h("header",{class:"text-title "+(this.sticky&&"sticky")},h("div",{class:"before-title"},h("slot",{name:"before-title"})),h("div",{class:"title",style:{cursor:this.titleCursorPointer&&"pointer"},onClick:this.handleClick},this.titleProduct),h("div",{class:"content"},h("slot",{name:"content"}))))};return e}();ProductHeader.style=productHeaderCss;var statusBadgeCss='@import url(https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@300;400;500;700;900&display=swap);@import url(https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@400;700&family=Volkhov:wght@400;700&display=swap);@import url(https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500;700&family=Oxygen+Mono&family=Roboto+Mono:wght@300;400;500;600;700&display=swap);.bg-default{background:#f6f8fa}.text-xs{font-size:.75rem;line-height:1rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-2x1{font-size:1.5rem;line-height:2rem}.text-3x1{font-size:1.875rem;line-height:2.25rem}.text-4x1{font-size:2.25rem;line-height:2.5rem}.text-5x1{font-size:3rem;line-height:3rem}.text-6x1{font-size:3.75rem;line-height:3.75rem}.text-7x1{font-size:4.5rem;line-height:4.5rem}.text-8x1{font-size:6rem;line-height:6rem}.text-9x1{font-size:8rem;line-height:8rem}.text-sans{font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Roboto,Almarai,Inter,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-serif{font-family:ui-serif,Volkhov,Libre Baskerville,Georgia,serif,serif}.text-mono{font-family:ui-monospace,Fira Mono,Roboto Mono,Oxygen Mono,Consolas,monospace,monospace}.text-title{font-family:Inter,sans-serif}@import url("https://fonts.googleapis.com/css2?family=Inter:wght@500;700&family=Open+Sans:wght@400;600&display=swap"); *{-webkit-box-sizing:border-box;box-sizing:border-box}:host([hidden]){display:none}:host([theme=light]){--tecnologia-color-primary:#3c9bec;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=light]) .bg-primary{background-color:#3c9bec}:host([theme=light]) .bg-secondary{background-color:#cbd0d8}:host([theme=light]) .bg-danger{background-color:#ec3c43}:host([theme=light]) .bg-success{background-color:#00c99a}:host([theme=light]) .bg-warning{background-color:#ff9800}:host([theme=dark]){--tecnologia-color-primary:#7dbcf2;--tecnologia-color-secondary:#cbd0d8;--tecnologia-color-danger:#ec3c43;--tecnologia-color-success:#00c99a;--tecnologia-color-warning:#ff9800}:host([theme=dark]) .bg-primary{background-color:#7dbcf2}:host([theme=dark]) .bg-secondary{background-color:#cbd0d8}:host([theme=dark]) .bg-danger{background-color:#ec3c43}:host([theme=dark]) .bg-success{background-color:#00c99a}:host([theme=dark]) .bg-warning{background-color:#ff9800}:host{display:block}.badge .badge-value{background:#e9f3fc;color:#307cbc;font-size:0.9375rem;padding:0.6rem 1.0667rem;border-radius:15rem;line-height:2rem;white-space:pre-wrap;-webkit-box-decoration-break:clone;box-decoration-break:clone}.badge .badge-value.primary{background:#e5f9f4;color:#00c99a}.badge .badge-value.secondary{background:#f6f6f6;color:#646464}.badge .badge-value.success{background:#e5f9f4;color:#00a07b}.badge .badge-value.danger{background:#ffecf1;color:#b23154}.badge .badge-value.warn{background-color:#ffe0b2;color:#ffa726}.badge .badge-value.info{background:#e9f3fc;color:#307cbc}';var StatusBadge=function(){function e(e){registerInstance(this,e);this.status=TecStatus.primary}e.prototype.render=function(){return h(Host,null,h("div",{class:"badge text-sans"},h("span",{class:"badge-value "+this.status},this.badgeText)))};return e}();StatusBadge.style=statusBadgeCss;export{BottomBar as tec_bottom_bar,TecButton as tec_button,CodeInput as tec_code_input,TecModal as tec_modal,ProductHeader as tec_product_header,StatusBadge as tec_status_badge};