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

@alaskaairux/auro-icon

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alaskaairux/auro-icon - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

dist/cacheFetch.js

7

CHANGELOG.md
# Semantic Release Automated Changelog
## [2.0.3](https://github.com/AlaskaAirlines/auro-icon/compare/v2.0.2...v2.0.3) (2020-12-02)
### Bug Fixes
* add perf update, use map to dedupe fetch requests ([47e8621](https://github.com/AlaskaAirlines/auro-icon/commit/47e862142d56cf8095428dc93ce1338f7c7c9960))
## [2.0.2](https://github.com/AlaskaAirlines/auro-icon/compare/v2.0.1...v2.0.2) (2020-10-31)

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

2

dist/auro-icon__bundled.js

@@ -1,1 +0,1 @@

!function(r){function e(e){for(var t,i,c=e[0],s=e[1],l=e[2],f=0,p=[];f<c.length;f++)i=c[f],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(t in s)Object.prototype.hasOwnProperty.call(s,t)&&(r[t]=s[t]);for(u&&u(e);p.length;)p.shift()();return a.push.apply(a,l||[]),o()}function o(){for(var r,e=0;e<a.length;e++){for(var o=a[e],t=!0,c=1;c<o.length;c++){var s=o[c];0!==n[s]&&(t=!1)}t&&(a.splice(e--,1),r=i(i.s=o[0]))}return r}var t={},n={0:0},a=[];function i(e){if(t[e])return t[e].exports;var o=t[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=r,i.c=t,i.d=function(r,e,o){i.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:o})},i.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},i.t=function(r,e){if(1&e&&(r=i(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)i.d(o,t,function(e){return r[e]}.bind(null,t));return o},i.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return i.d(e,"a",e),e},i.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},i.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=e,c=c.slice();for(var l=0;l<c.length;l++)e(c[l]);var u=s;a.push([30,1]),o()}({30:function(r,e,o){"use strict";o.r(e);var t=o(15),n=o.n(t),a=o(11),i=o.n(a),c=o(13),s=o.n(c),l=o(14),u=o.n(l),f=o(16),p=o.n(f),h=o(17),d=o.n(h),y=o(18),b=o.n(y),v=o(19),g=o.n(v),m=o(20),k=o.n(m),x=o(12),w=o.n(x),O=o(10),j=o(21),P=o(22),S=o(23);o(29);function D(){var r=i()(["*,*:before,*:after{-webkit-box-sizing:border-box;box-sizing:border-box}@media (prefers-reduced-motion: reduce){*,*:before,*:after{-webkit-animation:none !important;animation:none !important;-webkit-transition:none !important;-o-transition:none !important;transition:none !important}}*:focus{outline:none}.js-focus-visible :focus:not(.focus-visible){outline:none}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:-webkit-box;display:-ms-flexbox;display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.ico_squareLarge{fill:currentColor;width:1.5rem;height:1.5rem}.ico_squareSmall{fill:currentColor;width:0.6rem;height:0.6rem}.ico_squareMed{fill:currentColor;width:1rem;height:1rem}.ico_squareSml{fill:currentColor;width:0.75rem;height:0.75rem}:host{color:currentColor;display:inline-block;vertical-align:middle;line-height:1}:host .logo{color:#01426a;color:var(--auro-color-brand-midnight-400)}:host .primary{color:#626b79;color:var(--auro-color-icon-primary-on-light)}:host .emphasis{color:#222222;color:var(--auro-color-icon-emphasis-on-light)}:host .accent{color:#0074cb;color:var(--auro-color-icon-accent-on-light)}:host .disabled{color:rgba(0,0,0,0.15);color:var(--auro-color-icon-disabled-on-light)}:host .error{color:#df0b37;color:var(--auro-color-alert-error-on-light)}:host .success{color:#00805d;color:var(--auro-color-alert-success-on-light)}:host .advisory{color:#fff0cd;color:var(--auro-color-alert-advisory-on-light)}:host .warning{color:#de750c;color:var(--auro-color-alert-warning-on-light)}:host([onDark]) .logo{color:#ffffff;color:var(--auro-color-base-white)}:host([onDark]) .primary{color:#9fabbb;color:var(--auro-color-icon-primary-on-dark)}:host([onDark]) .emphasis{color:#ffffff;color:var(--auro-color-icon-emphasis-on-dark)}:host([onDark]) .accent{color:#00cff0;color:var(--auro-color-icon-accent-on-dark)}:host([onDark]) .disabled{color:rgba(255,255,255,0.4);color:var(--auro-color-icon-disabled-on-dark)}:host([onDark]) .error{color:#ff999b;color:var(--auro-color-alert-error-on-dark)}:host([onDark]) .success{color:#69cf96;color:var(--auro-color-alert-success-on-dark)}:host([onDark]) .advisory{color:#fff0cd;color:var(--auro-color-alert-advisory-on-dark)}:host([customSize]){--auro-size-lg:100%;width:100%;height:100%}\n"]);return D=function(){return r},r}var _=Object(O.b)(D());function B(){var r=i()(["\n ","\n "]);return B=function(){return r},r}function C(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function M(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?C(Object(o),!0).forEach((function(e){n()(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):C(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function T(){var r=i()(['\n <div class="','">\n <div class="util_displayHiddenVisually">\n <slot></slot>\n </div>\n <slot name="icon">',"</slot>\n </div>\n "]);return T=function(){return r},r}function q(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var o,t=w()(r);if(e){var n=w()(this).constructor;o=Reflect.construct(t,arguments,n)}else o=t.apply(this,arguments);return k()(this,o)}}var R=function(r){g()(n,r);var e,o,t=q(n);function n(){return p()(this,n),t.apply(this,arguments)}return d()(n,[{key:"fetchIcon",value:(o=u()(s.a.mark((function r(e,o){var t,n,a,i;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t="https://unpkg.com/@alaskaairux/icons@latest/dist",n="","logos"!==e){r.next=8;break}return r.next=5,fetch("".concat(t,"/").concat(e,"/").concat(o,".svg"));case 5:n=r.sent,r.next=23;break;case 8:if(!this.alaska){r.next=14;break}return r.next=11,fetch("".concat(t,"/restricted/AS.svg"));case 11:n=r.sent,r.next=23;break;case 14:if(!this.alaskaTagline){r.next=20;break}return r.next=17,fetch("".concat(t,"/restricted/AS-tagline.svg"));case 17:n=r.sent,r.next=23;break;case 20:return r.next=22,fetch("".concat(t,"/icons/").concat(e,"/").concat(o,".svg"));case 22:n=r.sent;case 23:return r.next=25,n.text();case 25:return a=r.sent,i=(new DOMParser).parseFromString(a,"text/html"),r.abrupt("return",i.body.querySelector("svg"));case 28:case"end":return r.stop()}}),r,this)}))),function(r,e){return o.apply(this,arguments)})},{key:"firstUpdated",value:(e=u()(s.a.mark((function r(){var e,o;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.fetchIcon(this.category,this.name);case 2:(e=r.sent)?this.svg=e:(o=(new DOMParser).parseFromString(S.a.svg,"text/html"),this.svg=o.body.firstChild);case 4:case"end":return r.stop()}}),r,this)}))),function(){return e.apply(this,arguments)})},{key:"render",value:function(){var r={primary:!this.alaska&&!this.alaskaTagline&&!this.customColor,emphasis:this.emphasis,accent:this.accent,disabled:this.disabled,error:this.error,success:this.success,advisory:this.advisory,warning:this.warning,logo:this.alaska||this.alaskaTagline};return Object(O.c)(T(),Object(j.a)(r),this.svg)}}],[{key:"properties",get:function(){return M(M({},b()(w()(n),"properties",this)),{},{category:{type:String,reflect:!0},alaska:{type:Boolean,reflect:!0},alaskaTagline:{type:Boolean,reflect:!0},name:{type:String,reflect:!0},primary:{type:Boolean,reflect:!0},emphasis:{type:Boolean,reflect:!0},accent:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},error:{type:Boolean,reflect:!0},success:{type:Boolean,reflect:!0},advisory:{type:Boolean,reflect:!0},warning:{type:Boolean,reflect:!0},onDark:{type:Boolean,reflect:!0},svg:{attribute:!1},customColor:{type:Boolean}})}},{key:"styles",get:function(){return Object(O.b)(B(),_)}}]),n}(P.a);customElements.get("auro-icon")||customElements.define("auro-icon",R)}});
!function(r){function e(e){for(var t,i,c=e[0],s=e[1],l=e[2],f=0,p=[];f<c.length;f++)i=c[f],Object.prototype.hasOwnProperty.call(n,i)&&n[i]&&p.push(n[i][0]),n[i]=0;for(t in s)Object.prototype.hasOwnProperty.call(s,t)&&(r[t]=s[t]);for(u&&u(e);p.length;)p.shift()();return a.push.apply(a,l||[]),o()}function o(){for(var r,e=0;e<a.length;e++){for(var o=a[e],t=!0,c=1;c<o.length;c++){var s=o[c];0!==n[s]&&(t=!1)}t&&(a.splice(e--,1),r=i(i.s=o[0]))}return r}var t={},n={0:0},a=[];function i(e){if(t[e])return t[e].exports;var o=t[e]={i:e,l:!1,exports:{}};return r[e].call(o.exports,o,o.exports,i),o.l=!0,o.exports}i.m=r,i.c=t,i.d=function(r,e,o){i.o(r,e)||Object.defineProperty(r,e,{enumerable:!0,get:o})},i.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},i.t=function(r,e){if(1&e&&(r=i(r)),8&e)return r;if(4&e&&"object"==typeof r&&r&&r.__esModule)return r;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:r}),2&e&&"string"!=typeof r)for(var t in r)i.d(o,t,function(e){return r[e]}.bind(null,t));return o},i.n=function(r){var e=r&&r.__esModule?function(){return r.default}:function(){return r};return i.d(e,"a",e),e},i.o=function(r,e){return Object.prototype.hasOwnProperty.call(r,e)},i.p="";var c=window.webpackJsonp=window.webpackJsonp||[],s=c.push.bind(c);c.push=e,c=c.slice();for(var l=0;l<c.length;l++)e(c[l]);var u=s;a.push([30,1]),o()}({30:function(r,e,o){"use strict";o.r(e);var t=o(15),n=o.n(t),a=o(11),i=o.n(a),c=o(13),s=o.n(c),l=o(14),u=o.n(l),f=o(16),p=o.n(f),h=o(17),d=o.n(h),y=o(18),b=o.n(y),v=o(19),g=o.n(v),m=o(20),k=o.n(m),w=o(12),x=o.n(w),O=o(10),j=o(21),P=o(22),S=o(23),D=new Map,_=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e.responseParser||function(r){return r.text()};return D.has(r)||D.set(r,fetch(r).then(o)),D.get(r)};o(29);function B(){var r=i()(["*,*:before,*:after{-webkit-box-sizing:border-box;box-sizing:border-box}@media (prefers-reduced-motion: reduce){*,*:before,*:after{-webkit-animation:none !important;animation:none !important;-webkit-transition:none !important;-o-transition:none !important;transition:none !important}}*:focus{outline:none}.js-focus-visible :focus:not(.focus-visible){outline:none}.util_displayInline{display:inline}.util_displayInlineBlock{display:inline-block}.util_displayBlock,:host{display:block}.util_displayFlex{display:-webkit-box;display:-ms-flexbox;display:flex}.util_displayHidden,:host([hidden]:not(:focus):not(:active)){display:none}.util_displayHiddenVisually,:host([hiddenVisually]:not(:focus):not(:active)){border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;padding:0;position:absolute;width:1px}.ico_squareLarge{fill:currentColor;width:1.5rem;height:1.5rem}.ico_squareSmall{fill:currentColor;width:0.6rem;height:0.6rem}.ico_squareMed{fill:currentColor;width:1rem;height:1rem}.ico_squareSml{fill:currentColor;width:0.75rem;height:0.75rem}:host{color:currentColor;display:inline-block;vertical-align:middle;line-height:1}:host .logo{color:#01426a;color:var(--auro-color-brand-midnight-400)}:host .primary{color:#626b79;color:var(--auro-color-icon-primary-on-light)}:host .emphasis{color:#222222;color:var(--auro-color-icon-emphasis-on-light)}:host .accent{color:#0074cb;color:var(--auro-color-icon-accent-on-light)}:host .disabled{color:rgba(0,0,0,0.15);color:var(--auro-color-icon-disabled-on-light)}:host .error{color:#df0b37;color:var(--auro-color-alert-error-on-light)}:host .success{color:#00805d;color:var(--auro-color-alert-success-on-light)}:host .advisory{color:#fff0cd;color:var(--auro-color-alert-advisory-on-light)}:host .warning{color:#de750c;color:var(--auro-color-alert-warning-on-light)}:host([onDark]) .logo{color:#ffffff;color:var(--auro-color-base-white)}:host([onDark]) .primary{color:#9fabbb;color:var(--auro-color-icon-primary-on-dark)}:host([onDark]) .emphasis{color:#ffffff;color:var(--auro-color-icon-emphasis-on-dark)}:host([onDark]) .accent{color:#00cff0;color:var(--auro-color-icon-accent-on-dark)}:host([onDark]) .disabled{color:rgba(255,255,255,0.4);color:var(--auro-color-icon-disabled-on-dark)}:host([onDark]) .error{color:#ff999b;color:var(--auro-color-alert-error-on-dark)}:host([onDark]) .success{color:#69cf96;color:var(--auro-color-alert-success-on-dark)}:host([onDark]) .advisory{color:#fff0cd;color:var(--auro-color-alert-advisory-on-dark)}:host([customSize]){--auro-size-lg:100%;width:100%;height:100%}\n"]);return B=function(){return r},r}var C=Object(O.b)(B());function M(){var r=i()(["\n ","\n "]);return M=function(){return r},r}function T(r,e){var o=Object.keys(r);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(r);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.push.apply(o,t)}return o}function q(r){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?T(Object(o),!0).forEach((function(e){n()(r,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):T(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}function R(){var r=i()(['\n <div class="','">\n <div class="util_displayHiddenVisually">\n <slot></slot>\n </div>\n <slot name="icon">',"</slot>\n </div>\n "]);return R=function(){return r},r}function z(r){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(r){return!1}}();return function(){var o,t=x()(r);if(e){var n=x()(this).constructor;o=Reflect.construct(t,arguments,n)}else o=t.apply(this,arguments);return k()(this,o)}}var E=function(r){g()(n,r);var e,o,t=z(n);function n(){return p()(this,n),t.apply(this,arguments)}return d()(n,[{key:"fetchIcon",value:(o=u()(s.a.mark((function r(e,o){var t,n,a;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(t="https://unpkg.com/@alaskaairux/icons@latest/dist",n="","logos"!==e){r.next=8;break}return r.next=5,_("".concat(t,"/").concat(e,"/").concat(o,".svg"));case 5:n=r.sent,r.next=23;break;case 8:if(!this.alaska){r.next=14;break}return r.next=11,_("".concat(t,"/restricted/AS.svg"));case 11:n=r.sent,r.next=23;break;case 14:if(!this.alaskaTagline){r.next=20;break}return r.next=17,_("".concat(t,"/restricted/AS-tagline.svg"));case 17:n=r.sent,r.next=23;break;case 20:return r.next=22,_("".concat(t,"/icons/").concat(e,"/").concat(o,".svg"));case 22:n=r.sent;case 23:return a=(new DOMParser).parseFromString(n,"text/html"),r.abrupt("return",a.body.querySelector("svg"));case 25:case"end":return r.stop()}}),r,this)}))),function(r,e){return o.apply(this,arguments)})},{key:"firstUpdated",value:(e=u()(s.a.mark((function r(){var e,o;return s.a.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.fetchIcon(this.category,this.name);case 2:(e=r.sent)?this.svg=e:(o=(new DOMParser).parseFromString(S.a.svg,"text/html"),this.svg=o.body.firstChild);case 4:case"end":return r.stop()}}),r,this)}))),function(){return e.apply(this,arguments)})},{key:"render",value:function(){var r={primary:!this.alaska&&!this.alaskaTagline&&!this.customColor,emphasis:this.emphasis,accent:this.accent,disabled:this.disabled,error:this.error,success:this.success,advisory:this.advisory,warning:this.warning,logo:this.alaska||this.alaskaTagline};return Object(O.c)(R(),Object(j.a)(r),this.svg)}}],[{key:"properties",get:function(){return q(q({},b()(x()(n),"properties",this)),{},{category:{type:String,reflect:!0},alaska:{type:Boolean,reflect:!0},alaskaTagline:{type:Boolean,reflect:!0},name:{type:String,reflect:!0},primary:{type:Boolean,reflect:!0},emphasis:{type:Boolean,reflect:!0},accent:{type:Boolean,reflect:!0},disabled:{type:Boolean,reflect:!0},error:{type:Boolean,reflect:!0},success:{type:Boolean,reflect:!0},advisory:{type:Boolean,reflect:!0},warning:{type:Boolean,reflect:!0},onDark:{type:Boolean,reflect:!0},svg:{attribute:!1},customColor:{type:Boolean}})}},{key:"styles",get:function(){return Object(O.b)(M(),C)}}]),n}(P.a);customElements.get("auro-icon")||customElements.define("auro-icon",E)}});

