New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@tradeshift/elements

Package Overview
Dependencies
Maintainers
3
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tradeshift/elements - npm Package Compare versions

Comparing version 0.27.6 to 0.28.0

4

CHANGELOG.md

@@ -5,2 +5,6 @@ # Change Log

# [0.28.0](https://github.com/Tradeshift/elements/compare/v0.27.6...v0.28.0) (2021-09-10)
**Note:** Version bump only for package @tradeshift/elements
## [0.27.6](https://github.com/Tradeshift/elements/compare/v0.27.5...v0.27.6) (2021-08-10)

@@ -7,0 +11,0 @@

2

lib/core.esm.js

@@ -93,2 +93,2 @@ function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function e(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function n(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,i(t,e)}function r(t){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function s(t,e,n){return(s=o()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,o)}function o(){return s(t,arguments,r(this).constructor)}return o.prototype=Object.create(t.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),i(o,t)})(t)}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function l(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}

*/
var rt=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),ot=function(){function t(t,e){if(e!==it)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},e(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(rt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),st=function(t){return new ot(String(t),it)},at=function(t){if(t instanceof ot)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")},ut=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+at(n)+t[r+1]}),t[0]);return new ot(i,it)};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var lt={},ct=function(t){function e(){return t.apply(this,arguments)||this}n(e,t),e.getStyles=function(){return this.styles},e._getUniqueStyles=function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var t=this.getStyles();if(Array.isArray(t)){var e=function(t,n){return t.reduceRight((function(t,n){return Array.isArray(n)?e(n,t):(t.add(n),t)}),n)},n=e(t,new Set),r=[];n.forEach((function(t){return r.unshift(t)})),this._styles=r}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((function(t){if(t instanceof CSSStyleSheet&&!rt){var e=Array.prototype.slice.call(t.cssRules).reduce((function(t,e){return t+e.cssText}),"");return st(e)}return t}))}};var r=e.prototype;return r.initialize=function(){t.prototype.initialize.call(this),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},r.createRenderRoot=function(){return this.attachShadow(this.constructor.shadowRootOptions)},r.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?rt?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},r.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},r.update=function(e){var n=this,r=this.render();t.prototype.update.call(this,e),r!==lt&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},r.render=function(){return lt},e}(nt);ct.finalized=!0,ct.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=q.has(e),o=G&&11===e.nodeType&&!!e.host,s=o&&!X.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=q.get(e);void 0===r&&(p(e,e.firstChild),q.set(e,r=new L(Object.assign({templateFactory:F},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:J(r)},n)),s){var u=q.get(a);q.delete(a);var l=u.value instanceof A?u.value.template:void 0;Q(r,a,l),p(e,e.firstChild),e.appendChild(a),q.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)},ct.shadowRootOptions={mode:"open"};var pt={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ht={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},dt={ESCAPE:27},ft=function(t){return t.key===ht.ESCAPE||t.keyCode===dt.ESCAPE},vt=Object.freeze({__proto__:null,messages:pt,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ht,keyboardEventKeyCodes:dt}),yt=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(undefined,i)}),e)}},isEscapeKeyEvent:ft}),mt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&ft(t)&&this.parentElement.close()},t}();function _t(t,e){window.customElements.get(t)||window.customElements.define(t,e)}var gt=function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),vt.delay.FAST):this.dispatchEvent(i)},e(r,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[st(":focus{outline:none}:host{margin:0;padding:0;font-size:14px;font-size:var(--ts-font-size-default)}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),r}(ct);function St(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}}export{mt as CloseOnEscBehavior,gt as TSElement,vt as constants,ut as css,_t as customElementDefineHelper,yt as helpers,K as html,st as unsafeCSS,St as validateSlottedNodes};
var rt=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,it=Symbol(),ot=function(){function t(t,e){if(e!==it)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},e(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(rt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),st=function(t){return new ot(String(t),it)},at=function(t){if(t instanceof ot)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")},ut=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+at(n)+t[r+1]}),t[0]);return new ot(i,it)};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var lt={},ct=function(t){function e(){return t.apply(this,arguments)||this}n(e,t),e.getStyles=function(){return this.styles},e._getUniqueStyles=function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var t=this.getStyles();if(Array.isArray(t)){var e=function(t,n){return t.reduceRight((function(t,n){return Array.isArray(n)?e(n,t):(t.add(n),t)}),n)},n=e(t,new Set),r=[];n.forEach((function(t){return r.unshift(t)})),this._styles=r}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((function(t){if(t instanceof CSSStyleSheet&&!rt){var e=Array.prototype.slice.call(t.cssRules).reduce((function(t,e){return t+e.cssText}),"");return st(e)}return t}))}};var r=e.prototype;return r.initialize=function(){t.prototype.initialize.call(this),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},r.createRenderRoot=function(){return this.attachShadow(this.constructor.shadowRootOptions)},r.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?rt?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},r.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},r.update=function(e){var n=this,r=this.render();t.prototype.update.call(this,e),r!==lt&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},r.render=function(){return lt},e}(nt);ct.finalized=!0,ct.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=q.has(e),o=G&&11===e.nodeType&&!!e.host,s=o&&!X.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=q.get(e);void 0===r&&(p(e,e.firstChild),q.set(e,r=new L(Object.assign({templateFactory:F},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:J(r)},n)),s){var u=q.get(a);q.delete(a);var l=u.value instanceof A?u.value.template:void 0;Q(r,a,l),p(e,e.firstChild),e.appendChild(a),q.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)},ct.shadowRootOptions={mode:"open"};var pt={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ht={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},dt={ESCAPE:27},ft=function(t){return t.key===ht.ESCAPE||t.keyCode===dt.ESCAPE},vt=Object.freeze({__proto__:null,messages:pt,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ht,keyboardEventKeyCodes:dt}),yt=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(undefined,i)}),e)}},isEscapeKeyEvent:ft}),mt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&ft(t)&&this.parentElement.close()},t}();function _t(t,e){window.customElements.get(t)||window.customElements.define(t,e)}var gt=function(t){function r(){return t.apply(this,arguments)||this}return n(r,t),r.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),vt.delay.FAST):this.dispatchEvent(i)},e(r,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[st(":focus{outline:none}:host{font-size:14px;font-size:var(--ts-font-size-default);margin:0;padding:0}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),r}(ct);function St(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}}export{mt as CloseOnEscBehavior,gt as TSElement,vt as constants,ut as css,_t as customElementDefineHelper,yt as helpers,K as html,st as unsafeCSS,St as validateSlottedNodes};

