@domphy/ui 0.9.0 → 0.11.0
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/core-theme-ui.global.js +4 -4
- package/dist/core-theme-ui.global.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ValueOrState, PartialElement, DomphyElement, State } from '@domphy/core';
|
|
2
2
|
import { ThemeColor } from '@domphy/theme';
|
|
3
|
-
import { Placement as Placement$1 } from '@floating
|
|
4
|
-
export { Placement } from '@floating
|
|
3
|
+
import { Placement as Placement$1 } from '@domphy/floating';
|
|
4
|
+
export { Placement } from '@domphy/floating';
|
|
5
5
|
|
|
6
6
|
declare function abbreviation(props?: {
|
|
7
7
|
color?: ValueOrState<ThemeColor>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ValueOrState, PartialElement, DomphyElement, State } from '@domphy/core';
|
|
2
2
|
import { ThemeColor } from '@domphy/theme';
|
|
3
|
-
import { Placement as Placement$1 } from '@floating
|
|
4
|
-
export { Placement } from '@floating
|
|
3
|
+
import { Placement as Placement$1 } from '@domphy/floating';
|
|
4
|
+
export { Placement } from '@domphy/floating';
|
|
5
5
|
|
|
6
6
|
declare function abbreviation(props?: {
|
|
7
7
|
color?: ValueOrState<ThemeColor>;
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Xo=Object.defineProperty,Jo=Object.defineProperties;var Qo=Object.getOwnPropertyDescriptors;var Vt=Object.getOwnPropertySymbols;var Zo=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable;var Rt=(i,o,n)=>o in i?Xo(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,_t=(i,o)=>{for(var n in o||(o={}))Zo.call(o,n)&&Rt(i,n,o[n]);if(Vt)for(var n of Vt(o))er.call(o,n)&&Rt(i,n,o[n]);return i},Nt=(i,o)=>Jo(i,Qo(o));import{toState as Mt}from"@domphy/core";import{themeColor as fe,themeSize as tr,themeSpacing as or}from"@domphy/theme";function Hi(i={}){var e,r;let o=Mt((e=i.color)!=null?e:"neutral","color"),n=Mt((r=i.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>tr(t),backgroundColor:t=>fe(t),color:t=>fe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>fe(t,"shift-7",o.get(t)),textUnderlineOffset:or(.72),cursor:"help","&:hover":{color:t=>fe(t,"shift-11",n.get(t)),textDecorationColor:t=>fe(t,"shift-9",n.get(t))}}}}import{toState as rr}from"@domphy/core";import{themeColor as X,themeDensity as L,themeSpacing as V}from"@domphy/theme";function Fi(i={}){var n;let o=rr((n=i.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>V(L(e)*2),backgroundColor:e=>X(e,"inherit",o.get(e)),color:e=>X(e,"shift-10",o.get(e)),outline:e=>`1px solid ${X(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>V(L(e)*2),paddingInline:e=>V(L(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>V(L(e)*4),color:e=>X(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>V(L(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>V(L(e)*4),color:e=>X(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:V(2),paddingBlock:e=>V(L(e)*2),paddingInline:e=>V(L(e)*4),borderTop:e=>`1px solid ${X(e,"shift-3",o.get(e))}`}}}}import{merge as nr,toState as ir}from"@domphy/core";import{themeColor as Je,themeSpacing as ar}from"@domphy/theme";function Gi(i={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:r=90}=i;return{_onSchedule:(t,a)=>{nr(a,{_context:{splitter:{direction:o,size:ir(n),min:e,max:r}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Ui(){return{_onMount:i=>{let o=i.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=i.domElement,e=o.direction==="horizontal"?"width":"height";n.style[e]=`${o.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let r=o.size.addListener(t=>{n.style[e]=`${t}%`});i.addHook("Remove",r)}}}function Xi(){return{_onMount:i=>{let o=i.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=i.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize";let r=t=>{t.preventDefault();let a=n.parentElement,l=u=>{let c=a.getBoundingClientRect(),m=e?(u.clientX-c.left)/c.width*100:(u.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(m,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};n.addEventListener("mousedown",r),i.addHook("Remove",()=>n.removeEventListener("mousedown",r))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i=>Je(i,"shift-2"),"&:hover":{backgroundColor:i=>Je(i,"shift-3")},"&::after":{content:'""',borderRadius:ar(999),backgroundColor:i=>Je(i,"shift-4")}}}}import{merge as lr,toState as sr}from"@domphy/core";import{themeColor as R,themeDensity as $e,themeSize as Dt,themeSpacing as J}from"@domphy/theme";function ea(){return{_onSchedule:(i,o)=>{lr(o,{_context:{command:{query:sr("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ta(i={}){let{color:o="neutral",accentColor:n="primary"}=i;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let r=e.getContext("command");if(!r){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>r.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>Dt(e,"inherit"),paddingInline:e=>J($e(e)*3),paddingBlock:e=>J($e(e)*2),border:"none",borderBottom:e=>`1px solid ${R(e,"shift-3",o)}`,outline:"none",color:e=>R(e,"shift-10",o),backgroundColor:e=>R(e,"inherit",o),"&::placeholder":{color:e=>R(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>R(e,"shift-6",n)}}}}function oa(i={}){let{color:o="neutral",accentColor:n="primary"}=i;return{role:"option",_onMount:e=>{var s,u;let r=e.getContext("command");if(!r){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(u=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?u:"",l=r.query.addListener(c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())});e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Dt(e,"inherit"),height:e=>J(6+$e(e)*2),paddingInline:e=>J($e(e)*3),border:"none",outline:"none",color:e=>R(e,"shift-9",o),backgroundColor:e=>R(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>R(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${J(.5)} solid ${R(e,"shift-6",n)}`,outlineOffset:`-${J(.5)}`}}}}import{toState as Lt}from"@domphy/core";import{themeColor as Q,themeSize as cr,themeSpacing as Z}from"@domphy/theme";function aa(i={}){var e,r;let o=Lt((e=i.color)!=null?e:"neutral","color"),n=Lt((r=i.accentColor)!=null?r:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let s=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(s.findIndex(p=>p===t));t.attributes.set("ariaPressed",p=>{let d=a.value.get(p);return Array.isArray(d)?d.includes(u):d===u}),t.addEvent("click",()=>{let p=a.value.get();if(a.multiple){let d=Array.isArray(p)?[...p]:[];a.value.set(d.includes(u)?d.filter(h=>h!==u):[...d,u])}else a.value.set(p===u?"":u)})},style:{cursor:"pointer",fontSize:t=>cr(t,"inherit"),height:Z(6),paddingBlock:Z(1),paddingInline:Z(2),border:"none",borderRadius:Z(1),color:t=>Q(t,"shift-9",o.get(t)),backgroundColor:t=>Q(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>Q(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>Q(t,"shift-3",n.get(t)),color:t=>Q(t,"shift-12",n.get(t))},"&:focus-visible":{outline:t=>`${Z(.5)} solid ${Q(t,"shift-6",n.get(t))}`,outlineOffset:`-${Z(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as mr}from"@domphy/core";import{themeSpacing as ze,themeColor as Ht,themeSize as ur}from"@domphy/theme";function ua(i={}){var e;let{multiple:o=!1,color:n="neutral"}=i;return{role:"group",_context:{toggleGroup:{value:mr((e=i.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:ze(1),paddingInline:ze(1),gap:ze(1),borderRadius:ze(2),fontSize:r=>ur(r,"inherit"),backgroundColor:r=>Ht(r,"inherit",n),outline:r=>`1px solid ${Ht(r,"shift-3",n)}`,outlineOffset:"-1px"}}}import{themeSpacing as Bt}from"@domphy/theme";function pa(){return{style:{display:"flex",alignItems:"center",gap:Bt(2),"& > *":{minWidth:Bt(9)+"!important"}},_onMount:i=>{let o=i.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let l=n(),s=a.target,u=l.indexOf(s);s.value&&u<l.length-1&&l[u+1].focus()},r=a=>{let l=n(),s=a.target,u=l.indexOf(s);a.key==="Backspace"&&!s.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&l[u-1].focus(),a.key==="ArrowRight"&&u<l.length-1&&l[u+1].focus()},t=a=>{var m,p,d;a.preventDefault();let l=(p=(m=a.clipboardData)==null?void 0:m.getData("text"))!=null?p:"",s=n(),u=s.indexOf(a.target);[...l].forEach((h,y)=>{s[u+y]&&(s[u+y].value=h)});let c=Math.min(u+l.length-1,s.length-1);(d=s[c])==null||d.focus()};o.addEventListener("input",e),o.addEventListener("keydown",r),o.addEventListener("paste",t),i.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",r),o.removeEventListener("paste",t)})}}}import{toState as dr}from"@domphy/core";import{themeColor as Qe,themeDensity as At,themeSize as hr,themeSpacing as Ve}from"@domphy/theme";function Sa(i={}){var n;let o=dr((n=i.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:Ve(3),paddingBlock:e=>Ve(At(e)*2),paddingInline:e=>Ve(At(e)*4),boxShadow:e=>`inset ${Ve(1)} 0 0 0 ${Qe(e,"shift-8",o.get(e))}`,backgroundColor:e=>Qe(e,"inherit",o.get(e)),color:e=>Qe(e,"shift-10",o.get(e)),fontSize:e=>hr(e,"inherit")}}}import{toState as pr}from"@domphy/core";import{themeColor as Kt,themeSize as fr,themeSpacing as Wt}from"@domphy/theme";function ka(i={}){var n;let o=pr((n=i.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:Wt(9),height:Wt(9),fontSize:e=>fr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>Kt(e,"inherit",o.get(e)),color:e=>Kt(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Ft}from"@domphy/core";import{themeSpacing as Ze,themeColor as jt,themeSize as gr}from"@domphy/theme";function Ia(i={}){var r;let{label:o=999}=i,n=Ft(o),e=Ft((r=i.color)!=null?r:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Ze(1),minWidth:Ze(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>gr(t,"decrease-1"),borderRadius:Ze(999),backgroundColor:t=>jt(t,"shift-9",e.get(t)),color:t=>jt(t,"shift-0",e.get(t))}}}}import{toState as yr}from"@domphy/core";import{themeColor as ge,themeSize as br,themeSpacing as qt}from"@domphy/theme";function _a(i={}){var e;let{separator:o="/"}=i,n=yr((e=i.color)!=null?e:"neutral","color");return{_onInsert:r=>{r.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:r=>br(r,"inherit"),gap:qt(1),color:r=>ge(r,"shift-9",n.get(r)),backgroundColor:r=>ge(r,"inherit",n.get(r)),"& > *":{display:"inline-flex",alignItems:"center",color:r=>ge(r,"shift-8",n.get(r))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:r=>ge(r,"shift-4",n.get(r)),paddingInlineStart:qt(1)},"& > [aria-current=page]":{color:r=>ge(r,"shift-10",n.get(r)),pointerEvents:"none"}}}}import{toState as Sr}from"@domphy/core";import{themeColor as Re,themeSize as Cr,themeSpacing as _e}from"@domphy/theme";function Ha(i={}){var n;let o=Sr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Cr(e,"inherit"),paddingInline:_e(1),border:"none",background:"none",cursor:"pointer",color:e=>Re(e,"shift-8",o.get(e)),borderRadius:_e(1),"&:hover":{color:e=>Re(e,"shift-10",o.get(e)),backgroundColor:e=>Re(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${_e(.5)} solid ${Re(e,"shift-6",o.get(e))}`,outlineOffset:_e(.5)}}}}import{toState as et,merge as tt}from"@domphy/core";import{themeSpacing as G,themeColor as ye,themeDensity as ot,themeSize as Yt}from"@domphy/theme";import{toState as Er}from"@domphy/core";import{themeColor as Ne,themeSize as vr,themeSpacing as _}from"@domphy/theme";var xr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function Me(i={}){var e;let{removable:o=!1}=i,n=Er((e=i.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:r=>{let t={span:xr,onClick:a=>{a.stopPropagation(),r.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:_(1),width:_(4),height:_(4),flexShrink:0,"&:hover":{backgroundColor:a=>Ne(a,"shift-4",n.get(a))}}};o&&r.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:_(6),paddingBlock:"0px",borderRadius:_(1),paddingInlineStart:_(2),paddingInlineEnd:o?_(1):_(2),gap:_(2),fontSize:r=>vr(r,"inherit"),backgroundColor:r=>Ne(r,"inherit",n.get(r)),color:r=>Ne(r,"shift-9",n.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${Ne(r,"shift-4",n.get(r))}`}}}import{toState as kr,merge as Tr}from"@domphy/core";import{computePosition as wr,autoUpdate as Pr,offset as Or,flip as Ir,shift as $r}from"@floating-ui/dom";function H(i){let{open:o=!1,placement:n}=i,e=null,r=null,t=null,a=null,l=null,s=null,u=!1,c=kr(o),m=()=>{u||!s||(u=!0,l=s.children.insert(i.content))},p=()=>{m(),t&&a&&(r&&r(),r=Pr(t,a,()=>{wr(t,a,{placement:n.get(),middleware:[Or(12),Ir(),$r()],strategy:"fixed"}).then(({x:g,y:v,placement:b})=>{Object.assign(a.style,{left:`${g}px`,top:`${v}px`}),n.set(b)})}),c.set(!0))},d=()=>{r&&r(),r=null,c.set(!1)},h=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},y=()=>{e&&clearTimeout(e),e=setTimeout(d,100)},f={style:{position:"fixed",pointerEvents:"auto",visibility:g=>c.get(g)?"visible":"hidden"},_onMount:g=>a=g.domElement,_portal:g=>{let v=g.domElement.querySelector("#domphy-floating");if(!v){let b={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};v=g.children.insert(b).domElement}return v}};return Tr(i.content,f),{show:h,hide:y,anchorPartial:{onKeyDown:g=>g.key==="Escape"&&y(),_onMount:g=>{s=g.getRoot(),t=g.domElement;let v=b=>{if(!c.get()||!t||!a)return;let S=b.target;!t.contains(S)&&!a.contains(S)&&y()};g.getRoot().domElement.addEventListener("click",v),g.addHook("BeforeRemove",()=>{e&&clearTimeout(e),r&&(r(),r=null),l&&l.remove(),g.getRoot().domElement.removeEventListener("click",v)})}}}}function ol(i){let{options:o=[],placement:n="bottom",color:e="neutral",open:r=!1,multiple:t=!1}=i,a=et(i.value),l=et(r),{show:s,hide:u,anchorPartial:c}=H({open:l,placement:et(n),content:i.content}),m={onClick:()=>!t&&u()};tt(i.content,m);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:G(6),marginInlineStart:G(2),fontSize:f=>Yt(f,"inherit"),color:f=>ye(f,"shift-9",e),backgroundColor:f=>ye(f,"inherit",e)},d;i.input?(tt(i.input,{onFocus:()=>s(),style:p,_key:"combobox-input"}),d=i.input):d={input:null,onFocus:()=>s(),value:f=>(a.get(f),""),style:p,_key:"combobox-input"};let h={div:f=>{let E=a.get(f),g=Array.isArray(E)?E:[E],b=o.filter(S=>g.includes(S.value)).map(S=>({span:S.label,$:[Me({color:e,removable:!0})],_key:S.value,_onRemove:Xe=>{let pe=a.get(),zt=(Array.isArray(pe)?pe:[pe]).filter(Uo=>Uo!==S.value);t?a.set(zt):a.set(zt[0])}}));return b.push(d),b},style:{display:"flex",flexWrap:"wrap",gap:G(1)}},y={_onInsert:f=>{f.tagName!="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:f=>f.children.insert(h),style:{minWidth:G(32),outlineOffset:"-1px",outline:f=>`1px solid ${ye(f,"shift-4","neutral")}`,paddingBlock:f=>G(ot(f)*1),paddingInline:f=>G(ot(f)*1),borderRadius:f=>G(ot(f)*1),fontSize:f=>Yt(f,"inherit"),color:f=>ye(f,"shift-9",e),backgroundColor:f=>ye(f,"inherit",e)}};return tt(c,y),c}import{toState as zr}from"@domphy/core";import{themeSpacing as rt,themeColor as De,themeSize as Vr}from"@domphy/theme";function Gt(i={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=rt(6),bordered:r=!0}=i,t=zr(o),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},l=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},s=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>Vr(c),backgroundColor:c=>De(c),color:c=>De(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:rt(1.5),height:rt(1.5),backgroundColor:c=>De(c,"inherit",n),borderWidth:r?"1px":"0px",borderColor:c=>De(c,"inherit",n),borderTopStyle:c=>{let m=l(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=l(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=l(c);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:c=>{let m=l(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=l(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=l(c);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:c=>{let m=l(c),p=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",d=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${p},${d}) rotate(45deg)`}}}}}import{toState as Rr}from"@domphy/core";import{themeSpacing as nt,themeColor as Ut,themeDensity as Xt,themeSize as _r}from"@domphy/theme";function pl(i={}){var n;let o=Rr((n=i.color)!=null?n:"inherit","color");return{_onInsert:e=>{e.tagName!="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>_r(e,"inherit"),backgroundColor:e=>Ut(e,"inherit",o.get(e)),boxShadow:e=>`inset ${nt(1)} 0 0 0 ${Ut(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>nt(Xt(e)*2),paddingInline:e=>nt(Xt(e)*4),margin:0}}}import{toState as Nr}from"@domphy/core";import{themeColor as N,themeDensity as Le,themeSize as Mr,themeSpacing as be}from"@domphy/theme";function bl(i={}){var n;let o=Nr((n=i.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Mr(e,"inherit"),paddingBlock:e=>be(Le(e)*1),paddingInline:e=>be(Le(e)*3),borderRadius:e=>be(Le(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>be(Le(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${N(e,"shift-4",o.get(e))}`,color:e=>N(e,"shift-9",o.get(e)),backgroundColor:e=>N(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>N(e,"shift-10",o.get(e)),backgroundColor:e=>N(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${be(.5)} ${N(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>N(e,"shift-2","neutral"),outline:e=>`1px solid ${N(e,"shift-4","neutral")}`,color:e=>N(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Jt}from"@domphy/core";import{themeColor as x,themeSpacing as B,themeSize as Dr}from"@domphy/theme";function Tl(i={}){var e,r;let o=Jt((e=i.color)!=null?e:"neutral","color"),n=Jt((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Dr(t,"inherit"),display:"inline-flex",position:"relative",width:B(6),height:B(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:B(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${x(t,"shift-4",o.get(t))}`,color:t=>x(t,"shift-9",o.get(t)),width:B(4),height:B(4)},"&:hover::before":{backgroundColor:t=>x(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${x(t,"shift-6",n.get(t))}`,backgroundColor:t=>x(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>x(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${B(.5)} solid ${x(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${x(t,"shift-6",n.get(t))}`,backgroundColor:t=>x(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>x(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>x(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:B(1.5),outline:t=>`${B(.5)} solid ${x(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>x(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Lr}from"@domphy/core";import{themeSpacing as it,themeColor as Qt,themeSize as Hr}from"@domphy/theme";function Vl(i={}){var n;let o=Lr((n=i.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",fontSize:e=>Hr(e,"inherit"),color:e=>Qt(e,"shift-9",o.get(e)),backgroundColor:e=>Qt(e,"inherit",o.get(e)),height:it(6),paddingInline:it(1.5),borderRadius:it(1)}}}import{toState as Zt}from"@domphy/core";import{themeColor as A,themeDensity as Se,themeSize as eo,themeSpacing as C}from"@domphy/theme";function Hl(i={}){var r,t;let{duration:o=240}=i,n=Zt((r=i.color)!=null?r:"neutral","color"),e=Zt((t=i.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>eo(a,"inherit"),color:a=>A(a,"shift-9",n.get(a)),backgroundColor:a=>A(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>A(a,"shift-2",n.get(a)),color:a=>A(a,"shift-10",n.get(a)),fontSize:a=>eo(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:C(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>C(Se(a)*4),height:C(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:C(2),height:C(2),flexShrink:0,marginTop:`-${C(.5)}`,borderInlineEnd:a=>`${C(.5)} solid ${A(a,"shift-9",n.get(a))}`,borderBottom:a=>`${C(.5)} solid ${A(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>A(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>C(Se(a)*2),outlineOffset:`-${C(.5)}`,outline:a=>`${C(.5)} solid ${A(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>C(Se(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:C(250),opacity:1,paddingTop:a=>C(Se(a)*1),paddingBottom:a=>C(Se(a)*3)}}}}import{toState as Br}from"@domphy/core";import{themeColor as to,themeSpacing as oo,themeSize as ro}from"@domphy/theme";function ql(i={}){var n;let o=Br((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${oo(24)}, max-content) 1fr`,columnGap:oo(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>ro(e,"inherit"),color:e=>to(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>ro(e,"inherit"),color:e=>to(e,"shift-9",o.get(e))}}}}import{toState as Ar}from"@domphy/core";import{themeColor as He,themeDensity as Kr,themeSize as Wr,themeSpacing as at}from"@domphy/theme";function Jl(i={}){let{color:o="neutral",open:n=!1}=i,e=Ar(n);return{_onInsert:r=>{r.tagName!="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(r,t)=>{if(r.target!==t.domElement)return;let a=t.domElement.getBoundingClientRect();r.clientX>=a.left&&r.clientX<=a.right&&r.clientY>=a.top&&r.clientY<=a.bottom||e.set(!1)},onTransitionEnd:(r,t)=>{let a=t.domElement;a.style.opacity==="0"&&(a.close(),document.body.style.overflow="")},_onMount:r=>{let t=r.domElement,a=s=>{s?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let u=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');u==null||u.focus()})):t.style.opacity="0"};a(e.get());let l=e.addListener(a);r.addHook("Remove",()=>{l(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:r=>Wr(r,"inherit"),color:r=>He(r,"shift-10",o),backgroundColor:r=>He(r,"inherit",o),border:"none",padding:r=>at(Kr(r)*3),boxShadow:r=>`0 ${at(9)} ${at(16)} ${He(r,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:r=>He(r,"shift-2","neutral"),opacity:.75}}}}import{toState as Fr}from"@domphy/core";import{themeColor as jr,themeSize as qr}from"@domphy/theme";function ns(i={}){var n;let o=Fr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>qr(e,"inherit"),fontStyle:"italic",color:e=>jr(e,"shift-10",o.get(e))}}}import{toState as Yr}from"@domphy/core";import{themeColor as no,themeSize as Gr,themeSpacing as Be}from"@domphy/theme";function us(i={}){var n;let o=Yr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Be(2),marginInline:0,marginTop:Be(3),marginBottom:Be(3),color:e=>no(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Be(2)},"& figcaption":{fontSize:e=>Gr(e,"decrease-1"),color:e=>no(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Ur}from"@domphy/core";import{themeColor as Ae,themeDensity as ee,themeSpacing as M,themeSize as lt}from"@domphy/theme";function gs(i={}){var r;let{layout:o="horizontal"}=i,n=Ur((r=i.color)!=null?r:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>M(ee(t)*3),paddingBlock:t=>M(ee(t)*3),border:"none",borderRadius:t=>M(ee(t)*2),fontSize:t=>lt(t,"inherit"),backgroundColor:t=>Ae(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:M(4),rowGap:M(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>lt(t,"inherit"),fontWeight:600,paddingBlock:t=>M(ee(t)*1),borderRadius:t=>M(ee(t)*2),color:t=>Ae(t,"shift-9",n.get(t)),backgroundColor:t=>Ae(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":M(ee(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${M(2)} * -1)`,fontSize:t=>lt(t,"decrease-1"),color:t=>Ae(t,"shift-9",n.get(t))}}}}import{toState as Xr}from"@domphy/core";import{themeColor as Jr,themeSize as Qr,themeSpacing as Zr}from"@domphy/theme";var en={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function xs(i={}){var n;let o=Xr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Jr(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Zr(2),fontSize:e=>{let r=en[e.elementNode.tagName]||"inherit";return Qr(e,r)}}}}import{toState as tn}from"@domphy/core";import{themeColor as on,themeSpacing as io}from"@domphy/theme";function $s(i={}){var n;let o=tn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:io(3),marginBottom:io(3),backgroundColor:e=>on(e,"shift-4",o.get(e))}}}import{toState as rn}from"@domphy/core";import{themeColor as nn,themeSpacing as an}from"@domphy/theme";function Ds(i={}){var n;let o=rn((n=i.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:an(2),backgroundColor:e=>nn(e,"inherit",o.get(e))}}}import{toState as ln}from"@domphy/core";import{themeSpacing as ao,themeColor as sn,themeSize as cn}from"@domphy/theme";function Ks(i={}){var n;let o=ln((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:ao(4),height:ao(4),flexShrink:"0",fontSize:e=>cn(e),backgroundColor:"transparent",color:e=>sn(e,"shift-9",o.get(e))}}}import{toState as lo}from"@domphy/core";import{themeColor as so,themeDensity as Ce,themeSpacing as Ee,themeSize as mn}from"@domphy/theme";function Gs(i={}){var e,r;let o=lo((e=i.color)!=null?e:"neutral","color"),n=lo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"color",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputColor" primitive patch must use input tag'),a.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>mn(t,"inherit"),paddingBlock:t=>Ee(Ce(t)*1),paddingInline:t=>Ee(Ce(t)*1),blockSize:t=>Ee(6+Ce(t)*2),inlineSize:t=>Ee(6+Ce(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Ee(Ce(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>so(t,"shift-2","neutral"),outline:t=>`1px solid ${so(t,"shift-4","neutral")}`}}}}import{toState as co}from"@domphy/core";import{themeColor as K,themeDensity as st,themeSpacing as ve,themeSize as un}from"@domphy/theme";function tc(i={}){var r,t;let{mode:o="datetime-local"}=i,n=co((r=i.color)!=null?r:"neutral","color"),e=co((t=i.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,l)=>{a.tagName!="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:a=>un(a,"inherit"),lineHeight:"inherit",color:a=>K(a,"shift-9",n.get(a)),backgroundColor:a=>K(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${K(a,"shift-4",n.get(a))}`,borderRadius:a=>ve(st(a)*1),paddingInline:a=>ve(st(a)*3),height:a=>ve(6+st(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${ve(.5)} solid ${K(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>K(a,"shift-8","neutral"),backgroundColor:a=>K(a,"shift-2","neutral"),outline:a=>`1px solid ${K(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${ve(.5)} solid ${K(a,"shift-6","error")}`}}}}import{toState as mo}from"@domphy/core";import{themeColor as w,themeDensity as Ke,themeSpacing as W,themeSize as dn}from"@domphy/theme";function sc(i={}){var e,r;let o=mo((e=i.color)!=null?e:"neutral","color"),n=mo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>dn(t,"inherit"),lineHeight:"inherit",color:t=>w(t,"shift-9",o.get(t)),backgroundColor:t=>w(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${w(t,"shift-4",o.get(t))}`,borderRadius:t=>W(Ke(t)*1),height:t=>W(6+Ke(t)*2),paddingInline:t=>W(Ke(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>W(Ke(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:W(1),height:W(6),paddingInline:W(2),cursor:"pointer",color:t=>w(t,"shift-11",o.get(t)),backgroundColor:t=>w(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${W(.5)} solid ${w(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>w(t,"shift-8","neutral"),outline:t=>`1px solid ${w(t,"shift-4","neutral")}`,backgroundColor:t=>w(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>w(t,"shift-8","neutral"),backgroundColor:t=>w(t,"shift-3","neutral")}}}}import{toState as uo}from"@domphy/core";import{themeColor as F,themeDensity as ct,themeSpacing as xe,themeSize as hn}from"@domphy/theme";function fc(i={}){var e,r;let o=uo((e=i.color)!=null?e:"neutral","color"),n=uo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>hn(t,"inherit"),lineHeight:"inherit",color:t=>F(t,"shift-9",o.get(t)),backgroundColor:t=>F(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${F(t,"shift-4",o.get(t))}`,borderRadius:t=>xe(ct(t)*1),minWidth:xe(32),paddingInline:t=>xe(ct(t)*3),paddingBlock:t=>xe(ct(t)*1),"&::placeholder":{color:t=>F(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${xe(.5)} solid ${F(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>F(t,"shift-8","neutral"),backgroundColor:t=>F(t,"shift-2","neutral"),outline:t=>`1px solid ${F(t,"shift-4","neutral")}`}}}}import{toState as ho}from"@domphy/core";import{themeColor as k,themeDensity as mt,themeSpacing as j,themeSize as pn}from"@domphy/theme";function vc(i={}){var e,r;let o=ho((e=i.color)!=null?e:"neutral","color"),n=ho((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:j(10),paddingInline:t=>j(mt(t)*3),paddingBlock:t=>j(mt(t)*1),borderRadius:t=>j(mt(t)*1),fontSize:t=>pn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${k(t,"shift-4",o.get(t))}`,color:t=>k(t,"shift-9",o.get(t)),backgroundColor:t=>k(t,"inherit",o.get(t)),"&::placeholder":{color:t=>k(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>k(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${j(.5)} solid ${k(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>k(t,"shift-2","neutral"),outline:t=>`1px solid ${k(t,"shift-4","neutral")}`,color:t=>k(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${j(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${j(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${j(.5)} solid ${k(t,"shift-6","warning")}`}}}}import{toState as po}from"@domphy/core";import{themeColor as We,themeSpacing as P}from"@domphy/theme";function Ic(i={}){var e,r;let o=po((e=i.color)!=null?e:"neutral","color"),n=po((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:P(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:P(1.5),borderRadius:P(999),backgroundColor:t=>We(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:P(4),height:P(4),borderRadius:P(999),border:"none",marginTop:`calc((${P(1.5)} - ${P(4)}) / 2)`,backgroundColor:t=>We(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>We(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${P(.5)} solid ${We(t,"shift-6",n.get(t))}`,outlineOffset:P(1),borderRadius:P(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as fo}from"@domphy/core";import{themeColor as U,themeDensity as Fe,themeSpacing as te,themeSize as fn}from"@domphy/theme";function Mc(i={}){var e,r;let o=fo((e=i.color)!=null?e:"neutral","color"),n=fo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:te(10),paddingInlineStart:t=>te(Fe(t)*3),paddingInlineEnd:t=>te(Fe(t)*1.5),paddingBlock:t=>te(Fe(t)*1),borderRadius:t=>te(Fe(t)*1),fontSize:t=>fn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${U(t,"shift-4",o.get(t))}`,color:t=>U(t,"shift-9",o.get(t)),backgroundColor:t=>U(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${te(.5)} solid ${U(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>U(t,"shift-2","neutral"),outline:t=>`1px solid ${U(t,"shift-4","neutral")}`,color:t=>U(t,"shift-8","neutral")}}}}import{toState as gn}from"@domphy/core";import{themeColor as ut,themeSize as yn,themeSpacing as dt}from"@domphy/theme";function Wc(i={}){var n;let o=gn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>yn(e,"inherit"),color:e=>ut(e,"shift-9",o.get(e)),backgroundColor:e=>ut(e,"inherit",o.get(e)),paddingBlock:dt(.5),paddingInline:dt(1.5),borderRadius:dt(1),outline:e=>`1px solid ${ut(e,"shift-4",o.get(e))}`}}}import{toState as go}from"@domphy/core";import{themeColor as ht,themeSize as bn,themeSpacing as Sn}from"@domphy/theme";function Xc(i={}){var e,r;let o=go((e=i.color)!=null?e:"neutral","color"),n=go((r=i.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Sn(2),fontSize:t=>bn(t,"inherit"),color:t=>ht(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>ht(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>ht(t,"shift-8","neutral")}}}}import{toState as yo}from"@domphy/core";import{themeColor as oe,themeSize as Cn,themeSpacing as pt}from"@domphy/theme";function om(i={}){var e,r;let o=yo((e=i.color)!=null?e:"primary","color"),n=yo((r=i.accentColor)!=null?r:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>Cn(t,"inherit"),backgroundColor:t=>oe(t),color:t=>oe(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>oe(t,"shift-9",n.get(t))},"&:hover:not([disabled])":{color:t=>oe(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:pt(1),outlineOffset:pt(1),outline:t=>`${pt(.5)} solid ${oe(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>oe(t,"shift-8","neutral")}}}}import{toState as En}from"@domphy/core";import{themeSpacing as ft,themeSize as vn,themeColor as bo}from"@domphy/theme";function cm(i={}){var n;let o=En((n=i.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:e=>{e.tagName!="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>vn(e,"inherit"),color:e=>bo(e,"shift-9",o.get(e)),backgroundColor:e=>bo(e,"inherit",o.get(e)),height:ft(6),borderRadius:ft(1),paddingInline:ft(1.5)}}}import{toState as xn}from"@domphy/core";import{themeColor as kn,themeSize as Tn}from"@domphy/theme";function ym(i={}){var n;let o=xn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Tn(e,"inherit"),color:e=>kn(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as wn}from"@domphy/core";import{themeColor as So,themeDensity as gt,themeSpacing as yt,themeSize as Pn}from"@domphy/theme";function km(i={}){var n;let o=wn((n=i.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Pn(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>yt(gt(e)*2),paddingInline:e=>yt(gt(e)*3),borderRadius:e=>yt(gt(e)*2)}}}import{toState as Co}from"@domphy/core";import{themeColor as bt,themeSpacing as je}from"@domphy/theme";function zm(i={}){var e,r;let o=Co((e=i.color)!=null?e:"neutral","color"),n=Co((r=i.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:je(2),border:0,borderRadius:je(999),overflow:"hidden",backgroundColor:t=>bt(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>bt(t,"shift-3",o.get(t)),borderRadius:je(999)},"&::-webkit-progress-value":{backgroundColor:t=>bt(t,"shift-9",n.get(t)),borderRadius:je(999),transition:"width 220ms ease"}}}}import{toState as Eo}from"@domphy/core";import{themeColor as q,themeSize as On,themeSpacing as ke}from"@domphy/theme";function Lm(i={}){var e,r;let o=Eo((e=i.color)!=null?e:"neutral","color"),n=Eo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>On(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:ke(6),height:ke(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${q(t,"shift-4",o.get(t))}`,color:t=>q(t,"shift-9",o.get(t)),width:ke(4),height:ke(4)},"&:hover::before":{backgroundColor:t=>q(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${q(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>q(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>q(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${ke(.5)} solid ${q(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>q(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as O,themeDensity as Te,themeSize as In,themeSpacing as I,themeColorToken as $n}from"@domphy/theme";function Am(i={}){let{color:o="neutral",accentColor:n="primary"}=i;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>In(e,"inherit"),lineHeight:"inherit",color:e=>O(e,"shift-9",o),backgroundColor:e=>O(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${O(e,"shift-4",o)}`,borderRadius:e=>I(Te(e)*1),paddingBlock:e=>I(Te(e)*1),paddingLeft:e=>I(Te(e)*3),paddingRight:e=>I(Te(e)*5),backgroundImage:e=>{let r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${$n(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(r)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${I(2)} center`,backgroundSize:`${I(2.5)} ${I(1.5)}`,"&:not([multiple])":{height:e=>I(6+Te(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${I(.5)} solid ${O(e,"shift-5",n)}`},"&:focus-visible":{outline:e=>`${I(.5)} solid ${O(e,"shift-6",n)}`},"& optgroup":{color:e=>O(e,"shift-11",o)},"& option[disabled]":{color:e=>O(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>O(e,"shift-8","neutral"),outline:e=>`1px solid ${O(e,"shift-4","neutral")}`,backgroundColor:e=>O(e,"shift-2","neutral")}}}}import{hashString as zn,toState as Vn}from"@domphy/core";import{themeColor as vo,themeSize as Rn,themeSpacing as xo}from"@domphy/theme";function jm(i={}){var r;let o=Vn((r=i.color)!=null?r:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=zn(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Rn(t),color:t=>vo(t,"shift-9",o.get(t)),height:xo(6),display:"block",borderRadius:xo(1),backgroundColor:t=>vo(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}import{hashString as _n,toState as Nn}from"@domphy/core";import{themeColor as qe,themeSize as Mn,themeSpacing as St}from"@domphy/theme";var To={to:{transform:"rotate(360deg)"}},ko=_n(JSON.stringify(To));function Um(i={}){var n;let o=Nn((n=i.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Mn(e),backgroundColor:e=>qe(e),color:e=>qe(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:St(6),height:St(6),borderRadius:"50%",border:e=>`${St(.5)} solid ${qe(e,"shift-4",o.get(e))}`,borderTopColor:e=>qe(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${ko} 0.7s linear infinite`,[`@keyframes ${ko}`]:To}}}import{toState as Dn}from"@domphy/core";import{themeColor as Ln,themeDensity as wo,themeSize as Hn,themeSpacing as Po}from"@domphy/theme";function eu(i={}){var a;let{color:o="neutral",multiple:n=!1}=i,e=Dn((a=i.value)!=null?a:n?[]:null),r={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:i.name,value:c||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:l=>{l.tagName!="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(r)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>Po(wo(l)*2),paddingInline:l=>Po(wo(l)*2),fontSize:l=>Hn(l,"inherit"),backgroundColor:l=>Ln(l,"inherit",o)}}}import{themeSpacing as Ye,themeColor as re,themeDensity as Oo,themeSize as Bn}from"@domphy/theme";function nu(i={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=i;return{role:"option",_onInit:t=>{t.tagName!="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let l=a.value;t.attributes.set("ariaSelected",s=>{let u=l.get(s);return a.multiple?u.includes(e):u==e}),t.addEvent("click",()=>{let s=l.get();a.multiple?s.includes(e)?l.set(s.filter(u=>u!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Bn(t,"inherit"),height:t=>Ye(6+Oo(t)*2),paddingInline:t=>Ye(Oo(t)*3),border:"none",outline:"none",color:t=>re(t,"shift-9",n),backgroundColor:t=>re(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>re(t,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:t=>re(t,"shift-6",o),color:t=>re(t,"shift-11")},"&:focus-visible":{outline:t=>`${Ye(.5)} solid ${re(t,"shift-6",o)}`,outlineOffset:`-${Ye(.5)}`}}}}import{toState as Ct,merge as Io}from"@domphy/core";import{themeSpacing as we,themeColor as Et,themeDensity as vt,themeSize as An}from"@domphy/theme";function mu(i){let{options:o=[],placement:n="bottom",color:e="neutral",open:r=!1,multiple:t=!1}=i,a=Ct(i.value),l=Ct(r),{show:s,hide:u,anchorPartial:c}=H({open:l,placement:Ct(n),content:i.content}),m={onClick:()=>!t&&u()};Io(i.content,m);let p={div:h=>{let y=a.get(h),f=Array.isArray(y)?y:[y];return o.filter(g=>f.includes(g.value)).map(g=>({span:g.label,$:[Me({color:e,removable:t})],_key:g.value,_onRemove:v=>{let b=a.get(),Xe=(Array.isArray(b)?b:[b]).filter(pe=>pe!==g.value);t?a.set(Xe):a.set(Xe[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:we(1),flex:1}},d={_onInsert:h=>{h.tagName!="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:h=>h.children.insert(p),onClick:()=>l.get()?u():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:h=>we(6+vt(h)*2),minWidth:we(32),outlineOffset:"-1px",outline:h=>`1px solid ${Et(h,"shift-4","neutral")}`,paddingInline:h=>we(vt(h)*2),borderRadius:h=>we(vt(h)*1),fontSize:h=>An(h,"inherit"),color:h=>Et(h,"shift-9",e),backgroundColor:h=>Et(h,"inherit",e)}};return Io(c,d),c}import{toState as Kn}from"@domphy/core";import{themeColor as xt,themeSize as $o,themeSpacing as D}from"@domphy/theme";function yu(i={}){var n;let o=Kn((n=i.accentColor)!=null?n:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>$o(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:D(9),height:D(6),cursor:"pointer",margin:"0",paddingBlock:D(1),"&:checked":{"&::before":{backgroundColor:e=>xt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${D(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:D(3),height:D(3),borderRadius:D(999),left:D(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>xt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:D(999),display:"inline-block",fontSize:e=>$o(e,"inherit"),lineHeight:1,backgroundColor:e=>xt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as kt}from"@domphy/core";import{themeColor as ne,themeSize as Wn,themeSpacing as T}from"@domphy/theme";function Eu(i={}){var t,a;let{checked:o=!1}=i,n=kt(o),e=kt((t=i.color)!=null?t:"neutral","color"),r=kt((a=i.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:l=>{l.tagName!="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>n.get(l),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>Wn(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${ne(l,"shift-3",e.get(l))}`,minWidth:T(12),minHeight:T(6),borderRadius:T(999),paddingLeft:T(7),paddingRight:T(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:l=>ne(l,"inherit",e.get(l)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:T(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:T(5),height:T(5),borderRadius:T(999),color:l=>ne(l,"shift-9"),backgroundColor:l=>ne(l,"decrease-2",e.get(l))},"&[aria-checked=true]":{backgroundColor:l=>ne(l,"increase-3",r.get(l)),outline:"none",color:l=>ne(l,"decrease-2"),paddingLeft:T(2),paddingRight:T(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${T(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Fn}from"@domphy/core";import{themeColor as jn,themeSize as qn}from"@domphy/theme";function Ou(i={}){var n;let o=Fn((n=i.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>qn(e,"inherit"),color:e=>jn(e,"shift-9",o.get(e))}}}import{toState as Yn}from"@domphy/core";import{themeColor as zo,themeSize as Gn}from"@domphy/theme";function Nu(i={}){var n;let o=Yn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Gn(e,"inherit"),fontWeight:700,color:e=>zo(e,"shift-11",o.get(e)),backgroundColor:e=>zo(e)}}}import{toState as Un}from"@domphy/core";import{themeColor as Xn,themeSize as Jn}from"@domphy/theme";function Ku(i={}){var n;let o=Un((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Jn(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Xn(e,"shift-9",o.get(e))}}}import{toState as Qn}from"@domphy/core";import{themeColor as Zn,themeSize as ei}from"@domphy/theme";function Uu(i={}){var n;let o=Qn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>ei(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Zn(e,"shift-9",o.get(e))}}}import{toState as ti}from"@domphy/core";import{themeColor as $,themeDensity as ie,themeSpacing as ae,themeSize as Vo}from"@domphy/theme";function Zu(i={}){var n;let o=ti((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>Vo(e,"inherit"),color:e=>$(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>$(e,"shift-10",o.get(e)),backgroundColor:e=>$(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>$(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${$(e,"shift-3",o.get(e))}`,fontSize:e=>Vo(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>$(e,"shift-10",o.get(e)),backgroundColor:e=>$(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${$(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>$(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>$(e,"shift-2")+"!important"}}}}import{toState as Ro}from"@domphy/core";import{themeColor as z,themeDensity as Tt,themeSpacing as le,themeSize as oi}from"@domphy/theme";function ad(i={}){var r,t;let o=Ro((r=i.color)!=null?r:"neutral","color"),n=Ro((t=i.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=i;return{_onInsert:a=>{a.tagName!="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let l=a.domElement;l.style.overflow="hidden";let s=()=>{l.style.height="auto",l.style.height=l.scrollHeight+"px"};l.addEventListener("input",s),s()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>le(Tt(a)*2),paddingBlock:a=>le(Tt(a)*1.5),border:"none",borderRadius:a=>le(Tt(a)*1.5),fontSize:a=>oi(a,"inherit"),color:a=>z(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${z(a,"shift-4",o.get(a))}`,backgroundColor:a=>z(a,"inherit",o.get(a)),"&::placeholder":{color:a=>z(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${le(.5)} solid ${z(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${le(.5)} solid ${z(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${le(.5)} solid ${z(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>z(a,"shift-8","neutral"),outline:a=>`1px solid ${z(a,"shift-4","neutral")}`,backgroundColor:a=>z(a,"shift-2","neutral")}}}}import{toState as ri}from"@domphy/core";import{themeColor as _o,themeSize as ni,themeSpacing as ii}from"@domphy/theme";function hd(i={}){var n;let o=ri((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ni(e,"inherit"),backgroundColor:e=>_o(e),color:e=>_o(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ii(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as ai}from"@domphy/core";import{themeColor as No,themeSize as li,themeSpacing as si}from"@domphy/theme";function Cd(i={}){var n;let o=ai((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>li(e,"inherit"),backgroundColor:e=>No(e),color:e=>No(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:si(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as ci}from"@domphy/core";import{themeColor as se,themeDensity as Pe,themeSize as mi,themeSpacing as ce}from"@domphy/theme";function ui(i,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];i>3&&n.push("...");let e=Math.max(2,i-1),r=Math.min(o-1,i+1);for(let t=e;t<=r;t++)n.push(t);return i<o-2&&n.push("..."),n.push(o),n}function kd(i){var l;let{total:o,color:n="neutral",accentColor:e="primary"}=i,r=ci((l=i.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ce(6+Pe(s)*2),height:s=>ce(6+Pe(s)*2),paddingInline:s=>ce(Pe(s)*2),borderRadius:s=>ce(Pe(s)*1),border:"none",cursor:"pointer",fontSize:s=>mi(s,"inherit"),backgroundColor:"transparent",color:s=>se(s,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Nt(_t({},t),{backgroundColor:s=>se(s,"shift-6",e),color:s=>se(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-6",e)}});return{_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let u={div:c=>{let m=r.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&r.set(m-1),style:t});for(let d of ui(m,o))if(d==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:h=>ce(Pe(h)*2),color:h=>se(h,"shift-7",n)}});else{let h=d===m;p.push({button:String(d),type:"button",ariaLabel:`Page ${d}`,ariaCurrent:h?"page":void 0,disabled:h,onClick:()=>r.set(d),style:h?a:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&r.set(m+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:ce(1)}};s.children.insert(u)},style:{display:"inline-flex"}}}import{toState as di}from"@domphy/core";import{themeColor as Ge,themeSize as hi,themeSpacing as pi}from"@domphy/theme";function $d(i={}){var n;let o=di((n=i.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:pi(2),fontSize:e=>hi(e,"inherit"),backgroundColor:e=>Ge(e),color:e=>Ge(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ge(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ge(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as fi}from"@domphy/core";import{themeColor as Ue,themeDensity as gi,themeSize as yi,themeSpacing as Oe}from"@domphy/theme";var Mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},bi={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},wt=i=>i==="left"||i==="right";function _d(i={}){let{color:o="neutral",open:n=!1,placement:e="right",size:r}=i,t=fi(n),a=wt(e)?Oe(80):Oe(64),l=r!=null?r:a;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,u)=>{s.target===u.domElement&&t.set(!1)},onTransitionEnd:(s,u)=>{let c=u.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let u=s.domElement,c=p=>{p?(u.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.style.transform="translate(0, 0)"})):u.style.transform=Mo[e]};c(t.get());let m=t.addListener(c);s.addHook("Remove",()=>{m(),document.body.style.overflow=""})},style:{transform:Mo[e],transition:"transform 0.25s ease",fontSize:s=>yi(s,"inherit"),color:s=>Ue(s,"shift-10",o),backgroundColor:s=>Ue(s,"inherit",o),border:"none",padding:s=>Oe(gi(s)*3),margin:bi[e],width:wt(e)?l:"100dvw",height:wt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Oe(4)} ${Oe(12)} ${Ue(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ue(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Do,merge as Si}from"@domphy/core";function Kd(i){var p;let{open:o=!1,placement:n="bottom",openOn:e="click"}=i,r=null,t=Do(o),a=Do(n),{show:l,hide:s,anchorPartial:u}=H({open:t,placement:a,content:i.content}),c={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),_onInsert:d=>{let h=d.attributes.get("id");r=h||d.nodeId,!h&&d.attributes.set("id",r)}};return(p=i.content).$||(p.$=[]),i.content.$.push(c),Si(u,{ariaHaspopup:"dialog",ariaExpanded:d=>t.get(d),onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),onClick:()=>{e==="click"&&(t.get()?s():l())},onFocus:()=>l(),onBlur:(d,h)=>{let y=d.relatedTarget,f=h.getRoot().domElement,E=r?f.querySelector(`#${CSS.escape(r)}`):null;y&&(E!=null&&E.contains(y))||s()},_onMount:d=>r&&d.attributes.set("ariaControls",r)}),u}import{toState as Ci}from"@domphy/core";import{themeColor as Pt,themeDensity as Ot,themeSize as Ei,themeSpacing as Y}from"@domphy/theme";function qd(i={}){let{position:o="top-center",color:n="neutral"}=i,e=Ci(!1),r=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:r?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:Y(4),zIndex:30,padding:Y(6),pointerEvents:"none"}};return{_portal:s=>{let u=s.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=s.children.insert(l).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Y(32),pointerEvents:"auto",paddingBlock:s=>Y(Ot(s)*2),paddingInline:s=>Y(Ot(s)*4),borderRadius:s=>Y(Ot(s)*2),fontSize:s=>Ei(s,"inherit"),color:s=>Pt(s,"shift-9",n),backgroundColor:s=>Pt(s,"inherit",n),boxShadow:s=>`0 ${Y(2)} ${Y(9)} ${Pt(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":r?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,u)=>{let c=m=>{m.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),u())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as vi,toState as Lo}from"@domphy/core";import{themeSpacing as It,themeColor as Ho,themeDensity as $t,themeSize as xi}from"@domphy/theme";function eh(i={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=i,r=Lo(n),t=Lo(e),a=null,l={span:d=>t.get(d)},{show:s,hide:u,anchorPartial:c}=H({open:o,placement:r,content:l}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:d=>{let h=d.attributes.get("id");a=h||d.nodeId,!h&&d.attributes.set("id",a)},style:{paddingBlock:d=>It($t(d)*1),paddingInline:d=>It($t(d)*3),borderRadius:d=>It($t(d)*1),color:d=>Ho(d,"shift-9"),backgroundColor:d=>Ho(d),fontSize:d=>xi(d,"inherit")},$:[Gt({placement:r,bordered:!1})]};return l.$||(l.$=[]),l.$.push(m),vi(c,{onMouseEnter:()=>s(),onMouseLeave:()=>u(),onFocus:()=>s(),onBlur:()=>u(),onKeyDown:d=>d.key==="Escape"&&u(),_onMount:d=>a&&d.attributes.set("ariaDescribedby",a)}),c}import{ElementNode as Bo}from"@domphy/core";function Ao(i,o){return i.key!==void 0&&i.key!==null?String(i.key):`index-${o}`}function nh(i={}){let{duration:o=300,delay:n=0}=i,e=new Map;return{_onBeforeUpdate:r=>{e=new Map,r.children.items.forEach((t,a)=>{if(!(t instanceof Bo))return;let l=t.domElement;l&&e.set(Ao(t,a),l.getBoundingClientRect())})},_onUpdate:r=>{r.children.items.forEach((t,a)=>{if(!(t instanceof Bo))return;let l=t.domElement;if(!l)return;let s=Ao(t,a),u=e.get(s);if(!u)return;let c=l.getBoundingClientRect(),m=u.left-c.left,p=u.top-c.top;if(Math.abs(m)<.5&&Math.abs(p)<.5)return;let d=l.style.transition,h=l.style.transform;l.style.transition="none",l.style.transform=`translate(${m}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});let y=()=>{l.style.transition=d,l.style.transform=h,l.removeEventListener("transitionend",f)},f=E=>{E.propertyName==="transform"&&y()};l.addEventListener("transitionend",f),setTimeout(y,o+n+34)}),e.clear()}}}import{merge as ki}from"@domphy/core";import{toState as Ti}from"@domphy/core";function mh(i={}){return{role:"tablist",_onSchedule:(n,e)=>{let r={_context:{tabs:{activeKey:Ti(i.activeKey||0)}}};ki(e,r)}}}import{themeSpacing as me,themeColor as ue,themeDensity as Ko,themeSize as wi}from"@domphy/theme";function ph(i={}){let{accentColor:o="primary",color:n="neutral"}=i;return{role:"tab",_onInsert:r=>{var u,c;r.tagName!="button"&&console.warn('"tab" patch must use button tag');let t=r.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(u=r.parent)==null?void 0:u.children.items)!=null?c:[];a=a.filter(m=>m.type=="ElementNode"&&m.attributes.get("role")=="tab");let l=r.key!==null&&r.key!==void 0?r.key:a.findIndex(m=>m==r),s={id:"tab"+r.parent.nodeId+l,ariaControls:"tabpanel"+r.parent.nodeId+l,ariaSelected:m=>t.activeKey.get(m)==l,onClick:()=>t.activeKey.set(l),onKeyDown:m=>{var E,g,v,b;let p=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;m.preventDefault();let d=((g=(E=r.parent)==null?void 0:E.children.items)!=null?g:[]).filter(S=>S.type==="ElementNode"&&S.attributes.get("role")==="tab"),h=d.findIndex(S=>S===r),y=h;p==="ArrowRight"?y=(h+1)%d.length:p==="ArrowLeft"?y=(h-1+d.length)%d.length:p==="Home"?y=0:p==="End"&&(y=d.length-1);let f=d[y];t.activeKey.set((v=f.key)!=null?v:y),(b=f.domElement)==null||b.focus()}};r.merge(s)},style:{cursor:"pointer",fontSize:r=>wi(r,"inherit"),height:r=>me(6+Ko(r)*2),paddingInline:r=>me(Ko(r)*4),border:"none",outline:"none",color:r=>ue(r,"shift-9"),backgroundColor:r=>ue(r,"inherit"),boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-6",o)}`},"&:focus-visible":{boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-6",o)}`}}}}import{themeSpacing as Wo,themeDensity as Fo}from"@domphy/theme";function bh(){return{role:"tabpanel",style:{paddingBlock:o=>Wo(Fo(o)*2),paddingInline:o=>Wo(Fo(o)*2)},_onInsert:o=>{var a,l;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(l=(a=o.parent)==null?void 0:a.children.items)!=null?l:[];e=e.filter(s=>s.type=="ElementNode"&&s.attributes.get("role")=="tabpanel");let r=o.key!==null&&o.key!==void 0?o.key:e.findIndex(s=>s==o),t={id:"tabpanel"+o.parent.nodeId+r,ariaLabelledby:"tab"+o.parent.nodeId+r,hidden:s=>n.activeKey.get(s)!=r};o.merge(t)}}}import{merge as Pi}from"@domphy/core";import{toState as Oi}from"@domphy/core";import{themeColor as Ii,themeDensity as jo,themeSize as $i,themeSpacing as qo}from"@domphy/theme";function Th(i={}){let{color:o="neutral",selectable:n=!0}=i;return{role:"menu",dataTone:"shift-17",_onSchedule:(r,t)=>{var l;let a={_context:{menu:{activeKey:Oi((l=i.activeKey)!=null?l:null),selectable:n}}};Pi(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:r=>qo(jo(r)*2),paddingInline:r=>qo(jo(r)*2),fontSize:r=>$i(r,"inherit"),backgroundColor:r=>Ii(r,"inherit",o)}}}import{themeSpacing as Ie,themeColor as de,themeDensity as Yo,themeSize as zi}from"@domphy/theme";function Ih(i={}){let{accentColor:o="primary",color:n="neutral"}=i;return{role:"menuitem",_onInsert:r=>{var s,u;r.tagName!="button"&&console.warn('"menuItem" patch must use button tag');let t=r.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(u=(s=r.parent)==null?void 0:s.children.items)!=null?u:[];a=a.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="menuitem");let l=r.key!==null&&r.key!==void 0?r.key:a.findIndex(c=>c==r);t.selectable&&(r.attributes.set("ariaCurrent",c=>t.activeKey.get(c)==l||void 0),r.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(r,t)=>{var c,m,p,d;let a=r.key;if(a==="Enter"||a===" "){r.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;r.preventDefault();let l=((p=(m=t.parent)==null?void 0:m.children.items)!=null?p:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="menuitem"),s=l.findIndex(h=>h===t),u=s;a==="ArrowDown"?u=(s+1)%l.length:a==="ArrowUp"?u=(s-1+l.length)%l.length:a==="Home"?u=0:a==="End"&&(u=l.length-1),(d=l[u].domElement)==null||d.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:r=>Ie(2),width:"100%",fontSize:r=>zi(r,"inherit"),height:r=>Ie(6+Yo(r)*2),paddingInline:r=>Ie(Yo(r)*3),border:"none",outline:"none",color:r=>de(r,"shift-9"),backgroundColor:r=>de(r,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:r=>de(r,"shift-2")},"&[aria-current=true]":{backgroundColor:r=>de(r,"shift-3",o),color:r=>de(r,"shift-10")},"&:focus-visible":{outline:r=>`${Ie(.5)} solid ${de(r,"shift-6",o)}`,outlineOffset:`-${Ie(.5)}`}}}}var Go=i=>!!i&&typeof i.get=="function"&&i._isState===!0,he=i=>{let o={},n=[];for(let e in i){let r=i[e];e==="x"?n.push(`translateX(${typeof r=="number"?`${r}px`:r})`):e==="y"?n.push(`translateY(${typeof r=="number"?`${r}px`:r})`):e==="scale"?n.push(`scale(${r})`):e==="rotate"?n.push(`rotate(${typeof r=="number"?`${r}deg`:r})`):o[e]=r}return n.length&&(o.transform=n.join(" ")),o};function zh(i={}){var a,l,s,u;let{initial:o,animate:n,exit:e,transition:r={}}=i,t={duration:(a=r.duration)!=null?a:300,delay:(l=r.delay)!=null?l:0,easing:(s=r.easing)!=null?s:"ease",iterations:(u=r.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let p=Go(n)?n.get():n;if(p?m.animate(o?[he(o),he(p)]:[he(p)],t):o&&Object.assign(m.style,he(o)),Go(n)){let d=n.addListener(h=>{m.animate([he(h)],t)});c.setMetadata("motionRelease",d)}},_onBeforeRemove:(c,m)=>{let p=c.domElement;if(!p||!e||typeof p.animate!="function")return m();p.animate([he(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}export{Hi as abbreviation,Sa as alert,ka as avatar,Ia as badge,pl as blockquote,_a as breadcrumb,Ha as breadcrumbEllipsis,bl as button,Eu as buttonSwitch,Fi as card,Vl as code,ol as combobox,ea as command,oa as commandItem,ta as commandSearch,ql as descriptionList,Hl as details,Jl as dialog,$d as divider,_d as drawer,ns as emphasis,us as figure,gs as formGroup,xs as heading,$s as horizontalRule,Ks as icon,Ds as image,Tl as inputCheckbox,Gs as inputColor,tc as inputDateTime,sc as inputFile,Mc as inputNumber,pa as inputOTP,Lm as inputRadio,Ic as inputRange,fc as inputSearch,yu as inputSwitch,vc as inputText,Wc as keyboard,Xc as label,om as link,cm as mark,Th as menu,Ih as menuItem,zh as motion,Cd as orderedList,kd as pagination,ym as paragraph,Kd as popover,Gt as popoverArrow,km as preformated,zm as progress,Am as select,mu as selectBox,nu as selectItem,eu as selectList,jm as skeleton,Ou as small,Um as spinner,Gi as splitter,Xi as splitterHandle,Ui as splitterPanel,Nu as strong,Ku as subscript,Uu as superscript,ph as tab,bh as tabPanel,Zu as table,mh as tabs,Me as tag,ad as textarea,qd as toast,aa as toggle,ua as toggleGroup,eh as tooltip,nh as transitionGroup,hd as unorderedList};
|
|
1
|
+
var Xo=Object.defineProperty,Jo=Object.defineProperties;var Qo=Object.getOwnPropertyDescriptors;var Vt=Object.getOwnPropertySymbols;var Zo=Object.prototype.hasOwnProperty,er=Object.prototype.propertyIsEnumerable;var Rt=(i,o,n)=>o in i?Xo(i,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):i[o]=n,_t=(i,o)=>{for(var n in o||(o={}))Zo.call(o,n)&&Rt(i,n,o[n]);if(Vt)for(var n of Vt(o))er.call(o,n)&&Rt(i,n,o[n]);return i},Nt=(i,o)=>Jo(i,Qo(o));import{toState as Mt}from"@domphy/core";import{themeColor as fe,themeSize as tr,themeSpacing as or}from"@domphy/theme";function Hi(i={}){var e,r;let o=Mt((e=i.color)!=null?e:"neutral","color"),n=Mt((r=i.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>tr(t),backgroundColor:t=>fe(t),color:t=>fe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>fe(t,"shift-7",o.get(t)),textUnderlineOffset:or(.72),cursor:"help","&:hover":{color:t=>fe(t,"shift-11",n.get(t)),textDecorationColor:t=>fe(t,"shift-9",n.get(t))}}}}import{toState as rr}from"@domphy/core";import{themeColor as X,themeDensity as L,themeSpacing as V}from"@domphy/theme";function Fi(i={}){var n;let o=rr((n=i.color)!=null?n:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>V(L(e)*2),backgroundColor:e=>X(e,"inherit",o.get(e)),color:e=>X(e,"shift-10",o.get(e)),outline:e=>`1px solid ${X(e,"shift-4",o.get(e))}`,outlineOffset:"-1px",overflow:"hidden","& > img":{gridArea:"image",width:"100%",height:"auto",display:"block"},"& > :is(h1,h2,h3,h4,h5,h6)":{gridArea:"title",paddingBlock:e=>V(L(e)*2),paddingInline:e=>V(L(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>V(L(e)*4),color:e=>X(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>V(L(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>V(L(e)*4),color:e=>X(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:V(2),paddingBlock:e=>V(L(e)*2),paddingInline:e=>V(L(e)*4),borderTop:e=>`1px solid ${X(e,"shift-3",o.get(e))}`}}}}import{merge as nr,toState as ir}from"@domphy/core";import{themeColor as Je,themeSpacing as ar}from"@domphy/theme";function Gi(i={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:r=90}=i;return{_onSchedule:(t,a)=>{nr(a,{_context:{splitter:{direction:o,size:ir(n),min:e,max:r}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Ui(){return{_onMount:i=>{let o=i.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=i.domElement,e=o.direction==="horizontal"?"width":"height";n.style[e]=`${o.size.get()}%`,n.style.flexShrink="0",n.style.overflow="auto";let r=o.size.addListener(t=>{n.style[e]=`${t}%`});i.addHook("Remove",r)}}}function Xi(){return{_onMount:i=>{let o=i.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=i.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize";let r=t=>{t.preventDefault();let a=n.parentElement,l=u=>{let c=a.getBoundingClientRect(),m=e?(u.clientX-c.left)/c.width*100:(u.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(m,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};n.addEventListener("mousedown",r),i.addHook("Remove",()=>n.removeEventListener("mousedown",r))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i=>Je(i,"shift-2"),"&:hover":{backgroundColor:i=>Je(i,"shift-3")},"&::after":{content:'""',borderRadius:ar(999),backgroundColor:i=>Je(i,"shift-4")}}}}import{merge as lr,toState as sr}from"@domphy/core";import{themeColor as R,themeDensity as $e,themeSize as Dt,themeSpacing as J}from"@domphy/theme";function ea(){return{_onSchedule:(i,o)=>{lr(o,{_context:{command:{query:sr("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function ta(i={}){let{color:o="neutral",accentColor:n="primary"}=i;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let r=e.getContext("command");if(!r){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>r.query.set(t.value);t.addEventListener("input",a),e.addHook("Remove",()=>t.removeEventListener("input",a))},style:{fontFamily:"inherit",fontSize:e=>Dt(e,"inherit"),paddingInline:e=>J($e(e)*3),paddingBlock:e=>J($e(e)*2),border:"none",borderBottom:e=>`1px solid ${R(e,"shift-3",o)}`,outline:"none",color:e=>R(e,"shift-10",o),backgroundColor:e=>R(e,"inherit",o),"&::placeholder":{color:e=>R(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>R(e,"shift-6",n)}}}}function oa(i={}){let{color:o="neutral",accentColor:n="primary"}=i;return{role:"option",_onMount:e=>{var s,u;let r=e.getContext("command");if(!r){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(u=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?u:"",l=r.query.addListener(c=>{t.hidden=c.length>0&&!a.includes(c.toLowerCase())});e.addHook("Remove",l)},style:{cursor:"pointer",display:"flex",alignItems:"center",width:"100%",fontSize:e=>Dt(e,"inherit"),height:e=>J(6+$e(e)*2),paddingInline:e=>J($e(e)*3),border:"none",outline:"none",color:e=>R(e,"shift-9",o),backgroundColor:e=>R(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>R(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${J(.5)} solid ${R(e,"shift-6",n)}`,outlineOffset:`-${J(.5)}`}}}}import{toState as Lt}from"@domphy/core";import{themeColor as Q,themeSize as cr,themeSpacing as Z}from"@domphy/theme";function aa(i={}){var e,r;let o=Lt((e=i.color)!=null?e:"neutral","color"),n=Lt((r=i.accentColor)!=null?r:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,m;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let a=t.getContext("toggleGroup");if(!a){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let s=((m=(c=t.parent)==null?void 0:c.children.items)!=null?m:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),u=t.key!==null&&t.key!==void 0?String(t.key):String(s.findIndex(p=>p===t));t.attributes.set("ariaPressed",p=>{let d=a.value.get(p);return Array.isArray(d)?d.includes(u):d===u}),t.addEvent("click",()=>{let p=a.value.get();if(a.multiple){let d=Array.isArray(p)?[...p]:[];a.value.set(d.includes(u)?d.filter(h=>h!==u):[...d,u])}else a.value.set(p===u?"":u)})},style:{cursor:"pointer",fontSize:t=>cr(t,"inherit"),height:Z(6),paddingBlock:Z(1),paddingInline:Z(2),border:"none",borderRadius:Z(1),color:t=>Q(t,"shift-9",o.get(t)),backgroundColor:t=>Q(t,"inherit",o.get(t)),transition:"background-color 300ms ease","&:hover:not([disabled])":{backgroundColor:t=>Q(t,"shift-2",o.get(t))},"&[aria-pressed=true]":{backgroundColor:t=>Q(t,"shift-3",n.get(t)),color:t=>Q(t,"shift-12",n.get(t))},"&:focus-visible":{outline:t=>`${Z(.5)} solid ${Q(t,"shift-6",n.get(t))}`,outlineOffset:`-${Z(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as mr}from"@domphy/core";import{themeSpacing as ze,themeColor as Ht,themeSize as ur}from"@domphy/theme";function ua(i={}){var e;let{multiple:o=!1,color:n="neutral"}=i;return{role:"group",_context:{toggleGroup:{value:mr((e=i.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:ze(1),paddingInline:ze(1),gap:ze(1),borderRadius:ze(2),fontSize:r=>ur(r,"inherit"),backgroundColor:r=>Ht(r,"inherit",n),outline:r=>`1px solid ${Ht(r,"shift-3",n)}`,outlineOffset:"-1px"}}}import{themeSpacing as Bt}from"@domphy/theme";function pa(){return{style:{display:"flex",alignItems:"center",gap:Bt(2),"& > *":{minWidth:Bt(9)+"!important"}},_onMount:i=>{let o=i.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=a=>{let l=n(),s=a.target,u=l.indexOf(s);s.value&&u<l.length-1&&l[u+1].focus()},r=a=>{let l=n(),s=a.target,u=l.indexOf(s);a.key==="Backspace"&&!s.value&&u>0&&l[u-1].focus(),a.key==="ArrowLeft"&&u>0&&l[u-1].focus(),a.key==="ArrowRight"&&u<l.length-1&&l[u+1].focus()},t=a=>{var m,p,d;a.preventDefault();let l=(p=(m=a.clipboardData)==null?void 0:m.getData("text"))!=null?p:"",s=n(),u=s.indexOf(a.target);[...l].forEach((h,y)=>{s[u+y]&&(s[u+y].value=h)});let c=Math.min(u+l.length-1,s.length-1);(d=s[c])==null||d.focus()};o.addEventListener("input",e),o.addEventListener("keydown",r),o.addEventListener("paste",t),i.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",r),o.removeEventListener("paste",t)})}}}import{toState as dr}from"@domphy/core";import{themeColor as Qe,themeDensity as At,themeSize as hr,themeSpacing as Ve}from"@domphy/theme";function Sa(i={}){var n;let o=dr((n=i.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:Ve(3),paddingBlock:e=>Ve(At(e)*2),paddingInline:e=>Ve(At(e)*4),boxShadow:e=>`inset ${Ve(1)} 0 0 0 ${Qe(e,"shift-8",o.get(e))}`,backgroundColor:e=>Qe(e,"inherit",o.get(e)),color:e=>Qe(e,"shift-10",o.get(e)),fontSize:e=>hr(e,"inherit")}}}import{toState as pr}from"@domphy/core";import{themeColor as Kt,themeSize as fr,themeSpacing as Wt}from"@domphy/theme";function ka(i={}){var n;let o=pr((n=i.color)!=null?n:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:Wt(9),height:Wt(9),fontSize:e=>fr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>Kt(e,"inherit",o.get(e)),color:e=>Kt(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Ft}from"@domphy/core";import{themeSpacing as Ze,themeColor as jt,themeSize as gr}from"@domphy/theme";function Ia(i={}){var r;let{label:o=999}=i,n=Ft(o),e=Ft((r=i.color)!=null?r:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${n.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:Ze(1),minWidth:Ze(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>gr(t,"decrease-1"),borderRadius:Ze(999),backgroundColor:t=>jt(t,"shift-9",e.get(t)),color:t=>jt(t,"shift-0",e.get(t))}}}}import{toState as yr}from"@domphy/core";import{themeColor as ge,themeSize as br,themeSpacing as qt}from"@domphy/theme";function _a(i={}){var e;let{separator:o="/"}=i,n=yr((e=i.color)!=null?e:"neutral","color");return{_onInsert:r=>{r.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:r=>br(r,"inherit"),gap:qt(1),color:r=>ge(r,"shift-9",n.get(r)),backgroundColor:r=>ge(r,"inherit",n.get(r)),"& > *":{display:"inline-flex",alignItems:"center",color:r=>ge(r,"shift-8",n.get(r))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:r=>ge(r,"shift-4",n.get(r)),paddingInlineStart:qt(1)},"& > [aria-current=page]":{color:r=>ge(r,"shift-10",n.get(r)),pointerEvents:"none"}}}}import{toState as Sr}from"@domphy/core";import{themeColor as Re,themeSize as Cr,themeSpacing as _e}from"@domphy/theme";function Ha(i={}){var n;let o=Sr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!=="button"&&console.warn('"breadcrumbEllipsis" patch must use button tag')},ariaLabel:"More breadcrumb items",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:e=>Cr(e,"inherit"),paddingInline:_e(1),border:"none",background:"none",cursor:"pointer",color:e=>Re(e,"shift-8",o.get(e)),borderRadius:_e(1),"&:hover":{color:e=>Re(e,"shift-10",o.get(e)),backgroundColor:e=>Re(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${_e(.5)} solid ${Re(e,"shift-6",o.get(e))}`,outlineOffset:_e(.5)}}}}import{toState as et,merge as tt}from"@domphy/core";import{themeSpacing as G,themeColor as ye,themeDensity as ot,themeSize as Yt}from"@domphy/theme";import{toState as Er}from"@domphy/core";import{themeColor as Ne,themeSize as vr,themeSpacing as _}from"@domphy/theme";var xr='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M6.707 5.293l5.293 5.292l5.293 -5.292a1 1 0 0 1 1.414 1.414l-5.292 5.293l5.292 5.293a1 1 0 0 1 -1.414 1.414l-5.293 -5.292l-5.293 5.292a1 1 0 1 1 -1.414 -1.414l5.292 -5.293l-5.292 -5.293a1 1 0 0 1 1.414 -1.414" /></svg>';function Me(i={}){var e;let{removable:o=!1}=i,n=Er((e=i.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:r=>{let t={span:xr,onClick:a=>{a.stopPropagation(),r.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:_(1),width:_(4),height:_(4),flexShrink:0,"&:hover":{backgroundColor:a=>Ne(a,"shift-4",n.get(a))}}};o&&r.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:_(6),paddingBlock:"0px",borderRadius:_(1),paddingInlineStart:_(2),paddingInlineEnd:o?_(1):_(2),gap:_(2),fontSize:r=>vr(r,"inherit"),backgroundColor:r=>Ne(r,"inherit",n.get(r)),color:r=>Ne(r,"shift-9",n.get(r)),border:"none",outlineOffset:"-1px",outline:r=>`1px solid ${Ne(r,"shift-4",n.get(r))}`}}}import{toState as kr,merge as Tr}from"@domphy/core";import{computePosition as wr,autoUpdate as Pr,offset as Or,flip as Ir,shift as $r}from"@domphy/floating";function H(i){let{open:o=!1,placement:n}=i,e=null,r=null,t=null,a=null,l=null,s=null,u=!1,c=kr(o),m=()=>{u||!s||(u=!0,l=s.children.insert(i.content))},p=()=>{m(),t&&a&&(r&&r(),r=Pr(t,a,()=>{wr(t,a,{placement:n.get(),middleware:[Or(12),Ir(),$r()],strategy:"fixed"}).then(({x:g,y:v,placement:b})=>{Object.assign(a.style,{left:`${g}px`,top:`${v}px`}),n.set(b)})}),c.set(!0))},d=()=>{r&&r(),r=null,c.set(!1)},h=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},y=()=>{e&&clearTimeout(e),e=setTimeout(d,100)},f={style:{position:"fixed",pointerEvents:"auto",visibility:g=>c.get(g)?"visible":"hidden"},_onMount:g=>a=g.domElement,_portal:g=>{let v=g.domElement.querySelector("#domphy-floating");if(!v){let b={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};v=g.children.insert(b).domElement}return v}};return Tr(i.content,f),{show:h,hide:y,anchorPartial:{onKeyDown:g=>g.key==="Escape"&&y(),_onMount:g=>{s=g.getRoot(),t=g.domElement;let v=b=>{if(!c.get()||!t||!a)return;let S=b.target;!t.contains(S)&&!a.contains(S)&&y()};g.getRoot().domElement.addEventListener("click",v),g.addHook("BeforeRemove",()=>{e&&clearTimeout(e),r&&(r(),r=null),l&&l.remove(),g.getRoot().domElement.removeEventListener("click",v)})}}}}function ol(i){let{options:o=[],placement:n="bottom",color:e="neutral",open:r=!1,multiple:t=!1}=i,a=et(i.value),l=et(r),{show:s,hide:u,anchorPartial:c}=H({open:l,placement:et(n),content:i.content}),m={onClick:()=>!t&&u()};tt(i.content,m);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:G(6),marginInlineStart:G(2),fontSize:f=>Yt(f,"inherit"),color:f=>ye(f,"shift-9",e),backgroundColor:f=>ye(f,"inherit",e)},d;i.input?(tt(i.input,{onFocus:()=>s(),style:p,_key:"combobox-input"}),d=i.input):d={input:null,onFocus:()=>s(),value:f=>(a.get(f),""),style:p,_key:"combobox-input"};let h={div:f=>{let E=a.get(f),g=Array.isArray(E)?E:[E],b=o.filter(S=>g.includes(S.value)).map(S=>({span:S.label,$:[Me({color:e,removable:!0})],_key:S.value,_onRemove:Xe=>{let pe=a.get(),zt=(Array.isArray(pe)?pe:[pe]).filter(Uo=>Uo!==S.value);t?a.set(zt):a.set(zt[0])}}));return b.push(d),b},style:{display:"flex",flexWrap:"wrap",gap:G(1)}},y={_onInsert:f=>{f.tagName!="div"&&console.warn('"combobox" primitive patch must use div tag')},_onInit:f=>f.children.insert(h),style:{minWidth:G(32),outlineOffset:"-1px",outline:f=>`1px solid ${ye(f,"shift-4","neutral")}`,paddingBlock:f=>G(ot(f)*1),paddingInline:f=>G(ot(f)*1),borderRadius:f=>G(ot(f)*1),fontSize:f=>Yt(f,"inherit"),color:f=>ye(f,"shift-9",e),backgroundColor:f=>ye(f,"inherit",e)}};return tt(c,y),c}import{toState as zr}from"@domphy/core";import{themeSpacing as rt,themeColor as De,themeSize as Vr}from"@domphy/theme";function Gt(i={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=rt(6),bordered:r=!0}=i,t=zr(o),a={top:"bottom",bottom:"top",left:"right",right:"left","top-start":"bottom-end","top-end":"bottom-start","bottom-start":"top-end","bottom-end":"top-start","left-start":"right-end","left-end":"right-start","right-start":"left-end","right-end":"left-start"},l=c=>{var m;return(m=a[t.get(c)])!=null?m:a["bottom-end"]},s=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",u=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>Vr(c),backgroundColor:c=>De(c),color:c=>De(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:rt(1.5),height:rt(1.5),backgroundColor:c=>De(c,"inherit",n),borderWidth:r?"1px":"0px",borderColor:c=>De(c,"inherit",n),borderTopStyle:c=>{let m=l(c);return m.includes("top")||m.includes("right")?"solid":"none"},borderBottomStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("left")?"solid":"none"},borderLeftStyle:c=>{let m=l(c);return m.includes("top")||m.includes("left")?"solid":"none"},borderRightStyle:c=>{let m=l(c);return m.includes("bottom")||m.includes("right")?"solid":"none"},top:c=>{let m=l(c);return m.includes("top")?0:m.includes("bottom")?"auto":s(m)},right:c=>{let m=l(c);return m.includes("right")?0:m.includes("left")?"auto":u(m)},bottom:c=>{let m=l(c);return m.includes("bottom")?0:m.includes("top")?"auto":u(m)},left:c=>{let m=l(c);return m.includes("left")?0:m.includes("right")?"auto":s(m)},transform:c=>{let m=l(c),p=m.includes("right")||m.includes("end")&&!m.includes("left")?"50%":"-50%",d=m.includes("bottom")||m.includes("end")&&!m.includes("top")?"50%":"-50%";return`translate(${p},${d}) rotate(45deg)`}}}}}import{toState as Rr}from"@domphy/core";import{themeSpacing as nt,themeColor as Ut,themeDensity as Xt,themeSize as _r}from"@domphy/theme";function pl(i={}){var n;let o=Rr((n=i.color)!=null?n:"inherit","color");return{_onInsert:e=>{e.tagName!="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>_r(e,"inherit"),backgroundColor:e=>Ut(e,"inherit",o.get(e)),boxShadow:e=>`inset ${nt(1)} 0 0 0 ${Ut(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>nt(Xt(e)*2),paddingInline:e=>nt(Xt(e)*4),margin:0}}}import{toState as Nr}from"@domphy/core";import{themeColor as N,themeDensity as Le,themeSize as Mr,themeSpacing as be}from"@domphy/theme";function bl(i={}){var n;let o=Nr((n=i.color)!=null?n:"primary","color");return{_onInsert:e=>{e.tagName!="button"&&console.warn('"button" primitive patch must use button tag')},style:{appearance:"none",fontSize:e=>Mr(e,"inherit"),paddingBlock:e=>be(Le(e)*1),paddingInline:e=>be(Le(e)*3),borderRadius:e=>be(Le(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>be(Le(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${N(e,"shift-4",o.get(e))}`,color:e=>N(e,"shift-9",o.get(e)),backgroundColor:e=>N(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>N(e,"shift-10",o.get(e)),backgroundColor:e=>N(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${be(.5)} ${N(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>N(e,"shift-2","neutral"),outline:e=>`1px solid ${N(e,"shift-4","neutral")}`,color:e=>N(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Jt}from"@domphy/core";import{themeColor as x,themeSpacing as B,themeSize as Dr}from"@domphy/theme";function Tl(i={}){var e,r;let o=Jt((e=i.color)!=null?e:"neutral","color"),n=Jt((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"checkbox",_onInsert:t=>{t.tagName!=="input"&&console.warn('"inputCheckbox" primitive patch must use input tag')},style:{appearance:"none",fontSize:t=>Dr(t,"inherit"),display:"inline-flex",position:"relative",width:B(6),height:B(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:B(1),lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${x(t,"shift-4",o.get(t))}`,color:t=>x(t,"shift-9",o.get(t)),width:B(4),height:B(4)},"&:hover::before":{backgroundColor:t=>x(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${x(t,"shift-6",n.get(t))}`,backgroundColor:t=>x(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>x(t,"shift-7",n.get(t))},"&:checked::after":{content:'""',display:"block",position:"absolute",top:"25%",insetInlineStart:"37%",width:"20%",height:"30%",border:t=>`${B(.5)} solid ${x(t,"inherit",n.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${x(t,"shift-6",n.get(t))}`,backgroundColor:t=>x(t,"shift-3",n.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>x(t,"shift-8",n.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>x(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:B(1.5),outline:t=>`${B(.5)} solid ${x(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>x(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Lr}from"@domphy/core";import{themeSpacing as it,themeColor as Qt,themeSize as Hr}from"@domphy/theme";function Vl(i={}){var n;let o=Lr((n=i.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="code"&&console.warn('"code" primitive patch must use code tag')},style:{display:"inline-flex",alignItems:"center",fontSize:e=>Hr(e,"inherit"),color:e=>Qt(e,"shift-9",o.get(e)),backgroundColor:e=>Qt(e,"inherit",o.get(e)),height:it(6),paddingInline:it(1.5),borderRadius:it(1)}}}import{toState as Zt}from"@domphy/core";import{themeColor as A,themeDensity as Se,themeSize as eo,themeSpacing as C}from"@domphy/theme";function Hl(i={}){var r,t;let{duration:o=240}=i,n=Zt((r=i.color)!=null?r:"neutral","color"),e=Zt((t=i.accentColor)!=null?t:"primary","accentColor");return{_onInsert:a=>{a.tagName!="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:a=>eo(a,"inherit"),color:a=>A(a,"shift-9",n.get(a)),backgroundColor:a=>A(a,"inherit",n.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>A(a,"shift-2",n.get(a)),color:a=>A(a,"shift-10",n.get(a)),fontSize:a=>eo(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:C(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>C(Se(a)*4),height:C(10)},"& > summary::-webkit-details-marker":{display:"none"},"& > summary::marker":{content:'""'},"& > summary::after":{content:'""',width:C(2),height:C(2),flexShrink:0,marginTop:`-${C(.5)}`,borderInlineEnd:a=>`${C(.5)} solid ${A(a,"shift-9",n.get(a))}`,borderBottom:a=>`${C(.5)} solid ${A(a,"shift-9",n.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>A(a,"shift-3",n.get(a))},"& > summary:focus-visible":{borderRadius:a=>C(Se(a)*2),outlineOffset:`-${C(.5)}`,outline:a=>`${C(.5)} solid ${A(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>C(Se(a)*3),paddingTop:0,paddingBottom:0,transition:`max-height ${o}ms ease, opacity ${o}ms ease, padding ${o}ms ease`},"&[open] > :not(summary)":{maxHeight:C(250),opacity:1,paddingTop:a=>C(Se(a)*1),paddingBottom:a=>C(Se(a)*3)}}}}import{toState as Br}from"@domphy/core";import{themeColor as to,themeSpacing as oo,themeSize as ro}from"@domphy/theme";function ql(i={}){var n;let o=Br((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${oo(24)}, max-content) 1fr`,columnGap:oo(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>ro(e,"inherit"),color:e=>to(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>ro(e,"inherit"),color:e=>to(e,"shift-9",o.get(e))}}}}import{toState as Ar}from"@domphy/core";import{themeColor as He,themeDensity as Kr,themeSize as Wr,themeSpacing as at}from"@domphy/theme";function Jl(i={}){let{color:o="neutral",open:n=!1}=i,e=Ar(n);return{_onInsert:r=>{r.tagName!="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(r,t)=>{if(r.target!==t.domElement)return;let a=t.domElement.getBoundingClientRect();r.clientX>=a.left&&r.clientX<=a.right&&r.clientY>=a.top&&r.clientY<=a.bottom||e.set(!1)},onTransitionEnd:(r,t)=>{let a=t.domElement;a.style.opacity==="0"&&(a.close(),document.body.style.overflow="")},_onMount:r=>{let t=r.domElement,a=s=>{s?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let u=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');u==null||u.focus()})):t.style.opacity="0"};a(e.get());let l=e.addListener(a);r.addHook("Remove",()=>{l(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:r=>Wr(r,"inherit"),color:r=>He(r,"shift-10",o),backgroundColor:r=>He(r,"inherit",o),border:"none",padding:r=>at(Kr(r)*3),boxShadow:r=>`0 ${at(9)} ${at(16)} ${He(r,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:r=>He(r,"shift-2","neutral"),opacity:.75}}}}import{toState as Fr}from"@domphy/core";import{themeColor as jr,themeSize as qr}from"@domphy/theme";function ns(i={}){var n;let o=Fr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>qr(e,"inherit"),fontStyle:"italic",color:e=>jr(e,"shift-10",o.get(e))}}}import{toState as Yr}from"@domphy/core";import{themeColor as no,themeSize as Gr,themeSpacing as Be}from"@domphy/theme";function us(i={}){var n;let o=Yr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:Be(2),marginInline:0,marginTop:Be(3),marginBottom:Be(3),color:e=>no(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:Be(2)},"& figcaption":{fontSize:e=>Gr(e,"decrease-1"),color:e=>no(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Ur}from"@domphy/core";import{themeColor as Ae,themeDensity as ee,themeSpacing as M,themeSize as lt}from"@domphy/theme";function gs(i={}){var r;let{layout:o="horizontal"}=i,n=Ur((r=i.color)!=null?r:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>M(ee(t)*3),paddingBlock:t=>M(ee(t)*3),border:"none",borderRadius:t=>M(ee(t)*2),fontSize:t=>lt(t,"inherit"),backgroundColor:t=>Ae(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:M(4),rowGap:M(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>lt(t,"inherit"),fontWeight:600,paddingBlock:t=>M(ee(t)*1),borderRadius:t=>M(ee(t)*2),color:t=>Ae(t,"shift-9",n.get(t)),backgroundColor:t=>Ae(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":M(ee(t)*1)},"& > label:has(+ :not(legend, label, p) + p)":{gridRow:e?"auto":"span 2"},"& > :not(legend, label, p)":{gridColumn:e?"1":"2",minWidth:0,width:"100%",boxSizing:"border-box"},"& > p":{gridColumn:e?"1":"2",minWidth:0,margin:0,marginBlockStart:`calc(${M(2)} * -1)`,fontSize:t=>lt(t,"decrease-1"),color:t=>Ae(t,"shift-9",n.get(t))}}}}import{toState as Xr}from"@domphy/core";import{themeColor as Jr,themeSize as Qr,themeSpacing as Zr}from"@domphy/theme";var en={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function xs(i={}){var n;let o=Xr((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{["h1","h2","h3","h4","h5","h6"].includes(e.tagName)||console.warn('"heading" primitive patch must use heading tags [h1...h6]')},style:{color:e=>Jr(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Zr(2),fontSize:e=>{let r=en[e.elementNode.tagName]||"inherit";return Qr(e,r)}}}}import{toState as tn}from"@domphy/core";import{themeColor as on,themeSpacing as io}from"@domphy/theme";function $s(i={}){var n;let o=tn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="hr"&&console.warn('"horizontalRule" primitive patch must use hr tag')},style:{border:0,height:"1px",marginInline:0,marginTop:io(3),marginBottom:io(3),backgroundColor:e=>on(e,"shift-4",o.get(e))}}}import{toState as rn}from"@domphy/core";import{themeColor as nn,themeSpacing as an}from"@domphy/theme";function Ds(i={}){var n;let o=rn((n=i.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="img"&&console.warn('"image" primitive patch must use img tag')},style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",objectFit:"cover",borderRadius:an(2),backgroundColor:e=>nn(e,"inherit",o.get(e))}}}import{toState as ln}from"@domphy/core";import{themeSpacing as ao,themeColor as sn,themeSize as cn}from"@domphy/theme";function Ks(i={}){var n;let o=ln((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="span"&&console.warn('"icon" primitive patch should use span tag')},style:{display:"inline-flex",alignItems:"center",justifyContent:"center",alignSelf:"center",justifySelf:"center",verticalAlign:"middle",width:ao(4),height:ao(4),flexShrink:"0",fontSize:e=>cn(e),backgroundColor:"transparent",color:e=>sn(e,"shift-9",o.get(e))}}}import{toState as lo}from"@domphy/core";import{themeColor as so,themeDensity as Ce,themeSpacing as Ee,themeSize as mn}from"@domphy/theme";function Gs(i={}){var e,r;let o=lo((e=i.color)!=null?e:"neutral","color"),n=lo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"color",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputColor" primitive patch must use input tag'),a.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>mn(t,"inherit"),paddingBlock:t=>Ee(Ce(t)*1),paddingInline:t=>Ee(Ce(t)*1),blockSize:t=>Ee(6+Ce(t)*2),inlineSize:t=>Ee(6+Ce(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Ee(Ce(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>so(t,"shift-2","neutral"),outline:t=>`1px solid ${so(t,"shift-4","neutral")}`}}}}import{toState as co}from"@domphy/core";import{themeColor as K,themeDensity as st,themeSpacing as ve,themeSize as un}from"@domphy/theme";function tc(i={}){var r,t;let{mode:o="datetime-local"}=i,n=co((r=i.color)!=null?r:"neutral","color"),e=co((t=i.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(a,l)=>{a.tagName!="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:a=>un(a,"inherit"),lineHeight:"inherit",color:a=>K(a,"shift-9",n.get(a)),backgroundColor:a=>K(a,"inherit",n.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${K(a,"shift-4",n.get(a))}`,borderRadius:a=>ve(st(a)*1),paddingInline:a=>ve(st(a)*3),height:a=>ve(6+st(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${ve(.5)} solid ${K(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>K(a,"shift-8","neutral"),backgroundColor:a=>K(a,"shift-2","neutral"),outline:a=>`1px solid ${K(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${ve(.5)} solid ${K(a,"shift-6","error")}`}}}}import{toState as mo}from"@domphy/core";import{themeColor as w,themeDensity as Ke,themeSpacing as W,themeSize as dn}from"@domphy/theme";function sc(i={}){var e,r;let o=mo((e=i.color)!=null?e:"neutral","color"),n=mo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"file",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputFile" primitive patch must use input tag'),a.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>dn(t,"inherit"),lineHeight:"inherit",color:t=>w(t,"shift-9",o.get(t)),backgroundColor:t=>w(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${w(t,"shift-4",o.get(t))}`,borderRadius:t=>W(Ke(t)*1),height:t=>W(6+Ke(t)*2),paddingInline:t=>W(Ke(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>W(Ke(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:W(1),height:W(6),paddingInline:W(2),cursor:"pointer",color:t=>w(t,"shift-11",o.get(t)),backgroundColor:t=>w(t,"shift-1",o.get(t))},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${W(.5)} solid ${w(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.8,cursor:"not-allowed",color:t=>w(t,"shift-8","neutral"),outline:t=>`1px solid ${w(t,"shift-4","neutral")}`,backgroundColor:t=>w(t,"shift-1","neutral")},"&[disabled]::-webkit-file-upload-button":{cursor:"not-allowed",color:t=>w(t,"shift-8","neutral"),backgroundColor:t=>w(t,"shift-3","neutral")}}}}import{toState as uo}from"@domphy/core";import{themeColor as F,themeDensity as ct,themeSpacing as xe,themeSize as hn}from"@domphy/theme";function fc(i={}){var e,r;let o=uo((e=i.color)!=null?e:"neutral","color"),n=uo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"search",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputSearch" primitive patch must use input tag'),a.type="search"},style:{fontFamily:"inherit",fontSize:t=>hn(t,"inherit"),lineHeight:"inherit",color:t=>F(t,"shift-9",o.get(t)),backgroundColor:t=>F(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${F(t,"shift-4",o.get(t))}`,borderRadius:t=>xe(ct(t)*1),minWidth:xe(32),paddingInline:t=>xe(ct(t)*3),paddingBlock:t=>xe(ct(t)*1),"&::placeholder":{color:t=>F(t,"shift-7",o.get(t))},"&::-webkit-search-decoration":{display:"none"},"&::-webkit-search-cancel-button":{cursor:"pointer"},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${xe(.5)} solid ${F(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>F(t,"shift-8","neutral"),backgroundColor:t=>F(t,"shift-2","neutral"),outline:t=>`1px solid ${F(t,"shift-4","neutral")}`}}}}import{toState as ho}from"@domphy/core";import{themeColor as k,themeDensity as mt,themeSpacing as j,themeSize as pn}from"@domphy/theme";function vc(i={}){var e,r;let o=ho((e=i.color)!=null?e:"neutral","color"),n=ho((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"text",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),a.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:j(10),paddingInline:t=>j(mt(t)*3),paddingBlock:t=>j(mt(t)*1),borderRadius:t=>j(mt(t)*1),fontSize:t=>pn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${k(t,"shift-4",o.get(t))}`,color:t=>k(t,"shift-9",o.get(t)),backgroundColor:t=>k(t,"inherit",o.get(t)),"&::placeholder":{color:t=>k(t,"shift-7")},"&:not(:placeholder-shown)":{color:t=>k(t,"shift-10")},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${j(.5)} solid ${k(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>k(t,"shift-2","neutral"),outline:t=>`1px solid ${k(t,"shift-4","neutral")}`,color:t=>k(t,"shift-8","neutral")},"&:invalid:not(:placeholder-shown)":{outline:t=>`${j(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${j(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${j(.5)} solid ${k(t,"shift-6","warning")}`}}}}import{toState as po}from"@domphy/core";import{themeColor as We,themeSpacing as P}from"@domphy/theme";function Ic(i={}){var e,r;let o=po((e=i.color)!=null?e:"neutral","color"),n=po((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"range",_onInsert:t=>{t.tagName!="input"&&console.warn('"inputRange" primitive patch must use input tag')},style:{appearance:"none",width:"100%",margin:0,padding:0,height:P(4),background:"transparent",cursor:"pointer","&::-webkit-slider-runnable-track":{height:P(1.5),borderRadius:P(999),backgroundColor:t=>We(t,"shift-3",o.get(t))},"&::-webkit-slider-thumb":{appearance:"none",width:P(4),height:P(4),borderRadius:P(999),border:"none",marginTop:`calc((${P(1.5)} - ${P(4)}) / 2)`,backgroundColor:t=>We(t,"shift-9",n.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>We(t,"shift-10",n.get(t))},"&:focus-visible":{outline:t=>`${P(.5)} solid ${We(t,"shift-6",n.get(t))}`,outlineOffset:P(1),borderRadius:P(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as fo}from"@domphy/core";import{themeColor as U,themeDensity as Fe,themeSpacing as te,themeSize as fn}from"@domphy/theme";function Mc(i={}){var e,r;let o=fo((e=i.color)!=null?e:"neutral","color"),n=fo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"number",_onSchedule:(t,a)=>{t.tagName!="input"&&console.warn('"inputNumber" primitive patch must use input tag'),a.type="number"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:te(10),paddingInlineStart:t=>te(Fe(t)*3),paddingInlineEnd:t=>te(Fe(t)*1.5),paddingBlock:t=>te(Fe(t)*1),borderRadius:t=>te(Fe(t)*1),fontSize:t=>fn(t,"inherit"),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${U(t,"shift-4",o.get(t))}`,color:t=>U(t,"shift-9",o.get(t)),backgroundColor:t=>U(t,"inherit",o.get(t)),"&::-webkit-inner-spin-button, &::-webkit-outer-spin-button":{opacity:1},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:t=>`${te(.5)} solid ${U(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>U(t,"shift-2","neutral"),outline:t=>`1px solid ${U(t,"shift-4","neutral")}`,color:t=>U(t,"shift-8","neutral")}}}}import{toState as gn}from"@domphy/core";import{themeColor as ut,themeSize as yn,themeSpacing as dt}from"@domphy/theme";function Wc(i={}){var n;let o=gn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>yn(e,"inherit"),color:e=>ut(e,"shift-9",o.get(e)),backgroundColor:e=>ut(e,"inherit",o.get(e)),paddingBlock:dt(.5),paddingInline:dt(1.5),borderRadius:dt(1),outline:e=>`1px solid ${ut(e,"shift-4",o.get(e))}`}}}import{toState as go}from"@domphy/core";import{themeColor as ht,themeSize as bn,themeSpacing as Sn}from"@domphy/theme";function Xc(i={}){var e,r;let o=go((e=i.color)!=null?e:"neutral","color"),n=go((r=i.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Sn(2),fontSize:t=>bn(t,"inherit"),color:t=>ht(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>ht(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>ht(t,"shift-8","neutral")}}}}import{toState as yo}from"@domphy/core";import{themeColor as oe,themeSize as Cn,themeSpacing as pt}from"@domphy/theme";function om(i={}){var e,r;let o=yo((e=i.color)!=null?e:"primary","color"),n=yo((r=i.accentColor)!=null?r:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>Cn(t,"inherit"),backgroundColor:t=>oe(t),color:t=>oe(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>oe(t,"shift-9",n.get(t))},"&:hover:not([disabled])":{color:t=>oe(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:pt(1),outlineOffset:pt(1),outline:t=>`${pt(.5)} solid ${oe(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>oe(t,"shift-8","neutral")}}}}import{toState as En}from"@domphy/core";import{themeSpacing as ft,themeSize as vn,themeColor as bo}from"@domphy/theme";function cm(i={}){var n;let o=En((n=i.accentColor)!=null?n:"highlight","accentColor");return{_onInsert:e=>{e.tagName!="mark"&&console.warn('"mark" primitive patch must use mark tag')},dataTone:"shift-2",style:{display:"inline-flex",alignItems:"center",fontSize:e=>vn(e,"inherit"),color:e=>bo(e,"shift-9",o.get(e)),backgroundColor:e=>bo(e,"inherit",o.get(e)),height:ft(6),borderRadius:ft(1),paddingInline:ft(1.5)}}}import{toState as xn}from"@domphy/core";import{themeColor as kn,themeSize as Tn}from"@domphy/theme";function ym(i={}){var n;let o=xn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>Tn(e,"inherit"),color:e=>kn(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as wn}from"@domphy/core";import{themeColor as So,themeDensity as gt,themeSpacing as yt,themeSize as Pn}from"@domphy/theme";function km(i={}){var n;let o=wn((n=i.color)!=null?n:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>Pn(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>yt(gt(e)*2),paddingInline:e=>yt(gt(e)*3),borderRadius:e=>yt(gt(e)*2)}}}import{toState as Co}from"@domphy/core";import{themeColor as bt,themeSpacing as je}from"@domphy/theme";function zm(i={}){var e,r;let o=Co((e=i.color)!=null?e:"neutral","color"),n=Co((r=i.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="progress"&&console.warn('"progress" primitive patch must use progress tag')},style:{appearance:"none",width:"100%",height:je(2),border:0,borderRadius:je(999),overflow:"hidden",backgroundColor:t=>bt(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>bt(t,"shift-3",o.get(t)),borderRadius:je(999)},"&::-webkit-progress-value":{backgroundColor:t=>bt(t,"shift-9",n.get(t)),borderRadius:je(999),transition:"width 220ms ease"}}}}import{toState as Eo}from"@domphy/core";import{themeColor as q,themeSize as On,themeSpacing as ke}from"@domphy/theme";function Lm(i={}){var e,r;let o=Eo((e=i.color)!=null?e:"neutral","color"),n=Eo((r=i.accentColor)!=null?r:"primary","accentColor");return{type:"radio",_onInsert:t=>{if(t.tagName!="input"){console.warn('"inputRadio" primitive patch must use input tag and radio type');return}},style:{fontSize:t=>On(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:ke(6),height:ke(6),justifyContent:"center",alignItems:"center",transition:"background-color 300ms, outline-color 300ms",margin:0,padding:0,"&::before":{content:'""',display:"block",borderRadius:"50%",lineHeight:1,cursor:"pointer",border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${q(t,"shift-4",o.get(t))}`,color:t=>q(t,"shift-9",o.get(t)),width:ke(4),height:ke(4)},"&:hover::before":{backgroundColor:t=>q(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${q(t,"shift-6",n.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>q(t,"shift-8",n.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>q(t,"shift-7",n.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${ke(.5)} solid ${q(t,"shift-6",n.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>q(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{themeColor as O,themeDensity as Te,themeSize as In,themeSpacing as I,themeColorToken as $n}from"@domphy/theme";function Am(i={}){let{color:o="neutral",accentColor:n="primary"}=i;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>In(e,"inherit"),lineHeight:"inherit",color:e=>O(e,"shift-9",o),backgroundColor:e=>O(e,"inherit",o),border:"none",outlineOffset:"-1px",outline:e=>`1px solid ${O(e,"shift-4",o)}`,borderRadius:e=>I(Te(e)*1),paddingBlock:e=>I(Te(e)*1),paddingLeft:e=>I(Te(e)*3),paddingRight:e=>I(Te(e)*5),backgroundImage:e=>{let r=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${$n(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(r)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${I(2)} center`,backgroundSize:`${I(2.5)} ${I(1.5)}`,"&:not([multiple])":{height:e=>I(6+Te(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${I(.5)} solid ${O(e,"shift-5",n)}`},"&:focus-visible":{outline:e=>`${I(.5)} solid ${O(e,"shift-6",n)}`},"& optgroup":{color:e=>O(e,"shift-11",o)},"& option[disabled]":{color:e=>O(e,"shift-7","neutral")},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:e=>O(e,"shift-8","neutral"),outline:e=>`1px solid ${O(e,"shift-4","neutral")}`,backgroundColor:e=>O(e,"shift-2","neutral")}}}}import{hashString as zn,toState as Vn}from"@domphy/core";import{themeColor as vo,themeSize as Rn,themeSpacing as xo}from"@domphy/theme";function jm(i={}){var r;let o=Vn((r=i.color)!=null?r:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=zn(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Rn(t),color:t=>vo(t,"shift-9",o.get(t)),height:xo(6),display:"block",borderRadius:xo(1),backgroundColor:t=>vo(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}import{hashString as _n,toState as Nn}from"@domphy/core";import{themeColor as qe,themeSize as Mn,themeSpacing as St}from"@domphy/theme";var To={to:{transform:"rotate(360deg)"}},ko=_n(JSON.stringify(To));function Um(i={}){var n;let o=Nn((n=i.color)!=null?n:"neutral","color");return{role:"status",ariaLabel:"loading",_onInsert:e=>{e.tagName!="span"&&console.warn('"spinner" patch must use span tag')},style:{fontSize:e=>Mn(e),backgroundColor:e=>qe(e),color:e=>qe(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:St(6),height:St(6),borderRadius:"50%",border:e=>`${St(.5)} solid ${qe(e,"shift-4",o.get(e))}`,borderTopColor:e=>qe(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${ko} 0.7s linear infinite`,[`@keyframes ${ko}`]:To}}}import{toState as Dn}from"@domphy/core";import{themeColor as Ln,themeDensity as wo,themeSize as Hn,themeSpacing as Po}from"@domphy/theme";function eu(i={}){var a;let{color:o="neutral",multiple:n=!1}=i,e=Dn((a=i.value)!=null?a:n?[]:null),r={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:i.name,value:c||""}))},hidden:!0};return{dataTone:"shift-17",_context:{select:{value:e,multiple:n}},_onInit:l=>{l.tagName!="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(r)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>Po(wo(l)*2),paddingInline:l=>Po(wo(l)*2),fontSize:l=>Hn(l,"inherit"),backgroundColor:l=>Ln(l,"inherit",o)}}}import{themeSpacing as Ye,themeColor as re,themeDensity as Oo,themeSize as Bn}from"@domphy/theme";function nu(i={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=i;return{role:"option",_onInit:t=>{t.tagName!="div"&&console.warn('"selectItem" patch must use div tag');let a=t.getContext("select");if(a){let l=a.value;t.attributes.set("ariaSelected",s=>{let u=l.get(s);return a.multiple?u.includes(e):u==e}),t.addEvent("click",()=>{let s=l.get();a.multiple?s.includes(e)?l.set(s.filter(u=>u!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Bn(t,"inherit"),height:t=>Ye(6+Oo(t)*2),paddingInline:t=>Ye(Oo(t)*3),border:"none",outline:"none",color:t=>re(t,"shift-9",n),backgroundColor:t=>re(t,"inherit",n),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>re(t,"shift-2",n)},"&[aria-selected=true]":{backgroundColor:t=>re(t,"shift-6",o),color:t=>re(t,"shift-11")},"&:focus-visible":{outline:t=>`${Ye(.5)} solid ${re(t,"shift-6",o)}`,outlineOffset:`-${Ye(.5)}`}}}}import{toState as Ct,merge as Io}from"@domphy/core";import{themeSpacing as we,themeColor as Et,themeDensity as vt,themeSize as An}from"@domphy/theme";function mu(i){let{options:o=[],placement:n="bottom",color:e="neutral",open:r=!1,multiple:t=!1}=i,a=Ct(i.value),l=Ct(r),{show:s,hide:u,anchorPartial:c}=H({open:l,placement:Ct(n),content:i.content}),m={onClick:()=>!t&&u()};Io(i.content,m);let p={div:h=>{let y=a.get(h),f=Array.isArray(y)?y:[y];return o.filter(g=>f.includes(g.value)).map(g=>({span:g.label,$:[Me({color:e,removable:t})],_key:g.value,_onRemove:v=>{let b=a.get(),Xe=(Array.isArray(b)?b:[b]).filter(pe=>pe!==g.value);t?a.set(Xe):a.set(Xe[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:we(1),flex:1}},d={_onInsert:h=>{h.tagName!="div"&&console.warn('"selectBox" patch must use div tag')},_onInit:h=>h.children.insert(p),onClick:()=>l.get()?u():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:h=>we(6+vt(h)*2),minWidth:we(32),outlineOffset:"-1px",outline:h=>`1px solid ${Et(h,"shift-4","neutral")}`,paddingInline:h=>we(vt(h)*2),borderRadius:h=>we(vt(h)*1),fontSize:h=>An(h,"inherit"),color:h=>Et(h,"shift-9",e),backgroundColor:h=>Et(h,"inherit",e)}};return Io(c,d),c}import{toState as Kn}from"@domphy/core";import{themeColor as xt,themeSize as $o,themeSpacing as D}from"@domphy/theme";function yu(i={}){var n;let o=Kn((n=i.accentColor)!=null?n:"primary","accentColor");return{dataTone:"shift-2",type:"checkbox",_onSchedule:e=>{if(e.tagName!="input"){console.warn('"inputSwitch" primitive patch must use input tag');return}},style:{fontSize:e=>$o(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:D(9),height:D(6),cursor:"pointer",margin:"0",paddingBlock:D(1),"&:checked":{"&::before":{backgroundColor:e=>xt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${D(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:D(3),height:D(3),borderRadius:D(999),left:D(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>xt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:D(999),display:"inline-block",fontSize:e=>$o(e,"inherit"),lineHeight:1,backgroundColor:e=>xt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as kt}from"@domphy/core";import{themeColor as ne,themeSize as Wn,themeSpacing as T}from"@domphy/theme";function Eu(i={}){var t,a;let{checked:o=!1}=i,n=kt(o),e=kt((t=i.color)!=null?t:"neutral","color"),r=kt((a=i.accentColor)!=null?a:"primary","accentColor");return{_onSchedule:l=>{l.tagName!="button"&&console.warn('"buttonSwitch" primitive patch must use button tag')},role:"switch",ariaChecked:l=>n.get(l),dataTone:"shift-2",onClick:()=>n.set(!n.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>Wn(l),border:"none",outlineWidth:"1px",outline:l=>`1px solid ${ne(l,"shift-3",e.get(l))}`,minWidth:T(12),minHeight:T(6),borderRadius:T(999),paddingLeft:T(7),paddingRight:T(2),transition:"padding-left 0.3s, padding-right 0.3s",backgroundColor:l=>ne(l,"inherit",e.get(l)),"& > :first-child":{content:'""',position:"absolute",display:"inline-flex",alignItems:"center",left:T(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",width:T(5),height:T(5),borderRadius:T(999),color:l=>ne(l,"shift-9"),backgroundColor:l=>ne(l,"decrease-2",e.get(l))},"&[aria-checked=true]":{backgroundColor:l=>ne(l,"increase-3",r.get(l)),outline:"none",color:l=>ne(l,"decrease-2"),paddingLeft:T(2),paddingRight:T(7)},"&[aria-checked=true] > :first-child":{left:`calc(100% - ${T(5.5)})`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Fn}from"@domphy/core";import{themeColor as jn,themeSize as qn}from"@domphy/theme";function Ou(i={}){var n;let o=Fn((n=i.color)!=null?n:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>qn(e,"inherit"),color:e=>jn(e,"shift-9",o.get(e))}}}import{toState as Yn}from"@domphy/core";import{themeColor as zo,themeSize as Gn}from"@domphy/theme";function Nu(i={}){var n;let o=Yn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Gn(e,"inherit"),fontWeight:700,color:e=>zo(e,"shift-11",o.get(e)),backgroundColor:e=>zo(e)}}}import{toState as Un}from"@domphy/core";import{themeColor as Xn,themeSize as Jn}from"@domphy/theme";function Ku(i={}){var n;let o=Un((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Jn(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Xn(e,"shift-9",o.get(e))}}}import{toState as Qn}from"@domphy/core";import{themeColor as Zn,themeSize as ei}from"@domphy/theme";function Uu(i={}){var n;let o=Qn((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>ei(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Zn(e,"shift-9",o.get(e))}}}import{toState as ti}from"@domphy/core";import{themeColor as $,themeDensity as ie,themeSpacing as ae,themeSize as Vo}from"@domphy/theme";function Zu(i={}){var n;let o=ti((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>Vo(e,"inherit"),color:e=>$(e,"shift-9",o.get(e)),width:"100%",borderCollapse:"collapse","& caption":{captionSide:"bottom"},"& th, & thead td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>$(e,"shift-10",o.get(e)),backgroundColor:e=>$(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>$(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${$(e,"shift-3",o.get(e))}`,fontSize:e=>Vo(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>$(e,"shift-10",o.get(e)),backgroundColor:e=>$(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${$(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>$(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>$(e,"shift-2")+"!important"}}}}import{toState as Ro}from"@domphy/core";import{themeColor as z,themeDensity as Tt,themeSpacing as le,themeSize as oi}from"@domphy/theme";function ad(i={}){var r,t;let o=Ro((r=i.color)!=null?r:"neutral","color"),n=Ro((t=i.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=i;return{_onInsert:a=>{a.tagName!="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:a=>{if(e){let l=a.domElement;l.style.overflow="hidden";let s=()=>{l.style.height="auto",l.style.height=l.scrollHeight+"px"};l.addEventListener("input",s),s()}},style:{fontFamily:"inherit",lineHeight:"inherit",resize:"vertical",paddingInline:a=>le(Tt(a)*2),paddingBlock:a=>le(Tt(a)*1.5),border:"none",borderRadius:a=>le(Tt(a)*1.5),fontSize:a=>oi(a,"inherit"),color:a=>z(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${z(a,"shift-4",o.get(a))}`,backgroundColor:a=>z(a,"inherit",o.get(a)),"&::placeholder":{color:a=>z(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${le(.5)} solid ${z(a,"shift-5",n.get(a))}`},"&:focus-visible":{outline:a=>`${le(.5)} solid ${z(a,"shift-6",n.get(a))}`},"&:invalid":{outline:a=>`${le(.5)} solid ${z(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>z(a,"shift-8","neutral"),outline:a=>`1px solid ${z(a,"shift-4","neutral")}`,backgroundColor:a=>z(a,"shift-2","neutral")}}}}import{toState as ri}from"@domphy/core";import{themeColor as _o,themeSize as ni,themeSpacing as ii}from"@domphy/theme";function hd(i={}){var n;let o=ri((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ni(e,"inherit"),backgroundColor:e=>_o(e),color:e=>_o(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ii(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as ai}from"@domphy/core";import{themeColor as No,themeSize as li,themeSpacing as si}from"@domphy/theme";function Cd(i={}){var n;let o=ai((n=i.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>li(e,"inherit"),backgroundColor:e=>No(e),color:e=>No(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:si(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as ci}from"@domphy/core";import{themeColor as se,themeDensity as Pe,themeSize as mi,themeSpacing as ce}from"@domphy/theme";function ui(i,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let n=[1];i>3&&n.push("...");let e=Math.max(2,i-1),r=Math.min(o-1,i+1);for(let t=e;t<=r;t++)n.push(t);return i<o-2&&n.push("..."),n.push(o),n}function kd(i){var l;let{total:o,color:n="neutral",accentColor:e="primary"}=i,r=ci((l=i.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ce(6+Pe(s)*2),height:s=>ce(6+Pe(s)*2),paddingInline:s=>ce(Pe(s)*2),borderRadius:s=>ce(Pe(s)*1),border:"none",cursor:"pointer",fontSize:s=>mi(s,"inherit"),backgroundColor:"transparent",color:s=>se(s,"shift-9",n),"&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-2",n)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Nt(_t({},t),{backgroundColor:s=>se(s,"shift-6",e),color:s=>se(s,"shift-11",e),fontWeight:"600",cursor:"default","&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-6",e)}});return{_onInsert:s=>{s.tagName!=="div"&&console.warn('"pagination" patch must use div tag')},_onInit:s=>{let u={div:c=>{let m=r.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:m<=1,onClick:()=>m>1&&r.set(m-1),style:t});for(let d of ui(m,o))if(d==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:h=>ce(Pe(h)*2),color:h=>se(h,"shift-7",n)}});else{let h=d===m;p.push({button:String(d),type:"button",ariaLabel:`Page ${d}`,ariaCurrent:h?"page":void 0,disabled:h,onClick:()=>r.set(d),style:h?a:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:m>=o,onClick:()=>m<o&&r.set(m+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:ce(1)}};s.children.insert(u)},style:{display:"inline-flex"}}}import{toState as di}from"@domphy/core";import{themeColor as Ge,themeSize as hi,themeSpacing as pi}from"@domphy/theme";function $d(i={}){var n;let o=di((n=i.color)!=null?n:"neutral","color");return{role:"separator",_onInsert:e=>{e.tagName!=="div"&&console.warn('"divider" patch should be used with <div>')},style:{display:"flex",justifyContent:"center",alignItems:"baseline",gap:pi(2),fontSize:e=>hi(e,"inherit"),backgroundColor:e=>Ge(e),color:e=>Ge(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ge(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ge(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as fi}from"@domphy/core";import{themeColor as Ue,themeDensity as gi,themeSize as yi,themeSpacing as Oe}from"@domphy/theme";var Mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},bi={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},wt=i=>i==="left"||i==="right";function _d(i={}){let{color:o="neutral",open:n=!1,placement:e="right",size:r}=i,t=fi(n),a=wt(e)?Oe(80):Oe(64),l=r!=null?r:a;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,u)=>{s.target===u.domElement&&t.set(!1)},onTransitionEnd:(s,u)=>{let c=u.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let u=s.domElement,c=p=>{p?(u.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{u.style.transform="translate(0, 0)"})):u.style.transform=Mo[e]};c(t.get());let m=t.addListener(c);s.addHook("Remove",()=>{m(),document.body.style.overflow=""})},style:{transform:Mo[e],transition:"transform 0.25s ease",fontSize:s=>yi(s,"inherit"),color:s=>Ue(s,"shift-10",o),backgroundColor:s=>Ue(s,"inherit",o),border:"none",padding:s=>Oe(gi(s)*3),margin:bi[e],width:wt(e)?l:"100dvw",height:wt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Oe(4)} ${Oe(12)} ${Ue(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ue(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Do,merge as Si}from"@domphy/core";function Kd(i){var p;let{open:o=!1,placement:n="bottom",openOn:e="click"}=i,r=null,t=Do(o),a=Do(n),{show:l,hide:s,anchorPartial:u}=H({open:t,placement:a,content:i.content}),c={role:"dialog",dataTone:"shift-11",onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),_onInsert:d=>{let h=d.attributes.get("id");r=h||d.nodeId,!h&&d.attributes.set("id",r)}};return(p=i.content).$||(p.$=[]),i.content.$.push(c),Si(u,{ariaHaspopup:"dialog",ariaExpanded:d=>t.get(d),onMouseEnter:()=>e==="hover"&&l(),onMouseLeave:()=>e==="hover"&&s(),onClick:()=>{e==="click"&&(t.get()?s():l())},onFocus:()=>l(),onBlur:(d,h)=>{let y=d.relatedTarget,f=h.getRoot().domElement,E=r?f.querySelector(`#${CSS.escape(r)}`):null;y&&(E!=null&&E.contains(y))||s()},_onMount:d=>r&&d.attributes.set("ariaControls",r)}),u}import{toState as Ci}from"@domphy/core";import{themeColor as Pt,themeDensity as Ot,themeSize as Ei,themeSpacing as Y}from"@domphy/theme";function qd(i={}){let{position:o="top-center",color:n="neutral"}=i,e=Ci(!1),r=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:r?"column":"column-reverse",alignItems:t?"center":a?"end":"start",inset:0,gap:Y(4),zIndex:30,padding:Y(6),pointerEvents:"none"}};return{_portal:s=>{let u=s.domElement.querySelector(`#domphy-toast-${o}`);return u||(u=s.children.insert(l).domElement),u},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Y(32),pointerEvents:"auto",paddingBlock:s=>Y(Ot(s)*2),paddingInline:s=>Y(Ot(s)*4),borderRadius:s=>Y(Ot(s)*2),fontSize:s=>Ei(s,"inherit"),color:s=>Pt(s,"shift-9",n),backgroundColor:s=>Pt(s,"inherit",n),boxShadow:s=>`0 ${Y(2)} ${Y(9)} ${Pt(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":r?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,u)=>{let c=m=>{m.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),u())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as vi,toState as Lo}from"@domphy/core";import{themeSpacing as It,themeColor as Ho,themeDensity as $t,themeSize as xi}from"@domphy/theme";function eh(i={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=i,r=Lo(n),t=Lo(e),a=null,l={span:d=>t.get(d)},{show:s,hide:u,anchorPartial:c}=H({open:o,placement:r,content:l}),m={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:d=>{let h=d.attributes.get("id");a=h||d.nodeId,!h&&d.attributes.set("id",a)},style:{paddingBlock:d=>It($t(d)*1),paddingInline:d=>It($t(d)*3),borderRadius:d=>It($t(d)*1),color:d=>Ho(d,"shift-9"),backgroundColor:d=>Ho(d),fontSize:d=>xi(d,"inherit")},$:[Gt({placement:r,bordered:!1})]};return l.$||(l.$=[]),l.$.push(m),vi(c,{onMouseEnter:()=>s(),onMouseLeave:()=>u(),onFocus:()=>s(),onBlur:()=>u(),onKeyDown:d=>d.key==="Escape"&&u(),_onMount:d=>a&&d.attributes.set("ariaDescribedby",a)}),c}import{ElementNode as Bo}from"@domphy/core";function Ao(i,o){return i.key!==void 0&&i.key!==null?String(i.key):`index-${o}`}function nh(i={}){let{duration:o=300,delay:n=0}=i,e=new Map;return{_onBeforeUpdate:r=>{e=new Map,r.children.items.forEach((t,a)=>{if(!(t instanceof Bo))return;let l=t.domElement;l&&e.set(Ao(t,a),l.getBoundingClientRect())})},_onUpdate:r=>{r.children.items.forEach((t,a)=>{if(!(t instanceof Bo))return;let l=t.domElement;if(!l)return;let s=Ao(t,a),u=e.get(s);if(!u)return;let c=l.getBoundingClientRect(),m=u.left-c.left,p=u.top-c.top;if(Math.abs(m)<.5&&Math.abs(p)<.5)return;let d=l.style.transition,h=l.style.transform;l.style.transition="none",l.style.transform=`translate(${m}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});let y=()=>{l.style.transition=d,l.style.transform=h,l.removeEventListener("transitionend",f)},f=E=>{E.propertyName==="transform"&&y()};l.addEventListener("transitionend",f),setTimeout(y,o+n+34)}),e.clear()}}}import{merge as ki}from"@domphy/core";import{toState as Ti}from"@domphy/core";function mh(i={}){return{role:"tablist",_onSchedule:(n,e)=>{let r={_context:{tabs:{activeKey:Ti(i.activeKey||0)}}};ki(e,r)}}}import{themeSpacing as me,themeColor as ue,themeDensity as Ko,themeSize as wi}from"@domphy/theme";function ph(i={}){let{accentColor:o="primary",color:n="neutral"}=i;return{role:"tab",_onInsert:r=>{var u,c;r.tagName!="button"&&console.warn('"tab" patch must use button tag');let t=r.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(u=r.parent)==null?void 0:u.children.items)!=null?c:[];a=a.filter(m=>m.type=="ElementNode"&&m.attributes.get("role")=="tab");let l=r.key!==null&&r.key!==void 0?r.key:a.findIndex(m=>m==r),s={id:"tab"+r.parent.nodeId+l,ariaControls:"tabpanel"+r.parent.nodeId+l,ariaSelected:m=>t.activeKey.get(m)==l,onClick:()=>t.activeKey.set(l),onKeyDown:m=>{var E,g,v,b;let p=m.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;m.preventDefault();let d=((g=(E=r.parent)==null?void 0:E.children.items)!=null?g:[]).filter(S=>S.type==="ElementNode"&&S.attributes.get("role")==="tab"),h=d.findIndex(S=>S===r),y=h;p==="ArrowRight"?y=(h+1)%d.length:p==="ArrowLeft"?y=(h-1+d.length)%d.length:p==="Home"?y=0:p==="End"&&(y=d.length-1);let f=d[y];t.activeKey.set((v=f.key)!=null?v:y),(b=f.domElement)==null||b.focus()}};r.merge(s)},style:{cursor:"pointer",fontSize:r=>wi(r,"inherit"),height:r=>me(6+Ko(r)*2),paddingInline:r=>me(Ko(r)*4),border:"none",outline:"none",color:r=>ue(r,"shift-9"),backgroundColor:r=>ue(r,"inherit"),boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-1",n)}`,"&:hover:not([disabled])":{boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-2",n)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-6",o)}`},"&:focus-visible":{boxShadow:r=>`inset 0 -${me(.5)} 0 0 ${ue(r,"shift-6",o)}`}}}}import{themeSpacing as Wo,themeDensity as Fo}from"@domphy/theme";function bh(){return{role:"tabpanel",style:{paddingBlock:o=>Wo(Fo(o)*2),paddingInline:o=>Wo(Fo(o)*2)},_onInsert:o=>{var a,l;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(l=(a=o.parent)==null?void 0:a.children.items)!=null?l:[];e=e.filter(s=>s.type=="ElementNode"&&s.attributes.get("role")=="tabpanel");let r=o.key!==null&&o.key!==void 0?o.key:e.findIndex(s=>s==o),t={id:"tabpanel"+o.parent.nodeId+r,ariaLabelledby:"tab"+o.parent.nodeId+r,hidden:s=>n.activeKey.get(s)!=r};o.merge(t)}}}import{merge as Pi}from"@domphy/core";import{toState as Oi}from"@domphy/core";import{themeColor as Ii,themeDensity as jo,themeSize as $i,themeSpacing as qo}from"@domphy/theme";function Th(i={}){let{color:o="neutral",selectable:n=!0}=i;return{role:"menu",dataTone:"shift-17",_onSchedule:(r,t)=>{var l;let a={_context:{menu:{activeKey:Oi((l=i.activeKey)!=null?l:null),selectable:n}}};Pi(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:r=>qo(jo(r)*2),paddingInline:r=>qo(jo(r)*2),fontSize:r=>$i(r,"inherit"),backgroundColor:r=>Ii(r,"inherit",o)}}}import{themeSpacing as Ie,themeColor as de,themeDensity as Yo,themeSize as zi}from"@domphy/theme";function Ih(i={}){let{accentColor:o="primary",color:n="neutral"}=i;return{role:"menuitem",_onInsert:r=>{var s,u;r.tagName!="button"&&console.warn('"menuItem" patch must use button tag');let t=r.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(u=(s=r.parent)==null?void 0:s.children.items)!=null?u:[];a=a.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="menuitem");let l=r.key!==null&&r.key!==void 0?r.key:a.findIndex(c=>c==r);t.selectable&&(r.attributes.set("ariaCurrent",c=>t.activeKey.get(c)==l||void 0),r.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(r,t)=>{var c,m,p,d;let a=r.key;if(a==="Enter"||a===" "){r.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;r.preventDefault();let l=((p=(m=t.parent)==null?void 0:m.children.items)!=null?p:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="menuitem"),s=l.findIndex(h=>h===t),u=s;a==="ArrowDown"?u=(s+1)%l.length:a==="ArrowUp"?u=(s-1+l.length)%l.length:a==="Home"?u=0:a==="End"&&(u=l.length-1),(d=l[u].domElement)==null||d.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:r=>Ie(2),width:"100%",fontSize:r=>zi(r,"inherit"),height:r=>Ie(6+Yo(r)*2),paddingInline:r=>Ie(Yo(r)*3),border:"none",outline:"none",color:r=>de(r,"shift-9"),backgroundColor:r=>de(r,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:r=>de(r,"shift-2")},"&[aria-current=true]":{backgroundColor:r=>de(r,"shift-3",o),color:r=>de(r,"shift-10")},"&:focus-visible":{outline:r=>`${Ie(.5)} solid ${de(r,"shift-6",o)}`,outlineOffset:`-${Ie(.5)}`}}}}var Go=i=>!!i&&typeof i.get=="function"&&i._isState===!0,he=i=>{let o={},n=[];for(let e in i){let r=i[e];e==="x"?n.push(`translateX(${typeof r=="number"?`${r}px`:r})`):e==="y"?n.push(`translateY(${typeof r=="number"?`${r}px`:r})`):e==="scale"?n.push(`scale(${r})`):e==="rotate"?n.push(`rotate(${typeof r=="number"?`${r}deg`:r})`):o[e]=r}return n.length&&(o.transform=n.join(" ")),o};function zh(i={}){var a,l,s,u;let{initial:o,animate:n,exit:e,transition:r={}}=i,t={duration:(a=r.duration)!=null?a:300,delay:(l=r.delay)!=null?l:0,easing:(s=r.easing)!=null?s:"ease",iterations:(u=r.iterations)!=null?u:1,fill:"both"};return{_onMount:c=>{let m=c.domElement;if(!m||typeof m.animate!="function")return;let p=Go(n)?n.get():n;if(p?m.animate(o?[he(o),he(p)]:[he(p)],t):o&&Object.assign(m.style,he(o)),Go(n)){let d=n.addListener(h=>{m.animate([he(h)],t)});c.setMetadata("motionRelease",d)}},_onBeforeRemove:(c,m)=>{let p=c.domElement;if(!p||!e||typeof p.animate!="function")return m();p.animate([he(e)],t).finished.then(m,m)},_onRemove:c=>{let m=c.getMetadata("motionRelease");m==null||m()}}}export{Hi as abbreviation,Sa as alert,ka as avatar,Ia as badge,pl as blockquote,_a as breadcrumb,Ha as breadcrumbEllipsis,bl as button,Eu as buttonSwitch,Fi as card,Vl as code,ol as combobox,ea as command,oa as commandItem,ta as commandSearch,ql as descriptionList,Hl as details,Jl as dialog,$d as divider,_d as drawer,ns as emphasis,us as figure,gs as formGroup,xs as heading,$s as horizontalRule,Ks as icon,Ds as image,Tl as inputCheckbox,Gs as inputColor,tc as inputDateTime,sc as inputFile,Mc as inputNumber,pa as inputOTP,Lm as inputRadio,Ic as inputRange,fc as inputSearch,yu as inputSwitch,vc as inputText,Wc as keyboard,Xc as label,om as link,cm as mark,Th as menu,Ih as menuItem,zh as motion,Cd as orderedList,kd as pagination,ym as paragraph,Kd as popover,Gt as popoverArrow,km as preformated,zm as progress,Am as select,mu as selectBox,nu as selectItem,eu as selectList,jm as skeleton,Ou as small,Um as spinner,Gi as splitter,Xi as splitterHandle,Ui as splitterPanel,Nu as strong,Ku as subscript,Uu as superscript,ph as tab,bh as tabPanel,Zu as table,mh as tabs,Me as tag,ad as textarea,qd as toast,aa as toggle,ua as toggleGroup,eh as tooltip,nh as transitionGroup,hd as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|