Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alaskaairux/auro-button

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alaskaairux/auro-button - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

demo/alert.js

7

CHANGELOG.md
# Semantic Release Automated Changelog
## [6.0.1](https://github.com/AlaskaAirlines/auro-button/compare/v6.0.0...v6.0.1) (2021-01-30)
### Bug Fixes
* [#95](https://github.com/AlaskaAirlines/auro-button/issues/95) Missing conditional check ([2fb749d](https://github.com/AlaskaAirlines/auro-button/commit/2fb749d981744664b3ba3ccf626a7770fdcdc5f4))
# [6.0.0](https://github.com/AlaskaAirlines/auro-button/compare/v5.3.1...v6.0.0) (2020-12-24)

@@ -4,0 +11,0 @@

2

dist/auro-button__bundled.js

@@ -186,2 +186,2 @@ /**

*/
class J{constructor(t){this.classes=new Set,this.changed=!1,this.element=t;const e=(t.getAttribute("class")||"").split(/\s+/);for(const t of e)this.classes.add(t)}add(t){this.classes.add(t),this.changed=!0}remove(t){this.classes.delete(t),this.changed=!0}commit(){if(this.changed){let t="";this.classes.forEach((e=>t+=e+" ")),this.element.setAttribute("class",t)}}}const K=new WeakMap,G=e((t=>e=>{if(!(e instanceof x)||e instanceof P||"class"!==e.committer.name||e.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:o}=e,{element:r}=o;let s=K.get(e);void 0===s&&(r.setAttribute("class",o.strings.join(" ")),K.set(e,s=new Set));const i=r.classList||new J(r);s.forEach((e=>{e in t||(i.remove(e),s.delete(e))}));for(const e in t){const o=t[e];o!=s.has(e)&&(o?(i.add(e),s.add(e)):(i.remove(e),s.delete(e)))}"function"==typeof i.commit&&i.commit()}));(function(t,e){!function(){function t(t){var e=!0,o=!1,r=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(t){return!!(t&&t!==document&&"HTML"!==t.nodeName&&"BODY"!==t.nodeName&&"classList"in t&&"contains"in t.classList)}function n(t){t.classList.contains("focus-visible")||(t.classList.add("focus-visible"),t.setAttribute("data-focus-visible-added",""))}function a(t){e=!1}function d(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(t){t.target.nodeName&&"html"===t.target.nodeName.toLowerCase()||(e=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",(function(o){o.metaKey||o.altKey||o.ctrlKey||(i(t.activeElement)&&n(t.activeElement),e=!0)}),!0),document.addEventListener("mousedown",a,!0),document.addEventListener("pointerdown",a,!0),document.addEventListener("touchstart",a,!0),document.addEventListener("visibilitychange",(function(t){"hidden"===document.visibilityState&&(o&&(e=!0),d())}),!0),d(),t.addEventListener("focus",(function(t){var o,r,a;i(t.target)&&(e||(r=(o=t.target).type,"INPUT"===(a=o.tagName)&&s[r]&&!o.readOnly||"TEXTAREA"===a&&!o.readOnly||o.isContentEditable))&&n(t.target)}),!0),t.addEventListener("blur",(function(t){var e;i(t.target)&&(t.target.classList.contains("focus-visible")||t.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(r),r=window.setTimeout((function(){o=!1}),100),(e=t.target).hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added")))}),!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var e;window.applyFocusVisiblePolyfill=t;try{e=new CustomEvent("focus-visible-polyfill-ready")}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(e)}"undefined"!=typeof document&&t(document)}()})(X={exports:{}},X.exports);var X,Y=j`*,:after,:before{box-sizing:border-box}@media (prefers-reduced-motion:reduce){*,:after,:before{animation:none!important;transition:none!important}}:focus{outline:3px solid transparent}.js-focus-visible :focus:not(.focus-visible){outline:3px solid transparent}.util_insetLg--squish{padding:calc(1.5rem / 2) 1.5rem}:host(.focus-visible) .auro-button{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #fff;box-shadow:inset 0 0 0 1px var(--auro-color-border-focus-on-dark),inset 0 0 0 3px var(--auro-color-background-lightest)}:host(.focus-visible) .auro-button--secondary{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);box-shadow:inset 0 0 0 3px #0074cb;box-shadow:inset 0 0 0 3px var(--auro-color-ui-default-on-light)}:host(.focus-visible) .auro-button--tertiary{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border-color:#0074cb;border-color:var(--auro-color-ui-default-on-light);box-shadow:inset 0 0 0 3px #0074cb;box-shadow:inset 0 0 0 3px var(--auro-color-ui-default-on-light)}:host(.focus-visible) .auro-buttonOndark{background-color:#00cff0;background-color:var(--auro-color-ui-default-on-dark);box-shadow:inset 0 0 0 3px #fff;box-shadow:inset 0 0 0 3px var(--auro-color-border-focus-on-dark)}:host(.focus-visible) .auro-buttonOndark--secondary{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);box-shadow:inset 0 0 0 3px #5de3f7;box-shadow:inset 0 0 0 3px var(--auro-color-ui-active-on-dark);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-active-on-dark)}:host(.focus-visible) .auro-buttonOndark--tertiary{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border-color:#5de3f7;border-color:var(--auro-color-ui-active-on-dark);box-shadow:inset 0 0 0 3px #5de3f7;box-shadow:inset 0 0 0 3px var(--auro-color-ui-active-on-dark)}:host(.focus-visible) .auro-button::-moz-focus-inner{border:none;width:100%}:host([fluid=true]) .auro-button,:host([fluid]) .auro-button{min-width:auto;width:100%}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{transition:all .15s ease;padding:.75rem 1.5rem;padding:var(--auro-size-sm) var(--auro-size-lg);color:#fff;color:var(--auro-color-text-primary-on-dark);cursor:pointer;background-color:#0074cb;background-color:var(--auro-color-ui-default-on-light);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light);border-radius:.375rem;border-radius:var(--auro-border-radius);font-family:'AS Circular',Helvetica Neue,Arial,sans-serif;font-family:var(--auro-font-family-default);font-size:1rem;font-size:var(--auro-text-body-size-default);font-weight:500;font-weight:var(--auro-text-body-default-weight);line-height:1.4;line-height:var(--auro-unitless-scale-140);overflow:hidden;text-overflow:ellipsis;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%;margin:0;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}@media (hover:hover){.auro-button:active,.auro-button:hover{background-color:#054687;background-color:var(--auro-color-ui-hover-on-light);border:1px solid #054687;border:1px solid var(--auro-color-ui-hover-on-light)}}.auro-button::-moz-focus-inner{border:none}.auro-button:active{background-color:#054687;background-color:var(--auro-color-ui-active-on-light);border:1px solid #054687;border:1px solid var(--auro-color-ui-active-on-light);transform:scale(.95)}@media screen and (min-width:660px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset;opacity:.4}@media (hover:hover){.auro-button:disabled:hover{background-color:#0074cb;background-color:var(--auro-color-ui-default-on-light);border-color:#0074cb;border-color:var(--auro-color-ui-default-on-light)}}.auro-button--secondary{background-color:#fff;background-color:var(--auro-color-background-lightest);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light);color:#0074cb;color:var(--auro-color-text-link-on-light)}@media (hover:hover){.auro-button--secondary:active,.auro-button--secondary:hover{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light)}}.auro-button--secondary:active{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light)}.auro-button--secondary:disabled:hover{background-color:#fff;background-color:var(--auro-color-background-lightest);border-color:#0074cb;border-color:var(--auro-color-ui-default-on-light)}.auro-button--tertiary{background-color:transparent;border-color:transparent;color:#0074cb;color:var(--auro-color-text-link-on-light)}@media (hover:hover){.auro-button--tertiary:active,.auro-button--tertiary:hover{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border-color:transparent}}.auro-button--tertiary:active{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border-color:transparent}@media (hover:hover){.auro-button--tertiary:disabled:hover{background-color:transparent;border-color:transparent}}.auro-buttonOndark{background-color:#00cff0;background-color:var(--auro-color-ui-default-on-dark);border:1px solid #00cff0;border:1px solid var(--auro-color-ui-default-on-dark);color:#222;color:var(--auro-color-text-primary-on-light)}@media (hover:hover){.auro-buttonOndark:active,.auro-buttonOndark:hover{background-color:#5de3f7;background-color:var(--auro-color-ui-hover-on-dark);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-hover-on-dark)}}.auro-buttonOndark:active{background-color:#5de3f7;background-color:var(--auro-color-ui-active-on-dark);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-active-on-dark)}@media (hover:hover){.auro-buttonOndark:disabled:hover{background-color:#00cff0;background-color:var(--auro-color-ui-default-on-dark);border-color:#00cff0;border-color:var(--auro-color-ui-default-on-dark)}}.auro-buttonOndark--secondary{background-color:transparent;border:1px solid #00cff0;border:1px solid var(--auro-color-ui-default-on-dark);color:#00cff0;color:var(--auro-color-ui-default-on-dark)}@media (hover:hover){.auro-buttonOndark--secondary:active,.auro-buttonOndark--secondary:hover{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15)}}.auro-buttonOndark--secondary:active{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-hover-on-dark)}@media (hover:hover){.auro-buttonOndark--secondary:disabled:hover{background-color:transparent;border:1px solid #00cff0;border:1px solid var(--auro-color-ui-default-on-dark)}}.auro-buttonOndark--tertiary{background-color:transparent;border:1px solid transparent;color:#00cff0;color:var(--auro-color-ui-default-on-dark)}@media (hover:hover){.auro-buttonOndark--tertiary:active,.auro-buttonOndark--tertiary:hover{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border:1px solid transparent;box-shadow:none}}.auro-buttonOndark--tertiary:active{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border:1px solid transparent;box-shadow:none}@media (hover:hover){.auro-buttonOndark--tertiary:disabled:hover{background-color:transparent;border-color:transparent}}.icon svg{vertical-align:middle}.icon slot{vertical-align:middle}`,Q=j`:host([fixed]) .util_insetLg--squish{padding:calc(24px / 2) 24px}:host([fixed]) .auro-button{padding:12px 24px;border-radius:6px;font-size:16px}@media screen and (min-width:660px){:host([fixed]) .auro-button{min-width:140px}}`;class Z extends B{static get styles(){return[Y,Q]}static get properties(){return{autofocus:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},ondark:{type:Boolean,reflect:!0},secondary:{type:Boolean,reflect:!0},tertiary:{type:Boolean,reflect:!0},arialabel:{type:String,reflect:!0},arialabelledby:{type:String,reflect:!0},title:{type:String,reflect:!0},type:{type:String,reflect:!0},value:{type:String,reflect:!0},id:{type:String},svgIconLeft:{type:String},svgIconRight:{type:String}}}focus(){this.renderRoot.querySelector("button").focus()}getIcon(t){return this.dom=(new DOMParser).parseFromString(t,"text/html"),this.svg=this.dom.body.firstChild,this.svg}render(){const t={"util_insetLg--squish":!0,"auro-button":!0,"auro-buttonOndark":this.ondark,"auro-button--secondary":this.secondary,"auro-buttonOndark--secondary":this.secondary&&this.ondark,"auro-button--tertiary":this.tertiary,"auro-buttonOndark--tertiary":this.tertiary&&this.ondark,icon:this.svgIconLeft||this.svgIconRight};return I`<button aria-label="${W(this.arialabel?this.arialabel:void 0)}" aria-labelledby="${W(this.arialabelledby?this.arialabelledby:void 0)}" ?autofocus="${this.autofocus}" class="${G(t)}" ?disabled="${this.disabled}" id="${W(this.id?this.id:void 0)}" title="${W(this.title?this.title:void 0)}" name="${W(this.name?this.name:void 0)}" type="${W(this.type?this.type:void 0)}" .value="${W(this.value?this.value:void 0)}" @click="${()=>{}}">${W(this.svgIconLeft?this.getIcon(this.svgIconLeft):void 0)}<slot></slot>${W(this.svgIconRight?this.getIcon(this.svgIconRight):void 0)}</button>`}}customElements.get("auro-button")||customElements.define("auro-button",Z);
class J{constructor(t){this.classes=new Set,this.changed=!1,this.element=t;const e=(t.getAttribute("class")||"").split(/\s+/);for(const t of e)this.classes.add(t)}add(t){this.classes.add(t),this.changed=!0}remove(t){this.classes.delete(t),this.changed=!0}commit(){if(this.changed){let t="";this.classes.forEach((e=>t+=e+" ")),this.element.setAttribute("class",t)}}}const K=new WeakMap,G=e((t=>e=>{if(!(e instanceof x)||e instanceof P||"class"!==e.committer.name||e.committer.parts.length>1)throw new Error("The `classMap` directive must be used in the `class` attribute and must be the only part in the attribute.");const{committer:o}=e,{element:r}=o;let s=K.get(e);void 0===s&&(r.setAttribute("class",o.strings.join(" ")),K.set(e,s=new Set));const i=r.classList||new J(r);s.forEach((e=>{e in t||(i.remove(e),s.delete(e))}));for(const e in t){const o=t[e];o!=s.has(e)&&(o?(i.add(e),s.add(e)):(i.remove(e),s.delete(e)))}"function"==typeof i.commit&&i.commit()}));var X;(function(t,e){!function(){function t(t){var e=!0,o=!1,r=null,s={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function i(t){return!!(t&&t!==document&&"HTML"!==t.nodeName&&"BODY"!==t.nodeName&&"classList"in t&&"contains"in t.classList)}function n(t){t.classList.contains("focus-visible")||(t.classList.add("focus-visible"),t.setAttribute("data-focus-visible-added",""))}function a(t){e=!1}function d(){document.addEventListener("mousemove",c),document.addEventListener("mousedown",c),document.addEventListener("mouseup",c),document.addEventListener("pointermove",c),document.addEventListener("pointerdown",c),document.addEventListener("pointerup",c),document.addEventListener("touchmove",c),document.addEventListener("touchstart",c),document.addEventListener("touchend",c)}function c(t){t.target.nodeName&&"html"===t.target.nodeName.toLowerCase()||(e=!1,document.removeEventListener("mousemove",c),document.removeEventListener("mousedown",c),document.removeEventListener("mouseup",c),document.removeEventListener("pointermove",c),document.removeEventListener("pointerdown",c),document.removeEventListener("pointerup",c),document.removeEventListener("touchmove",c),document.removeEventListener("touchstart",c),document.removeEventListener("touchend",c))}document.addEventListener("keydown",(function(o){o.metaKey||o.altKey||o.ctrlKey||(i(t.activeElement)&&n(t.activeElement),e=!0)}),!0),document.addEventListener("mousedown",a,!0),document.addEventListener("pointerdown",a,!0),document.addEventListener("touchstart",a,!0),document.addEventListener("visibilitychange",(function(t){"hidden"===document.visibilityState&&(o&&(e=!0),d())}),!0),d(),t.addEventListener("focus",(function(t){var o,r,a;i(t.target)&&(e||(r=(o=t.target).type,"INPUT"===(a=o.tagName)&&s[r]&&!o.readOnly||"TEXTAREA"===a&&!o.readOnly||o.isContentEditable))&&n(t.target)}),!0),t.addEventListener("blur",(function(t){var e;i(t.target)&&(t.target.classList.contains("focus-visible")||t.target.hasAttribute("data-focus-visible-added"))&&(o=!0,window.clearTimeout(r),r=window.setTimeout((function(){o=!1}),100),(e=t.target).hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added")))}),!0),t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&t.host?t.host.setAttribute("data-js-focus-visible",""):t.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var e;window.applyFocusVisiblePolyfill=t;try{e=new CustomEvent("focus-visible-polyfill-ready")}catch(t){(e=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(e)}"undefined"!=typeof document&&t(document)}()})(X={exports:{}},X.exports);var Y=j`*,:after,:before{box-sizing:border-box}@media (prefers-reduced-motion:reduce){*,:after,:before{animation:none!important;transition:none!important}}:focus{outline:3px solid transparent}.js-focus-visible :focus:not(.focus-visible){outline:3px solid transparent}.util_insetLg--squish{padding:calc(1.5rem / 2) 1.5rem}:host(.focus-visible) .auro-button{box-shadow:inset 0 0 0 1px #fff,inset 0 0 0 3px #fff;box-shadow:inset 0 0 0 1px var(--auro-color-border-focus-on-dark),inset 0 0 0 3px var(--auro-color-background-lightest)}:host(.focus-visible) .auro-button--secondary{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);box-shadow:inset 0 0 0 3px #0074cb;box-shadow:inset 0 0 0 3px var(--auro-color-ui-default-on-light)}:host(.focus-visible) .auro-button--tertiary{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border-color:#0074cb;border-color:var(--auro-color-ui-default-on-light);box-shadow:inset 0 0 0 3px #0074cb;box-shadow:inset 0 0 0 3px var(--auro-color-ui-default-on-light)}:host(.focus-visible) .auro-buttonOndark{background-color:#00cff0;background-color:var(--auro-color-ui-default-on-dark);box-shadow:inset 0 0 0 3px #fff;box-shadow:inset 0 0 0 3px var(--auro-color-border-focus-on-dark)}:host(.focus-visible) .auro-buttonOndark--secondary{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);box-shadow:inset 0 0 0 3px #5de3f7;box-shadow:inset 0 0 0 3px var(--auro-color-ui-active-on-dark);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-active-on-dark)}:host(.focus-visible) .auro-buttonOndark--tertiary{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border-color:#5de3f7;border-color:var(--auro-color-ui-active-on-dark);box-shadow:inset 0 0 0 3px #5de3f7;box-shadow:inset 0 0 0 3px var(--auro-color-ui-active-on-dark)}:host(.focus-visible) .auro-button::-moz-focus-inner{border:none;width:100%}:host([fluid=true]) .auro-button,:host([fluid]) .auro-button{min-width:auto;width:100%}::slotted(svg){vertical-align:middle}slot{pointer-events:none}.auro-button{transition:all .15s ease;padding:.75rem 1.5rem;padding:var(--auro-size-sm) var(--auro-size-lg);color:#fff;color:var(--auro-color-text-primary-on-dark);cursor:pointer;background-color:#0074cb;background-color:var(--auro-color-ui-default-on-light);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light);border-radius:.375rem;border-radius:var(--auro-border-radius);font-family:'AS Circular',Helvetica Neue,Arial,sans-serif;font-family:var(--auro-font-family-default);font-size:1rem;font-size:var(--auro-text-body-size-default);font-weight:500;font-weight:var(--auro-text-body-default-weight);line-height:1.4;line-height:var(--auro-unitless-scale-140);overflow:hidden;text-overflow:ellipsis;-ms-user-select:none;user-select:none;white-space:nowrap;width:100%;margin:0;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none;-webkit-user-select:none}@media (hover:hover){.auro-button:active,.auro-button:hover{background-color:#054687;background-color:var(--auro-color-ui-hover-on-light);border:1px solid #054687;border:1px solid var(--auro-color-ui-hover-on-light)}}.auro-button::-moz-focus-inner{border:none}.auro-button:active{background-color:#054687;background-color:var(--auro-color-ui-active-on-light);border:1px solid #054687;border:1px solid var(--auro-color-ui-active-on-light);transform:scale(.95)}@media screen and (min-width:660px){.auro-button{min-width:8.75rem;width:auto}}.auro-button:disabled{cursor:not-allowed;transform:unset;opacity:.4}@media (hover:hover){.auro-button:disabled:hover{background-color:#0074cb;background-color:var(--auro-color-ui-default-on-light);border-color:#0074cb;border-color:var(--auro-color-ui-default-on-light)}}.auro-button--secondary{background-color:#fff;background-color:var(--auro-color-background-lightest);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light);color:#0074cb;color:var(--auro-color-text-link-on-light)}@media (hover:hover){.auro-button--secondary:active,.auro-button--secondary:hover{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light)}}.auro-button--secondary:active{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border:1px solid #0074cb;border:1px solid var(--auro-color-ui-default-on-light)}.auro-button--secondary:disabled:hover{background-color:#fff;background-color:var(--auro-color-background-lightest);border-color:#0074cb;border-color:var(--auro-color-ui-default-on-light)}.auro-button--tertiary{background-color:transparent;border-color:transparent;color:#0074cb;color:var(--auro-color-text-link-on-light)}@media (hover:hover){.auro-button--tertiary:active,.auro-button--tertiary:hover{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border-color:transparent}}.auro-button--tertiary:active{background-color:#f8f8f8;background-color:var(--auro-color-background-lighter);border-color:transparent}@media (hover:hover){.auro-button--tertiary:disabled:hover{background-color:transparent;border-color:transparent}}.auro-buttonOndark{background-color:#00cff0;background-color:var(--auro-color-ui-default-on-dark);border:1px solid #00cff0;border:1px solid var(--auro-color-ui-default-on-dark);color:#222;color:var(--auro-color-text-primary-on-light)}@media (hover:hover){.auro-buttonOndark:active,.auro-buttonOndark:hover{background-color:#5de3f7;background-color:var(--auro-color-ui-hover-on-dark);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-hover-on-dark)}}.auro-buttonOndark:active{background-color:#5de3f7;background-color:var(--auro-color-ui-active-on-dark);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-active-on-dark)}@media (hover:hover){.auro-buttonOndark:disabled:hover{background-color:#00cff0;background-color:var(--auro-color-ui-default-on-dark);border-color:#00cff0;border-color:var(--auro-color-ui-default-on-dark)}}.auro-buttonOndark--secondary{background-color:transparent;border:1px solid #00cff0;border:1px solid var(--auro-color-ui-default-on-dark);color:#00cff0;color:var(--auro-color-ui-default-on-dark)}@media (hover:hover){.auro-buttonOndark--secondary:active,.auro-buttonOndark--secondary:hover{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15)}}.auro-buttonOndark--secondary:active{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border:1px solid #5de3f7;border:1px solid var(--auro-color-ui-hover-on-dark)}@media (hover:hover){.auro-buttonOndark--secondary:disabled:hover{background-color:transparent;border:1px solid #00cff0;border:1px solid var(--auro-color-ui-default-on-dark)}}.auro-buttonOndark--tertiary{background-color:transparent;border:1px solid transparent;color:#00cff0;color:var(--auro-color-ui-default-on-dark)}@media (hover:hover){.auro-buttonOndark--tertiary:active,.auro-buttonOndark--tertiary:hover{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border:1px solid transparent;box-shadow:none}}.auro-buttonOndark--tertiary:active{background-color:rgba(0,0,0,.15);background-color:var(--auro-color-base-black-opacity-15);border:1px solid transparent;box-shadow:none}@media (hover:hover){.auro-buttonOndark--tertiary:disabled:hover{background-color:transparent;border-color:transparent}}.icon svg{vertical-align:middle}.icon slot{vertical-align:middle}`,Q=j`:host([fixed]) .util_insetLg--squish{padding:calc(24px / 2) 24px}:host([fixed]) .auro-button{padding:12px 24px;border-radius:6px;font-size:16px}@media screen and (min-width:660px){:host([fixed]) .auro-button{min-width:140px}}`;class Z extends B{static get styles(){return[Y,Q]}static get properties(){return{autofocus:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},ondark:{type:Boolean,reflect:!0},secondary:{type:Boolean,reflect:!0},tertiary:{type:Boolean,reflect:!0},arialabel:{type:String,reflect:!0},arialabelledby:{type:String,reflect:!0},title:{type:String,reflect:!0},type:{type:String,reflect:!0},value:{type:String,reflect:!0},id:{type:String},svgIconLeft:{type:String},svgIconRight:{type:String}}}focus(){this.renderRoot.querySelector("button").focus()}getIcon(t){return this.dom=(new DOMParser).parseFromString(t,"text/html"),this.svg=this.dom.body.firstChild,this.svg}render(){const t={"util_insetLg--squish":!0,"auro-button":!0,"auro-buttonOndark":this.ondark,"auro-button--secondary":this.secondary,"auro-buttonOndark--secondary":this.secondary&&this.ondark,"auro-button--tertiary":this.tertiary,"auro-buttonOndark--tertiary":this.tertiary&&this.ondark,icon:this.svgIconLeft||this.svgIconRight};return I`<button aria-label="${W(this.arialabel?this.arialabel:void 0)}" aria-labelledby="${W(this.arialabelledby?this.arialabelledby:void 0)}" ?autofocus="${this.autofocus}" class="${G(t)}" ?disabled="${this.disabled}" id="${W(this.id?this.id:void 0)}" title="${W(this.title?this.title:void 0)}" name="${W(this.name?this.name:void 0)}" type="${W(this.type?this.type:void 0)}" .value="${W(this.value?this.value:void 0)}" @click="${()=>{}}">${W(this.svgIconLeft?this.getIcon(this.svgIconLeft):void 0)}<slot></slot>${W(this.svgIconRight?this.getIcon(this.svgIconRight):void 0)}</button>`}}customElements.get("auro-button")||customElements.define("auro-button",Z);

@@ -101,2 +101,4 @@ // Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license

customElements.define("auro-button-light", AuroButtonLight);
if (!customElements.get("auro-button-light")) {
customElements.define("auro-button-light", AuroButtonLight);
}

@@ -11,3 +11,3 @@ {

"name": "@alaskaairux/auro-button",
"version": "6.0.0",
"version": "6.0.1",
"description": "Auro custom auro-button element",

@@ -34,3 +34,3 @@ "author": "Product design and research",

"@alaskaairux/design-tokens": "^3.0.0",
"@alaskaairux/icons": "^4.1.0",
"@alaskaairux/icons": "^4.2.2",
"@alaskaairux/webcorestylesheets": "^3.0.0",

@@ -46,29 +46,27 @@ "@babel/core": "^7.12.10",

"@open-wc/testing-karma": "^4.0.9",
"@polymer/iron-demo-helpers": "^3.1.0",
"@rollup/plugin-alias": "^3.1.1",
"@rollup/plugin-babel": "^5.2.2",
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-node-resolve": "^11.1.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@semantic-release/npm": "^7.0.9",
"@web/dev-server": "^0.1.0",
"@semantic-release/npm": "^7.0.10",
"@web/dev-server": "^0.1.5",
"@webcomponents/webcomponentsjs": "^2.5.0",
"autoprefixer": "^10.1.0",
"autoprefixer": "^10.2.3",
"babel-loader": "^8.2.2",
"compression": "^1.7.4",
"concat": "^1.0.3",
"copy-webpack-plugin": "^6.4.1",
"copyfiles": "^2.4.1",
"core-js": "^3.8.1",
"eslint": "^7.16.0",
"core-js": "^3.8.3",
"eslint": "^7.18.0",
"eslint-plugin-lit": "^1.3.0",
"focus-visible": "^5.2.0",
"husky": "^4.3.6",
"husky": "^4.3.8",
"lodash": "^4.17.20",
"marked": "^1.2.7",
"nodemon": "^2.0.6",
"nodemon": "^2.0.7",
"npm-run-all": "^4.1.5",
"postcss": "^8.2.1",
"postcss-custom-properties": "^10.0.0",
"postcss": "^8.2.4",
"postcss-custom-properties": "^11.0.0",
"postcss-discard-comments": "^4.0.2",

@@ -78,9 +76,10 @@ "postcss-rem-to-pixel": "^4.1.2",

"postcss-selector-replace": "^1.0.2",
"rollup": "^2.35.1",
"prismjs": "^1.23.0",
"rollup": "^2.38.0",
"rollup-plugin-minify-html-literals": "^1.2.5",
"rollup-plugin-serve": "^1.1.0",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^17.3.0",
"sinon": "^9.2.2",
"stylelint": "^13.8.0",
"semantic-release": "^17.3.7",
"sinon": "^9.2.4",
"stylelint": "^13.9.0",
"stylelint-config-standard": "^20.0.0",

@@ -125,3 +124,9 @@ "wc-sass-render": "^1.2.3",

"sassBuild:watch": "nodemon -e scss --watch src --exec npm run sassBuild:dev",
"postCss:component": "node ./scripts/postCss.js"
"postCss:component": "node ./scripts/postCss.js",
"demo:rmBuild": "rm -rf ./build",
"demo:newBuild": "mkdir ./build && mkdir ./build/css && mkdir ./build/demo",
"demo:copyDemo": "copyfiles -u 1 -V './demo/demo.md' ./build/demo",
"demo:copyIndex": "copyfiles -u 1 -V './demo/index.html' ./build",
"demo:updateIndex": "node ./scripts/prepForBuild",
"demo:build": "npm-run-all ciBuild demo:rmBuild demo:newBuild demo:copyIndex demo:copyDemo demo:updateIndex"
},

@@ -128,0 +133,0 @@ "husky": {

@@ -53,2 +53,3 @@ # auro-button

```html
<link rel="stylesheet" href="https://unpkg.com/@alaskaairux/design-tokens@latest/dist/tokens/CSSCustomProperties.css" />

@@ -154,1 +155,5 @@ <link rel="stylesheet" href="https://unpkg.com/@alaskaairux/webcorestylesheets@latest/dist/bundled/essentials.css" />

Automated tests are required for every Auro component. See `.\test\auro-button.test.js` for the tests for this component. Run `npm test` to run the tests and check code coverage. Tests must pass and meet a certain coverage threshold to commit. See [the testing documentation](https://auro.alaskaair.com/support/tests) for more details.
### Demo deployment
To deploy a demo version of the component for review, run `npm run demo:build` to create a `./build` directory that can be pushed to any static server.

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc