UNPKG

@anjuna/docs

Version:

Anjuna Documentation Web Components

1 lines 4.94 kB
AnjunaDocs.loadBundle("ypxneput",["exports"],function(t){var e=window.AnjunaDocs.h,n=function(){function t(){this.context="primary",this.size="default",this.type="button"}return t.prototype.btnClasses=function(){return["ad-button","ad-button-"+this.context,"ad-button-"+this.size].join(" ")},t.prototype.onBlur=function(){this.adBlur.emit()},t.prototype.onFocus=function(){this.adFocus.emit()},t.prototype.render=function(){var t=this;return this.href?e("a",{href:this.href,class:this.btnClasses(),onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()}},e("slot",null)):e("button",{type:this.type,class:this.btnClasses(),onFocus:function(){return t.onFocus()},onBlur:function(){return t.onBlur()}},e("slot",null))},Object.defineProperty(t,"is",{get:function(){return"ad-button"},enumerable:!0,configurable:!0}),Object.defineProperty(t,"properties",{get:function(){return{context:{type:String,attr:"context"},disabled:{type:Boolean,attr:"disabled",reflectToAttr:!0},href:{type:String,attr:"href"},size:{type:String,attr:"size",reflectToAttr:!0},type:{type:String,attr:"type"}}},enumerable:!0,configurable:!0}),Object.defineProperty(t,"events",{get:function(){return[{name:"adBlur",method:"adBlur",bubbles:!0,cancelable:!0,composed:!0},{name:"adFocus",method:"adFocus",bubbles:!0,cancelable:!0,composed:!0}]},enumerable:!0,configurable:!0}),Object.defineProperty(t,"style",{get:function(){return".ad-button{display:inline-block;font-weight:400;text-align:center;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:1px solid transparent;padding:.375rem .75rem;font-size:.875rem;line-height:1.5;border-radius:.25rem;-webkit-transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;transition:color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out}\@media screen and (prefers-reduced-motion:reduce){.ad-button{-webkit-transition:none;transition:none}}.ad-button:focus,.ad-button:hover{text-decoration:none}.ad-button.focus,.ad-button:focus{outline:0;-webkit-box-shadow:0 0 0 .2rem rgba(56,75,93,.25);box-shadow:0 0 0 .2rem rgba(56,75,93,.25)}.ad-button.disabled,.ad-button:disabled{opacity:.65}.ad-button:not(:disabled):not(.disabled){cursor:pointer}.ad-button-link{font-weight:400}.ad-button-link,.ad-button-link:hover{color:var(--anj-secondary);background-color:transparent}.ad-button-link.focus,.ad-button-link:focus,.ad-button-link:hover{text-decoration:underline;border-color:transparent}.ad-button-link.focus,.ad-button-link:focus{-webkit-box-shadow:none;box-shadow:none}.ad-button-link.disabled,.ad-button-link:disabled{color:#6c757d;pointer-events:none}.ad-button-large{padding:.5rem 1rem;font-size:1.09375rem;line-height:1.5;border-radius:.3rem}.ad-button-small{padding:.25rem .5rem;font-size:.75rem;line-height:1.5;border-radius:.2rem}ad-button{display:inline-block}ad-button[type]{-webkit-appearance:none}ad-button .ad-button-link:focus,ad-button .ad-button-link:hover{text-decoration:none}ad-button .ad-button-link:focus{color:var(--anj-secondary-dark);opacity:.8}ad-button .ad-button-primary{background-color:var(--anj-secondary);color:var(--anj-light)}ad-button .ad-button-primary:hover{background-color:#02549f}ad-button .ad-button-primary:focus{-webkit-box-shadow:0 0 0 .2rem rgba(3,110,209,.5);box-shadow:0 0 0 .2rem rgba(3,110,209,.5)}ad-button .ad-button-neutral{background-color:var(--anj-neutral);color:var(--anj-light)}ad-button .ad-button-neutral:hover{background-color:#57626d}ad-button .ad-button-neutral:focus{-webkit-box-shadow:0 0 0 .2rem rgba(110,124,137,.5);box-shadow:0 0 0 .2rem rgba(110,124,137,.5)}ad-button .ad-button-danger{background-color:var(--anj-danger);color:var(--anj-light)}ad-button .ad-button-danger:hover{background-color:#b22c29}ad-button .ad-button-danger:focus{-webkit-box-shadow:0 0 0 .2rem rgba(210,63,60,.5);box-shadow:0 0 0 .2rem rgba(210,63,60,.5)}ad-button .ad-button-success{background-color:var(--anj-success);color:var(--anj-light)}ad-button .ad-button-success:hover{background-color:#26904f}ad-button .ad-button-success:focus{-webkit-box-shadow:0 0 0 .2rem rgba(49,184,101,.5);box-shadow:0 0 0 .2rem rgba(49,184,101,.5)}ad-button a.ad-button:not(.ad-button-link):focus,ad-button a.ad-button:not(.ad-button-link):hover{color:var(--anj-light)}ad-button[disabled]{-webkit-box-shadow:none;box-shadow:none;cursor:default;pointer-events:none;opacity:.65}"},enumerable:!0,configurable:!0}),t}();t.AdButton=n,Object.defineProperty(t,"__esModule",{value:!0})});