@tightrope-dev/link-component 0.1.3 → 0.1.5
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/index.cjs +37 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.js +3027 -0
- package/dist/index.js.map +1 -0
- package/dist/index.umd.js +37 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/link-component.css +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
(function(E,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],a):(E=typeof globalThis<"u"?globalThis:E||self,a(E.TightropeLink={},E.jsxRuntime,E.React))})(this,(function(E,a,S){"use strict";function je(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const N=je(S);function le(e,r){if(typeof e=="function")return e(r);e!=null&&(e.current=r)}function Pe(...e){return r=>{let t=!1;const o=e.map(n=>{const s=le(n,r);return!t&&typeof s=="function"&&(t=!0),s});if(t)return()=>{for(let n=0;n<o.length;n++){const s=o[n];typeof s=="function"?s():le(e[n],null)}}}}function ce(e){const r=Ie(e),t=N.forwardRef((o,n)=>{const{children:s,...l}=o,i=N.Children.toArray(s),u=i.find($e);if(u){const d=u.props.children,m=i.map(w=>w===u?N.Children.count(d)>1?N.Children.only(null):N.isValidElement(d)?d.props.children:null:w);return a.jsx(r,{...l,ref:n,children:N.isValidElement(d)?N.cloneElement(d,void 0,m):null})}return a.jsx(r,{...l,ref:n,children:s})});return t.displayName=`${e}.Slot`,t}var de=ce("Slot");function Ie(e){const r=N.forwardRef((t,o)=>{const{children:n,...s}=t;if(N.isValidElement(n)){const l=Le(n),i=Ee(s,n.props);return n.type!==N.Fragment&&(i.ref=o?Pe(o,l):l),N.cloneElement(n,i)}return N.Children.count(n)>1?N.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var Me=Symbol("radix.slottable");function $e(e){return N.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Me}function Ee(e,r){const t={...r};for(const o in r){const n=e[o],s=r[o];/^on[A-Z]/.test(o)?n&&s?t[o]=(...i)=>{const u=s(...i);return n(...i),u}:n&&(t[o]=n):o==="style"?t[o]={...n,...s}:o==="className"&&(t[o]=[n,s].filter(Boolean).join(" "))}return{...e,...t}}function Le(e){var o,n;let r=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(n=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}function ue(e){var r,t,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(r=0;r<n;r++)e[r]&&(t=ue(e[r]))&&(o&&(o+=" "),o+=t)}else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function pe(){for(var e,r,t=0,o="",n=arguments.length;t<n;t++)(e=arguments[t])&&(r=ue(e))&&(o&&(o+=" "),o+=r);return o}const fe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ge=pe,Y=(e,r)=>t=>{var o;if((r==null?void 0:r.variants)==null)return ge(e,t==null?void 0:t.class,t==null?void 0:t.className);const{variants:n,defaultVariants:s}=r,l=Object.keys(n).map(d=>{const m=t==null?void 0:t[d],w=s==null?void 0:s[d];if(m===null)return null;const C=fe(m)||fe(w);return n[d][C]}),i=t&&Object.entries(t).reduce((d,m)=>{let[w,C]=m;return C===void 0||(d[w]=C),d},{}),u=r==null||(o=r.compoundVariants)===null||o===void 0?void 0:o.reduce((d,m)=>{let{class:w,className:C,...A}=m;return Object.entries(A).every(z=>{let[g,b]=z;return Array.isArray(b)?b.includes({...s,...i}[g]):{...s,...i}[g]===b})?[...d,w,C]:d},[]);return ge(e,l,u,t==null?void 0:t.class,t==null?void 0:t.className)},R="-",Ve=e=>{const r=Oe(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:l=>{const i=l.split(R);return i[0]===""&&i.length!==1&&i.shift(),be(i,r)||Ge(l)},getConflictingClassGroupIds:(l,i)=>{const u=t[l]||[];return i&&o[l]?[...u,...o[l]]:u}}},be=(e,r)=>{var l;if(e.length===0)return r.classGroupId;const t=e[0],o=r.nextPart.get(t),n=o?be(e.slice(1),o):void 0;if(n)return n;if(r.validators.length===0)return;const s=e.join(R);return(l=r.validators.find(({validator:i})=>i(s)))==null?void 0:l.classGroupId},me=/^\[(.+)\]$/,Ge=e=>{if(me.test(e)){const r=me.exec(e)[1],t=r==null?void 0:r.substring(0,r.indexOf(":"));if(t)return"arbitrary.."+t}},Oe=e=>{const{theme:r,prefix:t}=e,o={nextPart:new Map,validators:[]};return We(Object.entries(e.classGroups),t).forEach(([s,l])=>{ee(l,o,s,r)}),o},ee=(e,r,t,o)=>{e.forEach(n=>{if(typeof n=="string"){const s=n===""?r:he(r,n);s.classGroupId=t;return}if(typeof n=="function"){if(Te(n)){ee(n(o),r,t,o);return}r.validators.push({validator:n,classGroupId:t});return}Object.entries(n).forEach(([s,l])=>{ee(l,he(r,s),t,o)})})},he=(e,r)=>{let t=e;return r.split(R).forEach(o=>{t.nextPart.has(o)||t.nextPart.set(o,{nextPart:new Map,validators:[]}),t=t.nextPart.get(o)}),t},Te=e=>e.isThemeGetter,We=(e,r)=>r?e.map(([t,o])=>{const n=o.map(s=>typeof s=="string"?r+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([l,i])=>[r+l,i])):s);return[t,n]}):e,Fe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let r=0,t=new Map,o=new Map;const n=(s,l)=>{t.set(s,l),r++,r>e&&(r=0,o=t,t=new Map)};return{get(s){let l=t.get(s);if(l!==void 0)return l;if((l=o.get(s))!==void 0)return n(s,l),l},set(s,l){t.has(s)?t.set(s,l):n(s,l)}}},ve="!",Ue=e=>{const{separator:r,experimentalParseClassName:t}=e,o=r.length===1,n=r[0],s=r.length,l=i=>{const u=[];let d=0,m=0,w;for(let b=0;b<i.length;b++){let f=i[b];if(d===0){if(f===n&&(o||i.slice(b,b+s)===r)){u.push(i.slice(m,b)),m=b+s;continue}if(f==="/"){w=b;continue}}f==="["?d++:f==="]"&&d--}const C=u.length===0?i:i.substring(m),A=C.startsWith(ve),z=A?C.substring(1):C,g=w&&w>m?w-m:void 0;return{modifiers:u,hasImportantModifier:A,baseClassName:z,maybePostfixModifierPosition:g}};return t?i=>t({className:i,parseClassName:l}):l},qe=e=>{if(e.length<=1)return e;const r=[];let t=[];return e.forEach(o=>{o[0]==="["?(r.push(...t.sort(),o),t=[]):t.push(o)}),r.push(...t.sort()),r},Be=e=>({cache:Fe(e.cacheSize),parseClassName:Ue(e),...Ve(e)}),De=/\s+/,He=(e,r)=>{const{parseClassName:t,getClassGroupId:o,getConflictingClassGroupIds:n}=r,s=[],l=e.trim().split(De);let i="";for(let u=l.length-1;u>=0;u-=1){const d=l[u],{modifiers:m,hasImportantModifier:w,baseClassName:C,maybePostfixModifierPosition:A}=t(d);let z=!!A,g=o(z?C.substring(0,A):C);if(!g){if(!z){i=d+(i.length>0?" "+i:i);continue}if(g=o(C),!g){i=d+(i.length>0?" "+i:i);continue}z=!1}const b=qe(m).join(":"),f=w?b+ve:b,k=f+g;if(s.includes(k))continue;s.push(k);const G=n(g,z);for(let P=0;P<G.length;++P){const T=G[P];s.push(f+T)}i=d+(i.length>0?" "+i:i)}return i};function Ze(){let e=0,r,t,o="";for(;e<arguments.length;)(r=arguments[e++])&&(t=ye(r))&&(o&&(o+=" "),o+=t);return o}const ye=e=>{if(typeof e=="string")return e;let r,t="";for(let o=0;o<e.length;o++)e[o]&&(r=ye(e[o]))&&(t&&(t+=" "),t+=r);return t};function Je(e,...r){let t,o,n,s=l;function l(u){const d=r.reduce((m,w)=>w(m),e());return t=Be(d),o=t.cache.get,n=t.cache.set,s=i,i(u)}function i(u){const d=o(u);if(d)return d;const m=He(u,t);return n(u,m),m}return function(){return s(Ze.apply(null,arguments))}}const v=e=>{const r=t=>t[e]||[];return r.isThemeGetter=!0,r},xe=/^\[(?:([a-z-]+):)?(.+)\]$/i,Ke=/^\d+\/\d+$/,Xe=new Set(["px","full","screen"]),Qe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ye=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Re=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,er=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,rr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>F(e)||Xe.has(e)||Ke.test(e),L=e=>U(e,"length",cr),F=e=>!!e&&!Number.isNaN(Number(e)),re=e=>U(e,"number",F),B=e=>!!e&&Number.isInteger(Number(e)),tr=e=>e.endsWith("%")&&F(e.slice(0,-1)),c=e=>xe.test(e),V=e=>Qe.test(e),or=new Set(["length","size","percentage"]),nr=e=>U(e,or,we),sr=e=>U(e,"position",we),ar=new Set(["image","url"]),ir=e=>U(e,ar,ur),lr=e=>U(e,"",dr),D=()=>!0,U=(e,r,t)=>{const o=xe.exec(e);return o?o[1]?typeof r=="string"?o[1]===r:r.has(o[1]):t(o[2]):!1},cr=e=>Ye.test(e)&&!Re.test(e),we=()=>!1,dr=e=>er.test(e),ur=e=>rr.test(e),pr=Je(()=>{const e=v("colors"),r=v("spacing"),t=v("blur"),o=v("brightness"),n=v("borderColor"),s=v("borderRadius"),l=v("borderSpacing"),i=v("borderWidth"),u=v("contrast"),d=v("grayscale"),m=v("hueRotate"),w=v("invert"),C=v("gap"),A=v("gradientColorStops"),z=v("gradientColorStopPositions"),g=v("inset"),b=v("margin"),f=v("opacity"),k=v("padding"),G=v("saturate"),P=v("scale"),T=v("sepia"),M=v("skew"),X=v("space"),Q=v("translate"),W=()=>["auto","contain","none"],q=()=>["auto","hidden","clip","visible","scroll"],H=()=>["auto",c,r],h=()=>[c,r],Z=()=>["",I,L],p=()=>["auto",F,c],x=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],y=()=>["solid","dashed","dotted","double","none"],_=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],J=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",c],Ae=()=>["auto","avoid","all","avoid-page","page","left","right","column"],$=()=>[F,c];return{cacheSize:500,separator:":",theme:{colors:[D],spacing:[I,L],blur:["none","",V,c],brightness:$(),borderColor:[e],borderRadius:["none","","full",V,c],borderSpacing:h(),borderWidth:Z(),contrast:$(),grayscale:O(),hueRotate:$(),invert:O(),gap:h(),gradientColorStops:[e],gradientColorStopPositions:[tr,L],inset:H(),margin:H(),opacity:$(),padding:h(),saturate:$(),scale:$(),sepia:O(),skew:$(),space:h(),translate:h()},classGroups:{aspect:[{aspect:["auto","square","video",c]}],container:["container"],columns:[{columns:[V]}],"break-after":[{"break-after":Ae()}],"break-before":[{"break-before":Ae()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...x(),c]}],overflow:[{overflow:q()}],"overflow-x":[{"overflow-x":q()}],"overflow-y":[{"overflow-y":q()}],overscroll:[{overscroll:W()}],"overscroll-x":[{"overscroll-x":W()}],"overscroll-y":[{"overscroll-y":W()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",B,c]}],basis:[{basis:H()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",c]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",B,c]}],"grid-cols":[{"grid-cols":[D]}],"col-start-end":[{col:["auto",{span:["full",B,c]},c]}],"col-start":[{"col-start":p()}],"col-end":[{"col-end":p()}],"grid-rows":[{"grid-rows":[D]}],"row-start-end":[{row:["auto",{span:[B,c]},c]}],"row-start":[{"row-start":p()}],"row-end":[{"row-end":p()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",c]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",c]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...J()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...J(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...J(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[k]}],px:[{px:[k]}],py:[{py:[k]}],ps:[{ps:[k]}],pe:[{pe:[k]}],pt:[{pt:[k]}],pr:[{pr:[k]}],pb:[{pb:[k]}],pl:[{pl:[k]}],m:[{m:[b]}],mx:[{mx:[b]}],my:[{my:[b]}],ms:[{ms:[b]}],me:[{me:[b]}],mt:[{mt:[b]}],mr:[{mr:[b]}],mb:[{mb:[b]}],ml:[{ml:[b]}],"space-x":[{"space-x":[X]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[X]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",c,r]}],"min-w":[{"min-w":[c,r,"min","max","fit"]}],"max-w":[{"max-w":[c,r,"none","full","min","max","fit","prose",{screen:[V]},V]}],h:[{h:[c,r,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[c,r,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[c,r,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[c,r,"auto","min","max","fit"]}],"font-size":[{text:["base",V,L]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",re]}],"font-family":[{font:[D]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",c]}],"line-clamp":[{"line-clamp":["none",F,re]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",I,c]}],"list-image":[{"list-image":["none",c]}],"list-style-type":[{list:["none","disc","decimal",c]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[f]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[f]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...y(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",I,L]}],"underline-offset":[{"underline-offset":["auto",I,c]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:h()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",c]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",c]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[f]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...x(),sr]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",nr]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},ir]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[z]}],"gradient-via-pos":[{via:[z]}],"gradient-to-pos":[{to:[z]}],"gradient-from":[{from:[A]}],"gradient-via":[{via:[A]}],"gradient-to":[{to:[A]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[i]}],"border-w-x":[{"border-x":[i]}],"border-w-y":[{"border-y":[i]}],"border-w-s":[{"border-s":[i]}],"border-w-e":[{"border-e":[i]}],"border-w-t":[{"border-t":[i]}],"border-w-r":[{"border-r":[i]}],"border-w-b":[{"border-b":[i]}],"border-w-l":[{"border-l":[i]}],"border-opacity":[{"border-opacity":[f]}],"border-style":[{border:[...y(),"hidden"]}],"divide-x":[{"divide-x":[i]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[i]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[f]}],"divide-style":[{divide:y()}],"border-color":[{border:[n]}],"border-color-x":[{"border-x":[n]}],"border-color-y":[{"border-y":[n]}],"border-color-s":[{"border-s":[n]}],"border-color-e":[{"border-e":[n]}],"border-color-t":[{"border-t":[n]}],"border-color-r":[{"border-r":[n]}],"border-color-b":[{"border-b":[n]}],"border-color-l":[{"border-l":[n]}],"divide-color":[{divide:[n]}],"outline-style":[{outline:["",...y()]}],"outline-offset":[{"outline-offset":[I,c]}],"outline-w":[{outline:[I,L]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[f]}],"ring-offset-w":[{"ring-offset":[I,L]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",V,lr]}],"shadow-color":[{shadow:[D]}],opacity:[{opacity:[f]}],"mix-blend":[{"mix-blend":[..._(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":_()}],filter:[{filter:["","none"]}],blur:[{blur:[t]}],brightness:[{brightness:[o]}],contrast:[{contrast:[u]}],"drop-shadow":[{"drop-shadow":["","none",V,c]}],grayscale:[{grayscale:[d]}],"hue-rotate":[{"hue-rotate":[m]}],invert:[{invert:[w]}],saturate:[{saturate:[G]}],sepia:[{sepia:[T]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[t]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[u]}],"backdrop-grayscale":[{"backdrop-grayscale":[d]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[m]}],"backdrop-invert":[{"backdrop-invert":[w]}],"backdrop-opacity":[{"backdrop-opacity":[f]}],"backdrop-saturate":[{"backdrop-saturate":[G]}],"backdrop-sepia":[{"backdrop-sepia":[T]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",c]}],duration:[{duration:$()}],ease:[{ease:["linear","in","out","in-out",c]}],delay:[{delay:$()}],animate:[{animate:["none","spin","ping","pulse","bounce",c]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[P]}],"scale-x":[{"scale-x":[P]}],"scale-y":[{"scale-y":[P]}],rotate:[{rotate:[B,c]}],"translate-x":[{"translate-x":[Q]}],"translate-y":[{"translate-y":[Q]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",c]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",c]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":h()}],"scroll-mx":[{"scroll-mx":h()}],"scroll-my":[{"scroll-my":h()}],"scroll-ms":[{"scroll-ms":h()}],"scroll-me":[{"scroll-me":h()}],"scroll-mt":[{"scroll-mt":h()}],"scroll-mr":[{"scroll-mr":h()}],"scroll-mb":[{"scroll-mb":h()}],"scroll-ml":[{"scroll-ml":h()}],"scroll-p":[{"scroll-p":h()}],"scroll-px":[{"scroll-px":h()}],"scroll-py":[{"scroll-py":h()}],"scroll-ps":[{"scroll-ps":h()}],"scroll-pe":[{"scroll-pe":h()}],"scroll-pt":[{"scroll-pt":h()}],"scroll-pr":[{"scroll-pr":h()}],"scroll-pb":[{"scroll-pb":h()}],"scroll-pl":[{"scroll-pl":h()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",c]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[I,L,re]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}});function j(...e){return pr(pe(e))}const fr=Y("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}});function Ce({className:e,variant:r,size:t,asChild:o=!1,...n}){const s=o?de:"button";return a.jsx(s,{"data-slot":"button",className:j(fr({variant:r,size:t,className:e})),...n})}const K=N.forwardRef(({className:e,type:r,...t},o)=>a.jsx("input",{type:r,className:j("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:o,...t}));K.displayName="Input";var gr=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],br=gr.reduce((e,r)=>{const t=ce(`Primitive.${r}`),o=N.forwardRef((n,s)=>{const{asChild:l,...i}=n,u=l?t:r;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),a.jsx(u,{...i,ref:s})});return o.displayName=`Primitive.${r}`,{...e,[r]:o}},{}),mr="Label",ke=N.forwardRef((e,r)=>a.jsx(br.label,{...e,ref:r,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||((n=e.onMouseDown)==null||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));ke.displayName=mr;var hr=ke;function te({className:e,...r}){return a.jsx(hr,{"data-slot":"label",className:j("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...r})}function vr({className:e,...r}){return a.jsx("div",{"data-slot":"card",className:j("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...r})}function yr({className:e,...r}){return a.jsx("div",{"data-slot":"card-header",className:j("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...r})}function xr({className:e,...r}){return a.jsx("div",{"data-slot":"card-title",className:j("leading-none font-semibold",e),...r})}function wr({className:e,...r}){return a.jsx("div",{"data-slot":"card-description",className:j("text-muted-foreground text-sm",e),...r})}function Cr({className:e,...r}){return a.jsx("div",{"data-slot":"card-content",className:j("px-6",e),...r})}const kr=Y("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Nr({className:e,variant:r,asChild:t=!1,...o}){const n=t?de:"span";return a.jsx(n,{"data-slot":"badge",className:j(kr({variant:r}),e),...o})}const _r=Y("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function oe({className:e,variant:r,...t}){return a.jsx("div",{"data-slot":"alert",role:"alert",className:j(_r({variant:r}),e),...t})}function ne({className:e,...r}){return a.jsx("div",{"data-slot":"alert-description",className:j("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...r})}/**
|
|
2
|
+
* @license lucide-react v0.537.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const Sr=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),zr=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(r,t,o)=>o?o.toUpperCase():t.toLowerCase()),Ne=e=>{const r=zr(e);return r.charAt(0).toUpperCase()+r.slice(1)},_e=(...e)=>e.filter((r,t,o)=>!!r&&r.trim()!==""&&o.indexOf(r)===t).join(" ").trim(),Ar=e=>{for(const r in e)if(r.startsWith("aria-")||r==="role"||r==="title")return!0};/**
|
|
7
|
+
* @license lucide-react v0.537.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/var jr={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
12
|
+
* @license lucide-react v0.537.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const Pr=S.forwardRef(({color:e="currentColor",size:r=24,strokeWidth:t=2,absoluteStrokeWidth:o,className:n="",children:s,iconNode:l,...i},u)=>S.createElement("svg",{ref:u,...jr,width:r,height:r,stroke:e,strokeWidth:o?Number(t)*24/Number(r):t,className:_e("lucide",n),...!s&&!Ar(i)&&{"aria-hidden":"true"},...i},[...l.map(([d,m])=>S.createElement(d,m)),...Array.isArray(s)?s:[s]]));/**
|
|
17
|
+
* @license lucide-react v0.537.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const se=(e,r)=>{const t=S.forwardRef(({className:o,...n},s)=>S.createElement(Pr,{ref:s,iconNode:r,className:_e(`lucide-${Sr(Ne(e))}`,`lucide-${e}`,o),...n}));return t.displayName=Ne(e),t};/**
|
|
22
|
+
* @license lucide-react v0.537.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* This source code is licensed under the ISC license.
|
|
25
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
+
*/const ae=se("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/**
|
|
27
|
+
* @license lucide-react v0.537.0 - ISC
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the ISC license.
|
|
30
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/const ie=se("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
|
|
32
|
+
* @license lucide-react v0.537.0 - ISC
|
|
33
|
+
*
|
|
34
|
+
* This source code is licensed under the ISC license.
|
|
35
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
+
*/const Se=se("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),ze={linkContainer:"_linkContainer_1iste_4",dark:"_dark_1iste_29"};function Ir({linkToken:e,apiBaseUrl:r="https://api.tightrope.dev",onSuccess:t,onError:o,theme:n="light",className:s="",showTokenBadge:l=!0,title:i="Tightrope Link",description:u}){var h,Z;const[d,m]=S.useState([]),[w,C]=S.useState(!0),[A,z]=S.useState(null),[g,b]=S.useState(null),[f,k]=S.useState({username:"",password:"",auth_params:{}}),[G,P]=S.useState(!1),[T,M]=S.useState(null),[X,Q]=S.useState(!1);S.useEffect(()=>{if(!e){C(!1);return}C(!0),(async()=>{try{const x=new URL(`${r}/integration_methods`);x.searchParams.set("link_token",e);const y=await fetch(x.toString());if(!y.ok)throw new Error(`Failed to fetch integrations: ${y.status}`);const _=await y.json();_&&_.integration_methods&&Array.isArray(_.integration_methods)?m(_.integration_methods):z("Invalid data format received")}catch(x){console.error("Error fetching integrations:",x);const y="Failed to load integrations";z(y),o==null||o(y)}finally{C(!1)}})()},[r,e,o]);const W=p=>/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(p),q=()=>{if(!g)return null;for(const p of d){const x=p.auth_methods.find(y=>y.id===g);if(x)return x}return null},H=async p=>{if(p.preventDefault(),!g||!f.username||!f.password){M("Please fill in all fields");return}const x=q();if(x!=null&&x.auth_params){for(const y of x.auth_params)if(!f.auth_params[y]){const _=`Please fill in the required field: ${y}`;M(_);return}}try{P(!0),M(null);const y=`${r}/linked_account_credentials`,_=await fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({integration_method_id:g,link_token:e,args:{username:f.username,password:f.password,auth_params:f.auth_params}})}),J=await _.json();if(!_.ok){const O=J.error||`HTTP error! status: ${_.status}`;M(O),o==null||o(O);return}Q(!0),t==null||t({integration_method_id:g,username:f.username}),k({username:"",password:"",auth_params:{}}),b(null)}catch(y){const _=y instanceof Error?y.message:"An error occurred";M(_),o==null||o(_),console.error("Error submitting credentials:",y)}finally{P(!1)}};return a.jsx("div",{className:`${ze.linkContainer} ${n==="dark"?ze.dark:""} ${s}`,children:a.jsxs(vr,{className:"w-full mx-auto shadow-xl border-2 bg-card",children:[a.jsx(yr,{className:"pb-8",children:a.jsxs("div",{className:"flex items-center justify-between",children:[a.jsxs("div",{className:"space-y-1",children:[a.jsx(xr,{className:"text-2xl font-bold tracking-tight",children:i}),u&&a.jsx(wr,{className:"text-base",children:u})]}),l&&e&&a.jsxs(Nr,{variant:W(e)?"secondary":"destructive",children:[W(e)?a.jsx(ae,{className:"h-3 w-3 mr-1"}):a.jsx(ie,{className:"h-3 w-3 mr-1"}),W(e)?"Valid Token":"Invalid Token"]})]})}),a.jsxs(Cr,{className:"space-y-8 pb-8",children:[X&&a.jsxs(oe,{className:"border-green-200 bg-green-50 dark:bg-green-950 dark:border-green-800",children:[a.jsx(ae,{className:"h-5 w-5 text-green-600 dark:text-green-400"}),a.jsx(ne,{className:"text-green-800 dark:text-green-200 font-medium",children:"Credentials submitted successfully!"})]}),a.jsx("div",{children:w?a.jsxs("div",{className:"text-center py-12",children:[a.jsx(Se,{className:"h-10 w-10 animate-spin mx-auto mb-4 text-primary"}),a.jsx("p",{className:"text-muted-foreground text-lg",children:"Loading integrations..."})]}):A?a.jsxs(oe,{variant:"destructive",children:[a.jsx(ie,{className:"h-4 w-4"}),a.jsx(ne,{children:A})]}):Array.isArray(d)?d.length===0?a.jsx("div",{className:"text-center py-12",children:a.jsx("p",{className:"text-muted-foreground",children:"No integrations available"})}):a.jsxs("div",{className:"space-y-4",children:[a.jsx("div",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Select an integration to connect"}),a.jsx("div",{className:"grid grid-cols-4 lg:grid-cols-4 md:grid-cols-2 sm:grid-cols-1 gap-3",children:d.map(p=>p.auth_methods.map(x=>a.jsx("button",{type:"button",onClick:()=>b(x.id),className:`p-4 rounded-lg border-2 transition-all duration-200 text-left ${g===x.id?"border-primary bg-primary/5 shadow-md":"border-border hover:border-primary/50 hover:bg-accent"}`,children:a.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[a.jsx("div",{className:"w-12 h-12 flex items-center justify-center flex-shrink-0",children:p.provider_logo_url?a.jsx("img",{src:p.provider_logo_url,alt:`${p.provider} logo`,className:"max-w-full max-h-full w-auto h-auto object-contain",style:{maxWidth:"48px",maxHeight:"48px"},onError:y=>{console.error("Failed to load logo for",p.provider,":",p.provider_logo_url),y.currentTarget.style.display="none"}}):a.jsx("div",{className:"w-full h-full bg-muted rounded-lg flex items-center justify-center text-muted-foreground font-semibold text-xl",children:p.provider.charAt(0).toUpperCase()})}),a.jsxs("div",{children:[a.jsx("div",{className:"font-semibold text-base",children:p.provider}),a.jsx("div",{className:"text-sm text-muted-foreground",children:x.display_name})]}),g===x.id&&a.jsx(ae,{className:"h-5 w-5 text-primary"})]})},x.id)))})]}):a.jsx("div",{className:"text-center py-12",children:a.jsx("p",{className:"text-muted-foreground",children:"Invalid data format"})})}),g&&a.jsxs("div",{className:"space-y-8 pt-8 border-t-2 animate-in fade-in-50 slide-in-from-top-4 duration-300",children:[a.jsxs("div",{className:"flex items-center gap-3 py-2",children:[a.jsx("div",{className:"h-1 flex-1 bg-primary rounded-full"}),a.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Enter Credentials"}),a.jsx("div",{className:"h-1 flex-1 bg-primary rounded-full"})]}),a.jsxs("form",{onSubmit:H,className:"flex flex-col gap-4 ",children:[a.jsxs("div",{className:"space-y-2",children:[a.jsx(te,{htmlFor:"username",className:"text-base font-medium",children:"Username"}),a.jsx(K,{type:"text",id:"username",value:f.username,onChange:p=>k({...f,username:p.target.value}),placeholder:"Enter your username",className:"h-11 text-base",required:!0})]}),a.jsxs("div",{className:"space-y-2",children:[a.jsx(te,{htmlFor:"password",className:"text-base font-medium",children:"Password"}),a.jsx(K,{type:"password",id:"password",value:f.password,onChange:p=>k({...f,password:p.target.value}),placeholder:"Enter your password",className:"h-11 text-base",required:!0})]}),(Z=(h=q())==null?void 0:h.auth_params)==null?void 0:Z.map(p=>a.jsxs("div",{className:"space-y-2",children:[a.jsx(te,{htmlFor:p,className:"text-base font-medium",children:p}),a.jsx(K,{type:"text",id:p,value:f.auth_params[p]||"",onChange:x=>k({...f,auth_params:{...f.auth_params,[p]:x.target.value}}),placeholder:`Enter ${p}`,className:"h-11 text-base",required:!0})]},p)),T&&a.jsxs(oe,{variant:"destructive",children:[a.jsx(ie,{className:"h-4 w-4"}),a.jsx(ne,{children:T})]}),a.jsxs("div",{className:"flex gap-3 pt-6",children:[a.jsx(Ce,{type:"submit",disabled:G,className:"flex-1 h-11 text-base font-semibold",size:"lg",children:G?a.jsxs(a.Fragment,{children:[a.jsx(Se,{className:"mr-2 h-5 w-5 animate-spin"}),"Submitting..."]}):"Submit Credentials"}),a.jsx(Ce,{type:"button",variant:"outline",className:"h-11",onClick:()=>{b(null),k({username:"",password:"",auth_params:{}}),M(null)},children:"Cancel"})]})]})]})]})]})})}E.Link=Ir,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})}));
|
|
37
|
+
//# sourceMappingURL=index.umd.js.map
|