@@ -11,2 +11,3 @@ /* eslint-disable one-var */

import penguin from '@alaskaairux/icons/dist/icons/interface/penguin_es6.js';
import cacheFetch from './cacheFetch';

@@ -116,16 +117,14 @@ // Import touch detection lib

const uri = 'https://unpkg.com/@alaskaairux/icons@latest/dist';
let icon = '';
let iconHTML = '';
if (category === 'logos') {
icon = await fetch(`${uri}/${category}/${name}.svg`);
iconHTML = await cacheFetch(`${uri}/${category}/${name}.svg`);
} else if (this.alaska) {
icon = await fetch(`${uri}/restricted/AS.svg`);
iconHTML = await cacheFetch(`${uri}/restricted/AS.svg`);
} else if (this.alaskaTagline) {
icon = await fetch(`${uri}/restricted/AS-tagline.svg`);
iconHTML = await cacheFetch(`${uri}/restricted/AS-tagline.svg`);
} else {
icon = await fetch(`${uri}/icons/${category}/${name}.svg`);
iconHTML = await cacheFetch(`${uri}/icons/${category}/${name}.svg`);
}
const iconHTML = await icon.text();
const dom = new DOMParser().parseFromString(iconHTML, 'text/html');

@@ -132,0 +131,0 @@

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

"name": "@alaskaairux/auro-icon",
"version": "2.0.2",
"version": "2.0.3",
"description": "Auro custom auro-icon element",

@@ -14,0 +14,0 @@ "author": "Product design and research",

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