@donotdev/components 0.0.30 → 0.0.31
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/atomic/Alert/index.d.ts +1 -1
- package/dist/atomic/Badge/index.d.ts +1 -1
- package/dist/atomic/Button/index.d.ts +1 -1
- package/dist/atomic/Tag/index.d.ts +1 -1
- package/dist/atomic/Toggle/index.d.ts +1 -1
- package/dist/styles/index.css +15 -0
- package/dist/utils/variants.d.ts +1 -1
- package/package.json +1 -1
- package/dist/CarouselContent-HEXWLSR2.css +0 -1
- package/dist/CarouselContent-WGDMI6BH.js +0 -1
- package/dist/CodeContent-EYAMBIQ2.css +0 -1
- package/dist/CodeContent-RW7AXCX3.js +0 -2
- package/dist/MarqueeContent-25D2GMPK.css +0 -1
- package/dist/MarqueeContent-DOKPFDYK.js +0 -1
- package/dist/chunk-Q3J75GL4.js +0 -1
- package/dist/chunk-U37VKGRT.js +0 -3
|
@@ -20,7 +20,7 @@ export declare const ALERT_VARIANT: {
|
|
|
20
20
|
readonly INFO: "info";
|
|
21
21
|
};
|
|
22
22
|
declare const alertVariants: (props?: ({
|
|
23
|
-
variant?: "
|
|
23
|
+
variant?: "error" | "muted" | "warning" | "info" | "success" | null | undefined;
|
|
24
24
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
25
25
|
export type AlertVariant = (typeof ALERT_VARIANT)[keyof typeof ALERT_VARIANT];
|
|
26
26
|
export interface AlertProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'>, VariantProps<typeof alertVariants> {
|
|
@@ -24,7 +24,7 @@ export declare const BADGE_VARIANT: {
|
|
|
24
24
|
readonly DESTRUCTIVE: "destructive";
|
|
25
25
|
};
|
|
26
26
|
declare const badgeVariants: (props?: ({
|
|
27
|
-
variant?: "default" | "
|
|
27
|
+
variant?: "default" | "outline" | "muted" | "accent" | "primary" | "destructive" | "warning" | "success" | "secondary" | null | undefined;
|
|
28
28
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
29
29
|
export type BadgeVariant = VariantProps<typeof badgeVariants>['variant'];
|
|
30
30
|
/**
|
|
@@ -21,7 +21,7 @@ export declare const BUTTON_VARIANT: {
|
|
|
21
21
|
readonly DESTRUCTIVE: "destructive";
|
|
22
22
|
};
|
|
23
23
|
declare const buttonVariants: (props?: ({
|
|
24
|
-
variant?: "default" | "
|
|
24
|
+
variant?: "default" | "outline" | "ghost" | "link" | "muted" | "accent" | "primary" | "destructive" | "warning" | "success" | "secondary" | null | undefined;
|
|
25
25
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
26
26
|
/**
|
|
27
27
|
* Button variant type - derived from buttonVariants to ensure type safety
|
|
@@ -15,7 +15,7 @@ export declare const TAG_VARIANT: {
|
|
|
15
15
|
readonly ACCENT: "accent";
|
|
16
16
|
};
|
|
17
17
|
declare const tagVariants: (props?: ({
|
|
18
|
-
variant?: "default" | "
|
|
18
|
+
variant?: "default" | "outline" | "accent" | null | undefined;
|
|
19
19
|
size?: "sm" | "md" | "lg" | null | undefined;
|
|
20
20
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
21
|
export interface TagProps extends Omit<HTMLAttributes<HTMLSpanElement>, 'onClick'>, VariantProps<typeof tagVariants> {
|
|
@@ -10,7 +10,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
10
10
|
import { TogglePrimitive } from './TogglePrimitive';
|
|
11
11
|
import type { ComponentPropsWithoutRef } from 'react';
|
|
12
12
|
declare const toggleVariants: (props?: ({
|
|
13
|
-
variant?: "default" | "
|
|
13
|
+
variant?: "default" | "outline" | "muted" | "accent" | "primary" | "destructive" | "warning" | "success" | "secondary" | null | undefined;
|
|
14
14
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
15
|
export interface ToggleProps extends ComponentPropsWithoutRef<typeof TogglePrimitive>, VariantProps<typeof toggleVariants> {
|
|
16
16
|
}
|
package/dist/styles/index.css
CHANGED
|
@@ -6127,6 +6127,21 @@ input[type='number'] {
|
|
|
6127
6127
|
background-color: var(--destructive-foreground);
|
|
6128
6128
|
}
|
|
6129
6129
|
|
|
6130
|
+
/* packages/components/src/atomic/RangeInput/RangeInput.css */
|
|
6131
|
+
|
|
6132
|
+
.dndev-range-input {
|
|
6133
|
+
display: grid;
|
|
6134
|
+
grid-template-columns: 1fr auto 1fr auto;
|
|
6135
|
+
align-items: center;
|
|
6136
|
+
gap: var(--gap-tight);
|
|
6137
|
+
width: 100%;
|
|
6138
|
+
}
|
|
6139
|
+
|
|
6140
|
+
.dndev-range-input > .dndev-input,
|
|
6141
|
+
.dndev-range-input > .dndev-relative {
|
|
6142
|
+
min-width: 0;
|
|
6143
|
+
}
|
|
6144
|
+
|
|
6130
6145
|
/* packages/components/src/atomic/Select/Select.css */
|
|
6131
6146
|
|
|
6132
6147
|
.dndev-select-trigger {
|
package/dist/utils/variants.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { type VariantProps } from 'class-variance-authority';
|
|
|
9
9
|
* Used by: Card, DualCard, StackedCards, Dialog, Sheet, Alert
|
|
10
10
|
*/
|
|
11
11
|
export declare const surfaceVariants: (props?: ({
|
|
12
|
-
variant?: "default" | "
|
|
12
|
+
variant?: "default" | "outline" | "muted" | "accent" | "primary" | "destructive" | "warning" | "success" | "secondary" | "glass" | null | undefined;
|
|
13
13
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
14
|
export type SurfaceVariantProps = VariantProps<typeof surfaceVariants>;
|
|
15
15
|
//# sourceMappingURL=variants.d.ts.map
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.dndev-stack{display:flex;flex-direction:column;width:100%;&[data-width=fit]{width:fit-content}&[data-width=auto]{width:auto}&[data-centered=true]{margin-inline:auto}&[data-direction=row],div&[data-direction=row]{flex-direction:row}&[data-direction=row-reverse]{flex-direction:row-reverse}&[data-direction=column-reverse]{flex-direction:column-reverse}&[data-wrap=wrap]{flex-wrap:wrap}&[data-wrap=nowrap]{flex-wrap:nowrap}&[data-wrap=wrap-reverse]{flex-wrap:wrap-reverse}&[data-align=start]{align-items:flex-start}&[data-align=center]{align-items:center}&[data-align=end]{align-items:flex-end}&[data-align=stretch]{align-items:stretch}&[data-align=baseline]{align-items:baseline}&[data-justify=start]{justify-content:flex-start}&[data-justify=center]{justify-content:center}&[data-justify=end]{justify-content:flex-end}&[data-justify=between]{justify-content:space-between}&[data-justify=around]{justify-content:space-around}&[data-justify=evenly]{justify-content:space-evenly}&[data-gap=none]{gap:var(--gap-none)}&[data-gap=tight]{gap:var(--gap-sm)}&[data-gap=medium]{gap:var(--gap-md)}&[data-gap=large]{gap:var(--gap-lg)}&[data-direction=row]>*{min-width:0}&[data-direction=row][data-wrap=nowrap]:not([data-overflow])>*{overflow:hidden}&[data-direction=row][data-wrap=wrap]:not([data-overflow])>*,&[data-direction=row][data-wrap=wrap-reverse]:not([data-overflow])>*{overflow:visible}&[data-direction=row][data-overflow=hidden]>*{overflow:hidden}&[data-direction=row][data-overflow=visible]>*{overflow:visible}&[data-direction=row][data-overflow=auto]>*{overflow:auto}&[data-direction=row][data-overflow=scroll]>*{overflow:scroll}&[data-rigid=true]>*{flex-shrink:0}&[data-nowrap=true]>*{white-space:nowrap}&[data-force=true]>*{align-self:inherit!important}}.dndev-carousel-slide{flex-shrink:0;box-sizing:border-box;width:calc(100% / var(--carousel-slides-mobile, 1))}@media(min-width:768px){.dndev-carousel-slide{width:calc(100% / var(--carousel-slides-tablet, 1))}}@media(min-width:1024px){.dndev-carousel-slide{width:calc(100% / var(--carousel-slides-laptop, 1))}}@media(min-width:1440px){.dndev-carousel-slide{width:calc(100% / var(--carousel-slides-desktop, 1))}}.dndev-carousel-slide[data-gap=tight]{padding-inline-end:var(--gap-sm)}.dndev-carousel-slide[data-gap=medium]{padding-inline-end:var(--gap-md)}.dndev-carousel-slide[data-gap=large]{padding-inline-end:var(--gap-lg)}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as ye}from"./chunk-IFHHPSKN.js";import{c as he,f as pe}from"./chunk-FA4BDD6N.js";import{a as P,k as ve}from"./chunk-Q3J75GL4.js";import"./chunk-O2XFH626.js";import{ChevronLeft as je,ChevronRight as Ke,Play as Ve,Pause as Be}from"lucide-react";import{useRef as k,useState as w,useEffect as $,useLayoutEffect as Ge,useCallback as c,useMemo as Q,memo as Qe}from"react";import{Fragment as Je,jsx as l,jsxs as W}from"react/jsx-runtime";function We({items:n,renderItem:we,className:J,slideClassName:xe,showArrows:Ce=!0,showDots:Me=!1,showProgress:ke=!0,autoplay:O=!0,autoplayInterval:Y=5e3,transition:_="slide",infinite:g=!0,slidesToShow:E=1,gap:U="none",swipeable:Z=!0,momentum:S=!0,onActiveChange:ee,onSlideClick:Ee,keyExtractor:te,"aria-label":Ie="Premium carousel",pauseOnHover:re=!0,pauseOnInvisible:Ye=!0,showPlayPause:Re=!0,lazy:ne=!1,preloadDistance:ae=1}){let oe=Array.isArray(E)?E:[E,E,E,E],[X,N,A,F]=oe,d=Math.max(...oe),z=k(null),y=k(null),[s,De]=w(0),[x,se]=w(O),[le,ie]=w(!1),[I,Se]=w(!0),[u,H]=w({isDragging:!1,startX:0,currentX:0,startTime:0,velocity:0}),j=k(null),h=k(null),m=k(null),[L,ce]=w("idle"),[de,ue]=w(!1);$(()=>{if(typeof window>"u")return;let e=window.matchMedia("(prefers-reduced-motion: reduce)");return ue(e.matches),pe(e,"change",r=>{ue(r.matches)})},[]);let[K,ge]=w(()=>typeof window>"u"?X:window.matchMedia("(min-width: 1440px)").matches?F:window.matchMedia("(min-width: 1024px)").matches?A:window.matchMedia("(min-width: 768px)").matches?N:X);$(()=>{if(typeof window>"u")return;let e=[{mq:window.matchMedia("(min-width: 1440px)"),value:F},{mq:window.matchMedia("(min-width: 1024px)"),value:A},{mq:window.matchMedia("(min-width: 768px)"),value:N}],t=()=>{for(let{mq:a,value:o}of e)if(a.matches){ge(o);return}ge(X)},r=e.map(({mq:a})=>{let o=()=>t();return a.addEventListener("change",o),()=>a.removeEventListener("change",o)});return()=>r.forEach(a=>a())},[X,N,A,F]);let q=Q(()=>({tension:.3,friction:.8,mass:1}),[]),Xe=Q(()=>{if(!g||n.length<=d)return n;let e=Math.max(d,2),t=n.slice(-e),r=n.slice(0,e);return[...t,...n,...r]},[n,g,d]),i=Q(()=>100/K,[K]),Le=Math.ceil(K/2)-1,me=k(!1);Ge(()=>{if(me.current||!g||!y.current||n.length<=d)return;me.current=!0;let e=Math.max(d,2);y.current.style.transform=`translateX(-${e*i}%)`},[g,d,i,n.length]);let Pe=c(e=>{if(!g)return e;let t=Math.max(d,2);return((e-t)%n.length+n.length)%n.length},[g,n.length,d]),be=k(I);be.current=I;let V=c((e,t,r=0)=>{if(!S)return;let a=parseFloat(e.style.transform.replace("translateX(","").replace("%)",""))||0,o=r,f=Date.now(),v=()=>{let C=(Date.now()-f)/1e3,D=a-t,M=-q.tension*D,Oe=-q.friction*o,He=(M+Oe)/q.mass;o+=He*C,a+=o*C,e.style.transform=`translateX(${a}%)`,be.current?Math.abs(D)>.1||Math.abs(o)>.1?h.current=requestAnimationFrame(v):(e.style.transform=`translateX(${t}%)`,e.style.transition="none",h.current=null):(e.style.transform=`translateX(${t}%)`,e.style.transition="none",h.current=null)};h.current!==null&&cancelAnimationFrame(h.current),h.current=requestAnimationFrame(v)},[S,q]),fe=c((e,t,r)=>{switch(_){case"fade":{e.style.transition=`opacity ${r} ease-in-out`,e.style.opacity="0";let o=parseInt(r,10)||300;m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{m.current=null,e.style.transform=`translateX(${t}%)`,e.style.opacity="1"},o/2);break}case"scale":{e.style.transition=`transform ${r} cubic-bezier(0.25, 0.46, 0.45, 0.94)`,e.style.transform=`translateX(${t}%) scale(0.95)`;let o=parseInt(r,10)||300;m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{m.current=null,e.style.transform=`translateX(${t}%) scale(1)`},o/2);break}case"parallax":e.style.transition=`transform ${r} cubic-bezier(0.25, 0.46, 0.45, 0.94)`,e.style.transform=`translateX(${t}%)`,e.querySelectorAll('[role="group"]').forEach((o,f)=>{let v=o,p=(f-Math.abs(t)/i)*.1;v.style.transform=`translateX(${p}%)`});break;default:e.style.transition=`transform ${r} cubic-bezier(0.25, 0.46, 0.45, 0.94)`,e.style.transform=`translateX(${t}%)`;break}},[_,i]),b=c((e,t=!1)=>{if(L!=="idle"&&!t||!I&&!t)return;let r=y.current;if(!r)return;let a=e;if(g){let p=Math.max(d,2);a=e+p}else a=Math.max(0,Math.min(e,n.length-1));let o=-(a*i),f=t||de?"0ms":"300ms";t||ce("transitioning"),fe(r,o,f);let v=g?(e%n.length+n.length)%n.length:a;if(De(v),ee?.(v),g){let p=Math.max(d,2),C=a<p,D=a>=n.length+p;if(C||D){let M=C?a+n.length:a-n.length;r.dataset.needsReset="true",r.dataset.resetIndex=M.toString()}if(t&&r.dataset.needsReset==="true"){let M=parseInt(r.dataset.resetIndex||"0");r.style.transition="none",r.style.transform=`translateX(-${M*i}%)`,delete r.dataset.needsReset,delete r.dataset.resetIndex}}},[g,n.length,i,d,ee,de,L,I,fe]),T=c(()=>{b(s+1)},[s,b]),R=c(()=>{b(s-1)},[s,b]),B=c(()=>{se(!0)},[]),G=c(()=>{se(!1)},[]);$(()=>{if(!(!x||le||!I||n.length<=1))return j.current=setTimeout(()=>{T()},Y),()=>{j.current&&clearTimeout(j.current)}},[x,le,I,s,T,Y,n.length]),$(()=>z.current?he(z.current,t=>Se(t.isIntersecting),{threshold:.1}):void 0,[]),$(()=>()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null),m.current!==null&&(clearTimeout(m.current),m.current=null)},[]);let $e=c(e=>ne?Math.abs(e-s)<=ae:!0,[ne,s,ae]),Ne=c(e=>{if(!Z||L!=="idle")return;let t=e.touches[0];t&&H({isDragging:!0,startX:t.clientX,currentX:t.clientX,startTime:Date.now(),velocity:0})},[Z,L]),Ae=c(e=>{if(!u.isDragging)return;let t=e.touches[0];if(!t)return;let r=t.clientX-u.startX,a=Date.now()-u.startTime,o=a>0?r/a:0,f=y.current;if(f&&Math.abs(r)>10){e.preventDefault();let v=g?Math.max(d,2):0,p=-((s+v)*i),C=r/(z.current?.clientWidth||1)*100,D=Math.min(Math.abs(r)/200,.8),M=C*(1-D);f.style.transition="none",f.style.transform=`translateX(${p+M}%)`}H(v=>({...v,currentX:t.clientX,velocity:o}))},[u.isDragging,u.startX,u.startTime,s,i,g,d]),Fe=c(()=>{if(!u.isDragging)return;let e=u.currentX-u.startX,t=u.velocity,r=50;if(S&&Math.abs(t)>.5){let a=y.current;if(a){let o=t>0?s-1:s+1,f=-(o*i);V(a,f,t*100),b(o,!0)}}else if(Math.abs(e)>r)e>0?R():T();else{let a=y.current;if(a&&S){let o=-(s*i);V(a,o,t*100)}else b(s,!0)}H({isDragging:!1,startX:0,currentX:0,startTime:0,velocity:0})},[u,S,T,R,b,s,V,i]),ze=c(()=>{ce("idle");let e=y.current;if(e?.dataset.needsReset==="true"){let t=parseInt(e.dataset.resetIndex||"0");e.style.transition="none",e.style.transform=`translateX(-${t*i}%)`,delete e.dataset.needsReset,delete e.dataset.resetIndex}},[i]),qe=c(e=>{let t=ye();switch(e.key){case"ArrowLeft":e.preventDefault(),t?T():R();break;case"ArrowRight":e.preventDefault(),t?R():T();break;case"Home":e.preventDefault(),b(0);break;case"End":e.preventDefault(),b(n.length-1);break;case" ":e.preventDefault(),x?G():B();break}},[T,R,b,n.length,x,B,G]);return!n||n.length===0?l(ve,{align:"center",justify:"center",className:P("dndev-relative",J),children:l("div",{style:{color:"var(--muted-foreground)"},children:"No items to display"})}):W("div",{ref:z,className:P("dndev-relative dndev-overflow-hidden",J),style:{outline:"none","--carousel-slides-mobile":X,"--carousel-slides-tablet":N,"--carousel-slides-laptop":A,"--carousel-slides-desktop":F},onMouseEnter:()=>re&&ie(!0),onMouseLeave:()=>re&&ie(!1),onKeyDown:qe,tabIndex:0,role:"region","aria-label":Ie,"aria-live":"polite",children:[l("div",{className:"dndev-overflow-hidden",children:l("div",{ref:y,className:P("dndev-flex",u.isDragging&&"dndev-pointer-events-none",L==="transitioning"&&"dndev-pointer-events-none"),style:{cursor:u.isDragging?"grabbing":void 0},onTransitionEnd:ze,onTouchStart:Ne,onTouchMove:Ae,onTouchEnd:Fe,children:Xe.map((e,t)=>{let r=Pe(t),a=r===(s+Le)%n.length,o=$e(r);return l("div",{className:P("dndev-carousel-slide",xe),"data-gap":U!=="none"?U:void 0,style:{opacity:o?1:0},role:"group","aria-roledescription":"slide","aria-label":`Slide ${r+1} of ${n.length}`,onClick:()=>Ee?.(e,r),children:o&&we(e,r,a)},te?te(e,r):`${r}-${t}`)})})}),Ce&&n.length>1&&W(Je,{children:[l("button",{className:"dndev-absolute dndev-z-breadcrumbs dndev-flex dndev-items-center dndev-justify-center",style:{insetInlineStart:"1rem",top:"50%",transform:"translateY(-50%)",width:"2.5rem",height:"2.5rem",opacity:0,transition:"opacity var(--dur-normal)",borderRadius:"9999px",backgroundColor:"rgb(from var(--background) r g b / 0.8)",border:"1px solid var(--border)",outline:"none"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgb(from var(--background) r g b / 0.9)",e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="rgb(from var(--background) r g b / 0.8)"},onClick:R,"aria-label":"Previous slide",tabIndex:-1,children:l(je,{style:{width:"var(--icon-md)",height:"var(--icon-md)",color:"var(--foreground)"}})}),l("button",{className:"dndev-absolute dndev-z-breadcrumbs dndev-flex dndev-items-center dndev-justify-center",style:{insetInlineEnd:"1rem",top:"50%",transform:"translateY(-50%)",width:"2.5rem",height:"2.5rem",opacity:0,transition:"opacity var(--dur-normal)",borderRadius:"9999px",backgroundColor:"rgb(from var(--background) r g b / 0.8)",border:"1px solid var(--border)",outline:"none"},onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgb(from var(--background) r g b / 0.9)",e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="rgb(from var(--background) r g b / 0.8)"},onClick:T,"aria-label":"Next slide",tabIndex:-1,children:l(Ke,{style:{width:"var(--icon-md)",height:"var(--icon-md)",color:"var(--foreground)"}})})]}),O&&Re&&l("button",{className:"dndev-absolute dndev-z-breadcrumbs dndev-flex dndev-items-center dndev-justify-center",style:{insetBlockStart:"var(--gap-md)",insetInlineEnd:"var(--gap-md)",width:"2rem",height:"2rem",opacity:0,transition:"opacity var(--dur-normal)",borderRadius:"9999px",backgroundColor:"rgb(from var(--background) r g b / 0.8)",border:"1px solid var(--border)",outline:"none"},tabIndex:-1,onMouseEnter:e=>{e.currentTarget.style.backgroundColor="rgb(from var(--background) r g b / 0.9)",e.currentTarget.style.opacity="1"},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="rgb(from var(--background) r g b / 0.8)"},onClick:()=>x?G():B(),"aria-label":x?"Pause carousel":"Play carousel",children:x?l(Be,{style:{width:"var(--icon-md)",height:"var(--icon-md)",color:"var(--foreground)"}}):l(Ve,{style:{width:"var(--icon-md)",height:"var(--icon-md)",color:"var(--foreground)"}})}),Me&&n.length>1&&l("div",{className:"dndev-absolute dndev-flex dndev-gap-sm dndev-z-breadcrumbs",style:{bottom:"1rem",insetInlineStart:"50%",transform:"translateX(-50%)"},children:n.map((e,t)=>l("button",{tabIndex:-1,style:{width:t===s?"1.5rem":"0.5rem",height:"0.5rem",borderRadius:"9999px",transition:"all 0.3s",outline:"none",backgroundColor:t===s?"var(--foreground)":"rgb(from var(--foreground) r g b / 0.3)"},onMouseEnter:r=>{t!==s&&(r.currentTarget.style.backgroundColor="rgb(from var(--foreground) r g b / 0.5)")},onMouseLeave:r=>{t!==s&&(r.currentTarget.style.backgroundColor="rgb(from var(--foreground) r g b / 0.3)")},onClick:()=>b(t),"aria-label":`Go to slide ${t+1}`},t))}),ke&&O&&l("div",{className:"dndev-absolute",style:{bottom:0,insetInlineStart:0,insetInlineEnd:0,height:"0.25rem",backgroundColor:"rgb(from var(--foreground) r g b / 0.2)"},children:l("div",{style:{height:"100%",width:`${(s+1)/n.length*100}%`,backgroundColor:"var(--foreground)",transition:"width 0.1s linear"}})}),W("div",{className:"dndev-sr-only","aria-live":"polite","aria-atomic":"true",children:["Slide ",s+1," of ",n.length]})]})}var Te=Qe(We);Te.displayName="Carousel";var it=Te;export{it as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.dndev-spinner{width:1em;height:1em;border:2px solid transparent;border-top-color:var(--primary);border-inline-end-color:var(--primary);border-radius:50%;animation:spin .6s linear infinite;display:inline-block}.dndev-spinner[data-variant=default]{border-top-color:var(--foreground);border-inline-end-color:var(--foreground)}.dndev-spinner[data-variant=muted]{border-top-color:var(--muted-foreground);border-inline-end-color:var(--muted-foreground)}.dndev-spinner[data-variant=primary]{border-top-color:var(--primary);border-inline-end-color:var(--primary)}.dndev-spinner[data-variant=secondary]{border-top-color:var(--secondary);border-inline-end-color:var(--secondary)}.dndev-spinner[data-variant=accent]{border-top-color:var(--accent);border-inline-end-color:var(--accent)}.dndev-spinner[data-variant=success]{border-top-color:var(--success);border-inline-end-color:var(--success)}.dndev-spinner[data-variant=warning]{border-top-color:var(--warning);border-inline-end-color:var(--warning)}.dndev-spinner[data-variant=destructive]{border-top-color:var(--destructive);border-inline-end-color:var(--destructive)}.dndev-spinner-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:rgb(from var(--background) r g b / .8);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);z-index:var(--z-overlay, 9999);transition:opacity var(--dur-normal, .2s) var(--ease-in-out, ease-in-out)}.dndev-spinner-overlay .dndev-spinner{width:var(--icon-touch, 48px);height:var(--icon-touch, 48px);border-width:3px}@keyframes spin{to{transform:rotate(360deg)}}[data-loading]{cursor:wait;pointer-events:none}.dndev-button-spinner{flex-shrink:0}.dndev-button-progress{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}.dndev-progress-ring{width:1em;height:1em;transform:rotate(-90deg)}.dndev-copy-button-transition{transition:transform var(--dur-fast) ease-out}.dndev-copy-button-scaled{transform:scale(.95)}.dndev-stack{display:flex;flex-direction:column;width:100%;&[data-width=fit]{width:fit-content}&[data-width=auto]{width:auto}&[data-centered=true]{margin-inline:auto}&[data-direction=row],div&[data-direction=row]{flex-direction:row}&[data-direction=row-reverse]{flex-direction:row-reverse}&[data-direction=column-reverse]{flex-direction:column-reverse}&[data-wrap=wrap]{flex-wrap:wrap}&[data-wrap=nowrap]{flex-wrap:nowrap}&[data-wrap=wrap-reverse]{flex-wrap:wrap-reverse}&[data-align=start]{align-items:flex-start}&[data-align=center]{align-items:center}&[data-align=end]{align-items:flex-end}&[data-align=stretch]{align-items:stretch}&[data-align=baseline]{align-items:baseline}&[data-justify=start]{justify-content:flex-start}&[data-justify=center]{justify-content:center}&[data-justify=end]{justify-content:flex-end}&[data-justify=between]{justify-content:space-between}&[data-justify=around]{justify-content:space-around}&[data-justify=evenly]{justify-content:space-evenly}&[data-gap=none]{gap:var(--gap-none)}&[data-gap=tight]{gap:var(--gap-sm)}&[data-gap=medium]{gap:var(--gap-md)}&[data-gap=large]{gap:var(--gap-lg)}&[data-direction=row]>*{min-width:0}&[data-direction=row][data-wrap=nowrap]:not([data-overflow])>*{overflow:hidden}&[data-direction=row][data-wrap=wrap]:not([data-overflow])>*,&[data-direction=row][data-wrap=wrap-reverse]:not([data-overflow])>*{overflow:visible}&[data-direction=row][data-overflow=hidden]>*{overflow:hidden}&[data-direction=row][data-overflow=visible]>*{overflow:visible}&[data-direction=row][data-overflow=auto]>*{overflow:auto}&[data-direction=row][data-overflow=scroll]>*{overflow:scroll}&[data-rigid=true]>*{flex-shrink:0}&[data-nowrap=true]>*{white-space:nowrap}&[data-force=true]>*{align-self:inherit!important}}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{q as l,v as y,w as S,y as w}from"./chunk-U37VKGRT.js";import{k as d}from"./chunk-Q3J75GL4.js";import"./chunk-O2XFH626.js";import{useEffect as C,useState as m,useMemo as x}from"react";import{jsx as e,jsxs as i}from"react/jsx-runtime";function V({children:o,language:p="tsx",className:z,showLineNumbers:H=!0,wrapLines:u=!1,showCopyButton:T=!0,onCopy:E,compact:h=!1}){let[s,L]=m(!1),[c,_]=m(null),[f,v]=m(!0),[k,D]=m(!1),N=w(),r=x(()=>o.trim().split(`
|
|
2
|
-
`),[o]);C(()=>{if(!s)return;let t=!0;return(async()=>{try{let[{getSingletonHighlighter:n},{createJavaScriptRegexEngine:b}]=await Promise.all([import("shiki"),import("shiki/engine/javascript")]),I=await n({themes:["github-dark","github-light"],langs:["typescript","tsx","javascript","jsx","json","css","html","bash","sql","yaml","markdown"],engine:b()});t&&(_(I),v(!1))}catch(n){n instanceof Error&&(n.message.includes("Cannot find module 'shiki'")||n.message.includes("Failed to fetch dynamically imported module")),t&&(D(!0),v(!1))}})(),()=>{t=!1}},[s]);let g=x(()=>{if(!s||!o||k||!c||f)return null;try{let t=N?"github-dark":"github-light",a=p||"text";return c.getLoadedLanguages().includes(a)?c.codeToHtml(o,{lang:a,theme:t}).replace(/^<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>$/,"").replace(/\n/g,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|[^\s>]+)/gi,""):null}catch{return null}},[o,p,s,c,f,N,k]);return C(()=>{L(!0)},[]),i(d,{gap:"none",className:"dndev-code dndev-surface","data-glow":"blank","data-compact":h,children:[!h&&e("div",{className:"dndev-code-header",children:i(d,{direction:"row",align:"center",justify:"between",children:[i(d,{direction:"row",align:"center",gap:"tight",children:[i("div",{className:"dndev-code-traffic-lights",children:[e("div",{className:"dndev-code-traffic-light","data-color":"red"}),e("div",{className:"dndev-code-traffic-light","data-color":"yellow"}),e("div",{className:"dndev-code-traffic-light","data-color":"green"})]}),e(l,{as:"span",className:"dndev-code-language",children:p}),i(l,{as:"span",className:"dndev-code-line-count",children:[r.length," line",r.length!==1?"s":""]})]}),T&&s&&e(S,{text:o,onCopy:E})]})}),e(y,{className:"dndev-code-content",showHorizontal:!u,showVertical:!0,children:e("pre",{className:"dndev-code-pre","data-wrap":u,"data-compact":h,children:H?i(d,{direction:"row",gap:"none",children:[e("div",{className:"dndev-code-line-numbers",children:r.map((t,a)=>e("div",{className:"dndev-code-line-number",children:String(a+1).padStart(2," ")},a))}),g?e("code",{className:"dndev-code-code",dangerouslySetInnerHTML:{__html:g}}):e("code",{className:"dndev-code-code",children:r.map((t,a)=>e(l,{as:"code",variant:"code",style:{display:"block",background:"transparent",padding:0,lineHeight:1.5},children:t||"\xA0"},a))})]}):g?e("code",{className:"dndev-code-code",dangerouslySetInnerHTML:{__html:g}}):e("code",{className:"dndev-code-code",children:r.map((t,a)=>e(l,{as:"code",variant:"code",style:{display:"block",background:"transparent",padding:0},children:t||"\xA0"},a))})})})]})}var q=V;export{q as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.dndev-stack{display:flex;flex-direction:column;width:100%;&[data-width=fit]{width:fit-content}&[data-width=auto]{width:auto}&[data-centered=true]{margin-inline:auto}&[data-direction=row],div&[data-direction=row]{flex-direction:row}&[data-direction=row-reverse]{flex-direction:row-reverse}&[data-direction=column-reverse]{flex-direction:column-reverse}&[data-wrap=wrap]{flex-wrap:wrap}&[data-wrap=nowrap]{flex-wrap:nowrap}&[data-wrap=wrap-reverse]{flex-wrap:wrap-reverse}&[data-align=start]{align-items:flex-start}&[data-align=center]{align-items:center}&[data-align=end]{align-items:flex-end}&[data-align=stretch]{align-items:stretch}&[data-align=baseline]{align-items:baseline}&[data-justify=start]{justify-content:flex-start}&[data-justify=center]{justify-content:center}&[data-justify=end]{justify-content:flex-end}&[data-justify=between]{justify-content:space-between}&[data-justify=around]{justify-content:space-around}&[data-justify=evenly]{justify-content:space-evenly}&[data-gap=none]{gap:var(--gap-none)}&[data-gap=tight]{gap:var(--gap-sm)}&[data-gap=medium]{gap:var(--gap-md)}&[data-gap=large]{gap:var(--gap-lg)}&[data-direction=row]>*{min-width:0}&[data-direction=row][data-wrap=nowrap]:not([data-overflow])>*{overflow:hidden}&[data-direction=row][data-wrap=wrap]:not([data-overflow])>*,&[data-direction=row][data-wrap=wrap-reverse]:not([data-overflow])>*{overflow:visible}&[data-direction=row][data-overflow=hidden]>*{overflow:hidden}&[data-direction=row][data-overflow=visible]>*{overflow:visible}&[data-direction=row][data-overflow=auto]>*{overflow:auto}&[data-direction=row][data-overflow=scroll]>*{overflow:scroll}&[data-rigid=true]>*{flex-shrink:0}&[data-nowrap=true]>*{white-space:nowrap}&[data-force=true]>*{align-self:inherit!important}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as z,f as O}from"./chunk-FA4BDD6N.js";import{a as f,h as P,k as x}from"./chunk-Q3J75GL4.js";import"./chunk-O2XFH626.js";import{useRef as K,useState as a,useEffect as p}from"react";import{jsx as h}from"react/jsx-runtime";var C={none:0,tight:8,medium:16,large:32};var X={linear:"linear","ease-in-out":"ease-in-out","ease-out":"ease-out"};function Y({items:r,renderItem:q,className:D,itemClassName:y,gap:d=P.MEDIUM,speed:R=48,direction:S="auto",pauseOnHover:I=!0,ariaLabel:V,reducedMotion:F="respect",behavior:A="auto",pauseOnFocusWithin:H=!0,easing:$="ease-in-out"}){let[G,E]=a(!1),[_,N]=a(!1);p(()=>{if(typeof window>"u")return;let e=window.matchMedia("(prefers-reduced-motion: reduce)");N(e.matches);let n=c=>{N(c.matches)};return e.addEventListener("change",n),()=>e.removeEventListener("change",n)},[]),p(()=>{if(typeof document>"u")return;let e=document.documentElement;E(e.dir==="rtl");let n=new MutationObserver(()=>{E(e.dir==="rtl")});return n.observe(e,{attributes:!0,attributeFilter:["dir"]}),()=>n.disconnect()},[]);let s=S;S==="auto"&&(s=G?"right":"left");let t=s==="up"||s==="down",o=F==="ignore"||!_,i=A;A==="auto"&&(i=r.length<=20?"bounce":"infinite");let u=K(null),[U,v]=a(8e3),[k,g]=a(0),[b,W]=a(!0),[L,B]=a(!1);p(()=>u.current?z(u.current,n=>W(n.isIntersecting),{threshold:0}):void 0,[]),p(()=>{if(!u.current||typeof window>"u"||!o)return;let e=u.current,n=e.querySelector("[data-marquee-track]");if(!n)return;let c=()=>{let l=t?e.clientHeight:e.clientWidth,M=t?n.scrollHeight:n.scrollWidth,m=Math.max(0,M-l);if(B(m>0),m>0){let T=Math.min(512,Math.max(12,R));if(i==="bounce"){let w=m*2/T*1e3;v(Math.max(2e3,Math.floor(w))),g(m)}else{let w=(M+C[d])/T*1e3;v(Math.max(2e3,Math.floor(w))),g(M+C[d])}}else v(0),g(0)};if(requestAnimationFrame(c),typeof ResizeObserver<"u"){let l=new ResizeObserver(()=>{requestAnimationFrame(c)});return l.observe(e),()=>l.disconnect()}else return O(window,"resize",()=>requestAnimationFrame(c))},[r,R,t,o,i,d]);let Q=()=>t?s==="up"?"normal":"reverse":s==="left"?"normal":"reverse",J=()=>i==="infinite"&&L?[...r,...r].map((e,n)=>h("div",{className:f("dndev-flex-shrink-0",y),children:q(e,n%r.length)},n)):r.map((e,n)=>h("div",{className:f("dndev-flex-shrink-0",y),children:q(e,n)},n));return h("div",{ref:u,className:f("dndev-relative dndev-overflow-hidden",I&&"group",H&&"focus-within:group",D),role:"region","aria-label":V||`${i==="infinite"?"Scrolling":"Bouncing"} content with ${r.length} items`,"aria-live":o&&b?"off":"polite",children:h(x,{className:"marquee-track",direction:t?"column":"row",align:t?void 0:"center",gap:d,"data-marquee-track":!0,"data-marquee-direction":t?"vertical":"horizontal","data-marquee-behavior":i,"data-marquee-reduced-motion":!o,style:{"--marquee-duration":o&&b&&L?`${U}ms`:"0ms","--marquee-direction":Q(),"--marquee-distance":t?`${k}px`:`${k}px`,"--marquee-easing":X[$],animationPlayState:!o||!b?"paused":"running"},children:J()})})}var ie=Y;export{ie as default};
|
package/dist/chunk-Q3J75GL4.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{clsx as T}from"clsx";function a(...e){return T(e)}function H(e){let t={};return e.variant!=null&&(t["data-variant"]=e.variant),e.size!=null&&(t["data-size"]=e.size),e.shadow!=null&&(t["data-shadow"]=e.shadow),e.radius!=null&&(t["data-radius"]=e.radius),e.hover!=null&&(t["data-hover"]=e.hover),e.glow!=null&&(t["data-glow"]=e.glow),e.side!=null&&(t["data-side"]=e.side),t}var k={srOnly:"dndev-sr-only",interactive:"dndev-interactive",control:"dndev-control",notification:"dndev-notification",input:"dndev-input",surface:"dndev-surface",overlay:"dndev-overlay",spinner:"dndev-spinner"},A={flex1:"dndev-flex-1",flexShrink0:"dndev-flex-shrink-0",hidden:"dndev-hidden",hScreen:"dndev-h-screen",minHScreen:"dndev-min-h-screen",maxHScreen:"dndev-max-h-screen",h90:"dndev-h-90",minH90:"dndev-min-h-90",maxH90:"dndev-max-h-90",h80:"dndev-h-80",minH80:"dndev-min-h-80",maxH80:"dndev-max-h-80",h60:"dndev-h-60",minH60:"dndev-min-h-60",maxH60:"dndev-max-h-60",sizeMd:"dndev-size-md",sizeTouch:"dndev-size-touch",zHeader:"dndev-z-header",zSidebar:"dndev-z-sidebar",zFooter:"dndev-z-footer",zOverlay:"dndev-z-overlay",zBreadcrumbs:"dndev-z-breadcrumbs",zDropdown:"dndev-z-dropdown",zModal:"dndev-z-modal",zTooltip:"dndev-z-tooltip",zToast:"dndev-z-toast"},N={spin:"dndev-animate-spin",pulse:"dndev-animate-pulse",bounce:"dndev-animate-bounce",fadeIn:"dndev-animate-fade-in",slideIn:"dndev-animate-slide-in",scaleIn:"dndev-animate-scale-in"},R={layout:"debug-layout",flex:"debug-flex",component:"debug-component"},I={touchTarget:"--touch-target",iconMd:"--icon-md",iconTouch:"--icon-touch",radius:"--radius",radiusNone:"--radius-none",radiusMd:"--radius-md",radiusFull:"--radius-full",radiusInteractive:"--radius-interactive",radiusSurface:"--radius-surface",radiusFloating:"--radius-floating",fontSizeXs:"--font-size-xs",fontSizeSm:"--font-size-sm",fontSizeBase:"--font-size-base",fontSizeLg:"--font-size-lg",fontSizeXl:"--font-size-xl",fontSize2xl:"--font-size-2xl",fontSize3xl:"--font-size-3xl",lineHeight:"--line-height",textMaxWidth:"--content-text",shadowSm:"--shadow-sm",shadowMd:"--shadow-md",shadowXl:"--shadow-xl",shadowNone:"--shadow-none",contentText:"--content-text",contentTable:"--content-table",contentDashboard:"--content-dashboard",gapNone:"--gap-none",gapSm:"--gap-sm",gapMd:"--gap-md",gapLg:"--gap-lg"},o={NONE:"none",TIGHT:"tight",MEDIUM:"medium",LARGE:"large"},O={COMPACT:"compact",FULL:"full",AUTO:"auto"},D={...k,...A,...N,...R};import{createElement as C,forwardRef as P}from"react";var d=P(({as:e="div",direction:t="column",align:r="stretch",justify:i="start",gap:s=o.MEDIUM,wrap:l="nowrap",overflow:c,flex:n,rigid:p=!1,nowrap:f=!1,force:u=!1,width:w="full",centered:m=!1,className:v,style:g,children:h,...x},y)=>{let z=e,b={...g,...n!==void 0?{flex:typeof n=="number"?String(n):n}:{}},S={...p&&{"data-rigid":"true"},...f&&{"data-nowrap":"true"},...u&&{"data-force":"true"}};return C(z,{ref:y,className:a("dndev-stack",v),"data-direction":t,"data-align":r,"data-justify":i,"data-gap":s,"data-wrap":l,"data-overflow":c,"data-width":w,"data-centered":m?"true":void 0,...S,style:b,...x},h)});d.displayName="Stack";var j=d;var X=j;export{a,H as b,k as c,A as d,N as e,R as f,I as g,o as h,O as i,D as j,X as k};
|
package/dist/chunk-U37VKGRT.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as i,b as g,i as E}from"./chunk-Q3J75GL4.js";var n={DEFAULT:"default",MUTED:"muted",PRIMARY:"primary",SECONDARY:"secondary",ACCENT:"accent",SUCCESS:"success",WARNING:"warning",DESTRUCTIVE:"destructive"},ze={...n,OUTLINE:"outline",GLASS:"glass"},G=n,Ye=n,Ge={GHOST:"ghost",BASE:"base",MUTED:"muted",CONTRAST:"contrast",ACCENT:"accent"};import{isValidElement as ue,useMemo as W}from"react";import{jsx as x}from"react/jsx-runtime";var fe=({icon:o,fallback:e,className:r,ariaHidden:a=!1})=>{let t=W(()=>o||e,[o,e]),s=W(()=>typeof t!="string"?!1:!/^[a-zA-Z0-9_-]+$/.test(t),[t]);if(!t)return null;let d="dndev-size-md";return typeof t=="function"||typeof t=="object"&&t!==null&&"render"in t?x(t,{className:i(d,"dndev-flex-shrink-0",r),"aria-hidden":a||void 0}):typeof t=="string"?s?x("span",{className:i("dndev-inline-flex dndev-items-center dndev-justify-center",d,r),"aria-hidden":a,children:t}):null:ue(t)?x("span",{className:i("dndev-inline-flex dndev-items-center dndev-justify-center",r),"aria-hidden":a,children:t}):x("span",{className:i("dndev-inline-flex dndev-items-center dndev-justify-center",r),"aria-hidden":a,children:t})},O=fe;import{jsx as B}from"react/jsx-runtime";function ve({overlay:o=!1,variant:e=n.PRIMARY,className:r,"aria-label":a="Loading"}){let t=g({variant:e}),s=B("div",{className:i("dndev-spinner",r),role:"status","aria-busy":"true","aria-label":a,...t,children:B("span",{className:"dndev-sr-only",children:a})});return o?B("div",{className:"dndev-spinner-overlay",children:s}):s}var X=ve;import*as A from"@radix-ui/react-tooltip";import{jsx as Te}from"react/jsx-runtime";var $=A.Provider,K=A.Root,q=A.Trigger;function Z({className:o,sideOffset:e=4,...r}){return Te(A.Content,{sideOffset:e,className:i("dndev-notification dndev-tooltip","animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",o),...r})}import{useCallback as J,useRef as ye,useState as D}from"react";import{jsx as M,jsxs as Ae}from"react/jsx-runtime";function be(o){if(!o)return!1;let e=o.querySelector(".dndev-interactive-label");return e instanceof HTMLElement&&e.offsetWidth>0}function ge({content:o,children:e,side:r,align:a="center",delayDuration:t=300,variant:s}){let[d,p]=D(!1),[h,P]=D(null),[c,f]=D(!1),m=ye(null),v=J(T=>{if(m.current=T,T){p(!0);let l=getComputedStyle(T).getPropertyValue("--tooltip-side").trim();l&&P(l)}},[]),b=J(T=>{T&&be(m.current)||f(T)},[]),C=r??h??"bottom",N=g({variant:s!==G.DEFAULT?s:void 0});return M($,{children:Ae(K,{delayDuration:t,open:d?c:!1,onOpenChange:b,children:[M(q,{asChild:!0,ref:v,children:e}),d&&M(Z,{side:C,align:a,...N,children:o})]})})}var _=ge;import{cva as he}from"class-variance-authority";import{forwardRef as Pe}from"react";import{Fragment as Q,jsx as u,jsxs as H}from"react/jsx-runtime";var U={...n,GHOST:"ghost",OUTLINE:"outline",LINK:"link"},Ce=he("dndev-interactive",{variants:{variant:{[n.DEFAULT]:"",[n.MUTED]:"",[n.PRIMARY]:"",[n.SECONDARY]:"",[n.ACCENT]:"",[n.SUCCESS]:"",[n.WARNING]:"",[n.DESTRUCTIVE]:"",[U.GHOST]:"",[U.OUTLINE]:"",[U.LINK]:""}},defaultVariants:{variant:n.DEFAULT}}),j=Pe(({className:o,variant:e,render:r,display:a=E.AUTO,icon:t,iconEnd:s=!1,children:d,tooltip:p,floating:h=!1,fullWidth:P=!1,loading:c=!1,loadingText:f,progress:m,disabled:v,"aria-label":b,"aria-describedby":C,...N},T)=>{let l=d,I=!!t,L=!!l,S=a,k=v||c,se=c&&m!==void 0&&m<100,le=c?f??l:l,F=c?H(Q,{children:[se?u("span",{className:"dndev-button-progress","aria-hidden":"true",children:H("svg",{viewBox:"0 0 20 20",className:"dndev-progress-ring",children:[u("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"2",opacity:"0.2"}),u("circle",{cx:"10",cy:"10",r:"8",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeDasharray:`${m/100*50.27} 50.27`,strokeLinecap:"round",transform:"rotate(-90 10 10)"})]})}):u(X,{className:"dndev-button-spinner","aria-hidden":"true"}),L&&u("span",{className:"dndev-interactive-label","data-display":S,children:le})]}):H(Q,{children:[t&&!s&&u(O,{icon:t}),L&&u("span",{className:"dndev-interactive-label","data-display":S,children:l}),t&&s&&u(O,{icon:t})]}),z=()=>b||(typeof l=="string"?l:typeof l=="number"?String(l):I&&!L?"Button":void 0),de=e===n.DEFAULT?n.PRIMARY:e,pe=g({variant:de}),ce=N.type||"button",{type:Fe,...me}=N,Y={children:F,className:i(Ce({variant:e,className:o}),"touch-manipulation"),"aria-label":z(),"aria-describedby":C,...pe,...h&&{"data-floating":"true"},...P&&{"data-full-width":"true"},...S&&{"data-display":S},...c&&{"data-loading":"true","aria-busy":"true"},...me},w=r?r(Y):u("button",{ref:T,type:ce,role:"button",tabIndex:k?-1:0,disabled:k,"aria-disabled":k||void 0,...Y,children:F});return S===E.COMPACT||S===E.AUTO?u(_,{content:p||z()||"Button",children:w}):p?u(_,{content:p,children:w}):w});j.displayName="Button";var ee=j;import{createElement as Ne,forwardRef as Se}from"react";import{jsx as xe,jsxs as Re}from"react/jsx-runtime";var Ee={...n,CODE:"code"},te=Se(function({as:e="div",children:r,variant:a=Ee.DEFAULT,level:t,align:s,weight:d,italic:p,className:h,...P},c){let f=e,m=g({variant:a}),b=t??(["h1","h2","h3","h4","h5","h6"].includes(e)?e:"body"),C=b!=="body"?{"data-level":b}:{},N=typeof r=="string"&&r.includes(`
|
|
2
|
-
`)?r.split(`
|
|
3
|
-
`).map((T,l,I)=>Re("span",{children:[T,l<I.length-1&&xe("br",{})]},l)):r;return Ne(f,{ref:c,className:i("dndev-text-base",h),"data-text-align":s||void 0,"data-font-weight":d||void 0,"data-italic":p||void 0,...m,...C,...P},N)});te.displayName="Text";var Rt=te;import*as y from"@radix-ui/react-scroll-area";import{jsx as oe}from"react/jsx-runtime";var re=y.Root,ne=y.Viewport,ie=y.Corner,R=({className:o,orientation:e="vertical",...r})=>oe(y.ScrollAreaScrollbar,{orientation:e,className:i("dndev-scroll-bar",o),"data-orientation":e,...r,children:oe(y.ScrollAreaThumb,{className:"dndev-scroll-bar-thumb","data-orientation":e})});import{jsx as V,jsxs as Ie}from"react/jsx-runtime";var Ve=({className:o,children:e,showHorizontal:r=!1,showVertical:a=!0,end:t=!1,...s})=>Ie(re,{className:i("dndev-scroll-area",t&&"dndev-scroll-area-end",o),...s,children:[V(ne,{className:"dndev-scroll-area-viewport",children:e}),a&&V(R,{orientation:"vertical"}),r&&V(R,{orientation:"horizontal"}),V(ie,{})]}),Dt=Ve;import{Copy as Le,Check as ke}from"lucide-react";import{useState as we,useCallback as Oe,useEffect as Be,useRef as De}from"react";import{jsx as _e}from"react/jsx-runtime";var Me=({text:o,children:e,variant:r="ghost",className:a,onCopy:t,onClick:s,tooltipText:d="Copy to clipboard",copiedTooltipText:p="Copied!",showTooltip:h=!0,ariaLabel:P,...c})=>{let[f,m]=we(!1),v=De(null);Be(()=>()=>{v.current!==null&&clearTimeout(v.current)},[]);let b=Oe(async C=>{try{if(typeof window>"u"||!navigator?.clipboard)return;await navigator.clipboard.writeText(o),m(!0),t?.(o),v.current!==null&&clearTimeout(v.current),v.current=setTimeout(()=>m(!1),2e3),s?.(C)}catch{}},[o,t,s]);return _e(ee,{type:"button",variant:r,display:E.COMPACT,icon:f?ke:Le,onClick:b,tooltip:h?f?p:d:void 0,className:i("dndev-copy-button-transition",f&&"dndev-copy-button-scaled",a),"aria-label":P||(f?"Copied to clipboard":"Copy to clipboard"),...c,children:e})},Kt=Me;import{useEffect as Ue,useState as He}from"react";function ae(){if(typeof window>"u")return!1;try{let o=document.documentElement,e=getComputedStyle(o).getPropertyValue("--theme-is-dark").trim();return e==="1"?!0:e==="0"?!1:o.classList.contains("dark")}catch{return document.documentElement.classList.contains("dark")}}function Qt(){let[o,e]=He(!1);return Ue(()=>{e(ae());let r=new MutationObserver(()=>{e(ae())});return r.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>r.disconnect()},[]),o}export{n as a,ze as b,G as c,Ye as d,Ge as e,O as f,X as g,$ as h,K as i,q as j,Z as k,_ as l,U as m,Ce as n,ee as o,Ee as p,Rt as q,re as r,ne as s,ie as t,R as u,Dt as v,Kt as w,ae as x,Qt as y};
|