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

@tradeshift/elements.dialog

Package Overview
Dependencies
Maintainers
9
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tradeshift/elements.dialog - npm Package Compare versions

Comparing version 0.39.0 to 0.40.0

2

lib/dialog.umd.js

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tradeshift/elements")):"function"==typeof define&&define.amd?define(["exports","@tradeshift/elements"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ts=t.ts||{},t.ts.elements=t.ts.elements||{},t.ts.elements.dialog=t.ts.elements.dialog||{}),t.ts.elements)}(this,(function(t,e){"use strict";function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function r(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},i.apply(this,arguments)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t,e){return e||(e=t.slice(0)),t.raw=e,t}var c,l={ICON_WRAPPER:"icon-wrapper",CIRCULAR_BG:"circular-background"};i({},e.helpers.classNamesToSelector(l));var u,d,p=e.constants.colors,h=e.constants.colorModifiers,f={DEFAULT:"default",INVERTED:"inverted",PRIMARY:"primary",DANGER:"danger",ERROR:"error",SUCCESS:"success",ACTIVE:"active",INFO:"info",FOCUS:"focus",WARNING:"warning",DISABLED:"disabled",DISABLED_CHECKED:"disabled-checked",SUGGESTED:"suggested",SLATE_LIGHTEST:"slate-lightest",GRAY_DARKER:"gray-darker",ACTION:"action"},b=((c={})[f.DEFAULT]=p.SLATE,c[f.INVERTED]=p.WHITE,c[f.DANGER]=p.RED,c[f.ERROR]=p.RED,c[f.SUCCESS]=p.GREEN,c[f.PRIMARY]=p.BLUE,c[f.ACTIVE]=p.BLUE,c[f.INFO]=p.BLUE,c[f.FOCUS]=p.BLUE,c[f.WARNING]=p.ORANGE,c[f.DISABLED]=p.GRAY+h.LIGHTER,c[f.SUGGESTED]=p.PURPLE,c[f.DISABLED_CHECKED]=p.GRAY+h.LIGHT,c[f.SLATE_LIGHTEST]=p.SLATE+h.LIGHTEST,c[f.GRAY_DARKER]=p.GRAY+h.DARKER,c[f.ACTION]=p.GRAY,c),g="medium",v=function(t){var o,n;function i(){var e;return(e=t.call(this)||this).size=g,e.iconCache=new Map,e.svgContent="",e}n=t,(o=i).prototype=Object.create(n.prototype),o.prototype.constructor=o,s(o,n);var c,p,h=i.prototype;return h.attributeChangedCallback=function(e,o,n){var r=this;switch(t.prototype.attributeChangedCallback.call(this,e,o,n),e){case"icon":!this.src&&n&&window.customElements.whenDefined("ts-icon").then((function(){r.getIcon()}));break;case"src":n&&window.customElements.whenDefined("ts-icon").then((function(){r.getSrc()}))}},h.getIcon=function(){return new Promise(function(t,e){var o,n,r;if(this.icon.indexOf("<svg")>-1&&this.icon.indexOf("</svg>")>-1)return this.svgContent=this.parseSvg(this.icon),t();if(!this.iconCache.has(this.icon)){var i=function(){try{return a.call(this)}catch(t){return e(t)}}.bind(this),s=function(o){try{return console.error(o),this.svgContent="",t()}catch(t){return e(t)}}.bind(this);try{return Promise.resolve(import("@tradeshift/elements.icon/lib/assets/icons/"+this.icon+".svg")).then(function(e){try{return o=e.default,Promise.resolve(fetch(o)).then(function(e){try{return(n=e).ok?Promise.resolve(this.extractSvgContent(n)).then(function(t){try{return r=t,this.iconCache.set(this.icon,r),i()}catch(t){return s(t)}}.bind(this),s):(this.svgContent="",t())}catch(t){return s(t)}}.bind(this),s)}catch(t){return s(t)}}.bind(this),s)}catch(t){s(t)}}function a(){return this.svgContent=this.iconCache.get(this.icon),t()}return a.call(this)}.bind(this))},h.getSrc=function(){return new Promise(function(t,e){var o,n;if(!this.iconCache.has(this.src)){var r=function(){try{return s.call(this)}catch(t){return e(t)}}.bind(this),i=function(o){try{return console.error(o),this.svgContent="",t()}catch(t){return e(t)}}.bind(this);try{return Promise.resolve(fetch(this.src)).then(function(e){try{return(o=e).ok?Promise.resolve(this.extractSvgContent(o)).then(function(t){try{return n=t,this.iconCache.set(this.src,n),r()}catch(t){return i(t)}}.bind(this),i):(this.svgContent="",t())}catch(t){return i(t)}}.bind(this),i)}catch(t){i(t)}}function s(){return this.svgContent=this.iconCache.get(this.src),t()}return s.call(this)}.bind(this))},h.parseSvg=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").firstChild},h.extractSvgContent=function(t){return new Promise(function(e,o){var n;return Promise.resolve(t.text()).then(function(t){try{return n=t,e(this.parseSvg(n))}catch(t){return o(t)}}.bind(this),o)}.bind(this))},h.render=function(){return e.html(u||(u=a(['<span class="','">',"</span>"])),l.ICON_WRAPPER,this.svgContent)},c=i,p=[{key:"styles",get:function(){var t=Object.keys(f).map((function(t){var o=f[t],n=b[o];return e.css(d||(d=a(["\n\t\t\t\t:host([type='","']) {\n\t\t\t\t\t--ts-icon-color: var(--ts-color-",");\n\t\t\t\t}\n\t\t\t"])),e.unsafeCSS(o),e.unsafeCSS(n))}));return[e.TSElement.styles,e.unsafeCSS(':host{display:inline-block}:host svg{color:var(--ts-icon-color)}.fill-none{fill:none}:host([size=small]) .icon-wrapper{height:12px;height:var(--ts-fontsize-mini);width:12px;width:var(--ts-fontsize-mini)}:host([size=medium]) .icon-wrapper{height:16px;height:var(--ts-fontsize-medium);width:16px;width:var(--ts-fontsize-medium)}:host([size=large]) .icon-wrapper{height:24px;height:var(--ts-fontsize-xbig);width:24px;width:var(--ts-fontsize-xbig)}:host([size=extra-large]) .icon-wrapper{height:60px;height:var(--ts-unit-triple);width:60px;width:var(--ts-unit-triple)}:host([rotate="90"]) .icon-wrapper{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host([rotate="180"]) .icon-wrapper{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host([rotate="270"]) .icon-wrapper{-webkit-transform:rotate(270deg);transform:rotate(270deg)}:host([flip=h]) .icon-wrapper,:host([flip=horizontal]) .icon-wrapper{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host([flip=v]) .icon-wrapper,:host([flip=vertical]) .icon-wrapper{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.icon-wrapper{display:block;height:0;padding-top:100%;position:relative;width:100%}svg{height:100%;left:0;position:absolute;top:0;width:100%}:host([type=default]) svg{color:#1f2a2e;color:var(--ts-color-slate)}:host([type=inverted]) svg{color:#fff;color:var(--ts-color-white)}:host([type=primary]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=danger]) svg{color:#bd0000;color:var(--ts-color-red)}:host([type=error]) svg{color:#bd0000;color:var(--ts-color-red)}:host([type=success]) svg{color:#50c610;color:var(--ts-color-green)}:host([type=active]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=info]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=focus]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=warning]) svg{color:#ff8c00;color:var(--ts-color-orange)}:host([type=disabled]) svg{color:#e6ecef;color:var(--ts-color-gray-lighter)}:host([type=disabled-checked]) svg{color:#cbd7dc;color:var(--ts-color-gray-light)}:host([type=suggested]) svg{color:#90129b;color:var(--ts-color-purple)}:host([type=slate-lightest]) svg{color:#506b77;color:var(--ts-color-slate-lightest)}:host([type=gray-darker]) svg{color:#648796;color:var(--ts-color-gray-darker)}:host([type=action]) svg{color:#9ab2bc;color:var(--ts-color-gray)}:host([circular]){background-color:var(--ts-icon-color);border-radius:50%}:host([circular]) svg{color:#fff;color:var(--ts-color-white)}')].concat(t)}},{key:"properties",get:function(){return{icon:{type:String,reflect:!0},src:{type:String,reflect:!0},size:{type:String,reflect:!0},type:{type:String,reflect:!0},circular:{type:Boolean,reflect:!0},rotate:{type:Number,reflect:!0},flip:{type:String,reflect:!0},svgContent:{type:String,attribute:!1}}}}],null&&r(c.prototype,null),p&&r(c,p),Object.defineProperty(c,"prototype",{writable:!1}),i}(e.TSElement);function y(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function x(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-icon",v);var w,k,S={PRIMARY:"primary",SECONDARY:"secondary",TEXT:"text",ACCEPT:"accept",WARNING:"warning",DANGER:"danger"},C=function(t){var o,n;function r(){var e;return(e=t.call(this)||this).grouped=!1,e}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,m(o,n);var i,s,a,c=r.prototype;return c.updated=function(t){var e=this;t.forEach((function(t,o){"focused"===o&&(t||window.customElements.whenDefined("ts-button").then((function(){return e.shadowRoot.getElementById("button").focus()})))}))},c.clickHandler=function(t){this.disabled||this.busy||this.dispatchCustomEvent("button-click",t)},c.getIcon=function(){return this.icon||this.iconSrc?e.html(w||(w=x(['<ts-icon .icon="','" .src="','" size="large" type="','"></ts-icon>'])),this.icon,this.iconSrc,this.iconType):""},c.render=function(){return e.html(k||(k=x(['\n\t\t\t<button id="button" ?disabled="','" dir="','" @click="','">\n\t\t\t\t',"\n\t\t\t\t<span>\n\t\t\t\t\t\x3c!-- Text of the button should be wrapped around `ts-button` element --\x3e\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t"],['\n\t\t\t<button id="button" ?disabled="','" dir="','" @click="','">\n\t\t\t\t',"\n\t\t\t\t<span>\n\t\t\t\t\t\x3c!-- Text of the button should be wrapped around \\`ts-button\\` element --\x3e\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t"])),this.disabled,this.direction,this.clickHandler,this.getIcon())},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host{--ts-box-shadow-color:transparent;display:inline-block;font-size:14px;font-size:var(--ts-font-size-default);line-height:20px;line-height:var(--ts-unit)}:host>button{border:none;border-radius:40px;border-radius:var(--ts-unit-double);box-shadow:inset 0 0 0 2px var(--ts-box-shadow-color);box-shadow:var(--ts-boxshadow-focus-border) var(--ts-box-shadow-color);font-size:14px;font-size:var(--ts-font-size-default);min-width:40px;min-width:var(--ts-unit-double);padding:0;position:relative}:host span{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;font-weight:600;font-weight:var(--ts-fontweight-semibold);line-height:20px;line-height:var(--ts-unit);padding:10px 20px;padding:var(--ts-unit-half) var(--ts-unit);text-transform:uppercase;white-space:nowrap}:host(:not([busy]))>button:hover{background:#e6ecef;background:var(--ts-color-gray-lighter);cursor:pointer}:host(:not([type]))>button,:host([type=secondary])>button{background:#fff;background:var(--ts-color-white);box-shadow:inset 0 0 0 1px #cbd7dc;box-shadow:var(--ts-boxshadow-border-default)}:host(:not([type]))>button:focus,:host([type=secondary])>button:focus{box-shadow:inset 0 0 0 2px #00aeff;box-shadow:var(--ts-boxshadow-focus-border) var(--ts-color-blue)}:host(.no-border)>button{background:transparent;box-shadow:none}:host(.no-border)>button:focus{box-shadow:none}:host([type=primary])>button{background:#00aeff;background:var(--ts-color-blue);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=primary])>button:hover{background:#0085cc;background:var(--ts-color-blue-dark)}:host(:not([busy])[type=primary])>button:focus{--ts-box-shadow-color:var(--ts-color-blue-darker)}:host([type=accept])>button{background:#50c610;background:var(--ts-color-green);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=accept])>button:hover{background:#399d0b;background:var(--ts-color-green-dark)}:host(:not([busy])[type=accept])>button:focus{--ts-box-shadow-color:var(--ts-color-green-darker)}:host([type=warning])>button{background:#ff8c00;background:var(--ts-color-orange);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=warning])>button:hover{background:#f07c00;background:var(--ts-color-orange-dark)}:host(:not([busy])[type=warning])>button:focus{--ts-box-shadow-color:var(--ts-color-orange-darker)}:host([type=danger])>button{background:#bd0000;background:var(--ts-color-red);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=danger])>button:hover{background:#900;background:var(--ts-color-red-dark)}:host(:not([busy])[type=danger])>button:focus{--ts-box-shadow-color:var(--ts-color-red-darker)}:host([type=text])>button{align-items:center;background:transparent;border-radius:3px;border-radius:var(--ts-radius);display:flex}:host([type=text]) span{color:#00aeff;color:var(--ts-color-blue);font-weight:400;font-weight:var(--ts-fontweight);letter-spacing:normal;padding:0 5px;padding:0 var(--ts-unit-quarter);text-transform:none}:host(:not([busy])[type=text])>button:hover{background:transparent}:host(:not([busy])[type=text])>button:hover span{color:#0085cc;color:var(--ts-color-blue-dark)}:host(:not([busy])[type=text])>button:focus{background:#00aeff;background:var(--ts-color-blue)}:host(:not([busy])[type=text])>button:focus span{color:#fff;color:var(--ts-color-white)}[dir=ltr] :host([type=text][icon-src])>button,[dir=ltr] :host([type=text][icon])>button{padding-left:var(--ts-unit-half)}:host([type=text][icon-src])>button:dir(ltr),:host([type=text][icon])>button:dir(ltr){padding-left:var(--ts-unit-half)}[dir=rtl] :host([type=text][icon-src])>button,[dir=rtl] :host([type=text][icon])>button{padding-right:var(--ts-unit-half)}:host([type=text][icon-src])>button:dir(rtl),:host([type=text][icon])>button:dir(rtl){padding-right:var(--ts-unit-half)}[dir=ltr] :host([type=text][icon-src])>button,[dir=ltr] :host([type=text][icon])>button{padding-left:10px}:host([type=text][icon-src])>button:dir(ltr),:host([type=text][icon])>button:dir(ltr){padding-left:10px}[dir=rtl] :host([type=text][icon-src])>button,[dir=rtl] :host([type=text][icon])>button{padding-right:10px}:host([type=text][icon-src])>button:dir(rtl),:host([type=text][icon])>button:dir(rtl){padding-right:10px}:host([type=text][icon-src])>button,:host([type=text][icon])>button{-webkit-padding-start:10px;-webkit-padding-start:var(--ts-unit-half);padding-inline-start:10px;padding-inline-start:var(--ts-unit-half)}:host([type=text][icon-src])>button span,:host([type=text][icon])>button span{color:var(--ts-color-blue-darkest);padding:10px;padding:var(--ts-unit-half)}:host(:not([busy])[type=text][icon-src])>button:hover,:host(:not([busy])[type=text][icon])>button:hover{background:#eff3f5;background:var(--ts-color-gray-lightest)}:host(:not([busy])[type=text][icon-src])>button:hover span,:host(:not([busy])[type=text][icon])>button:hover span{color:var(--ts-color-blue-darkest)}:host(:not([busy])[type=text][icon-src])>button:focus,:host(:not([busy])[type=text][icon])>button:focus{--ts-box-shadow-color:var(--ts-color-gray);background:#eff3f5;background:var(--ts-color-gray-lightest)}:host(:not([busy])[type=text][icon-src])>button:focus span,:host(:not([busy])[type=text][icon])>button:focus span{color:var(--ts-color-blue-darkest)}:host(:not([type=text])[size=micro])>button{border-radius:20px;border-radius:var(--ts-unit);font-size:11px;font-size:var(--ts-fontsize-small);padding:0 10px;padding:0 var(--ts-unit-half)}:host(:not([type=text])[size=micro]) span{font-size:11px;font-size:var(--ts-fontsize-small);padding:0 2.5px;padding:0 var(--ts-unit-eighth)}:host([full-width]),:host([grouped]){display:block;text-align:center}:host([full-width])>button,:host([grouped])>button{display:block;width:100%}:host([grouped]){margin-bottom:10px;margin-bottom:var(--ts-unit-half)}:host([inline]){display:inline-block}:host([inline])>button{display:inline;width:auto}:host([grouped][type=text])>button{display:flex;justify-content:center}:host(:not([type=text])[icon-src])>button,:host(:not([type=text])[icon])>button{height:40px;height:var(--ts-unit-double);width:40px;width:var(--ts-unit-double)}:host(:not([type=text])[icon-src]) ts-icon,:host(:not([type=text])[icon]) ts-icon{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}:host(:not([type=text])[icon-src]) span,:host(:not([type=text])[icon]) span{visibility:hidden}:host([disabled]){cursor:not-allowed}:host([disabled])>button{background-color:#e6ecef;background-color:var(--ts-disabled-background-color);box-shadow:none;pointer-events:none}:host([disabled]) span{color:#829fab;color:var(--ts-disabled-color)}:host([disabled][type=text])>button{background-color:transparent}:host([busy])>:first-child{-webkit-animation:move 1s linear infinite;animation:move 1s linear infinite;background-image:linear-gradient(-45deg,#cbd7dc 25%,#eff3f5 0,#eff3f5 50%,#cbd7dc 0,#cbd7dc 75%,#eff3f5 0,#eff3f5);background-image:linear-gradient(-45deg,var(--ts-color-gray-light) 25%,var(--ts-color-gray-lightest) 25%,var(--ts-color-gray-lightest) 50%,var(--ts-color-gray-light) 50%,var(--ts-color-gray-light) 75%,var(--ts-color-gray-lightest) 75%,var(--ts-color-gray-lightest));background-size:40px 40px;background-size:var(--ts-unit-double) var(--ts-unit-double);box-shadow:none;cursor:default;pointer-events:none}:host([busy])>:first-child>*{visibility:hidden}@-webkit-keyframes move{0%{background-position:0 0}to{background-position:40px 40px;background-position:var(--ts-unit-double) var(--ts-unit-double)}}@keyframes move{0%{background-position:0 0}to{background-position:40px 40px;background-position:var(--ts-unit-double) var(--ts-unit-double)}}")]}},{key:"properties",get:function(){return{type:{type:String,reflect:!0},size:{type:String,reflect:!0},busy:{type:Boolean,reflect:!0},icon:{type:String,reflect:!0},iconSrc:{type:String,reflect:!0,attribute:"icon-src"},disabled:{type:Boolean,reflect:!0},focused:{type:Boolean,reflect:!0},dir:{type:String,reflect:!0},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},grouped:{type:Boolean,reflect:!0},inline:{type:Boolean,reflect:!0}}}}],(s=[{key:"direction",get:function(){return this.dir||this.bodyDir}},{key:"iconType",get:function(){return(this.icon||this.iconSrc)&&this.type===S.TEXT?"action":[S.DANGER,S.WARNING,S.ACCEPT,S.PRIMARY].indexOf(this.type)>-1?"inverted":"default"}}])&&y(i.prototype,s),a&&y(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function E(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}e.customElementDefineHelper("ts-button",C);var T,z=function(t){var o,n;function r(){return t.apply(this,arguments)||this}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,O(o,n);var i,s,a,c=r.prototype;return c.firstUpdated=function(){this.updateButtonsProps()},c.handleSlotChange=function(){this.updateButtonsProps()},c.update=function(e){t.prototype.update.call(this,e),this.updateButtonsProps()},c.updateButtonsProps=function(){var t=this;Array.from(this.querySelectorAll("ts-button")).forEach((function(e){e.grouped=!0,e.inline=t.inline,e.dir=t.dir}))},c.render=function(){return e.html(T||(t=['\n\t\t\t<section dir="','">\n\t\t\t\t\x3c!-- All `ts-button` elements in the group should be wrapped with `ts-button-group` element to be grouped together --\x3e\n\t\t\t\t<slot @slotchange="','"></slot>\n\t\t\t</section>\n\t\t'],(o=['\n\t\t\t<section dir="','">\n\t\t\t\t\x3c!-- All \\`ts-button\\` elements in the group should be wrapped with \\`ts-button-group\\` element to be grouped together --\x3e\n\t\t\t\t<slot @slotchange="','"></slot>\n\t\t\t</section>\n\t\t'])||(o=t.slice(0)),t.raw=o,T=t),this.direction,this.handleSlotChange);var t,o},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host,:host>section{display:block;width:100%}:host([inline]){font-size:0}[dir=ltr] :host([inline]) ::slotted(ts-button){margin-right:var(--ts-unit-half)}:host([inline]) ::slotted(ts-button):dir(ltr){margin-right:var(--ts-unit-half)}[dir=rtl] :host([inline]) ::slotted(ts-button){margin-left:var(--ts-unit-half)}:host([inline]) ::slotted(ts-button):dir(rtl){margin-left:var(--ts-unit-half)}[dir=ltr] :host([inline]) ::slotted(ts-button){margin-right:10px}:host([inline]) ::slotted(ts-button):dir(ltr){margin-right:10px}[dir=rtl] :host([inline]) ::slotted(ts-button){margin-left:10px}:host([inline]) ::slotted(ts-button):dir(rtl){margin-left:10px}:host([inline]) ::slotted(ts-button){-webkit-margin-end:10px;-webkit-margin-end:var(--ts-unit-half);margin-inline-end:10px;margin-inline-end:var(--ts-unit-half)}")]}},{key:"properties",get:function(){return{dir:{type:String,reflect:!0},inline:{type:Boolean,reflect:!0}}}}],(s=[{key:"direction",get:function(){return this.dir||this.bodyDir}}])&&E(i.prototype,s),a&&E(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function P(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}e.customElementDefineHelper("ts-button-group",z);var j,B=function(t){var o,n,r,i;function s(){var e;return(e=t.call(this)||this).visible=!1,e}return n=t,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,_(o,n),s.prototype.render=function(){return e.html(j||(t=[' <div class="cover ','"></div> '],o||(o=t.slice(0)),t.raw=o,j=t),this.visible?"ts-fadeIn":"ts-fadeOut");var t,o},r=s,i=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(".cover{background-color:#0f151a;background-color:var(--ts-color-black);bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;visibility:hidden;z-index:10000;z-index:var(--ts-zindex-max)}.ts-fadeIn{opacity:.8;transition:visibility .1s linear .1s,opacity .2s;transition:visibility var(--ts-transition-now) linear var(--ts-transition-now),opacity var(--ts-transition-fast);visibility:visible}.ts-fadeOut{opacity:0;transition:visibility .1s linear .2s,opacity .2s;transition:visibility var(--ts-transition-now) linear var(--ts-transition-fast),opacity var(--ts-transition-fast);visibility:hidden}:host(.ts-aside-cover)>div{pointer-events:auto;z-index:1999;z-index:var(--ts-zindex-aside-cover)}:host(.ts-dialog-cover)>div{pointer-events:auto;z-index:2999;z-index:var(--ts-zindex-dialog-cover)}:host(.ts-spin-cover)>div{pointer-events:auto;z-index:3999;z-index:var(--ts-zindex-spin-cover)}:host(.ts-modal-cover)>div{pointer-events:auto;z-index:1499;z-index:var(--ts-zindex-modal-cover)}")]}},{key:"properties",get:function(){return{visible:{type:Boolean,attribute:"data-visible",reflect:!0}}}}],null&&P(r.prototype,null),i&&P(r,i),Object.defineProperty(r,"prototype",{writable:!1}),s}(e.TSElement);function D(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}e.customElementDefineHelper("ts-cover",B);var R,I=function(t){var o,n,r,i;function s(){return t.apply(this,arguments)||this}return n=t,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,A(o,n),s.prototype.render=function(){return e.html(R||(t=['\n\t\t\t<img .src="','" .alt="','"></img>\n\t\t'],o||(o=t.slice(0)),t.raw=o,R=t),this.src,this.alt);var t,o},r=s,i=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host img{border-radius:3px;border-radius:var(--ts-radius);height:40px;height:var(--ts-unit-double);width:40px;width:var(--ts-unit-double)}:host([size=large]) img{height:60px;height:var(--ts-unit-triple);width:60px;width:var(--ts-unit-triple)}")]}},{key:"properties",get:function(){return{size:{type:String,reflect:!0},src:{type:String,reflect:!0},alt:{type:String,reflect:!0}}}}],null&&D(r.prototype,null),i&&D(r,i),Object.defineProperty(r,"prototype",{writable:!1}),s}(e.TSElement);function N(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function H(t,e){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},H(t,e)}function G(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-app-icon",I);var U,L,M,Y,F=function(t){var o,n;function r(){var e;return(e=t.call(this)||this).color="white",e}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,H(o,n);var i,s,a,c=r.prototype;return c.getIcon=function(){return this.icon?e.html(U||(U=G([' <ts-app-icon class="icon" src="','" alt="','"></ts-app-icon> '])),this.icon,this.title):""},c.openChromeMenu=function(){window.top.postMessage('app-broadcast:{"appIds": "Tradeshift.Chrome", "key": "ts-broadcast-chrome-menu-open"}',"*")},c.getTitle=function(){return this.title?e.html(L||(L=G([' <span class="title">',"</span> "])),this.title):""},c.render=function(){return e.html(M||(M=G(["\n\t\t\t<header dir=",'>\n\t\t\t\t<div class="title-icon-container">'," "," ",'</div>\n\t\t\t\t<div class="slot-container">\n\t\t\t\t\t\x3c!-- Extra items on the opposite side of the header goes here, like button group. \t--\x3e\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</header>\n\t\t'])),this.direction,this.getMenuSwitch,this.getIcon(),this.getTitle())},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host{border-bottom:1px solid #cbd7dc;border-bottom:var(--ts-border);display:flex;height:60px;height:var(--ts-unit-triple);width:100%}:host>header{align-items:center;background-color:#fff;background-color:var(--ts-color-white);display:flex;justify-content:space-between;width:100%}:host .icon{block-size:40px;height:40px;height:var(--ts-unit-double);block-size:var(--ts-unit-double);margin-left:10px;margin-left:var(--ts-unit-half)}:host .title{font-size:18px;font-size:var(--ts-fontsize-big);margin-left:10px;margin-left:var(--ts-unit-half)}.title-icon-container{align-items:center;display:flex}.slot-container{margin:0 10px;margin:0 var(--ts-unit-half)}[dir=rtl] .icon,[dir=rtl] .title{margin-left:0;margin-right:10px;margin-right:var(--ts-unit-half)}:host([color=black])>header{background-color:#0f151a;background-color:var(--ts-color-black)}:host([color=black]) .title{color:#fff;color:var(--ts-color-white)}:host([color=red])>header{background-color:#bd0000;background-color:var(--ts-color-red)}:host([color=red]) .title{color:#fff;color:var(--ts-color-white)}:host([color=orange])>header{background-color:#ff8c00;background-color:var(--ts-color-orange)}:host([color=orange]) .title{color:#fff;color:var(--ts-color-white)}:host([color=yellow])>header{background-color:#fdbe12;background-color:var(--ts-color-yellow)}:host([color=yellow]) .title{color:#fff;color:var(--ts-color-white)}:host([color=green])>header{background-color:#50c610;background-color:var(--ts-color-green)}:host([color=green]) .title{color:#fff;color:var(--ts-color-white)}:host([color=blue])>header{background-color:#00aeff;background-color:var(--ts-color-blue)}:host([color=blue]) .title{color:#fff;color:var(--ts-color-white)}:host([color=purple])>header{background-color:#90129b;background-color:var(--ts-color-purple)}:host([color=purple]) .title{color:#fff;color:var(--ts-color-white)}:host([color=pink])>header{background-color:#a70262;background-color:var(--ts-color-pink)}:host([color=pink]) .title{color:#fff;color:var(--ts-color-white)}:host([color=gray])>header{background-color:#9ab2bc;background-color:var(--ts-color-gray)}:host([color=gray]) .title{color:#fff;color:var(--ts-color-white)}:host([color=slate])>header{background-color:#1f2a2e;background-color:var(--ts-color-slate)}:host([color=slate]) .title{color:#fff;color:var(--ts-color-white)}:host([color=white])>header{background-color:#fff;background-color:var(--ts-color-white)}:host([color=white]) .title{color:#0f151a;color:var(--ts-color-black)}.menu-switch{cursor:pointer;display:none;padding:10px;padding:var(--ts-unit-half)}@media screen and (max-width:600px){.icon{display:none}.menu-switch{display:block}:host .title{margin-left:0;margin-right:0}}")]}},{key:"properties",get:function(){return{dir:{type:String,reflect:!0},icon:{type:String,reflect:!0},title:{type:String,reflect:!0},color:{type:String,reflect:!0}}}}],(s=[{key:"getMenuSwitch",get:function(){return e.html(Y||(Y=G(['\n\t\t\t<ts-icon\n\t\t\t\t@click="','"\n\t\t\t\tclass="menu-switch"\n\t\t\t\ticon="','"\n\t\t\t\tsize="large"\n\t\t\t\ttabindex="0"\n\t\t\t></ts-icon>\n\t\t'])),this.openChromeMenu,'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.355 4a.84.84 0 0 1 .619.25.84.84 0 0 1 .25.618v1.15a.85.85 0 0 1-.25.607.822.822 0 0 1-.619.26H3.868a.833.833 0 0 1-.608-.26.833.833 0 0 1-.26-.607v-1.15c0-.246.087-.452.26-.619A.85.85 0 0 1 3.868 4h16.487Zm0 6.14a.84.84 0 0 1 .619.249.84.84 0 0 1 .25.618v1.15a.85.85 0 0 1-.25.607.822.822 0 0 1-.619.26H3.868a.833.833 0 0 1-.608-.26.833.833 0 0 1-.26-.607v-1.15c0-.246.087-.452.26-.618a.85.85 0 0 1 .608-.25h16.487Zm0 6.16a.84.84 0 0 1 .619.25.84.84 0 0 1 .25.618v1.15a.84.84 0 0 1-.25.618.84.84 0 0 1-.619.25H3.868a.85.85 0 0 1-.608-.25.822.822 0 0 1-.26-.618v-1.15c0-.245.087-.452.26-.618a.85.85 0 0 1 .608-.25h16.487Z" fill="currentColor"/></svg>')}},{key:"direction",get:function(){return this.dir?this.dir:this.bodyDir}}])&&N(i.prototype,s),a&&N(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function W(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}function q(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-header",F);var V,X,Z="large",J=function(t){var o,n;function r(){var o;return(o=t.call(this)||this).size=Z,o.title="",o.noCloseOnEscKey=!1,o.closeBehavior=new e.CloseOnEscBehavior(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o)),o.hideHeader=!1,o.noPadding=!1,o.noCloseOnCoverClick=!1,o}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,K(o,n);var i,s,a,c=r.prototype;return c.open=function(){this.visible=!0},c.close=function(){this.noCloseOnCoverClick||(this.visible=!1,this.dispatchCustomEvent("close"))},c.handleTransition=function(t){"opacity"===t.propertyName&&(this.visible?this.dispatchCustomEvent("opened"):this.dispatchCustomEvent("closed"))},c.attributeChangedCallback=function(e,o,n){t.prototype.attributeChangedCallback.call(this,e,o,n),"data-visible"===e&&n&&this.dispatchCustomEvent("open")},c.render=function(){return e.html(V||(V=q(['\n\t\t\t<div\n\t\t\t\tdir="','"\n\t\t\t\tclass="container '," ",'"\n\t\t\t\t@transitionend="','"\n\t\t\t>\n\t\t\t\t','\n\t\t\t\t<div class="note">\n\t\t\t\t\t\x3c!-- Use this slot name on the `ts-note` in the modal\t--\x3e\n\t\t\t\t\t<slot name="note"></slot>\n\t\t\t\t</div>\n\t\t\t\t<main>\n\t\t\t\t\t\x3c!-- Content in the main section of the modal\t--\x3e\n\t\t\t\t\t<slot name="main"></slot>\n\t\t\t\t</main>\n\t\t\t\t<footer>\n\t\t\t\t\t\x3c!-- Content in the footer section of the modal, most of the time `ts-button-group`\t--\x3e\n\t\t\t\t\t<slot name="footer"></slot>\n\t\t\t\t</footer>\n\t\t\t</div>\n\t\t\t<ts-cover class="ts-modal-cover" ?data-visible=',' @click="','"></ts-cover>\n\t\t'],['\n\t\t\t<div\n\t\t\t\tdir="','"\n\t\t\t\tclass="container '," ",'"\n\t\t\t\t@transitionend="','"\n\t\t\t>\n\t\t\t\t','\n\t\t\t\t<div class="note">\n\t\t\t\t\t\x3c!-- Use this slot name on the \\`ts-note\\` in the modal\t--\x3e\n\t\t\t\t\t<slot name="note"></slot>\n\t\t\t\t</div>\n\t\t\t\t<main>\n\t\t\t\t\t\x3c!-- Content in the main section of the modal\t--\x3e\n\t\t\t\t\t<slot name="main"></slot>\n\t\t\t\t</main>\n\t\t\t\t<footer>\n\t\t\t\t\t\x3c!-- Content in the footer section of the modal, most of the time \\`ts-button-group\\`\t--\x3e\n\t\t\t\t\t<slot name="footer"></slot>\n\t\t\t\t</footer>\n\t\t\t</div>\n\t\t\t<ts-cover class="ts-modal-cover" ?data-visible=',' @click="','"></ts-cover>\n\t\t'])),this.direction,this.size,this.hidden,this.handleTransition,this.header,this.visible,this.close)},c.firstUpdated=function(){this.closeBehavior.start()},c.disconnectedCallback=function(){this.closeBehavior.stop(),t.prototype.disconnectedCallback.call(this)},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(".container{background-color:#fff;background-color:var(--ts-color-white);bottom:20px;bottom:var(--ts-unit);box-shadow:inset 0 0 0 1px #cbd7dc;box-shadow:var(--ts-boxshadow-border-default);display:flex;flex-direction:column;left:20px;left:var(--ts-unit);position:absolute;right:20px;right:var(--ts-unit);top:20px;top:var(--ts-unit);z-index:1500;z-index:var(--ts-zindex-modal)}ts-header{flex-grow:0;flex-shrink:0;padding:0 0 0 5px;padding:0 0 0 var(--ts-unit-quarter)}ts-header[dir=rtl]{padding:0 5px 0 0;padding:0 var(--ts-unit-quarter) 0 0}.note ::slotted(ts-note){flex-grow:0;padding-left:20px;padding-left:var(--ts-unit);padding-right:20px;padding-right:var(--ts-unit)}.close{height:40px;height:var(--ts-unit-double);width:40px;width:var(--ts-unit-double)}main{flex-grow:1;overflow:auto;padding:20px;padding:var(--ts-unit)}:host([no-padding]) main{padding:0}footer{flex-grow:0}.container.medium{bottom:12.5%;left:25%;right:25%;top:12.5%}.container.small{bottom:auto;left:50%;right:auto;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:380px;width:var(--ts-modal-width-small)}.fade-in{opacity:1;transition:visibility .1s linear .1s,opacity .2s;transition:visibility var(--ts-transition-now) linear var(--ts-transition-now),opacity var(--ts-transition-fast);visibility:visible}.fade-out{opacity:0;transition:visibility .2s linear .1s,opacity .2s;transition:visibility var(--ts-transition-fast) linear var(--ts-transition-now),opacity var(--ts-transition-fast);visibility:hidden}@media (max-width:600px){.container,.container.medium,.container.small{bottom:10px;bottom:var(--ts-unit-half);left:10px;left:var(--ts-unit-half);right:10px;right:var(--ts-unit-half);top:10px;top:var(--ts-unit-half);-webkit-transform:translate(0);transform:translate(0);width:auto}.container main{padding:10px;padding:var(--ts-unit-half)}}")]}},{key:"properties",get:function(){return{dir:{type:String,reflect:!0,attribute:"data-dir"},size:{type:String,reflect:!0,attribute:"data-size"},title:{type:String,reflect:!0,attribute:"data-title"},visible:{type:Boolean,reflect:!0,attribute:"data-visible"},noCloseOnEscKey:{type:Boolean,attribute:"no-close-on-esc-key"},noCloseOnCoverClick:{type:Boolean,attribute:"no-close-on-cover-click"},hideHeader:{type:Boolean,attribute:"hide-header"},noPadding:{type:Boolean,attribute:"no-padding"}}}}],(s=[{key:"direction",get:function(){return this.dir?this.dir:this.bodyDir}},{key:"hidden",get:function(){return this.visible?"fade-in":"fade-out"}},{key:"header",get:function(){return this.hideHeader?"":e.html(X||(X=q(['\n\t\t\t<ts-header .title="','" dir="','">\n\t\t\t\t<ts-button class="no-border" icon="','" size="large" @click="','"></ts-button>\n\t\t\t</ts-header>\n\t\t'])),this.title,this.direction,'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"/><path d="m11.998 10.584 4.292-4.291a1 1 0 0 1 1.414 1.414l-4.291 4.291 4.291 4.292a1 1 0 0 1-1.414 1.414l-4.292-4.291-4.29 4.291a1 1 0 1 1-1.415-1.414l4.291-4.292-4.291-4.29a1 1 0 0 1 1.414-1.415l4.291 4.291Z" fill="currentColor"/></g></svg>',this.close)}}])&&W(i.prototype,s),a&&W(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function Q(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$(t,e)}function tt(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-modal",J);var et,ot,nt=function(t){var o,n;function r(){return t.apply(this,arguments)||this}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,$(o,n);var i,s,a=r.prototype;return a.textChangeHandler=function(t){var e=t.currentTarget;this.tooltip=this.tooltip||this.text||e.assignedNodes()[0].data},a.render=function(){return this.noTooltip?e.html(et||(et=tt(['\n\t\t\t\t\t<div class="text-wrapper">\n\t\t\t\t\t\t<slot>',"</slot>\n\t\t\t\t\t</div>\n\t\t\t "])),this.text):e.html(ot||(ot=tt(['\n\t\t\t\t\t<div class="text-wrapper" title="','">\n\t\t\t\t\t\t<slot @slotchange="','">',"</slot>\n\t\t\t\t\t</div>\n\t\t\t "])),this.tooltip||this.text,this.textChangeHandler,this.text)},i=r,s=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host{color:#0f151a;color:var(--ts-color-black);display:block;font-size:14px;font-size:var(--ts-font-size-default);line-height:20px;line-height:var(--ts-unit);min-width:0}:host([variant=title]) .text-wrapper{font-size:16px;font-size:var(--ts-fontsize-medium);font-weight:600;font-weight:var(--ts-fontweight-semibold)}:host([variant=subtitle]) .text-wrapper{color:#506b77;color:var(--ts-color-slate-lightest);font-size:12px;font-size:var(--ts-fontsize-mini)}:host([variant=semi-bold]) .text-wrapper{font-weight:600;font-weight:var(--ts-fontweight-semibold)}:host([no-wrap]) .text-wrapper{max-width:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap}:host([type=inverted]) .text-wrapper{color:#fff;color:var(--ts-color-white)}:host([type=warning]) .text-wrapper{color:#ff8c00;color:var(--ts-color-orange)}:host([type=danger]) .text-wrapper,:host([type=error]) .text-wrapper{color:#bd0000;color:var(--ts-color-red)}:host([type=action]) .text-wrapper,:host([type=primary]) .text-wrapper{color:#00aeff;color:var(--ts-color-blue)}:host([type=success]) .text-wrapper{color:#50c610;color:var(--ts-color-green)}:host([type=disabled]) .text-wrapper{color:#cbd7dc;color:var(--ts-color-gray-light)}:host([type=disabled-checked]) .text-wrapper{color:#9ab2bc;color:var(--ts-color-gray)}:host([type=slate-lightest]) .text-wrapper{color:#506b77;color:var(--ts-color-slate-lightest)}")]}},{key:"properties",get:function(){return{text:{type:String},tooltip:{type:String},variant:{type:String},type:{type:String},inline:{type:Boolean},noWrap:{type:Boolean,attribute:"no-wrap"},noTooltip:{type:Boolean,attribute:"no-tooltip"}}}}],null&&Q(i.prototype,null),s&&Q(i,s),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);e.customElementDefineHelper("ts-typography",nt);var rt,it,st,at,ct="success",lt="info",ut="error",dt="confirm",pt="warning",ht="danger",ft=((rt={})[ct]="checkmark",rt[lt]="info",rt[ut]="remove",rt[dt]="question",rt[pt]="alert",rt[ht]="remove",rt),bt=((it={})[ct]="success",it[lt]="info",it[ut]="error",it[dt]="primary",it[pt]="warning",it[ht]="danger",it),gt=((st={})[ct]="accept",st[lt]="primary",st[ut]="danger",st[dt]="primary",st[pt]="warning",st[ht]="danger",st),vt={accept_button:"OK",cancel_button:"Cancel"},yt=function(t){var r,i;function s(){var e;return(e=t.call(this)||this).type=dt,e.focused="cancel",e._translations=Object.assign({},vt),e.notification=!1,e.nonDismissable=!1,e}i=t,(r=s).prototype=Object.create(i.prototype),r.prototype.constructor=r,n(r,i);var a,c,l,u=s.prototype;return u.attributeChangedCallback=function(e,o,n){var r=this;t.prototype.attributeChangedCallback.call(this,e,o,n),"data-visible"===e&&"string"==typeof n&&window.setTimeout((function(){r.renderButtons=!0}),200)},u.updated=function(e){var o=this;if(t.prototype.updated.call(this,e),!0===this.visible&&!0===this.notification&&this.type===ct&&!this.nonDismissable)return window.setTimeout((function(){o.dismissModal()}),1500)},u.onAccept=function(){this.dispatchCustomEvent("accept"),this.dismissModal()},u.onCancel=function(){this.nonDismissable||(this.dispatchCustomEvent("cancel"),this.dismissModal())},u.dismissModal=function(){this.visible=!1,this.renderButtons=!1},u.extraButtonsSlotChangeHandler=function(t){var o=t.currentTarget.assignedNodes();e.validateSlottedNodes(this.tagName,o,["TS-BUTTON","TS-BUTTON-GROUP"])},u.isFocused=function(t){return!this.nonDismissable&&(this.notification?"accept"===t:this.renderButtons&&this.focused===t)},u.render=function(){return e.html(at||(t=["\n\t\t\t<ts-modal\n\t\t\t\t?data-visible=",'\n\t\t\t\tdata-size="small"\n\t\t\t\thide-header\n\t\t\t\t?no-close-on-esc-key=',"\n\t\t\t\t?no-close-on-cover-click=",'\n\t\t\t>\n\t\t\t\t<div class="content" slot="main">\n\t\t\t\t\t<ts-icon icon="','" type="','" size="extra-large"></ts-icon>\n\t\t\t\t\t\x3c!-- If in rare cases you need to have more complex content than text property, you can override the text by using this slot\t--\x3e\n\t\t\t\t\t<slot name="content">\n\t\t\t\t\t\t<ts-typography>','</ts-typography>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t\t<div class="footer','" slot="footer">\n\t\t\t\t\t<ts-button-group>\n\t\t\t\t\t\t<ts-button\n\t\t\t\t\t\t\t?focused="','"\n\t\t\t\t\t\t\t@click="','"\n\t\t\t\t\t\t\ttype="','"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t','\n\t\t\t\t\t\t</ts-button>\n\t\t\t\t\t\t<div class="','">\n\t\t\t\t\t\t\t\x3c!-- To add more options to the dialog (notifications will ignore extra buttons), between accept and cancel buttons --\x3e\n\t\t\t\t\t\t\t<slot name="extra-buttons" @slotchange="','"></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<ts-button\n\t\t\t\t\t\t\t?focused="','"\n\t\t\t\t\t\t\t@click="','"\n\t\t\t\t\t\t\ttype="','"\n\t\t\t\t\t\t\tclass="','"\n\t\t\t\t\t\t\t?disabled="','"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t',"\n\t\t\t\t\t\t</ts-button>\n\t\t\t\t\t</ts-button-group>\n\t\t\t\t</div>\n\t\t\t</ts-modal>\n\t\t"],o||(o=t.slice(0)),t.raw=o,at=t),this.visible,this.nonDismissable,this.nonDismissable,this.getIcon,this.getIconType,this.text,this._hideAllButtons?" visuallyhidden":"",this.isFocused("accept"),this.onAccept,this.getAcceptButtonType,this.translations.accept_button,this.notification?"visuallyhidden":"",this.extraButtonsSlotChangeHandler,this.isFocused("cancel"),this.onCancel,this.getCancelButtonType,this.notification||this.nonDismissable?"visuallyhidden":"",this.nonDismissable,this.translations.cancel_button);var t,o},a=s,l=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(".content{padding:0 20px 20px;padding:0 var(--ts-unit) var(--ts-unit);text-align:center}.footer{padding:0 40px 20px;padding:0 var(--ts-unit-double) var(--ts-unit)}.visuallyhidden{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}")]}},{key:"properties",get:function(){return{visible:{type:Boolean,attribute:"data-visible",reflect:!0},text:{type:String,reflect:!0},icon:{type:String,reflect:!0},type:{type:String,reflect:!0},translations:{type:Object,reflect:!0},focused:{type:String,reflect:!0},primary:{type:String,reflect:!0},notification:{type:Boolean,reflect:!0},nonDismissable:{type:Boolean,reflect:!0,attribute:"non-dismissable"},renderButtons:{type:Boolean,attribute:!1}}}}],(c=[{key:"translations",get:function(){return this._translations},set:function(t){var e=this._translations;this._translations=Object.assign(e,t),this.requestUpdate("translations",e)}},{key:"getIcon",get:function(){return this.icon&&!this.notification?this.icon:ft[this.type]}},{key:"getIconType",get:function(){return bt[this.type]||"primary"}},{key:"getAcceptButtonType",get:function(){return"accept"===this.primary?gt[this.type]:"secondary"}},{key:"getCancelButtonType",get:function(){return"cancel"===this.primary?gt[this.type]:"secondary"}},{key:"_hideAllButtons",get:function(){return!this.nonDismissable&&this.notification&&this.type===ct}}])&&o(a.prototype,c),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),s}(e.TSElement);e.customElementDefineHelper("ts-dialog",yt),t.TSDialog=yt,Object.defineProperty(t,"__esModule",{value:!0})}));
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@tradeshift/elements")):"function"==typeof define&&define.amd?define(["exports","@tradeshift/elements"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ts=t.ts||{},t.ts.elements=t.ts.elements||{},t.ts.elements.dialog=t.ts.elements.dialog||{}),t.ts.elements)}(this,(function(t,e){"use strict";function o(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e){return n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},n(t,e)}function r(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function i(){return i=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var o=arguments[e];for(var n in o)Object.prototype.hasOwnProperty.call(o,n)&&(t[n]=o[n])}return t},i.apply(this,arguments)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function a(t,e){return e||(e=t.slice(0)),t.raw=e,t}var c,l={ICON_WRAPPER:"icon-wrapper",CIRCULAR_BG:"circular-background"};i({},e.helpers.classNamesToSelector(l));var u,d,p=e.constants.colors,h=e.constants.colorModifiers,f={DEFAULT:"default",INVERTED:"inverted",PRIMARY:"primary",DANGER:"danger",ERROR:"error",SUCCESS:"success",ACTIVE:"active",INFO:"info",FOCUS:"focus",WARNING:"warning",DISABLED:"disabled",DISABLED_CHECKED:"disabled-checked",SUGGESTED:"suggested",SLATE_LIGHTEST:"slate-lightest",GRAY_DARKER:"gray-darker",ACTION:"action"},b=((c={})[f.DEFAULT]=p.SLATE,c[f.INVERTED]=p.WHITE,c[f.DANGER]=p.RED,c[f.ERROR]=p.RED,c[f.SUCCESS]=p.GREEN,c[f.PRIMARY]=p.BLUE,c[f.ACTIVE]=p.BLUE,c[f.INFO]=p.BLUE,c[f.FOCUS]=p.BLUE,c[f.WARNING]=p.ORANGE,c[f.DISABLED]=p.GRAY+h.LIGHTER,c[f.SUGGESTED]=p.PURPLE,c[f.DISABLED_CHECKED]=p.GRAY+h.LIGHT,c[f.SLATE_LIGHTEST]=p.SLATE+h.LIGHTEST,c[f.GRAY_DARKER]=p.GRAY+h.DARKER,c[f.ACTION]=p.GRAY,c),g="medium",v=function(t){var o,n;function i(){var e;return(e=t.call(this)||this).size=g,e.iconCache=new Map,e.svgContent="",e}n=t,(o=i).prototype=Object.create(n.prototype),o.prototype.constructor=o,s(o,n);var c,p,h=i.prototype;return h.attributeChangedCallback=function(e,o,n){var r=this;switch(t.prototype.attributeChangedCallback.call(this,e,o,n),e){case"icon":!this.src&&n&&window.customElements.whenDefined("ts-icon").then((function(){r.getIcon()}));break;case"src":n&&window.customElements.whenDefined("ts-icon").then((function(){r.getSrc()}))}},h.getIcon=function(){return new Promise(function(t,e){var o,n,r;if(this.validateSvg(this.icon))return this.svgContent=this.parseSvg(this.icon),t();if(this.iconCache.has(this.icon))return this.svgContent=this.iconCache.get(this.icon),t();var i=function(){try{return t()}catch(t){return e(t)}},s=function(t){try{return console.error(t),this.svgContent="",i()}catch(t){return e(t)}}.bind(this);try{return Promise.resolve(import("@tradeshift/elements.icon/lib/assets/icons/"+this.icon+".svg")).then(function(e){try{return o=e.default,n="",this.validateSvg(o)?(n=this.parseSvg(o),a.call(this)):Promise.resolve(fetch(o)).then(function(e){try{return(r=e).ok?Promise.resolve(this.extractSvgContent(r)).then(function(t){try{return n=t,a.call(this)}catch(t){return s(t)}}.bind(this),s):(this.svgContent="",t())}catch(t){return s(t)}}.bind(this),s);function a(){return this.iconCache.set(this.icon,n),this.svgContent=n,i()}}catch(c){return s(c)}}.bind(this),s)}catch(t){s(t)}}.bind(this))},h.getSrc=function(){return new Promise(function(t,e){var o,n;if(this.iconCache.has(this.src))return this.svgContent=this.iconCache.get(this.src),t();var r=function(){try{return t()}catch(t){return e(t)}},i=function(t){try{return console.error(t),this.svgContent="",r()}catch(t){return e(t)}}.bind(this);try{return Promise.resolve(fetch(this.src)).then(function(e){try{return(o=e).ok?Promise.resolve(this.extractSvgContent(o)).then(function(t){try{return n=t,this.iconCache.set(this.src,n),this.svgContent=n,r()}catch(t){return i(t)}}.bind(this),i):(this.svgContent="",t())}catch(t){return i(t)}}.bind(this),i)}catch(t){i(t)}}.bind(this))},h.validateSvg=function(t){return t.indexOf("<svg")>-1&&t.indexOf("</svg>")>-1},h.parseSvg=function(t){return(new DOMParser).parseFromString(t,"image/svg+xml").firstChild},h.extractSvgContent=function(t){return new Promise(function(e,o){var n;return Promise.resolve(t.text()).then(function(t){try{return n=t,e(this.parseSvg(n))}catch(t){return o(t)}}.bind(this),o)}.bind(this))},h.render=function(){return e.html(u||(u=a(['<span class="','">',"</span>"])),l.ICON_WRAPPER,this.svgContent)},c=i,p=[{key:"styles",get:function(){var t=Object.keys(f).map((function(t){var o=f[t],n=b[o];return e.css(d||(d=a(["\n\t\t\t\t:host([type='","']) {\n\t\t\t\t\t--ts-icon-color: var(--ts-color-",");\n\t\t\t\t}\n\t\t\t"])),e.unsafeCSS(o),e.unsafeCSS(n))}));return[e.TSElement.styles,e.unsafeCSS(':host{display:inline-block}:host svg{color:var(--ts-icon-color)}.fill-none{fill:none}:host([size=small]) .icon-wrapper{height:12px;height:var(--ts-fontsize-mini);width:12px;width:var(--ts-fontsize-mini)}:host([size=medium]) .icon-wrapper{height:16px;height:var(--ts-fontsize-medium);width:16px;width:var(--ts-fontsize-medium)}:host([size=large]) .icon-wrapper{height:24px;height:var(--ts-fontsize-xbig);width:24px;width:var(--ts-fontsize-xbig)}:host([size=extra-large]) .icon-wrapper{height:60px;height:var(--ts-unit-triple);width:60px;width:var(--ts-unit-triple)}:host([rotate="90"]) .icon-wrapper{-webkit-transform:rotate(90deg);transform:rotate(90deg)}:host([rotate="180"]) .icon-wrapper{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host([rotate="270"]) .icon-wrapper{-webkit-transform:rotate(270deg);transform:rotate(270deg)}:host([flip=h]) .icon-wrapper,:host([flip=horizontal]) .icon-wrapper{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host([flip=v]) .icon-wrapper,:host([flip=vertical]) .icon-wrapper{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.icon-wrapper{display:block;height:0;padding-top:100%;position:relative;width:100%}svg{height:100%;left:0;position:absolute;top:0;width:100%}:host([type=default]) svg{color:#1f2a2e;color:var(--ts-color-slate)}:host([type=inverted]) svg{color:#fff;color:var(--ts-color-white)}:host([type=primary]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=danger]) svg{color:#bd0000;color:var(--ts-color-red)}:host([type=error]) svg{color:#bd0000;color:var(--ts-color-red)}:host([type=success]) svg{color:#50c610;color:var(--ts-color-green)}:host([type=active]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=info]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=focus]) svg{color:#00aeff;color:var(--ts-color-blue)}:host([type=warning]) svg{color:#ff8c00;color:var(--ts-color-orange)}:host([type=disabled]) svg{color:#e6ecef;color:var(--ts-color-gray-lighter)}:host([type=disabled-checked]) svg{color:#cbd7dc;color:var(--ts-color-gray-light)}:host([type=suggested]) svg{color:#90129b;color:var(--ts-color-purple)}:host([type=slate-lightest]) svg{color:#506b77;color:var(--ts-color-slate-lightest)}:host([type=gray-darker]) svg{color:#648796;color:var(--ts-color-gray-darker)}:host([type=action]) svg{color:#9ab2bc;color:var(--ts-color-gray)}:host([circular]){background-color:var(--ts-icon-color);border-radius:50%}:host([circular]) svg{color:#fff;color:var(--ts-color-white)}')].concat(t)}},{key:"properties",get:function(){return{icon:{type:String,reflect:!0},src:{type:String,reflect:!0},size:{type:String,reflect:!0},type:{type:String,reflect:!0},circular:{type:Boolean,reflect:!0},rotate:{type:Number,reflect:!0},flip:{type:String,reflect:!0},svgContent:{type:String,attribute:!1}}}}],null&&r(c.prototype,null),p&&r(c,p),Object.defineProperty(c,"prototype",{writable:!1}),i}(e.TSElement);function y(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}function x(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-icon",v);var w,k,S={PRIMARY:"primary",SECONDARY:"secondary",TEXT:"text",ACCEPT:"accept",WARNING:"warning",DANGER:"danger"},C=function(t){var o,n;function r(){var e;return(e=t.call(this)||this).grouped=!1,e}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,m(o,n);var i,s,a,c=r.prototype;return c.updated=function(t){var e=this;t.forEach((function(t,o){"focused"===o&&(t||window.customElements.whenDefined("ts-button").then((function(){return e.shadowRoot.getElementById("button").focus()})))}))},c.clickHandler=function(t){this.disabled||this.busy||this.dispatchCustomEvent("button-click",t)},c.getIcon=function(){return this.icon||this.iconSrc?e.html(w||(w=x(['<ts-icon .icon="','" .src="','" size="large" type="','"></ts-icon>'])),this.icon,this.iconSrc,this.iconType):""},c.render=function(){return e.html(k||(k=x(['\n\t\t\t<button id="button" ?disabled="','" dir="','" @click="','">\n\t\t\t\t',"\n\t\t\t\t<span>\n\t\t\t\t\t\x3c!-- Text of the button should be wrapped around `ts-button` element --\x3e\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t"],['\n\t\t\t<button id="button" ?disabled="','" dir="','" @click="','">\n\t\t\t\t',"\n\t\t\t\t<span>\n\t\t\t\t\t\x3c!-- Text of the button should be wrapped around \\`ts-button\\` element --\x3e\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</span>\n\t\t\t</button>\n\t\t"])),this.disabled,this.direction,this.clickHandler,this.getIcon())},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host{--ts-box-shadow-color:transparent;display:inline-block;font-size:14px;font-size:var(--ts-font-size-default);line-height:20px;line-height:var(--ts-unit)}:host>button{border:none;border-radius:40px;border-radius:var(--ts-unit-double);box-shadow:inset 0 0 0 2px var(--ts-box-shadow-color);box-shadow:var(--ts-boxshadow-focus-border) var(--ts-box-shadow-color);font-size:14px;font-size:var(--ts-font-size-default);min-width:40px;min-width:var(--ts-unit-double);padding:0;position:relative}:host span{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:block;font-weight:600;font-weight:var(--ts-fontweight-semibold);line-height:20px;line-height:var(--ts-unit);padding:10px 20px;padding:var(--ts-unit-half) var(--ts-unit);text-transform:uppercase;white-space:nowrap}:host(:not([busy]))>button:hover{background:#e6ecef;background:var(--ts-color-gray-lighter);cursor:pointer}:host(:not([type]))>button,:host([type=secondary])>button{background:#fff;background:var(--ts-color-white);box-shadow:inset 0 0 0 1px #cbd7dc;box-shadow:var(--ts-boxshadow-border-default)}:host(:not([type]))>button:focus,:host([type=secondary])>button:focus{box-shadow:inset 0 0 0 2px #00aeff;box-shadow:var(--ts-boxshadow-focus-border) var(--ts-color-blue)}:host(.no-border)>button{background:transparent;box-shadow:none}:host(.no-border)>button:focus{box-shadow:none}:host([type=primary])>button{background:#00aeff;background:var(--ts-color-blue);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=primary])>button:hover{background:#0085cc;background:var(--ts-color-blue-dark)}:host(:not([busy])[type=primary])>button:focus{--ts-box-shadow-color:var(--ts-color-blue-darker)}:host([type=accept])>button{background:#50c610;background:var(--ts-color-green);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=accept])>button:hover{background:#399d0b;background:var(--ts-color-green-dark)}:host(:not([busy])[type=accept])>button:focus{--ts-box-shadow-color:var(--ts-color-green-darker)}:host([type=warning])>button{background:#ff8c00;background:var(--ts-color-orange);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=warning])>button:hover{background:#f07c00;background:var(--ts-color-orange-dark)}:host(:not([busy])[type=warning])>button:focus{--ts-box-shadow-color:var(--ts-color-orange-darker)}:host([type=danger])>button{background:#bd0000;background:var(--ts-color-red);color:#fff;color:var(--ts-color-white)}:host(:not([busy])[type=danger])>button:hover{background:#900;background:var(--ts-color-red-dark)}:host(:not([busy])[type=danger])>button:focus{--ts-box-shadow-color:var(--ts-color-red-darker)}:host([type=text])>button{align-items:center;background:transparent;border-radius:3px;border-radius:var(--ts-radius);display:flex}:host([type=text]) span{color:#00aeff;color:var(--ts-color-blue);font-weight:400;font-weight:var(--ts-fontweight);letter-spacing:normal;padding:0 5px;padding:0 var(--ts-unit-quarter);text-transform:none}:host(:not([busy])[type=text])>button:hover{background:transparent}:host(:not([busy])[type=text])>button:hover span{color:#0085cc;color:var(--ts-color-blue-dark)}:host(:not([busy])[type=text])>button:focus{background:#00aeff;background:var(--ts-color-blue)}:host(:not([busy])[type=text])>button:focus span{color:#fff;color:var(--ts-color-white)}[dir=ltr] :host([type=text][icon-src])>button,[dir=ltr] :host([type=text][icon])>button{padding-left:var(--ts-unit-half)}:host([type=text][icon-src])>button:dir(ltr),:host([type=text][icon])>button:dir(ltr){padding-left:var(--ts-unit-half)}[dir=rtl] :host([type=text][icon-src])>button,[dir=rtl] :host([type=text][icon])>button{padding-right:var(--ts-unit-half)}:host([type=text][icon-src])>button:dir(rtl),:host([type=text][icon])>button:dir(rtl){padding-right:var(--ts-unit-half)}[dir=ltr] :host([type=text][icon-src])>button,[dir=ltr] :host([type=text][icon])>button{padding-left:10px}:host([type=text][icon-src])>button:dir(ltr),:host([type=text][icon])>button:dir(ltr){padding-left:10px}[dir=rtl] :host([type=text][icon-src])>button,[dir=rtl] :host([type=text][icon])>button{padding-right:10px}:host([type=text][icon-src])>button:dir(rtl),:host([type=text][icon])>button:dir(rtl){padding-right:10px}:host([type=text][icon-src])>button,:host([type=text][icon])>button{-webkit-padding-start:10px;-webkit-padding-start:var(--ts-unit-half);padding-inline-start:10px;padding-inline-start:var(--ts-unit-half)}:host([type=text][icon-src])>button span,:host([type=text][icon])>button span{color:var(--ts-color-blue-darkest);padding:10px;padding:var(--ts-unit-half)}:host(:not([busy])[type=text][icon-src])>button:hover,:host(:not([busy])[type=text][icon])>button:hover{background:#eff3f5;background:var(--ts-color-gray-lightest)}:host(:not([busy])[type=text][icon-src])>button:hover span,:host(:not([busy])[type=text][icon])>button:hover span{color:var(--ts-color-blue-darkest)}:host(:not([busy])[type=text][icon-src])>button:focus,:host(:not([busy])[type=text][icon])>button:focus{--ts-box-shadow-color:var(--ts-color-gray);background:#eff3f5;background:var(--ts-color-gray-lightest)}:host(:not([busy])[type=text][icon-src])>button:focus span,:host(:not([busy])[type=text][icon])>button:focus span{color:var(--ts-color-blue-darkest)}:host(:not([type=text])[size=micro])>button{border-radius:20px;border-radius:var(--ts-unit);font-size:11px;font-size:var(--ts-fontsize-small);padding:0 10px;padding:0 var(--ts-unit-half)}:host(:not([type=text])[size=micro]) span{font-size:11px;font-size:var(--ts-fontsize-small);padding:0 2.5px;padding:0 var(--ts-unit-eighth)}:host([full-width]),:host([grouped]){display:block;text-align:center}:host([full-width])>button,:host([grouped])>button{display:block;width:100%}:host([grouped]){margin-bottom:10px;margin-bottom:var(--ts-unit-half)}:host([inline]){display:inline-block}:host([inline])>button{display:inline;width:auto}:host([grouped][type=text])>button{display:flex;justify-content:center}:host(:not([type=text])[icon-src])>button,:host(:not([type=text])[icon])>button{height:40px;height:var(--ts-unit-double);width:40px;width:var(--ts-unit-double)}:host(:not([type=text])[icon-src]) ts-icon,:host(:not([type=text])[icon]) ts-icon{left:50%;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}:host(:not([type=text])[icon-src]) span,:host(:not([type=text])[icon]) span{visibility:hidden}:host([disabled]){cursor:not-allowed}:host([disabled])>button{background-color:#e6ecef;background-color:var(--ts-disabled-background-color);box-shadow:none;pointer-events:none}:host([disabled]) span{color:#829fab;color:var(--ts-disabled-color)}:host([disabled][type=text])>button{background-color:transparent}:host([busy])>:first-child{-webkit-animation:move 1s linear infinite;animation:move 1s linear infinite;background-image:linear-gradient(-45deg,#cbd7dc 25%,#eff3f5 0,#eff3f5 50%,#cbd7dc 0,#cbd7dc 75%,#eff3f5 0,#eff3f5);background-image:linear-gradient(-45deg,var(--ts-color-gray-light) 25%,var(--ts-color-gray-lightest) 25%,var(--ts-color-gray-lightest) 50%,var(--ts-color-gray-light) 50%,var(--ts-color-gray-light) 75%,var(--ts-color-gray-lightest) 75%,var(--ts-color-gray-lightest));background-size:40px 40px;background-size:var(--ts-unit-double) var(--ts-unit-double);box-shadow:none;cursor:default;pointer-events:none}:host([busy])>:first-child>*{visibility:hidden}@-webkit-keyframes move{0%{background-position:0 0}to{background-position:40px 40px;background-position:var(--ts-unit-double) var(--ts-unit-double)}}@keyframes move{0%{background-position:0 0}to{background-position:40px 40px;background-position:var(--ts-unit-double) var(--ts-unit-double)}}")]}},{key:"properties",get:function(){return{type:{type:String,reflect:!0},size:{type:String,reflect:!0},busy:{type:Boolean,reflect:!0},icon:{type:String,reflect:!0},iconSrc:{type:String,reflect:!0,attribute:"icon-src"},disabled:{type:Boolean,reflect:!0},focused:{type:Boolean,reflect:!0},dir:{type:String,reflect:!0},fullWidth:{type:Boolean,reflect:!0,attribute:"full-width"},grouped:{type:Boolean,reflect:!0},inline:{type:Boolean,reflect:!0}}}}],(s=[{key:"direction",get:function(){return this.dir||this.bodyDir}},{key:"iconType",get:function(){return(this.icon||this.iconSrc)&&this.type===S.TEXT?"action":[S.DANGER,S.WARNING,S.ACCEPT,S.PRIMARY].indexOf(this.type)>-1?"inverted":"default"}}])&&y(i.prototype,s),a&&y(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function E(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}e.customElementDefineHelper("ts-button",C);var T,z=function(t){var o,n;function r(){return t.apply(this,arguments)||this}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,O(o,n);var i,s,a,c=r.prototype;return c.firstUpdated=function(){this.updateButtonsProps()},c.handleSlotChange=function(){this.updateButtonsProps()},c.update=function(e){t.prototype.update.call(this,e),this.updateButtonsProps()},c.updateButtonsProps=function(){var t=this;Array.from(this.querySelectorAll("ts-button")).forEach((function(e){e.grouped=!0,e.inline=t.inline,e.dir=t.dir}))},c.render=function(){return e.html(T||(t=['\n\t\t\t<section dir="','">\n\t\t\t\t\x3c!-- All `ts-button` elements in the group should be wrapped with `ts-button-group` element to be grouped together --\x3e\n\t\t\t\t<slot @slotchange="','"></slot>\n\t\t\t</section>\n\t\t'],(o=['\n\t\t\t<section dir="','">\n\t\t\t\t\x3c!-- All \\`ts-button\\` elements in the group should be wrapped with \\`ts-button-group\\` element to be grouped together --\x3e\n\t\t\t\t<slot @slotchange="','"></slot>\n\t\t\t</section>\n\t\t'])||(o=t.slice(0)),t.raw=o,T=t),this.direction,this.handleSlotChange);var t,o},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host,:host>section{display:block;width:100%}:host([inline]){font-size:0}[dir=ltr] :host([inline]) ::slotted(ts-button){margin-right:var(--ts-unit-half)}:host([inline]) ::slotted(ts-button):dir(ltr){margin-right:var(--ts-unit-half)}[dir=rtl] :host([inline]) ::slotted(ts-button){margin-left:var(--ts-unit-half)}:host([inline]) ::slotted(ts-button):dir(rtl){margin-left:var(--ts-unit-half)}[dir=ltr] :host([inline]) ::slotted(ts-button){margin-right:10px}:host([inline]) ::slotted(ts-button):dir(ltr){margin-right:10px}[dir=rtl] :host([inline]) ::slotted(ts-button){margin-left:10px}:host([inline]) ::slotted(ts-button):dir(rtl){margin-left:10px}:host([inline]) ::slotted(ts-button){-webkit-margin-end:10px;-webkit-margin-end:var(--ts-unit-half);margin-inline-end:10px;margin-inline-end:var(--ts-unit-half)}")]}},{key:"properties",get:function(){return{dir:{type:String,reflect:!0},inline:{type:Boolean,reflect:!0}}}}],(s=[{key:"direction",get:function(){return this.dir||this.bodyDir}}])&&E(i.prototype,s),a&&E(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function P(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}e.customElementDefineHelper("ts-button-group",z);var j,B=function(t){var o,n,r,i;function s(){var e;return(e=t.call(this)||this).visible=!1,e}return n=t,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,_(o,n),s.prototype.render=function(){return e.html(j||(t=[' <div class="cover ','"></div> '],o||(o=t.slice(0)),t.raw=o,j=t),this.visible?"ts-fadeIn":"ts-fadeOut");var t,o},r=s,i=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(".cover{background-color:#0f151a;background-color:var(--ts-color-black);bottom:0;left:0;overflow:hidden;pointer-events:none;position:absolute;right:0;top:0;visibility:hidden;z-index:10000;z-index:var(--ts-zindex-max)}.ts-fadeIn{opacity:.8;transition:visibility .1s linear .1s,opacity .2s;transition:visibility var(--ts-transition-now) linear var(--ts-transition-now),opacity var(--ts-transition-fast);visibility:visible}.ts-fadeOut{opacity:0;transition:visibility .1s linear .2s,opacity .2s;transition:visibility var(--ts-transition-now) linear var(--ts-transition-fast),opacity var(--ts-transition-fast);visibility:hidden}:host(.ts-aside-cover)>div{pointer-events:auto;z-index:1999;z-index:var(--ts-zindex-aside-cover)}:host(.ts-dialog-cover)>div{pointer-events:auto;z-index:2999;z-index:var(--ts-zindex-dialog-cover)}:host(.ts-spin-cover)>div{pointer-events:auto;z-index:3999;z-index:var(--ts-zindex-spin-cover)}:host(.ts-modal-cover)>div{pointer-events:auto;z-index:1499;z-index:var(--ts-zindex-modal-cover)}")]}},{key:"properties",get:function(){return{visible:{type:Boolean,attribute:"data-visible",reflect:!0}}}}],null&&P(r.prototype,null),i&&P(r,i),Object.defineProperty(r,"prototype",{writable:!1}),s}(e.TSElement);function D(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}e.customElementDefineHelper("ts-cover",B);var R,I=function(t){var o,n,r,i;function s(){return t.apply(this,arguments)||this}return n=t,(o=s).prototype=Object.create(n.prototype),o.prototype.constructor=o,A(o,n),s.prototype.render=function(){return e.html(R||(t=['\n\t\t\t<img .src="','" .alt="','"></img>\n\t\t'],o||(o=t.slice(0)),t.raw=o,R=t),this.src,this.alt);var t,o},r=s,i=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host img{border-radius:3px;border-radius:var(--ts-radius);height:40px;height:var(--ts-unit-double);width:40px;width:var(--ts-unit-double)}:host([size=large]) img{height:60px;height:var(--ts-unit-triple);width:60px;width:var(--ts-unit-triple)}")]}},{key:"properties",get:function(){return{size:{type:String,reflect:!0},src:{type:String,reflect:!0},alt:{type:String,reflect:!0}}}}],null&&D(r.prototype,null),i&&D(r,i),Object.defineProperty(r,"prototype",{writable:!1}),s}(e.TSElement);function N(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function H(t,e){return H=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},H(t,e)}function G(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-app-icon",I);var U,L,M,Y,F=function(t){var o,n;function r(){var e;return(e=t.call(this)||this).color="white",e}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,H(o,n);var i,s,a,c=r.prototype;return c.getIcon=function(){return this.icon?e.html(U||(U=G([' <ts-app-icon class="icon" src="','" alt="','"></ts-app-icon> '])),this.icon,this.title):""},c.openChromeMenu=function(){window.top.postMessage('app-broadcast:{"appIds": "Tradeshift.Chrome", "key": "ts-broadcast-chrome-menu-open"}',"*")},c.getTitle=function(){return this.title?e.html(L||(L=G([' <span class="title">',"</span> "])),this.title):""},c.render=function(){return e.html(M||(M=G(["\n\t\t\t<header dir=",'>\n\t\t\t\t<div class="title-icon-container">'," "," ",'</div>\n\t\t\t\t<div class="slot-container">\n\t\t\t\t\t\x3c!-- Extra items on the opposite side of the header goes here, like button group. \t--\x3e\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</div>\n\t\t\t</header>\n\t\t'])),this.direction,this.getMenuSwitch,this.getIcon(),this.getTitle())},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host{border-bottom:1px solid #cbd7dc;border-bottom:var(--ts-border);display:flex;height:60px;height:var(--ts-unit-triple);width:100%}:host>header{align-items:center;background-color:#fff;background-color:var(--ts-color-white);display:flex;justify-content:space-between;width:100%}:host .icon{block-size:40px;height:40px;height:var(--ts-unit-double);block-size:var(--ts-unit-double);margin-left:10px;margin-left:var(--ts-unit-half)}:host .title{font-size:18px;font-size:var(--ts-fontsize-big);margin-left:10px;margin-left:var(--ts-unit-half)}.title-icon-container{align-items:center;display:flex}.slot-container{margin:0 10px;margin:0 var(--ts-unit-half)}[dir=rtl] .icon,[dir=rtl] .title{margin-left:0;margin-right:10px;margin-right:var(--ts-unit-half)}:host([color=black])>header{background-color:#0f151a;background-color:var(--ts-color-black)}:host([color=black]) .title{color:#fff;color:var(--ts-color-white)}:host([color=red])>header{background-color:#bd0000;background-color:var(--ts-color-red)}:host([color=red]) .title{color:#fff;color:var(--ts-color-white)}:host([color=orange])>header{background-color:#ff8c00;background-color:var(--ts-color-orange)}:host([color=orange]) .title{color:#fff;color:var(--ts-color-white)}:host([color=yellow])>header{background-color:#fdbe12;background-color:var(--ts-color-yellow)}:host([color=yellow]) .title{color:#fff;color:var(--ts-color-white)}:host([color=green])>header{background-color:#50c610;background-color:var(--ts-color-green)}:host([color=green]) .title{color:#fff;color:var(--ts-color-white)}:host([color=blue])>header{background-color:#00aeff;background-color:var(--ts-color-blue)}:host([color=blue]) .title{color:#fff;color:var(--ts-color-white)}:host([color=purple])>header{background-color:#90129b;background-color:var(--ts-color-purple)}:host([color=purple]) .title{color:#fff;color:var(--ts-color-white)}:host([color=pink])>header{background-color:#a70262;background-color:var(--ts-color-pink)}:host([color=pink]) .title{color:#fff;color:var(--ts-color-white)}:host([color=gray])>header{background-color:#9ab2bc;background-color:var(--ts-color-gray)}:host([color=gray]) .title{color:#fff;color:var(--ts-color-white)}:host([color=slate])>header{background-color:#1f2a2e;background-color:var(--ts-color-slate)}:host([color=slate]) .title{color:#fff;color:var(--ts-color-white)}:host([color=white])>header{background-color:#fff;background-color:var(--ts-color-white)}:host([color=white]) .title{color:#0f151a;color:var(--ts-color-black)}.menu-switch{cursor:pointer;display:none;padding:10px;padding:var(--ts-unit-half)}@media screen and (max-width:600px){.icon{display:none}.menu-switch{display:block}:host .title{margin-left:0;margin-right:0}}")]}},{key:"properties",get:function(){return{dir:{type:String,reflect:!0},icon:{type:String,reflect:!0},title:{type:String,reflect:!0},color:{type:String,reflect:!0}}}}],(s=[{key:"getMenuSwitch",get:function(){return e.html(Y||(Y=G(['\n\t\t\t<ts-icon\n\t\t\t\t@click="','"\n\t\t\t\tclass="menu-switch"\n\t\t\t\ticon="','"\n\t\t\t\tsize="large"\n\t\t\t\ttabindex="0"\n\t\t\t></ts-icon>\n\t\t'])),this.openChromeMenu,'<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M20.355 4a.84.84 0 0 1 .619.25.84.84 0 0 1 .25.618v1.15a.85.85 0 0 1-.25.607.822.822 0 0 1-.619.26H3.868a.833.833 0 0 1-.608-.26.833.833 0 0 1-.26-.607v-1.15c0-.246.087-.452.26-.619A.85.85 0 0 1 3.868 4h16.487Zm0 6.14a.84.84 0 0 1 .619.249.84.84 0 0 1 .25.618v1.15a.85.85 0 0 1-.25.607.822.822 0 0 1-.619.26H3.868a.833.833 0 0 1-.608-.26.833.833 0 0 1-.26-.607v-1.15c0-.246.087-.452.26-.618a.85.85 0 0 1 .608-.25h16.487Zm0 6.16a.84.84 0 0 1 .619.25.84.84 0 0 1 .25.618v1.15a.84.84 0 0 1-.25.618.84.84 0 0 1-.619.25H3.868a.85.85 0 0 1-.608-.25.822.822 0 0 1-.26-.618v-1.15c0-.245.087-.452.26-.618a.85.85 0 0 1 .608-.25h16.487Z" fill="currentColor"/></svg>')}},{key:"direction",get:function(){return this.dir?this.dir:this.bodyDir}}])&&N(i.prototype,s),a&&N(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function W(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}function q(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-header",F);var V,X,Z="large",J=function(t){var o,n;function r(){var o;return(o=t.call(this)||this).size=Z,o.title="",o.noCloseOnEscKey=!1,o.closeBehavior=new e.CloseOnEscBehavior(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(o)),o.hideHeader=!1,o.noPadding=!1,o.noCloseOnCoverClick=!1,o}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,K(o,n);var i,s,a,c=r.prototype;return c.open=function(){this.visible=!0},c.close=function(){this.noCloseOnCoverClick||(this.visible=!1,this.dispatchCustomEvent("close"))},c.handleTransition=function(t){"opacity"===t.propertyName&&(this.visible?this.dispatchCustomEvent("opened"):this.dispatchCustomEvent("closed"))},c.attributeChangedCallback=function(e,o,n){t.prototype.attributeChangedCallback.call(this,e,o,n),"data-visible"===e&&n&&this.dispatchCustomEvent("open")},c.render=function(){return e.html(V||(V=q(['\n\t\t\t<div\n\t\t\t\tdir="','"\n\t\t\t\tclass="container '," ",'"\n\t\t\t\t@transitionend="','"\n\t\t\t>\n\t\t\t\t','\n\t\t\t\t<div class="note">\n\t\t\t\t\t\x3c!-- Use this slot name on the `ts-note` in the modal\t--\x3e\n\t\t\t\t\t<slot name="note"></slot>\n\t\t\t\t</div>\n\t\t\t\t<main>\n\t\t\t\t\t\x3c!-- Content in the main section of the modal\t--\x3e\n\t\t\t\t\t<slot name="main"></slot>\n\t\t\t\t</main>\n\t\t\t\t<footer>\n\t\t\t\t\t\x3c!-- Content in the footer section of the modal, most of the time `ts-button-group`\t--\x3e\n\t\t\t\t\t<slot name="footer"></slot>\n\t\t\t\t</footer>\n\t\t\t</div>\n\t\t\t<ts-cover class="ts-modal-cover" ?data-visible=',' @click="','"></ts-cover>\n\t\t'],['\n\t\t\t<div\n\t\t\t\tdir="','"\n\t\t\t\tclass="container '," ",'"\n\t\t\t\t@transitionend="','"\n\t\t\t>\n\t\t\t\t','\n\t\t\t\t<div class="note">\n\t\t\t\t\t\x3c!-- Use this slot name on the \\`ts-note\\` in the modal\t--\x3e\n\t\t\t\t\t<slot name="note"></slot>\n\t\t\t\t</div>\n\t\t\t\t<main>\n\t\t\t\t\t\x3c!-- Content in the main section of the modal\t--\x3e\n\t\t\t\t\t<slot name="main"></slot>\n\t\t\t\t</main>\n\t\t\t\t<footer>\n\t\t\t\t\t\x3c!-- Content in the footer section of the modal, most of the time \\`ts-button-group\\`\t--\x3e\n\t\t\t\t\t<slot name="footer"></slot>\n\t\t\t\t</footer>\n\t\t\t</div>\n\t\t\t<ts-cover class="ts-modal-cover" ?data-visible=',' @click="','"></ts-cover>\n\t\t'])),this.direction,this.size,this.hidden,this.handleTransition,this.header,this.visible,this.close)},c.firstUpdated=function(){this.closeBehavior.start()},c.disconnectedCallback=function(){this.closeBehavior.stop(),t.prototype.disconnectedCallback.call(this)},i=r,a=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(".container{background-color:#fff;background-color:var(--ts-color-white);bottom:20px;bottom:var(--ts-unit);box-shadow:inset 0 0 0 1px #cbd7dc;box-shadow:var(--ts-boxshadow-border-default);display:flex;flex-direction:column;left:20px;left:var(--ts-unit);position:absolute;right:20px;right:var(--ts-unit);top:20px;top:var(--ts-unit);z-index:1500;z-index:var(--ts-zindex-modal)}ts-header{flex-grow:0;flex-shrink:0;padding:0 0 0 5px;padding:0 0 0 var(--ts-unit-quarter)}ts-header[dir=rtl]{padding:0 5px 0 0;padding:0 var(--ts-unit-quarter) 0 0}.note ::slotted(ts-note){flex-grow:0;padding-left:20px;padding-left:var(--ts-unit);padding-right:20px;padding-right:var(--ts-unit)}.close{height:40px;height:var(--ts-unit-double);width:40px;width:var(--ts-unit-double)}main{flex-grow:1;overflow:auto;padding:20px;padding:var(--ts-unit)}:host([no-padding]) main{padding:0}footer{flex-grow:0}.container.medium{bottom:12.5%;left:25%;right:25%;top:12.5%}.container.small{bottom:auto;left:50%;right:auto;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:380px;width:var(--ts-modal-width-small)}.fade-in{opacity:1;transition:visibility .1s linear .1s,opacity .2s;transition:visibility var(--ts-transition-now) linear var(--ts-transition-now),opacity var(--ts-transition-fast);visibility:visible}.fade-out{opacity:0;transition:visibility .2s linear .1s,opacity .2s;transition:visibility var(--ts-transition-fast) linear var(--ts-transition-now),opacity var(--ts-transition-fast);visibility:hidden}@media (max-width:600px){.container,.container.medium,.container.small{bottom:10px;bottom:var(--ts-unit-half);left:10px;left:var(--ts-unit-half);right:10px;right:var(--ts-unit-half);top:10px;top:var(--ts-unit-half);-webkit-transform:translate(0);transform:translate(0);width:auto}.container main{padding:10px;padding:var(--ts-unit-half)}}")]}},{key:"properties",get:function(){return{dir:{type:String,reflect:!0,attribute:"data-dir"},size:{type:String,reflect:!0,attribute:"data-size"},title:{type:String,reflect:!0,attribute:"data-title"},visible:{type:Boolean,reflect:!0,attribute:"data-visible"},noCloseOnEscKey:{type:Boolean,attribute:"no-close-on-esc-key"},noCloseOnCoverClick:{type:Boolean,attribute:"no-close-on-cover-click"},hideHeader:{type:Boolean,attribute:"hide-header"},noPadding:{type:Boolean,attribute:"no-padding"}}}}],(s=[{key:"direction",get:function(){return this.dir?this.dir:this.bodyDir}},{key:"hidden",get:function(){return this.visible?"fade-in":"fade-out"}},{key:"header",get:function(){return this.hideHeader?"":e.html(X||(X=q(['\n\t\t\t<ts-header .title="','" dir="','">\n\t\t\t\t<ts-button class="no-border" icon="','" size="large" @click="','"></ts-button>\n\t\t\t</ts-header>\n\t\t'])),this.title,this.direction,'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="M0 0h24v24H0z"/><path d="m11.998 10.584 4.292-4.291a1 1 0 0 1 1.414 1.414l-4.291 4.291 4.291 4.292a1 1 0 0 1-1.414 1.414l-4.292-4.291-4.29 4.291a1 1 0 1 1-1.415-1.414l4.291-4.292-4.291-4.29a1 1 0 0 1 1.414-1.415l4.291 4.291Z" fill="currentColor"/></g></svg>',this.close)}}])&&W(i.prototype,s),a&&W(i,a),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);function Q(t,e){for(var o=0;o<e.length;o++){var n=e[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$(t,e)}function tt(t,e){return e||(e=t.slice(0)),t.raw=e,t}e.customElementDefineHelper("ts-modal",J);var et,ot,nt=function(t){var o,n;function r(){return t.apply(this,arguments)||this}n=t,(o=r).prototype=Object.create(n.prototype),o.prototype.constructor=o,$(o,n);var i,s,a=r.prototype;return a.textChangeHandler=function(t){var e=t.currentTarget;this.tooltip=this.tooltip||this.text||e.assignedNodes()[0].data},a.render=function(){return this.noTooltip?e.html(et||(et=tt(['\n\t\t\t\t\t<div class="text-wrapper">\n\t\t\t\t\t\t<slot>',"</slot>\n\t\t\t\t\t</div>\n\t\t\t "])),this.text):e.html(ot||(ot=tt(['\n\t\t\t\t\t<div class="text-wrapper" title="','">\n\t\t\t\t\t\t<slot @slotchange="','">',"</slot>\n\t\t\t\t\t</div>\n\t\t\t "])),this.tooltip||this.text,this.textChangeHandler,this.text)},i=r,s=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(":host{color:#0f151a;color:var(--ts-color-black);display:block;font-size:14px;font-size:var(--ts-font-size-default);line-height:20px;line-height:var(--ts-unit);min-width:0}:host([variant=title]) .text-wrapper{font-size:16px;font-size:var(--ts-fontsize-medium);font-weight:600;font-weight:var(--ts-fontweight-semibold)}:host([variant=subtitle]) .text-wrapper{color:#506b77;color:var(--ts-color-slate-lightest);font-size:12px;font-size:var(--ts-fontsize-mini)}:host([variant=semi-bold]) .text-wrapper{font-weight:600;font-weight:var(--ts-fontweight-semibold)}:host([no-wrap]) .text-wrapper{max-width:100%;overflow:hidden;position:relative;text-overflow:ellipsis;white-space:nowrap}:host([type=inverted]) .text-wrapper{color:#fff;color:var(--ts-color-white)}:host([type=warning]) .text-wrapper{color:#ff8c00;color:var(--ts-color-orange)}:host([type=danger]) .text-wrapper,:host([type=error]) .text-wrapper{color:#bd0000;color:var(--ts-color-red)}:host([type=action]) .text-wrapper,:host([type=primary]) .text-wrapper{color:#00aeff;color:var(--ts-color-blue)}:host([type=success]) .text-wrapper{color:#50c610;color:var(--ts-color-green)}:host([type=disabled]) .text-wrapper{color:#cbd7dc;color:var(--ts-color-gray-light)}:host([type=disabled-checked]) .text-wrapper{color:#9ab2bc;color:var(--ts-color-gray)}:host([type=slate-lightest]) .text-wrapper{color:#506b77;color:var(--ts-color-slate-lightest)}")]}},{key:"properties",get:function(){return{text:{type:String},tooltip:{type:String},variant:{type:String},type:{type:String},inline:{type:Boolean},noWrap:{type:Boolean,attribute:"no-wrap"},noTooltip:{type:Boolean,attribute:"no-tooltip"}}}}],null&&Q(i.prototype,null),s&&Q(i,s),Object.defineProperty(i,"prototype",{writable:!1}),r}(e.TSElement);e.customElementDefineHelper("ts-typography",nt);var rt,it,st,at,ct="success",lt="info",ut="error",dt="confirm",pt="warning",ht="danger",ft=((rt={})[ct]="checkmark",rt[lt]="info",rt[ut]="remove",rt[dt]="question",rt[pt]="alert",rt[ht]="remove",rt),bt=((it={})[ct]="success",it[lt]="info",it[ut]="error",it[dt]="primary",it[pt]="warning",it[ht]="danger",it),gt=((st={})[ct]="accept",st[lt]="primary",st[ut]="danger",st[dt]="primary",st[pt]="warning",st[ht]="danger",st),vt={accept_button:"OK",cancel_button:"Cancel"},yt=function(t){var r,i;function s(){var e;return(e=t.call(this)||this).type=dt,e.focused="cancel",e._translations=Object.assign({},vt),e.notification=!1,e.nonDismissable=!1,e}i=t,(r=s).prototype=Object.create(i.prototype),r.prototype.constructor=r,n(r,i);var a,c,l,u=s.prototype;return u.attributeChangedCallback=function(e,o,n){var r=this;t.prototype.attributeChangedCallback.call(this,e,o,n),"data-visible"===e&&"string"==typeof n&&window.setTimeout((function(){r.renderButtons=!0}),200)},u.updated=function(e){var o=this;if(t.prototype.updated.call(this,e),!0===this.visible&&!0===this.notification&&this.type===ct&&!this.nonDismissable)return window.setTimeout((function(){o.dismissModal()}),1500)},u.onAccept=function(){this.dispatchCustomEvent("accept"),this.dismissModal()},u.onCancel=function(){this.nonDismissable||(this.dispatchCustomEvent("cancel"),this.dismissModal())},u.dismissModal=function(){this.visible=!1,this.renderButtons=!1},u.extraButtonsSlotChangeHandler=function(t){var o=t.currentTarget.assignedNodes();e.validateSlottedNodes(this.tagName,o,["TS-BUTTON","TS-BUTTON-GROUP"])},u.isFocused=function(t){return!this.nonDismissable&&(this.notification?"accept"===t:this.renderButtons&&this.focused===t)},u.render=function(){return e.html(at||(t=["\n\t\t\t<ts-modal\n\t\t\t\t?data-visible=",'\n\t\t\t\tdata-size="small"\n\t\t\t\thide-header\n\t\t\t\t?no-close-on-esc-key=',"\n\t\t\t\t?no-close-on-cover-click=",'\n\t\t\t>\n\t\t\t\t<div class="content" slot="main">\n\t\t\t\t\t<ts-icon icon="','" type="','" size="extra-large"></ts-icon>\n\t\t\t\t\t\x3c!-- If in rare cases you need to have more complex content than text property, you can override the text by using this slot\t--\x3e\n\t\t\t\t\t<slot name="content">\n\t\t\t\t\t\t<ts-typography>','</ts-typography>\n\t\t\t\t\t</slot>\n\t\t\t\t</div>\n\t\t\t\t<div class="footer','" slot="footer">\n\t\t\t\t\t<ts-button-group>\n\t\t\t\t\t\t<ts-button\n\t\t\t\t\t\t\t?focused="','"\n\t\t\t\t\t\t\t@click="','"\n\t\t\t\t\t\t\ttype="','"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t','\n\t\t\t\t\t\t</ts-button>\n\t\t\t\t\t\t<div class="','">\n\t\t\t\t\t\t\t\x3c!-- To add more options to the dialog (notifications will ignore extra buttons), between accept and cancel buttons --\x3e\n\t\t\t\t\t\t\t<slot name="extra-buttons" @slotchange="','"></slot>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<ts-button\n\t\t\t\t\t\t\t?focused="','"\n\t\t\t\t\t\t\t@click="','"\n\t\t\t\t\t\t\ttype="','"\n\t\t\t\t\t\t\tclass="','"\n\t\t\t\t\t\t\t?disabled="','"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t',"\n\t\t\t\t\t\t</ts-button>\n\t\t\t\t\t</ts-button-group>\n\t\t\t\t</div>\n\t\t\t</ts-modal>\n\t\t"],o||(o=t.slice(0)),t.raw=o,at=t),this.visible,this.nonDismissable,this.nonDismissable,this.getIcon,this.getIconType,this.text,this._hideAllButtons?" visuallyhidden":"",this.isFocused("accept"),this.onAccept,this.getAcceptButtonType,this.translations.accept_button,this.notification?"visuallyhidden":"",this.extraButtonsSlotChangeHandler,this.isFocused("cancel"),this.onCancel,this.getCancelButtonType,this.notification||this.nonDismissable?"visuallyhidden":"",this.nonDismissable,this.translations.cancel_button);var t,o},a=s,l=[{key:"styles",get:function(){return[e.TSElement.styles,e.unsafeCSS(".content{padding:0 20px 20px;padding:0 var(--ts-unit) var(--ts-unit);text-align:center}.footer{padding:0 40px 20px;padding:0 var(--ts-unit-double) var(--ts-unit)}.visuallyhidden{clip:rect(0 0 0 0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}")]}},{key:"properties",get:function(){return{visible:{type:Boolean,attribute:"data-visible",reflect:!0},text:{type:String,reflect:!0},icon:{type:String,reflect:!0},type:{type:String,reflect:!0},translations:{type:Object,reflect:!0},focused:{type:String,reflect:!0},primary:{type:String,reflect:!0},notification:{type:Boolean,reflect:!0},nonDismissable:{type:Boolean,reflect:!0,attribute:"non-dismissable"},renderButtons:{type:Boolean,attribute:!1}}}}],(c=[{key:"translations",get:function(){return this._translations},set:function(t){var e=this._translations;this._translations=Object.assign(e,t),this.requestUpdate("translations",e)}},{key:"getIcon",get:function(){return this.icon&&!this.notification?this.icon:ft[this.type]}},{key:"getIconType",get:function(){return bt[this.type]||"primary"}},{key:"getAcceptButtonType",get:function(){return"accept"===this.primary?gt[this.type]:"secondary"}},{key:"getCancelButtonType",get:function(){return"cancel"===this.primary?gt[this.type]:"secondary"}},{key:"_hideAllButtons",get:function(){return!this.nonDismissable&&this.notification&&this.type===ct}}])&&o(a.prototype,c),l&&o(a,l),Object.defineProperty(a,"prototype",{writable:!1}),s}(e.TSElement);e.customElementDefineHelper("ts-dialog",yt),t.TSDialog=yt,Object.defineProperty(t,"__esModule",{value:!0})}));
{
"name": "@tradeshift/elements.dialog",
"version": "0.39.0",
"version": "0.40.0",
"repository": {

@@ -18,11 +18,11 @@ "type": "git",

"dependencies": {
"@tradeshift/elements": "^0.39.0",
"@tradeshift/elements.button": "^0.39.0",
"@tradeshift/elements.button-group": "^0.39.0",
"@tradeshift/elements.icon": "^0.39.0",
"@tradeshift/elements.modal": "^0.39.0",
"@tradeshift/elements.typography": "^0.39.0"
"@tradeshift/elements": "^0.40.0",
"@tradeshift/elements.button": "^0.40.0",
"@tradeshift/elements.button-group": "^0.40.0",
"@tradeshift/elements.icon": "^0.40.0",
"@tradeshift/elements.modal": "^0.40.0",
"@tradeshift/elements.typography": "^0.40.0"
},
"src": "src/dialog.js",
"gitHead": "3553e0208b3f9a52c6ca850412507c39ca11e0b7"
"gitHead": "95eb701d1139386b893ad0ed34acb72284339732"
}
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