blip-ds 1.244.1 → 1.244.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blip-ds/bds-button.entry.js +3 -2
- package/dist/blip-ds/bds-button.system.entry.js +1 -1
- package/dist/blip-ds/bds-icon.entry.js +16 -0
- package/dist/blip-ds/bds-icon.system.entry.js +1 -1
- package/dist/blip-ds/p-3384b887.entry.js +1 -0
- package/dist/blip-ds/p-71da6aac.system.entry.js +1 -0
- package/dist/blip-ds/p-9493d791.system.js +1 -1
- package/dist/blip-ds/p-9b0cf525.entry.js +1 -0
- package/dist/blip-ds/p-e791b9f7.system.entry.js +1 -0
- package/dist/cjs/bds-button.cjs.entry.js +3 -2
- package/dist/cjs/bds-button_2.cjs.entry.js +3 -2
- package/dist/cjs/bds-icon.cjs.entry.js +16 -0
- package/dist/cjs/bds-icon_2.cjs.entry.js +16 -0
- package/dist/collection/components/button/button.css +143 -60
- package/dist/collection/components/button/button.js +2 -1
- package/dist/esm/bds-button.entry.js +3 -2
- package/dist/esm/bds-button_2.entry.js +3 -2
- package/dist/esm/bds-icon.entry.js +16 -0
- package/dist/esm/bds-icon_2.entry.js +16 -0
- package/dist/esm-es5/bds-button_2.entry.js +1 -1
- package/dist/esm-es5/bds-icon_2.entry.js +1 -1
- package/package.json +1 -1
- package/dist/blip-ds/p-270f7035.system.entry.js +0 -1
- package/dist/blip-ds/p-5dc7ad42.system.entry.js +0 -1
- package/dist/blip-ds/p-951616a2.entry.js +0 -1
- package/dist/blip-ds/p-a806e267.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-cbe64994.js";var buttonCss='.button{border:none;margin:0;padding:0;width:auto;overflow:visible;outline:none;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;overflow:hidden;border-radius:8px;padding-left:16px;padding-right:16px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.button::-moz-focus-inner{border:0;padding:0}.button *{pointer-events:none}.button:before{content:"";position:absolute;inset:0;background-color:transparent;mix-blend-mode:multiply}.button--size-tall{padding-top:14px;padding-bottom:14px;height:56px}.button--size-tall--icon{padding-top:12px;padding-bottom:12px;height:56px}.button--size-standard{padding-top:9px;padding-bottom:9px;height:40px}.button--size-standard--icon{padding-top:8px;padding-bottom:8px;height:40px}.button--size-short{padding-top:5px;padding-bottom:5px;height:32px}.button--size-short--icon{padding-top:4px;padding-bottom:4px;height:40px}.button--size-icon--left{padding-left:16px}.button--size-icon--right{padding-right:16px}.button__icon{color:inherit;background-color:inherit;height:24px;margin-right:4px}.button__arrow{color:inherit;background-color:inherit;height:24px;margin-left:2px}.button__content{height:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.button__disabled{pointer-events:none;opacity:0.5}.button__primary{background:var(--color-primary, #3f7de8);color:var(--color-content-bright, #fff)}.button__primary:hover:before{background:#d2dfe6}.button__primary:active:before{background:#b9cbd3}.button__secondary{background:var(--color-secondary, #3f7de8);color:var(--color-content-bright, #fff)}.button__secondary:hover:before{background:#d2dfe6}.button__secondary:active:before{background:#b9cbd3}.button__tertiary{background:transparent;color:var(--color-primary, #3f7de8);border:2px solid var(--color-primary, #3f7de8)}.button__tertiary:hover:before{background:#e7edf4}.button__tertiary:active:before{background:#d2dfe6}.button__secondary--white{background:transparent;color:var(--color-content-bright, #fff)}.button__secondary--white:hover:before{background:#e7edf4}.button__secondary--white:active:before{background:#d2dfe6}.button__ghost{background:transparent;color:var(--color-primary, #3f7de8)}.button__ghost:hover:before{background:#e7edf4}.button__ghost:active:before{background:#d2dfe6}.button__delete{background:var(--color-delete, #ff4c4c);color:var(--color-content-bright, #fff)}.button__delete:hover:before{background:#d2dfe6}.button__delete:active:before{background:#b9cbd3}.button__dashed{background:transparent;color:var(--color-primary, #3f7de8);border:1px dashed var(--color-primary, #3f7de8)}.button__dashed:hover:before{background:#e7edf4}.button__dashed:active:before{background:#d2dfe6}.button__facebook{background:#1877f2;color:#f8fbfb}.button__facebook:hover:before{background:#d2dfe6}.button__facebook:active:before{background:#b9cbd3}.button bds-typo{position:relative}.button bds-loading-spinner{width:auto;max-height:100%;position:absolute}.button .hide{cursor:not-allowed;opacity:0}';var Button=function(){function t(t){var e=this;registerInstance(this,t);this.bdsClick=createEvent(this,"bdsClick",7);this.handleClick=function(t){if(!e.disabled){e.bdsClick.emit();var o=e.el.closest("form");if(o){t.preventDefault();var n=document.createElement("button");n.type=e.type;n.style.display="none";o.appendChild(n);n.click();n.remove()}}};this.disabled=false;this.size="standard";this.variant="primary";this.icon=null;this.arrow=false;this.type="button";this.typeIcon="icon";this.bdsLoading=false;this.bdsLoadingVariant="primary";this.bdsLoadingColor="light";this.dataTest=null}t.prototype.getSizeClass=function(){return this.arrow||!!this.icon?"button--size-".concat(this.size,"--icon"):"button--size-".concat(this.size)};t.prototype.renderIcon=function(){return this.icon&&h("div",{class:{button__icon:true,hide:this.bdsLoading&&true}},h("bds-icon",{name:this.icon,type:this.typeIcon,color:"inherit"}))};t.prototype.renderText=function(){var t;return h("div",{class:(t={button__content:true},t["button__content__".concat(this.variant)]=true,t.hide=this.bdsLoading&&true,t)},h("bds-typo",{variant:"fs-14",lineHeight:"simple",bold:"bold"},h("slot",null)))};t.prototype.renderArrow=function(){return this.arrow&&h("div",{class:{button__arrow:true,hide:this.bdsLoading&&true}},h("bds-icon",{name:"arrow-right",color:"inherit"}))};t.prototype.renderLoadingSpinner=function(){if(this.size==="short"){return h("bds-loading-spinner",{size:"extra-small",color:this.bdsLoadingColor})}else{return h("bds-loading-spinner",{size:"small",color:this.bdsLoadingColor})}};t.prototype.render=function(){var t;var e=this;var o=this.getSizeClass();return h("button",{onClick:function(t){return e.handleClick(t)},disabled:this.disabled,type:this.type,class:(t={button:true},t["button__".concat(this.variant)]=true,t["button__disabled"]=this.disabled,t[o]=true,t["button--size-icon--left"]=!!this.icon,t["button--size-icon--right"]=this.arrow,t),part:"button","data-test":this.dataTest},[this.bdsLoading&&this.renderLoadingSpinner(),this.renderIcon(),this.renderText(),this.renderArrow()])};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();Button.style=buttonCss;var loadExtraSmallSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGgKZD0iTTEuNiA4QzAuNzE2MzQ1IDggLTAuMDE2MDg2OSA3LjI3NjY4IDAuMTU5NDY5IDYuNDEwNjRDMC4yNjEzOTMgNS45MDc4NCAwLjQxMTY4OSA1LjQxNDc5IDAuNjA4OTY0IDQuOTM4NTNDMS4wMTEgMy45Njc5MyAxLjYwMDI4IDMuMDg2MDEgMi4zNDMxNSAyLjM0MzE1QzMuMDg2MDIgMS42MDAyOCAzLjk2NzkzIDEuMDExIDQuOTM4NTMgMC42MDg5NjNDNS40MTQ4IDAuNDExNjg5IDUuOTA3ODQgMC4yNjEzOTMgNi40MTA2NCAwLjE1OTQ2OUM3LjI3NjY4IC0wLjAxNjA4NjYgOCAwLjcxNjM0NSA4IDEuNkM4IDIuNDgzNjUgNy4yNjQ0NyAzLjE3NTA4IDYuNDI5NDYgMy40NjQyMUM2LjMzOTgxIDMuNDk1MjUgNi4yNTA5OSAzLjUyODk4IDYuMTYzMTIgMy41NjUzOEM1LjU4MDc2IDMuODA2NiA1LjA1MTYxIDQuMTYwMTcgNC42MDU4OSA0LjYwNTg5QzQuMTYwMTcgNS4wNTE2MSAzLjgwNjY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0iY3VycmVudENvbG9yIgovPgo8L3N2Zz4=";var loadingSpinnerCss=":host{display:block}.spinner_container{display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.spinner_background{border-radius:50%;border:2px solid var(--color-surface-3, #e7edf4)}.spinner_background_extra-small{border-width:2px;width:16px;height:16px;-webkit-box-sizing:border-box;box-sizing:border-box}.spinner_background_small{border-width:4px;width:32px;height:32px;-webkit-box-sizing:border-box;box-sizing:border-box}.spinner_background_standard{border-width:8px;width:64px;height:64px;-webkit-box-sizing:border-box;box-sizing:border-box}.spinner_background_main{border-color:var(--color-surface-3, #e7edf4)}.spinner_background_light{border-color:var(--color-content-default, #202c44);mix-blend-mode:multiply;opacity:0.32}.spinner_loading{-webkit-animation:rotate 0.5s linear infinite;animation:rotate 0.5s linear infinite;position:absolute}.spinner_loading_extra-small{width:16px;height:16px}.spinner_loading_small{width:32px;height:32px}.spinner_loading_standard{width:64px;height:64px}.spinner_loading_main{color:var(--color-brand, #3f7de8)}.spinner_loading_light{color:var(--color-surface-3, #e7edf4)}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";var BdsLoadingSpinner=function(){function t(t){var e=this;registerInstance(this,t);this.formatSvg=function(t){var e=document.createElement("div");e.innerHTML=t;var o=e.firstElementChild;o.removeAttribute("width");o.removeAttribute("height");return e.innerHTML};this.setSvgContent=function(){var t=e.size=="extra-small"?loadExtraSmallSvg:e.size=="small"?loadSmallSvg:e.size=="standard"&&loadStandardSvg;var o=atob(t.replace("data:image/svg+xml;base64,",""));e.svgContent=e.formatSvg(o)};this.svgContent=undefined;this.variant="primary";this.size="standard";this.color="main";this.dataTest=null}t.prototype.componentWillLoad=function(){this.setSvgContent()};t.prototype.render=function(){var t,e,o;return h(Host,null,h("div",{class:(t={spinner_container:true},t["spinner_background_".concat(this.size)]=true,t),"data-test":this.dataTest},h("div",{class:(e={spinner_background:true},e["spinner_background_".concat(this.size)]=true,e["spinner_background_".concat(this.color)]=true,e)}),h("div",{class:(o={spinner_loading:true},o["spinner_loading_".concat(this.size)]=true,o["spinner_loading_".concat(this.color)]=true,o),innerHTML:this.svgContent})))};return t}();BdsLoadingSpinner.style=loadingSpinnerCss;export{Button as bds_button,BdsLoadingSpinner as bds_loading_spinner};
|
|
1
|
+
import{r as registerInstance,c as createEvent,h,g as getElement,H as Host}from"./index-cbe64994.js";var buttonCss=".button{border:none;margin:0;padding:0;width:auto;overflow:visible;outline:none;background:transparent;color:inherit;font:inherit;line-height:normal;-webkit-font-smoothing:inherit;-moz-osx-font-smoothing:inherit;-webkit-appearance:none;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;height:100%;border-radius:8px;padding-left:16px;padding-right:16px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all 0.5s;-moz-transition:all 0.5s;transition:all 0.5s}.button::-moz-focus-inner{border:0;padding:0}.button *{pointer-events:none}.button--size-tall{padding-top:14px;padding-bottom:14px;height:40px}.button--size-tall--icon{padding-top:12px;padding-bottom:12px;height:40px}.button--size-standard{padding-top:9px;padding-bottom:9px;height:40px}.button--size-standard--icon{padding-top:8px;padding-bottom:8px;height:40px}.button--size-short{padding-top:5px;padding-bottom:5px;height:32px}.button--size-short--icon{padding-top:4px;padding-bottom:4px;height:40px}.button--size-icon--left{padding-left:16px}.button--size-icon--right{padding-right:16px}.button__icon{color:inherit;background-color:inherit;height:24px;margin-right:4px}.button__arrow{color:inherit;background-color:inherit;height:24px;margin-left:2px}.button__content{height:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.button__primary{background:#3f7de8;color:#ffffff}.button__primary:hover{background:#125ad5}.button__primary:active{background:#0747a6;color:#ffffff}.button__primary--disabled{background:#e8f2ff;pointer-events:none;color:#637798}.button__primary--disabled:hover,.button__primary--disabled:active{background:#e8f2ff;color:#637798}.button__secondary{background:transparent;color:#505f79}.button__secondary:hover{background:#e8f2ff;color:#3f7de8}.button__secondary:active{background:#d1e3fa;color:#3f7de8}.button__secondary--disabled{background:transparent;pointer-events:none;color:#637798}.button__secondary--disabled:hover,.button__secondary--disabled:active{background:transparent;color:#637798}.button__tertiary{background:transparent;color:#3f7de8;border:1px solid #d2dfe6}.button__tertiary:hover{border:1px solid #3f7de8;color:#3f7de8}.button__tertiary:active{background:#d1e3fa;border:1px solid #3f7de8;color:#3f7de8}.button__tertiary--disabled{background:transparent;pointer-events:none;color:#637798;border:1px solid #637798}.button__tertiary--disabled:hover,.button__tertiary--disabled:active{background:transparent;color:#637798;border:1px solid #637798}.button__secondary--white{background:transparent;color:#ffffff}.button__secondary--white:hover{background:rgba(255, 255, 255, 0.3);color:#ffffff}.button__secondary--white:active{background:rgba(255, 255, 255, 0.4);color:#ffffff}.button__secondary--white--disabled{background:#e8f2ff;pointer-events:none;color:#8ca0b3}.button__secondary--white--disabled:hover,.button__secondary--white--disabled:active{background:#e8f2ff;color:#8ca0b3}.button__ghost{background:transparent;color:#3f7de8;border:1px solid #3f7de8}.button__ghost:hover{background:#e8f2ff;color:#3f7de8;border:1px solid #3f7de8}.button__ghost:active{background:#d1e3fa;color:#3f7de8;border:1px solid #3f7de8}.button__ghost--disabled{background:transparent;pointer-events:none;color:#637798;border:1px solid #637798}.button__ghost--disabled:hover,.button__ghost--disabled:active{background:transparent;color:#637798;border:1px solid #637798}.button__delete{background:#ff4c4c;color:#ffffff}.button__delete:hover{background:#a01c2c;color:#ffffff}.button__delete:active{background:#6a2026;color:#ffffff}.button__delete--disabled{background:#fccccc;pointer-events:none;color:#ba5a5a}.button__delete--disabled:hover,.button__delete--disabled:active{background:#fccccc;color:#ba5a5a}.button__dashed{background:transparent;color:#3f7de8;border:1px dashed #3f7de8}.button__dashed:hover{background:transparent;color:#125ad5;border:1px dashed #125ad5}.button__dashed:active{background:transparent;color:#3f7de8;border:1px dashed #3f7de8}.button__dashed--disabled{background:transparent;pointer-events:none;color:#8ca0b3;border:1px dashed #8ca0b3}.button__dashed--disabled:hover,.button__dashed--disabled:active{background:transparent;color:#8ca0b3;border:1px dashed #8ca0b3}.button__facebook{background:#1877f2;color:#f8fbfb}.button__facebook:hover{background:#1771e6}.button__facebook:active{background:#3f7de8;color:#f8fbfb}.button__facebook--disabled{background:#e8f2ff;pointer-events:none;color:#8ca0b3}.button__facebook--disabled:hover,.button__facebook--disabled:active{background:#e8f2ff;color:#8ca0b3}.button bds-loading-spinner{width:auto;max-height:100%;position:absolute}.button .hide{cursor:not-allowed;opacity:0}";var Button=function(){function t(t){var o=this;registerInstance(this,t);this.bdsClick=createEvent(this,"bdsClick",7);this.handleClick=function(t){if(!o.disabled){o.bdsClick.emit();var e=o.el.closest("form");if(e){t.preventDefault();var n=document.createElement("button");n.type=o.type;n.style.display="none";e.appendChild(n);n.click();n.remove()}}};this.disabled=false;this.size="standard";this.variant="primary";this.icon=null;this.arrow=false;this.type="button";this.typeIcon="icon";this.bdsLoading=false;this.bdsLoadingVariant="primary";this.bdsLoadingColor="light";this.dataTest=null}t.prototype.getSizeClass=function(){return this.arrow||!!this.icon?"button--size-".concat(this.size,"--icon"):"button--size-".concat(this.size)};t.prototype.renderIcon=function(){return this.icon&&h("div",{class:{button__icon:true,hide:this.bdsLoading&&true}},h("bds-icon",{name:this.icon,type:this.typeIcon,color:"inherit"}))};t.prototype.renderText=function(){var t;return h("div",{class:(t={button__content:true},t["button__content__".concat(this.variant)]=true,t["button__content__".concat(this.variant,"--disabled")]=this.disabled,t.hide=this.bdsLoading&&true,t)},h("bds-typo",{variant:"fs-14",lineHeight:"simple",bold:"bold"},h("slot",null)))};t.prototype.renderArrow=function(){return this.arrow&&h("div",{class:{button__arrow:true,hide:this.bdsLoading&&true}},h("bds-icon",{name:"arrow-right",color:"inherit"}))};t.prototype.renderLoadingSpinner=function(){if(this.size==="short"){return h("bds-loading-spinner",{size:"extra-small",color:this.bdsLoadingColor})}else{return h("bds-loading-spinner",{size:"small",color:this.bdsLoadingColor})}};t.prototype.render=function(){var t;var o=this;var e=this.getSizeClass();return h("button",{onClick:function(t){return o.handleClick(t)},disabled:this.disabled,type:this.type,class:(t={button:true},t["button__".concat(this.variant)]=true,t["button__".concat(this.variant,"--disabled")]=this.disabled,t[e]=true,t["button--size-icon--left"]=!!this.icon,t["button--size-icon--right"]=this.arrow,t),part:"button","data-test":this.dataTest},[this.bdsLoading&&this.renderLoadingSpinner(),this.renderIcon(),this.renderText(),this.renderArrow()])};Object.defineProperty(t.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return t}();Button.style=buttonCss;var loadExtraSmallSvg="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGgKZD0iTTEuNiA4QzAuNzE2MzQ1IDggLTAuMDE2MDg2OSA3LjI3NjY4IDAuMTU5NDY5IDYuNDEwNjRDMC4yNjEzOTMgNS45MDc4NCAwLjQxMTY4OSA1LjQxNDc5IDAuNjA4OTY0IDQuOTM4NTNDMS4wMTEgMy45Njc5MyAxLjYwMDI4IDMuMDg2MDEgMi4zNDMxNSAyLjM0MzE1QzMuMDg2MDIgMS42MDAyOCAzLjk2NzkzIDEuMDExIDQuOTM4NTMgMC42MDg5NjNDNS40MTQ4IDAuNDExNjg5IDUuOTA3ODQgMC4yNjEzOTMgNi40MTA2NCAwLjE1OTQ2OUM3LjI3NjY4IC0wLjAxNjA4NjYgOCAwLjcxNjM0NSA4IDEuNkM4IDIuNDgzNjUgNy4yNjQ0NyAzLjE3NTA4IDYuNDI5NDYgMy40NjQyMUM2LjMzOTgxIDMuNDk1MjUgNi4yNTA5OSAz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SA4LjYzMjE3IDI2LjIzNzYgOC4zMzI1NyAyOC4wMTg1QzcuOTY2MDggMzAuMTk3IDYuMjA5MTQgMzIgNCAzMloiCmZpbGwtcnVsZT0iZXZlbm9kZCIKZmlsbD0iY3VycmVudENvbG9yIgovPgo8L3N2Zz4=";var loadingSpinnerCss=":host{display:block}.spinner_container{display:-ms-inline-flexbox;display:inline-flex;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.spinner_background{border-radius:50%;border:2px solid var(--color-surface-3, #e7edf4)}.spinner_background_extra-small{border-width:2px;width:16px;height:16px;-webkit-box-sizing:border-box;box-sizing:border-box}.spinner_background_small{border-width:4px;width:32px;height:32px;-webkit-box-sizing:border-box;box-sizing:border-box}.spinner_background_standard{border-width:8px;width:64px;height:64px;-webkit-box-sizing:border-box;box-sizing:border-box}.spinner_background_main{border-color:var(--color-surface-3, #e7edf4)}.spinner_background_light{border-color:var(--color-content-default, #202c44);mix-blend-mode:multiply;opacity:0.32}.spinner_loading{-webkit-animation:rotate 0.5s linear infinite;animation:rotate 0.5s linear infinite;position:absolute}.spinner_loading_extra-small{width:16px;height:16px}.spinner_loading_small{width:32px;height:32px}.spinner_loading_standard{width:64px;height:64px}.spinner_loading_main{color:var(--color-brand, #3f7de8)}.spinner_loading_light{color:var(--color-surface-3, #e7edf4)}@-webkit-keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes rotate{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";var BdsLoadingSpinner=function(){function t(t){var o=this;registerInstance(this,t);this.formatSvg=function(t){var o=document.createElement("div");o.innerHTML=t;var e=o.firstElementChild;e.removeAttribute("width");e.removeAttribute("height");return o.innerHTML};this.setSvgContent=function(){var t=o.size=="extra-small"?loadExtraSmallSvg:o.size=="small"?loadSmallSvg:o.size=="standard"&&loadStandardSvg;var e=atob(t.replace("data:image/svg+xml;base64,",""));o.svgContent=o.formatSvg(e)};this.svgContent=undefined;this.variant="primary";this.size="standard";this.color="main";this.dataTest=null}t.prototype.componentWillLoad=function(){this.setSvgContent()};t.prototype.render=function(){var t,o,e;return h(Host,null,h("div",{class:(t={spinner_container:true},t["spinner_background_".concat(this.size)]=true,t),"data-test":this.dataTest},h("div",{class:(o={spinner_background:true},o["spinner_background_".concat(this.size)]=true,o["spinner_background_".concat(this.color)]=true,o)}),h("div",{class:(e={spinner_loading:true},e["spinner_loading_".concat(this.size)]=true,e["spinner_loading_".concat(this.color)]=true,e),innerHTML:this.svgContent})))};return t}();BdsLoadingSpinner.style=loadingSpinnerCss;export{Button as bds_button,BdsLoadingSpinner as bds_loading_spinner};
|