Team Ai
Apppublic

gbehem/Data_Visualization_Project_RQ2

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes
button-Ej3vmCIF.js2 linesDownload Raw Back to assets
1import{s as k}from"./chunk-LvLJmgfZ.js";import{t as R}from"./react-Bj1aDYRI.js";import{t as j}from"./compiler-runtime-B3qBwwSJ.js";import{f as I,n as S,t as K}from"./useEventListener-Dy81QR4n.js";import{t as O}from"./jsx-runtime-icT_Ltz2.js";import{n as A,t as d}from"./cn-BoaCR37F.js";var a=k(R(),1),w=k(O(),1),D=Symbol.for("react.lazy"),h=a.use;function P(e){return typeof e=="object"&&!!e&&"then"in e}function C(e){return typeof e=="object"&&!!e&&"$$typeof"in e&&e.$$typeof===D&&"_payload"in e&&P(e._payload)}function N(e){let r=$(e),t=a.forwardRef((n,o)=>{let{children:i,...l}=n;C(i)&&typeof h=="function"&&(i=h(i._payload));let s=a.Children.toArray(i),u=s.find(H);if(u){let p=u.props.children,c=s.map(g=>g===u?a.Children.count(p)>1?a.Children.only(null):a.isValidElement(p)?p.props.children:null:g);return(0,w.jsx)(r,{...l,ref:o,children:a.isValidElement(p)?a.cloneElement(p,void 0,c):null})}return(0,w.jsx)(r,{...l,ref:o,children:i})});return t.displayName=`${e}.Slot`,t}var _=N("Slot");function $(e){let r=a.forwardRef((t,n)=>{let{children:o,...i}=t;if(C(o)&&typeof h=="function"&&(o=h(o._payload)),a.isValidElement(o)){let l=W(o),s=V(i,o.props);return o.type!==a.Fragment&&(s.ref=n?S(n,l):l),a.cloneElement(o,s)}return a.Children.count(o)>1?a.Children.only(null):null});return r.displayName=`${e}.SlotClone`,r}var z=Symbol("radix.slottable");function H(e){return a.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===z}function V(e,r){let t={...r};for(let n in r){let o=e[n],i=r[n];/^on[A-Z]/.test(n)?o&&i?t[n]=(...l)=>{let s=i(...l);return o(...l),s}:o&&(t[n]=o):n==="style"?t[n]={...o,...i}:n==="className"&&(t[n]=[o,i].filter(Boolean).join(" "))}return{...e,...t}}function W(e){var n,o;let r=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,t=r&&"isReactWarning"in r&&r.isReactWarning;return t?e.ref:(r=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,t=r&&"isReactWarning"in r&&r.isReactWarning,t?e.props.ref:e.props.ref||e.ref)}const E={stopPropagation:e=>r=>{r.stopPropagation(),e&&e(r)},onEnter:e=>r=>{r.key==="Enter"&&e&&e(r)},preventFocus:e=>{e.preventDefault()},fromInput:e=>{let r=e.target;return r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.tagName.startsWith("MARIMO")||r.isContentEditable||E.fromCodeMirror(e)},fromCodeMirror:e=>e.target.closest(".cm-editor")!==null,shouldIgnoreKeyboardEvent(e){return e.target instanceof HTMLInputElement||e.target instanceof HTMLTextAreaElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLElement&&(e.target.isContentEditable||e.target.tagName==="BUTTON"||e.target.closest("[role='textbox']")!==null||e.target.closest("[contenteditable='true']")!==null||e.target.closest(".cm-editor")!==null)},hasModifier:e=>e.ctrlKey||e.metaKey||e.altKey||e.shiftKey,isMetaOrCtrl:e=>e.metaKey||e.ctrlKey};var L=j(),f="active:shadow-none",T=A(d("disabled:opacity-50 disabled:pointer-events-none","inline-flex items-center justify-center rounded-md text-sm font-medium focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 ring-offset-background"),{variants:{variant:{default:d("bg-primary text-primary-foreground hover:bg-primary/90 shadow-xs border border-primary",f),destructive:d("border shadow-xs","bg-(--red-9) hover:bg-(--red-10) dark:bg-(--red-6) dark:hover:bg-(--red-7)","text-(--red-1) dark:text-(--red-12)","border-(--red-11)",f),success:d("border shadow-xs","bg-(--grass-9) hover:bg-(--grass-10) dark:bg-(--grass-6) dark:hover:bg-(--grass-7)","text-(--grass-1) dark:text-(--grass-12)","border-(--grass-11)",f),warn:d("border shadow-xs","bg-(--yellow-9) hover:bg-(--yellow-10) dark:bg-(--yellow-6) dark:hover:bg-(--yellow-7)","text-(--yellow-12)","border-(--yellow-11)",f),action:d("bg-action text-action-foreground shadow-xs","hover:bg-action-hover border border-action",f),outline:d("border border-slate-300 shadow-xs","hover:bg-accent hover:text-accent-foreground","hover:border-primary","aria-selected:text-accent-foreground aria-selected:border-primary",f),secondary:d("bg-secondary text-secondary-foreground hover:bg-secondary/80","border border-input shadow-xs",f),text:d("opacity-80 hover:opacity-100","active:opacity-100"),ghost:d("border border-transparent","hover:bg-accent hover:text-accent-foreground hover:shadow-xs",f,"active:text-accent-foreground"),link:"underline-offset-4 hover:underline text-link",linkDestructive:"underline-offset-4 hover:underline text-destructive underline-destructive",outlineDestructive:"border border-destructive text-destructive hover:bg-destructive/10"},size:{default:"h-10 py-2 px-4",xs:"h-7 px-2 rounded-md text-xs",sm:"h-9 px-3 rounded-md",lg:"h-11 px-8 rounded-md",icon:"h-6 w-6 mb-0"},disabled:{true:"opacity-50 pointer-events-none"}},defaultVariants:{variant:"default",size:"sm"}}),M=a.forwardRef((e,r)=>{let t=(0,L.c)(7),{className:n,variant:o,size:i,asChild:l,keyboardShortcut:s,...u}=e,p=l===void 0?!1:l,c=a.useRef(null),g;t[0]===Symbol.for("react.memo_cache_sentinel")?(g=()=>c.current,t[0]=g):g=t[0],a.useImperativeHandle(r,g);let b;t[1]===s?b=t[2]:(b=y=>{s&&(E.shouldIgnoreKeyboardEvent(y)||I(s)(y)&&(y.preventDefault(),y.stopPropagation(),c!=null&&c.current&&!c.current.disabled&&c.current.click()))},t[1]=s,t[2]=b),K(document,"keydown",b);let v=p?_:"button",x=d(T({variant:o,size:i,className:n,disabled:u.disabled}),n),m;return t[3]!==v||t[4]!==u||t[5]!==x?(m=(0,w.jsx)(v,{className:x,ref:c,...u}),t[3]=v,t[4]=u,t[5]=x,t[6]=m):m=t[6],m});M.displayName="Button";export{N as a,_ as i,T as n,E as r,M as t};2