1import{k as u,r as g,l as m,m as p,n}from"./index-Db-3GvIL.js";import{n as r,c as x}from"./index-C1VsgRY1.js";import"./index-C3JCvmqE.js";import"./index-Cr4yxThN.js";const b=u` 2 button { 3 display: block; 4 display: flex; 5 align-items: center; 6 padding: ${({spacing:e})=>e[1]}; 7 transition: background-color ${({durations:e})=>e.lg} 8 ${({easings:e})=>e["ease-out-power-2"]}; 9 will-change: background-color; 10 background-color: ${({tokens:e})=>e.theme.foregroundPrimary}; 11 border-radius: ${({borderRadius:e})=>e[32]}; 12 } 13 14 wui-image { 15 border-radius: ${({borderRadius:e})=>e[32]}; 16 } 17 18 wui-text { 19 padding-left: ${({spacing:e})=>e[1]}; 20 padding-right: ${({spacing:e})=>e[1]}; 21 } 22 23 .left-icon-container { 24 width: 24px; 25 height: 24px; 26 justify-content: center; 27 align-items: center; 28 } 29 30 .left-image-container { 31 position: relative; 32 justify-content: center; 33 align-items: center; 34 } 35 36 .chain-image { 37 position: absolute; 38 border: 1px solid ${({tokens:e})=>e.theme.foregroundPrimary}; 39 } 40 41 /* -- Sizes --------------------------------------------------- */ 42 button[data-size='lg'] { 43 height: 32px; 44 } 45 46 button[data-size='md'] { 47 height: 28px; 48 } 49 50 button[data-size='sm'] { 51 height: 24px; 52 } 53 54 button[data-size='lg'] .token-image { 55 width: 24px; 56 height: 24px; 57 } 58 59 button[data-size='md'] .token-image { 60 width: 20px; 61 height: 20px; 62 } 63 64 button[data-size='sm'] .token-image { 65 width: 16px; 66 height: 16px; 67 } 68 69 button[data-size='lg'] .left-icon-container { 70 width: 24px; 71 height: 24px; 72 } 73 74 button[data-size='md'] .left-icon-container { 75 width: 20px; 76 height: 20px; 77 } 78 79 button[data-size='sm'] .left-icon-container { 80 width: 16px; 81 height: 16px; 82 } 83 84 button[data-size='lg'] .chain-image { 85 width: 12px; 86 height: 12px; 87 bottom: 2px; 88 right: -4px; 89 } 90 91 button[data-size='md'] .chain-image { 92 width: 10px; 93 height: 10px; 94 bottom: 2px; 95 right: -4px; 96 } 97 98 button[data-size='sm'] .chain-image { 99 width: 8px; 100 height: 8px; 101 bottom: 2px; 102 right: -3px; 103 } 104 105 /* -- Focus states --------------------------------------------------- */ 106 button:focus-visible:enabled { 107 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 108 box-shadow: 0 0 0 4px ${({tokens:e})=>e.core.foregroundAccent040}; 109 } 110 111 /* -- Hover & Active states ----------------------------------------------------------- */ 112 @media (hover: hover) { 113 button:hover:enabled, 114 button:active:enabled { 115 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 116 } 117 } 118 119 /* -- Disabled states --------------------------------------------------- */ 120 button:disabled { 121 background-color: ${({tokens:e})=>e.theme.foregroundSecondary}; 122 opacity: 0.5; 123 } 124`;var a=function(e,t,s,d){var c=arguments.length,o=c<3?t:d===null?d=Object.getOwnPropertyDescriptor(t,s):d,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,s,d);else for(var h=e.length-1;h>=0;h--)(l=e[h])&&(o=(c<3?l(o):c>3?l(t,s,o):l(t,s))||o);return c>3&&o&&Object.defineProperty(t,s,o),o};const f={lg:"lg-regular",md:"lg-regular",sm:"md-regular"},w={lg:"lg",md:"md",sm:"sm"};let i=class extends p{constructor(){super(...arguments),this.size="md",this.disabled=!1,this.text="",this.loading=!1}render(){return this.loading?n` <wui-flex alignItems="center" gap="01" padding="01"> 125 <wui-shimmer width="20px" height="20px"></wui-shimmer> 126 <wui-shimmer width="32px" height="18px" borderRadius="4xs"></wui-shimmer> 127 </wui-flex>`:n` 128 <button ?disabled=${this.disabled} data-size=${this.size}> 129 ${this.imageTemplate()} ${this.textTemplate()} 130 </button> 131 `}imageTemplate(){if(this.imageSrc&&this.chainImageSrc)return n`<wui-flex class="left-image-container"> 132 <wui-image src=${this.imageSrc} class="token-image"></wui-image> 133 <wui-image src=${this.chainImageSrc} class="chain-image"></wui-image> 134 </wui-flex>`;if(this.imageSrc)return n`<wui-image src=${this.imageSrc} class="token-image"></wui-image>`;const t=w[this.size];return n`<wui-flex class="left-icon-container"> 135 <wui-icon size=${t} name="networkPlaceholder"></wui-icon> 136 </wui-flex>`}textTemplate(){const t=f[this.size];return n`<wui-text color="primary" variant=${t} 137 >${this.text}</wui-text 138 >`}};i.styles=[g,m,b];a([r()],i.prototype,"size",void 0);a([r()],i.prototype,"imageSrc",void 0);a([r()],i.prototype,"chainImageSrc",void 0);a([r({type:Boolean})],i.prototype,"disabled",void 0);a([r()],i.prototype,"text",void 0);a([r({type:Boolean})],i.prototype,"loading",void 0);i=a([x("wui-token-button")],i);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.