@@ -93,2 +93,2 @@ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ts=t.ts||{},t.ts.elements=t.ts.elements||{}))}(this,(function(t){"use strict";function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function n(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function a(t,e,n){return(a=s()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return a(t,arguments,i(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,t)})(t)}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return(n=n.call(t)).next.bind(n);if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return l(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}

*/
var ot=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),at=function(){function t(t,e){if(e!==st)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},n(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(ot?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),ut=function(t){return new at(String(t),st)},lt=function(t){if(t instanceof at)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var ct={},pt=function(t){function e(){return t.apply(this,arguments)||this}r(e,t),e.getStyles=function(){return this.styles},e._getUniqueStyles=function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var t=this.getStyles();if(Array.isArray(t)){var e=function(t,n){return t.reduceRight((function(t,n){return Array.isArray(n)?e(n,t):(t.add(n),t)}),n)},n=e(t,new Set),r=[];n.forEach((function(t){return r.unshift(t)})),this._styles=r}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((function(t){if(t instanceof CSSStyleSheet&&!ot){var e=Array.prototype.slice.call(t.cssRules).reduce((function(t,e){return t+e.cssText}),"");return ut(e)}return t}))}};var n=e.prototype;return n.initialize=function(){t.prototype.initialize.call(this),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},n.createRenderRoot=function(){return this.attachShadow(this.constructor.shadowRootOptions)},n.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?ot?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},n.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},n.update=function(e){var n=this,r=this.render();t.prototype.update.call(this,e),r!==ct&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},n.render=function(){return ct},e}(it);pt.finalized=!0,pt.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=K.has(e),o=$&&11===e.nodeType&&!!e.host,s=o&&!Q.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=K.get(e);void 0===r&&(d(e,e.firstChild),K.set(e,r=new j(Object.assign({templateFactory:q},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:Y(r)},n)),s){var u=K.get(a);K.delete(a);var l=u.value instanceof T?u.value.template:void 0;Z(r,a,l),d(e,e.firstChild),e.appendChild(a),K.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)},pt.shadowRootOptions={mode:"open"};var dt={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ht={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},ft={ESCAPE:27},vt=void 0,yt=function(t){return t.key===ht.ESCAPE||t.keyCode===ft.ESCAPE},mt=Object.freeze({__proto__:null,messages:dt,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ht,keyboardEventKeyCodes:ft}),_t=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(vt,i)}),e)}},isEscapeKeyEvent:yt}),gt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&yt(t)&&this.parentElement.close()},t}();var St=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),mt.delay.FAST):this.dispatchEvent(i)},n(e,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[ut(":focus{outline:none}:host{margin:0;padding:0;font-size:14px;font-size:var(--ts-font-size-default)}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),e}(pt);t.CloseOnEscBehavior=gt,t.TSElement=St,t.constants=mt,t.css=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+lt(n)+t[r+1]}),t[0]);return new at(i,st)},t.customElementDefineHelper=function(t,e){window.customElements.get(t)||window.customElements.define(t,e)},t.helpers=_t,t.html=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new k(t,n,"html",G)},t.unsafeCSS=ut,t.validateSlottedNodes=function(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}},Object.defineProperty(t,"__esModule",{value:!0})}));
var ot=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,st=Symbol(),at=function(){function t(t,e){if(e!==st)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}return t.prototype.toString=function(){return this.cssText},n(t,[{key:"styleSheet",get:function(){return void 0===this._styleSheet&&(ot?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}}]),t}(),ut=function(t){return new at(String(t),st)},lt=function(t){if(t instanceof at)return t.cssText;if("number"==typeof t)return t;throw new Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.")};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var ct={},pt=function(t){function e(){return t.apply(this,arguments)||this}r(e,t),e.getStyles=function(){return this.styles},e._getUniqueStyles=function(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_styles",this))){var t=this.getStyles();if(Array.isArray(t)){var e=function(t,n){return t.reduceRight((function(t,n){return Array.isArray(n)?e(n,t):(t.add(n),t)}),n)},n=e(t,new Set),r=[];n.forEach((function(t){return r.unshift(t)})),this._styles=r}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((function(t){if(t instanceof CSSStyleSheet&&!ot){var e=Array.prototype.slice.call(t.cssRules).reduce((function(t,e){return t+e.cssText}),"");return ut(e)}return t}))}};var n=e.prototype;return n.initialize=function(){t.prototype.initialize.call(this),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()},n.createRenderRoot=function(){return this.attachShadow(this.constructor.shadowRootOptions)},n.adoptStyles=function(){var t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?ot?this.renderRoot.adoptedStyleSheets=t.map((function(t){return t instanceof CSSStyleSheet?t:t.styleSheet})):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((function(t){return t.cssText})),this.localName))},n.connectedCallback=function(){t.prototype.connectedCallback.call(this),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)},n.update=function(e){var n=this,r=this.render();t.prototype.update.call(this,e),r!==ct&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((function(t){var e=document.createElement("style");e.textContent=t.cssText,n.renderRoot.appendChild(e)})))},n.render=function(){return ct},e}(it);pt.finalized=!0,pt.render=function(t,e,n){if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");var r=n.scopeName,i=K.has(e),o=$&&11===e.nodeType&&!!e.host,s=o&&!Q.has(r),a=s?document.createDocumentFragment():e;if(function(t,e,n){var r=K.get(e);void 0===r&&(d(e,e.firstChild),K.set(e,r=new j(Object.assign({templateFactory:q},n))),r.appendInto(e)),r.setValue(t),r.commit()}(t,a,Object.assign({templateFactory:Y(r)},n)),s){var u=K.get(a);K.delete(a);var l=u.value instanceof T?u.value.template:void 0;Z(r,a,l),d(e,e.firstChild),e.appendChild(a),K.set(e,u)}!i&&o&&window.ShadyCSS.styleElement(e.host)},pt.shadowRootOptions={mode:"open"};var dt={GENERAL:{DELETE:"Delete",REMOVE:"Remove",DOWNLOAD:"Download",UPLOAD:"upload",SELECT:"Select"}},ht={ESCAPE:"Escape",ARROW_RIGHT:"ArrowRight",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown"},ft={ESCAPE:27},vt=void 0,yt=function(t){return t.key===ht.ESCAPE||t.keyCode===ft.ESCAPE},mt=Object.freeze({__proto__:null,messages:dt,sizes:{FULL:"full",MEDIUM:"medium",SMALL:"small"},colorModifiers:{LIGHTEST:"-lightest",LIGHTER:"-lighter",LIGHT:"-light",DARK:"-dark",DARKER:"-darker"},colors:{WHITE:"white",BLACK:"black",RED:"red",ORANGE:"orange",YELLOW:"yellow",GREEN:"green",BLUE:"blue",PURPLE:"purple",PINK:"pink",GRAY:"gray",SLATE:"slate"},delay:{NOW:100,FAST:200,SLOW:600},keyboardEventKeys:ht,keyboardEventKeyCodes:ft}),_t=Object.freeze({__proto__:null,classNamesToSelector:function(t){var e={};return Object.keys(t).forEach((function(n){e[n]="."+t[n]})),e},objectKeysChangeCase:function(t,e){return void 0===e&&(e="toLowerCase"),Object.keys(t).reduce((function(n,r){return n[r[e]()]=t[r],n}),{})},debounceEvent:function(t,e){var n;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];clearTimeout(n),n=setTimeout((function(){return t.apply(vt,i)}),e)}},isEscapeKeyEvent:yt}),gt=function(){function t(t){this.parentElement=t,this.onKeyDown=this.onKeyDown.bind(this)}var e=t.prototype;return e.start=function(){document.addEventListener("keydown",this.onKeyDown)},e.stop=function(){document.removeEventListener("keydown",this.onKeyDown)},e.onKeyDown=function(t){this.parentElement.visible&&!this.parentElement.noCloseOnEscKey&&!t.isComposing&&yt(t)&&this.parentElement.close()},t}();var St=function(t){function e(){return t.apply(this,arguments)||this}return r(e,t),e.prototype.dispatchCustomEvent=function(t,e,n){var r=this;void 0===e&&(e={}),void 0===n&&(n=!1);var i=new CustomEvent(t,{detail:e,bubbles:!0,composed:!0});n?setTimeout((function(){r.dispatchEvent(i)}),mt.delay.FAST):this.dispatchEvent(i)},n(e,[{key:"bodyHasRTL",get:function(){return"rtl"===document.body.getAttribute("dir")}},{key:"bodyDir",get:function(){return document.body.getAttribute("dir")||"ltr"}}],[{key:"styles",get:function(){return[ut(":focus{outline:none}:host{font-size:14px;font-size:var(--ts-font-size-default);margin:0;padding:0}:host,:host *{box-sizing:border-box;font-family:Open Sans,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;font-family:var(--ts-font-family)}")]}}]),e}(pt);t.CloseOnEscBehavior=gt,t.TSElement=St,t.constants=mt,t.css=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];var i=n.reduce((function(e,n,r){return e+lt(n)+t[r+1]}),t[0]);return new at(i,st)},t.customElementDefineHelper=function(t,e){window.customElements.get(t)||window.customElements.define(t,e)},t.helpers=_t,t.html=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return new k(t,n,"html",G)},t.unsafeCSS=ut,t.validateSlottedNodes=function(t,e,n){var r=n.map((function(t){return t.toLowerCase()}));if(e.filter((function(t){if(t.nodeType!==Node.TEXT_NODE)return-1===r.indexOf(t.tagName.toLowerCase())})).length>0){var i=n.map((function(t){return t.toLowerCase()})).join();throw new Error("You can only use "+i+" in "+t.toLowerCase()+" component!")}},Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@tradeshift/elements",
"version": "0.27.6",
"version": "0.28.0",
"repository": {

@@ -20,3 +20,3 @@ "type": "git",

"src": "src/core.js",
"gitHead": "ff4923309b40e373d6a3b0d6dc06a393441e12c2"
"gitHead": "636e5d745d01dbc469541bd8d5bc3bf4434d177f"
}
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