UNPKG

@safe-stars/components

Version:

React component library for buying Telegram Stars in Telegram Mini Apps via Safe Stars.

231 lines (210 loc) 23.5 kB
"use strict";const c=require("./index-DFmTudTt.cjs"),v={getSpacingStyles(e,t){if(Array.isArray(e))return e[t]?`var(--wui-spacing-${e[t]})`:void 0;if(typeof e=="string")return`var(--wui-spacing-${e})`},getFormattedDate(e){return new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric"}).format(e)},getHostName(e){try{return new URL(e).hostname}catch{return""}},getTruncateString({string:e,charsStart:t,charsEnd:r,truncate:o}){return e.length<=t+r?e:o==="end"?`${e.substring(0,t)}...`:o==="start"?`...${e.substring(e.length-r)}`:`${e.substring(0,Math.floor(t))}...${e.substring(e.length-Math.floor(r))}`},generateAvatarColors(e){const r=e.toLowerCase().replace(/^0x/iu,"").replace(/[^a-f0-9]/gu,"").substring(0,6).padEnd(6,"0"),o=this.hexToRgb(r),n=getComputedStyle(document.documentElement).getPropertyValue("--w3m-border-radius-master"),s=100-3*Number(n==null?void 0:n.replace("px","")),a=`${s}% ${s}% at 65% 40%`,u=[];for(let p=0;p<5;p+=1){const w=this.tintColor(o,.15*p);u.push(`rgb(${w[0]}, ${w[1]}, ${w[2]})`)}return` --local-color-1: ${u[0]}; --local-color-2: ${u[1]}; --local-color-3: ${u[2]}; --local-color-4: ${u[3]}; --local-color-5: ${u[4]}; --local-radial-circle: ${a} `},hexToRgb(e){const t=parseInt(e,16),r=t>>16&255,o=t>>8&255,n=t&255;return[r,o,n]},tintColor(e,t){const[r,o,n]=e,i=Math.round(r+(255-r)*t),s=Math.round(o+(255-o)*t),a=Math.round(n+(255-n)*t);return[i,s,a]},isNumber(e){return{number:/^[0-9]+$/u}.number.test(e)},getColorTheme(e){var t;return e||(typeof window<"u"&&window.matchMedia?(t=window.matchMedia("(prefers-color-scheme: dark)"))!=null&&t.matches?"dark":"light":"dark")},splitBalance(e){const t=e.split(".");return t.length===2?[t[0],t[1]]:["0","00"]},roundNumber(e,t,r){return e.toString().length>=t?Number(e).toFixed(r):e},formatNumberToLocalString(e,t=2){return e===void 0?"0.00":typeof e=="number"?e.toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t}):parseFloat(e).toLocaleString("en-US",{maximumFractionDigits:t,minimumFractionDigits:t})}};function j(e,t){const{kind:r,elements:o}=t;return{kind:r,elements:o,finisher(n){customElements.get(e)||customElements.define(e,n)}}}function E(e,t){return customElements.get(e)||customElements.define(e,t),t}function P(e){return function(r){return typeof r=="function"?E(e,r):j(e,r)}}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const M={attribute:!0,type:String,converter:c.u,reflect:!1,hasChanged:c.f},U=(e=M,t,r)=>{const{kind:o,metadata:n}=r;let i=globalThis.litPropertyMetadata.get(n);if(i===void 0&&globalThis.litPropertyMetadata.set(n,i=new Map),o==="setter"&&((e=Object.create(e)).wrapped=!0),i.set(r.name,e),o==="accessor"){const{name:s}=r;return{set(a){const u=t.get.call(this);t.set.call(this,a),this.requestUpdate(s,u,e)},init(a){return a!==void 0&&this.C(s,void 0,e,a),a}}}if(o==="setter"){const{name:s}=r;return function(a){const u=this[s];t.call(this,a),this.requestUpdate(s,u,e)}}throw Error("Unsupported decorator location: "+o)};function l(e){return(t,r)=>typeof r=="object"?U(e,t,r):((o,n,i)=>{const s=n.hasOwnProperty(i);return n.constructor.createProperty(i,o),s?Object.getOwnPropertyDescriptor(n,i):void 0})(e,t,r)}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */function O(e){return l({...e,state:!0,attribute:!1})}/** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const L=e=>e===null||typeof e!="object"&&typeof e!="function",H=e=>e.strings===void 0;/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const A={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},C=e=>(...t)=>({_$litDirective$:e,values:t});let z=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,o){this._$Ct=t,this._$AM=r,this._$Ci=o}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const m=(e,t)=>{var o;const r=e._$AN;if(r===void 0)return!1;for(const n of r)(o=n._$AO)==null||o.call(n,t,!1),m(n,t);return!0},S=e=>{let t,r;do{if((t=e._$AM)===void 0)break;r=t._$AN,r.delete(e),e=t}while((r==null?void 0:r.size)===0)},k=e=>{for(let t;t=e._$AM;e=t){let r=t._$AN;if(r===void 0)t._$AN=r=new Set;else if(r.has(e))break;r.add(e),D(t)}};function I(e){this._$AN!==void 0?(S(this),this._$AM=e,k(this)):this._$AM=e}function N(e,t=!1,r=0){const o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let i=r;i<o.length;i++)m(o[i],!1),S(o[i]);else o!=null&&(m(o,!1),S(o));else m(this,e)}const D=e=>{e.type==A.CHILD&&(e._$AP??(e._$AP=N),e._$AQ??(e._$AQ=I))};class R extends z{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,r,o){super._$AT(t,r,o),k(this),this.isConnected=t._$AU}_$AO(t,r=!0){var o,n;t!==this.isConnected&&(this.isConnected=t,t?(o=this.reconnected)==null||o.call(this):(n=this.disconnected)==null||n.call(this)),r&&(m(this,t),S(this))}setValue(t){if(H(this._$Ct))this._$Ct._$AI(t,this);else{const r=[...this._$Ct._$AH];r[this._$Ci]=t,this._$Ct._$AI(r,this,0)}}disconnected(){}reconnected(){}}/** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */class F{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class G{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){this.Y??(this.Y=new Promise(t=>this.Z=t))}resume(){var t;(t=this.Z)==null||t.call(this),this.Y=this.Z=void 0}}/** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const x=e=>!L(e)&&typeof e.then=="function",_=1073741823;class W extends R{constructor(){super(...arguments),this._$Cwt=_,this._$Cbt=[],this._$CK=new F(this),this._$CX=new G}render(...t){return t.find(r=>!x(r))??c.T}update(t,r){const o=this._$Cbt;let n=o.length;this._$Cbt=r;const i=this._$CK,s=this._$CX;this.isConnected||this.disconnected();for(let a=0;a<r.length&&!(a>this._$Cwt);a++){const u=r[a];if(!x(u))return this._$Cwt=a,u;a<n&&u===o[a]||(this._$Cwt=_,n=0,Promise.resolve(u).then(async p=>{for(;s.get();)await s.get();const w=i.deref();if(w!==void 0){const b=w._$Cbt.indexOf(u);b>-1&&b<w._$Cwt&&(w._$Cwt=b,w.setValue(p))}}))}return c.T}disconnected(){this._$CK.disconnect(),this._$CX.pause()}reconnected(){this._$CK.reconnect(this),this._$CX.resume()}}const V=C(W);class Y{constructor(){this.cache=new Map}set(t,r){this.cache.set(t,r)}get(t){return this.cache.get(t)}has(t){return this.cache.has(t)}delete(t){this.cache.delete(t)}clear(){this.cache.clear()}}const q=new Y,K=c.i` :host { display: flex; aspect-ratio: var(--local-aspect-ratio); color: var(--local-color); width: var(--local-width); } svg { width: inherit; height: inherit; object-fit: contain; object-position: center; } .fallback { width: var(--local-width); height: var(--local-height); } `;var y=function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i};const T={add:async()=>(await Promise.resolve().then(()=>require("./add-B8T8QxmT.cjs"))).addSvg,allWallets:async()=>(await Promise.resolve().then(()=>require("./all-wallets-B3_kT3L3.cjs"))).allWalletsSvg,arrowBottomCircle:async()=>(await Promise.resolve().then(()=>require("./arrow-bottom-circle-DrOjo-Z7.cjs"))).arrowBottomCircleSvg,appStore:async()=>(await Promise.resolve().then(()=>require("./app-store-BGhe-m2n.cjs"))).appStoreSvg,apple:async()=>(await Promise.resolve().then(()=>require("./apple-7-Ykzuu7.cjs"))).appleSvg,arrowBottom:async()=>(await Promise.resolve().then(()=>require("./arrow-bottom-L3zKmV1O.cjs"))).arrowBottomSvg,arrowLeft:async()=>(await Promise.resolve().then(()=>require("./arrow-left-BrW7mX_C.cjs"))).arrowLeftSvg,arrowRight:async()=>(await Promise.resolve().then(()=>require("./arrow-right-C1RWCQ1i.cjs"))).arrowRightSvg,arrowTop:async()=>(await Promise.resolve().then(()=>require("./arrow-top-DWTIna3Y.cjs"))).arrowTopSvg,bank:async()=>(await Promise.resolve().then(()=>require("./bank-F7_ngalW.cjs"))).bankSvg,browser:async()=>(await Promise.resolve().then(()=>require("./browser-Dzwhem1v.cjs"))).browserSvg,card:async()=>(await Promise.resolve().then(()=>require("./card-Meg5B_KL.cjs"))).cardSvg,checkmark:async()=>(await Promise.resolve().then(()=>require("./checkmark-DgoaZoSm.cjs"))).checkmarkSvg,checkmarkBold:async()=>(await Promise.resolve().then(()=>require("./checkmark-bold-C6c-fDMo.cjs"))).checkmarkBoldSvg,chevronBottom:async()=>(await Promise.resolve().then(()=>require("./chevron-bottom-B0MKMRWS.cjs"))).chevronBottomSvg,chevronLeft:async()=>(await Promise.resolve().then(()=>require("./chevron-left-BOw0UvB6.cjs"))).chevronLeftSvg,chevronRight:async()=>(await Promise.resolve().then(()=>require("./chevron-right-B1jQwIcD.cjs"))).chevronRightSvg,chevronTop:async()=>(await Promise.resolve().then(()=>require("./chevron-top-XloW-s0L.cjs"))).chevronTopSvg,chromeStore:async()=>(await Promise.resolve().then(()=>require("./chrome-store-DnbKP99P.cjs"))).chromeStoreSvg,clock:async()=>(await Promise.resolve().then(()=>require("./clock-BRMlkG8P.cjs"))).clockSvg,close:async()=>(await Promise.resolve().then(()=>require("./close-BL5zd_5-.cjs"))).closeSvg,compass:async()=>(await Promise.resolve().then(()=>require("./compass-CQu9k3e5.cjs"))).compassSvg,coinPlaceholder:async()=>(await Promise.resolve().then(()=>require("./coinPlaceholder-2-XfePcg.cjs"))).coinPlaceholderSvg,copy:async()=>(await Promise.resolve().then(()=>require("./copy-B9peivC5.cjs"))).copySvg,cursor:async()=>(await Promise.resolve().then(()=>require("./cursor-DTc0L_zu.cjs"))).cursorSvg,cursorTransparent:async()=>(await Promise.resolve().then(()=>require("./cursor-transparent-BMiyi00v.cjs"))).cursorTransparentSvg,desktop:async()=>(await Promise.resolve().then(()=>require("./desktop-PC0ABzaR.cjs"))).desktopSvg,disconnect:async()=>(await Promise.resolve().then(()=>require("./disconnect-DX_6CBC7.cjs"))).disconnectSvg,discord:async()=>(await Promise.resolve().then(()=>require("./discord-DxmBYqbw.cjs"))).discordSvg,etherscan:async()=>(await Promise.resolve().then(()=>require("./etherscan-SBdxPNJV.cjs"))).etherscanSvg,extension:async()=>(await Promise.resolve().then(()=>require("./extension-Sm1C-dVA.cjs"))).extensionSvg,externalLink:async()=>(await Promise.resolve().then(()=>require("./external-link-UGz2rqV1.cjs"))).externalLinkSvg,facebook:async()=>(await Promise.resolve().then(()=>require("./facebook-CFcQsZwy.cjs"))).facebookSvg,farcaster:async()=>(await Promise.resolve().then(()=>require("./farcaster-D5qALZFw.cjs"))).farcasterSvg,filters:async()=>(await Promise.resolve().then(()=>require("./filters-DbpxSHHu.cjs"))).filtersSvg,github:async()=>(await Promise.resolve().then(()=>require("./github-CV5kbq24.cjs"))).githubSvg,google:async()=>(await Promise.resolve().then(()=>require("./google-fYCBQmUK.cjs"))).googleSvg,helpCircle:async()=>(await Promise.resolve().then(()=>require("./help-circle-Bytwlg-n.cjs"))).helpCircleSvg,image:async()=>(await Promise.resolve().then(()=>require("./image-CHMgECer.cjs"))).imageSvg,id:async()=>(await Promise.resolve().then(()=>require("./id-J0geYehY.cjs"))).idSvg,infoCircle:async()=>(await Promise.resolve().then(()=>require("./info-circle-5dS2FBu_.cjs"))).infoCircleSvg,lightbulb:async()=>(await Promise.resolve().then(()=>require("./lightbulb-BegDZDPL.cjs"))).lightbulbSvg,mail:async()=>(await Promise.resolve().then(()=>require("./mail-BmM-opg1.cjs"))).mailSvg,mobile:async()=>(await Promise.resolve().then(()=>require("./mobile-CQCPIAe9.cjs"))).mobileSvg,more:async()=>(await Promise.resolve().then(()=>require("./more-Bmp6l3i2.cjs"))).moreSvg,networkPlaceholder:async()=>(await Promise.resolve().then(()=>require("./network-placeholder-BTaA2jFl.cjs"))).networkPlaceholderSvg,nftPlaceholder:async()=>(await Promise.resolve().then(()=>require("./nftPlaceholder-DZvvMFup.cjs"))).nftPlaceholderSvg,off:async()=>(await Promise.resolve().then(()=>require("./off-DPWrxWAn.cjs"))).offSvg,playStore:async()=>(await Promise.resolve().then(()=>require("./play-store-7o1UMRkO.cjs"))).playStoreSvg,plus:async()=>(await Promise.resolve().then(()=>require("./plus-DDR2-oUZ.cjs"))).plusSvg,qrCode:async()=>(await Promise.resolve().then(()=>require("./qr-code-9QI5H0jK.cjs"))).qrCodeIcon,recycleHorizontal:async()=>(await Promise.resolve().then(()=>require("./recycle-horizontal-CtwAdoO5.cjs"))).recycleHorizontalSvg,refresh:async()=>(await Promise.resolve().then(()=>require("./refresh-BVTEaDry.cjs"))).refreshSvg,search:async()=>(await Promise.resolve().then(()=>require("./search-DrIPLs9r.cjs"))).searchSvg,send:async()=>(await Promise.resolve().then(()=>require("./send-DO_XxXTN.cjs"))).sendSvg,swapHorizontal:async()=>(await Promise.resolve().then(()=>require("./swapHorizontal-CV5mtlXI.cjs"))).swapHorizontalSvg,swapHorizontalMedium:async()=>(await Promise.resolve().then(()=>require("./swapHorizontalMedium-BArLmHaN.cjs"))).swapHorizontalMediumSvg,swapHorizontalBold:async()=>(await Promise.resolve().then(()=>require("./swapHorizontalBold-BFk5jOI2.cjs"))).swapHorizontalBoldSvg,swapHorizontalRoundedBold:async()=>(await Promise.resolve().then(()=>require("./swapHorizontalRoundedBold-CXOlJski.cjs"))).swapHorizontalRoundedBoldSvg,swapVertical:async()=>(await Promise.resolve().then(()=>require("./swapVertical-BU917hcl.cjs"))).swapVerticalSvg,telegram:async()=>(await Promise.resolve().then(()=>require("./telegram-CD-LhIgX.cjs"))).telegramSvg,threeDots:async()=>(await Promise.resolve().then(()=>require("./three-dots-ZtkNq4S1.cjs"))).threeDotsSvg,twitch:async()=>(await Promise.resolve().then(()=>require("./twitch-B5Ot0NPA.cjs"))).twitchSvg,twitter:async()=>(await Promise.resolve().then(()=>require("./x-BEdpX8RY.cjs"))).xSvg,twitterIcon:async()=>(await Promise.resolve().then(()=>require("./twitterIcon-DilJb5fz.cjs"))).twitterIconSvg,verify:async()=>(await Promise.resolve().then(()=>require("./verify-D1gWaFmN.cjs"))).verifySvg,verifyFilled:async()=>(await Promise.resolve().then(()=>require("./verify-filled-BKAeiVGo.cjs"))).verifyFilledSvg,wallet:async()=>(await Promise.resolve().then(()=>require("./wallet-QuVOyYwo.cjs"))).walletSvg,walletConnect:async()=>(await Promise.resolve().then(()=>require("./walletconnect-DcwsJ1pq.cjs"))).walletConnectSvg,walletConnectLightBrown:async()=>(await Promise.resolve().then(()=>require("./walletconnect-DcwsJ1pq.cjs"))).walletConnectLightBrownSvg,walletConnectBrown:async()=>(await Promise.resolve().then(()=>require("./walletconnect-DcwsJ1pq.cjs"))).walletConnectBrownSvg,walletPlaceholder:async()=>(await Promise.resolve().then(()=>require("./wallet-placeholder-WFRFc6ax.cjs"))).walletPlaceholderSvg,warningCircle:async()=>(await Promise.resolve().then(()=>require("./warning-circle-CfI3zaWd.cjs"))).warningCircleSvg,x:async()=>(await Promise.resolve().then(()=>require("./x-BEdpX8RY.cjs"))).xSvg,info:async()=>(await Promise.resolve().then(()=>require("./info-Cfan96ft.cjs"))).infoSvg,exclamationTriangle:async()=>(await Promise.resolve().then(()=>require("./exclamation-triangle-tdrE0P8_.cjs"))).exclamationTriangleSvg,reown:async()=>(await Promise.resolve().then(()=>require("./reown-logo-BCZ-LH-J.cjs"))).reownSvg};async function X(e){if(q.has(e))return q.get(e);const r=(T[e]??T.copy)();return q.set(e,r),r}let f=class extends c.i$1{constructor(){super(...arguments),this.size="md",this.name="copy",this.color="fg-300",this.aspectRatio="1 / 1"}render(){return this.style.cssText=` --local-color: ${`var(--wui-color-${this.color});`} --local-width: ${`var(--wui-icon-size-${this.size});`} --local-aspect-ratio: ${this.aspectRatio} `,c.x`${V(X(this.name),c.x`<div class="fallback"></div>`)}`}};f.styles=[c.resetStyles,c.colorStyles,K];y([l()],f.prototype,"size",void 0);y([l()],f.prototype,"name",void 0);y([l()],f.prototype,"color",void 0);y([l()],f.prototype,"aspectRatio",void 0);f=y([P("wui-icon")],f);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const B=C(class extends z{constructor(e){var t;if(super(e),e.type!==A.ATTRIBUTE||e.name!=="class"||((t=e.strings)==null?void 0:t.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){var o,n;if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(i=>i!=="")));for(const i in t)t[i]&&!((o=this.nt)!=null&&o.has(i))&&this.st.add(i);return this.render(t)}const r=e.element.classList;for(const i of this.st)i in t||(r.remove(i),this.st.delete(i));for(const i in t){const s=!!t[i];s===this.st.has(i)||(n=this.nt)!=null&&n.has(i)||(s?(r.add(i),this.st.add(i)):(r.remove(i),this.st.delete(i)))}return c.T}}),Z=c.i` :host { display: inline-flex !important; } slot { width: 100%; display: inline-block; font-style: normal; font-family: var(--wui-font-family); font-feature-settings: 'tnum' on, 'lnum' on, 'case' on; line-height: 130%; font-weight: var(--wui-font-weight-regular); overflow: inherit; text-overflow: inherit; text-align: var(--local-align); color: var(--local-color); } .wui-line-clamp-1 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; } .wui-line-clamp-2 { overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } .wui-font-medium-400 { font-size: var(--wui-font-size-medium); font-weight: var(--wui-font-weight-light); letter-spacing: var(--wui-letter-spacing-medium); } .wui-font-medium-600 { font-size: var(--wui-font-size-medium); letter-spacing: var(--wui-letter-spacing-medium); } .wui-font-title-600 { font-size: var(--wui-font-size-title); letter-spacing: var(--wui-letter-spacing-title); } .wui-font-title-6-600 { font-size: var(--wui-font-size-title-6); letter-spacing: var(--wui-letter-spacing-title-6); } .wui-font-mini-700 { font-size: var(--wui-font-size-mini); letter-spacing: var(--wui-letter-spacing-mini); text-transform: uppercase; } .wui-font-large-500, .wui-font-large-600, .wui-font-large-700 { font-size: var(--wui-font-size-large); letter-spacing: var(--wui-letter-spacing-large); } .wui-font-2xl-500, .wui-font-2xl-600, .wui-font-2xl-700 { font-size: var(--wui-font-size-2xl); letter-spacing: var(--wui-letter-spacing-2xl); } .wui-font-paragraph-400, .wui-font-paragraph-500, .wui-font-paragraph-600, .wui-font-paragraph-700 { font-size: var(--wui-font-size-paragraph); letter-spacing: var(--wui-letter-spacing-paragraph); } .wui-font-small-400, .wui-font-small-500, .wui-font-small-600 { font-size: var(--wui-font-size-small); letter-spacing: var(--wui-letter-spacing-small); } .wui-font-tiny-400, .wui-font-tiny-500, .wui-font-tiny-600 { font-size: var(--wui-font-size-tiny); letter-spacing: var(--wui-letter-spacing-tiny); } .wui-font-micro-700, .wui-font-micro-600 { font-size: var(--wui-font-size-micro); letter-spacing: var(--wui-letter-spacing-micro); text-transform: uppercase; } .wui-font-tiny-400, .wui-font-small-400, .wui-font-medium-400, .wui-font-paragraph-400 { font-weight: var(--wui-font-weight-light); } .wui-font-large-700, .wui-font-paragraph-700, .wui-font-micro-700, .wui-font-mini-700 { font-weight: var(--wui-font-weight-bold); } .wui-font-medium-600, .wui-font-medium-title-600, .wui-font-title-6-600, .wui-font-large-600, .wui-font-paragraph-600, .wui-font-small-600, .wui-font-tiny-600, .wui-font-micro-600 { font-weight: var(--wui-font-weight-medium); } :host([disabled]) { opacity: 0.4; } `;var $=function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i};let d=class extends c.i$1{constructor(){super(...arguments),this.variant="paragraph-500",this.color="fg-300",this.align="left",this.lineClamp=void 0}render(){const t={[`wui-font-${this.variant}`]:!0,[`wui-color-${this.color}`]:!0,[`wui-line-clamp-${this.lineClamp}`]:!!this.lineClamp};return this.style.cssText=` --local-align: ${this.align}; --local-color: var(--wui-color-${this.color}); `,c.x`<slot class=${B(t)}></slot>`}};d.styles=[c.resetStyles,Z];$([l()],d.prototype,"variant",void 0);$([l()],d.prototype,"color",void 0);$([l()],d.prototype,"align",void 0);$([l()],d.prototype,"lineClamp",void 0);d=$([P("wui-text")],d);const Q=c.i` :host { display: flex; width: inherit; height: inherit; } `;var g=function(e,t,r,o){var n=arguments.length,i=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")i=Reflect.decorate(e,t,r,o);else for(var a=e.length-1;a>=0;a--)(s=e[a])&&(i=(n<3?s(i):n>3?s(t,r,i):s(t,r))||i);return n>3&&i&&Object.defineProperty(t,r,i),i};let h=class extends c.i$1{render(){return this.style.cssText=` flex-direction: ${this.flexDirection}; flex-wrap: ${this.flexWrap}; flex-basis: ${this.flexBasis}; flex-grow: ${this.flexGrow}; flex-shrink: ${this.flexShrink}; align-items: ${this.alignItems}; justify-content: ${this.justifyContent}; column-gap: ${this.columnGap&&`var(--wui-spacing-${this.columnGap})`}; row-gap: ${this.rowGap&&`var(--wui-spacing-${this.rowGap})`}; gap: ${this.gap&&`var(--wui-spacing-${this.gap})`}; padding-top: ${this.padding&&v.getSpacingStyles(this.padding,0)}; padding-right: ${this.padding&&v.getSpacingStyles(this.padding,1)}; padding-bottom: ${this.padding&&v.getSpacingStyles(this.padding,2)}; padding-left: ${this.padding&&v.getSpacingStyles(this.padding,3)}; margin-top: ${this.margin&&v.getSpacingStyles(this.margin,0)}; margin-right: ${this.margin&&v.getSpacingStyles(this.margin,1)}; margin-bottom: ${this.margin&&v.getSpacingStyles(this.margin,2)}; margin-left: ${this.margin&&v.getSpacingStyles(this.margin,3)}; `,c.x`<slot></slot>`}};h.styles=[c.resetStyles,Q];g([l()],h.prototype,"flexDirection",void 0);g([l()],h.prototype,"flexWrap",void 0);g([l()],h.prototype,"flexBasis",void 0);g([l()],h.prototype,"flexGrow",void 0);g([l()],h.prototype,"flexShrink",void 0);g([l()],h.prototype,"alignItems",void 0);g([l()],h.prototype,"justifyContent",void 0);g([l()],h.prototype,"columnGap",void 0);g([l()],h.prototype,"rowGap",void 0);g([l()],h.prototype,"gap",void 0);g([l()],h.prototype,"padding",void 0);g([l()],h.prototype,"margin",void 0);h=g([P("wui-flex")],h);/** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause */const J=e=>e??c.E;exports.UiHelperUtil=v;exports.customElement=P;exports.e=B;exports.e$1=C;exports.f=R;exports.n=l;exports.o=J;exports.r=O; //# sourceMappingURL=if-defined-CdwTRez8.cjs.map