@domphy/ui 0.5.0 → 0.6.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 +5 -5
- 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 -48
- package/dist/index.d.ts +2 -48
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValueOrState, PartialElement, DomphyElement
|
|
1
|
+
import { ValueOrState, PartialElement, DomphyElement } from '@domphy/core';
|
|
2
2
|
import { ThemeColor } from '@domphy/theme';
|
|
3
3
|
import { Placement as Placement$1 } from '@floating-ui/dom';
|
|
4
4
|
export { Placement } from '@floating-ui/dom';
|
|
@@ -374,50 +374,4 @@ declare function menuItem(props?: {
|
|
|
374
374
|
color?: ThemeColor;
|
|
375
375
|
}): PartialElement;
|
|
376
376
|
|
|
377
|
-
|
|
378
|
-
type FieldMessages = {
|
|
379
|
-
error?: string;
|
|
380
|
-
warning?: string;
|
|
381
|
-
success?: string;
|
|
382
|
-
};
|
|
383
|
-
type FieldValidator = (value: unknown) => FieldMessages | null | Promise<FieldMessages | null>;
|
|
384
|
-
declare class FieldState {
|
|
385
|
-
_notifier: Notifier;
|
|
386
|
-
_value: unknown;
|
|
387
|
-
_initValue: unknown;
|
|
388
|
-
_messages: FieldMessages;
|
|
389
|
-
_touched: boolean;
|
|
390
|
-
_validator: FieldValidator | undefined;
|
|
391
|
-
_pending: boolean;
|
|
392
|
-
_validationToken: number;
|
|
393
|
-
constructor(initValue: unknown, validator?: FieldValidator);
|
|
394
|
-
value(listener?: Handler): unknown;
|
|
395
|
-
setValue(val: unknown): void;
|
|
396
|
-
dirty(listener?: Handler): boolean;
|
|
397
|
-
touched(listener?: Handler): boolean;
|
|
398
|
-
setTouched(): void;
|
|
399
|
-
configure(initValue?: unknown, validator?: FieldValidator): void;
|
|
400
|
-
message(type: keyof FieldMessages, listener?: Handler): string | undefined;
|
|
401
|
-
status(listener?: Handler): FieldStatus;
|
|
402
|
-
setMessages(next: FieldMessages): void;
|
|
403
|
-
reset(): void;
|
|
404
|
-
validate(): void;
|
|
405
|
-
_dispose(): void;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
declare class FormState {
|
|
409
|
-
fields: Map<string, FieldState>;
|
|
410
|
-
setField(path: string, initValue?: unknown, validator?: FieldValidator): FieldState;
|
|
411
|
-
getField(path: string): FieldState;
|
|
412
|
-
removeField(path: string): void;
|
|
413
|
-
get valid(): boolean;
|
|
414
|
-
reset(): void;
|
|
415
|
-
snapshot(): Record<string, unknown>;
|
|
416
|
-
_dispose(): void;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
declare function form(state: FormState): PartialElement;
|
|
420
|
-
|
|
421
|
-
declare function field(path: string, validator?: FieldValidator): PartialElement;
|
|
422
|
-
|
|
423
|
-
export { type FieldMessages, FieldState, type FieldStatus, type FieldValidator, FormState, abbreviation, alert, avatar, badge, blockquote, breadcrumb, breadcrumbEllipsis, button, buttonSwitch, card, code, combobox, command, commandItem, commandSearch, descriptionList, details, dialog, divider, drawer, emphasis, field, figure, form, formGroup, heading, horizontalRule, icon, image, inputCheckbox, inputColor, inputDateTime, inputFile, inputNumber, inputOTP, inputRadio, inputRange, inputSearch, inputSwitch, inputText, keyboard, label, link, mark, menu, menuItem, orderedList, pagination, paragraph, popover, popoverArrow, preformated, progress, select, selectBox, selectItem, selectList, skeleton, small, spinner, splitter, splitterHandle, splitterPanel, strong, subscript, superscript, tab, tabPanel, table, tabs, tag, textarea, toast, toggle, toggleGroup, tooltip, transitionGroup, unorderedList };
|
|
377
|
+
export { abbreviation, alert, avatar, badge, blockquote, breadcrumb, breadcrumbEllipsis, button, buttonSwitch, card, code, combobox, command, commandItem, commandSearch, descriptionList, details, dialog, divider, drawer, emphasis, figure, formGroup, heading, horizontalRule, icon, image, inputCheckbox, inputColor, inputDateTime, inputFile, inputNumber, inputOTP, inputRadio, inputRange, inputSearch, inputSwitch, inputText, keyboard, label, link, mark, menu, menuItem, orderedList, pagination, paragraph, popover, popoverArrow, preformated, progress, select, selectBox, selectItem, selectList, skeleton, small, spinner, splitter, splitterHandle, splitterPanel, strong, subscript, superscript, tab, tabPanel, table, tabs, tag, textarea, toast, toggle, toggleGroup, tooltip, transitionGroup, unorderedList };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValueOrState, PartialElement, DomphyElement
|
|
1
|
+
import { ValueOrState, PartialElement, DomphyElement } from '@domphy/core';
|
|
2
2
|
import { ThemeColor } from '@domphy/theme';
|
|
3
3
|
import { Placement as Placement$1 } from '@floating-ui/dom';
|
|
4
4
|
export { Placement } from '@floating-ui/dom';
|
|
@@ -374,50 +374,4 @@ declare function menuItem(props?: {
|
|
|
374
374
|
color?: ThemeColor;
|
|
375
375
|
}): PartialElement;
|
|
376
376
|
|
|
377
|
-
|
|
378
|
-
type FieldMessages = {
|
|
379
|
-
error?: string;
|
|
380
|
-
warning?: string;
|
|
381
|
-
success?: string;
|
|
382
|
-
};
|
|
383
|
-
type FieldValidator = (value: unknown) => FieldMessages | null | Promise<FieldMessages | null>;
|
|
384
|
-
declare class FieldState {
|
|
385
|
-
_notifier: Notifier;
|
|
386
|
-
_value: unknown;
|
|
387
|
-
_initValue: unknown;
|
|
388
|
-
_messages: FieldMessages;
|
|
389
|
-
_touched: boolean;
|
|
390
|
-
_validator: FieldValidator | undefined;
|
|
391
|
-
_pending: boolean;
|
|
392
|
-
_validationToken: number;
|
|
393
|
-
constructor(initValue: unknown, validator?: FieldValidator);
|
|
394
|
-
value(listener?: Handler): unknown;
|
|
395
|
-
setValue(val: unknown): void;
|
|
396
|
-
dirty(listener?: Handler): boolean;
|
|
397
|
-
touched(listener?: Handler): boolean;
|
|
398
|
-
setTouched(): void;
|
|
399
|
-
configure(initValue?: unknown, validator?: FieldValidator): void;
|
|
400
|
-
message(type: keyof FieldMessages, listener?: Handler): string | undefined;
|
|
401
|
-
status(listener?: Handler): FieldStatus;
|
|
402
|
-
setMessages(next: FieldMessages): void;
|
|
403
|
-
reset(): void;
|
|
404
|
-
validate(): void;
|
|
405
|
-
_dispose(): void;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
declare class FormState {
|
|
409
|
-
fields: Map<string, FieldState>;
|
|
410
|
-
setField(path: string, initValue?: unknown, validator?: FieldValidator): FieldState;
|
|
411
|
-
getField(path: string): FieldState;
|
|
412
|
-
removeField(path: string): void;
|
|
413
|
-
get valid(): boolean;
|
|
414
|
-
reset(): void;
|
|
415
|
-
snapshot(): Record<string, unknown>;
|
|
416
|
-
_dispose(): void;
|
|
417
|
-
}
|
|
418
|
-
|
|
419
|
-
declare function form(state: FormState): PartialElement;
|
|
420
|
-
|
|
421
|
-
declare function field(path: string, validator?: FieldValidator): PartialElement;
|
|
422
|
-
|
|
423
|
-
export { type FieldMessages, FieldState, type FieldStatus, type FieldValidator, FormState, abbreviation, alert, avatar, badge, blockquote, breadcrumb, breadcrumbEllipsis, button, buttonSwitch, card, code, combobox, command, commandItem, commandSearch, descriptionList, details, dialog, divider, drawer, emphasis, field, figure, form, formGroup, heading, horizontalRule, icon, image, inputCheckbox, inputColor, inputDateTime, inputFile, inputNumber, inputOTP, inputRadio, inputRange, inputSearch, inputSwitch, inputText, keyboard, label, link, mark, menu, menuItem, orderedList, pagination, paragraph, popover, popoverArrow, preformated, progress, select, selectBox, selectItem, selectList, skeleton, small, spinner, splitter, splitterHandle, splitterPanel, strong, subscript, superscript, tab, tabPanel, table, tabs, tag, textarea, toast, toggle, toggleGroup, tooltip, transitionGroup, unorderedList };
|
|
377
|
+
export { abbreviation, alert, avatar, badge, blockquote, breadcrumb, breadcrumbEllipsis, button, buttonSwitch, card, code, combobox, command, commandItem, commandSearch, descriptionList, details, dialog, divider, drawer, emphasis, figure, formGroup, heading, horizontalRule, icon, image, inputCheckbox, inputColor, inputDateTime, inputFile, inputNumber, inputOTP, inputRadio, inputRange, inputSearch, inputSwitch, inputText, keyboard, label, link, mark, menu, menuItem, orderedList, pagination, paragraph, popover, popoverArrow, preformated, progress, select, selectBox, selectItem, selectList, skeleton, small, spinner, splitter, splitterHandle, splitterPanel, strong, subscript, superscript, tab, tabPanel, table, tabs, tag, textarea, toast, toggle, toggleGroup, tooltip, transitionGroup, unorderedList };
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var Jo=Object.defineProperty,Qo=Object.defineProperties;var Zo=Object.getOwnPropertyDescriptors;var $t=Object.getOwnPropertySymbols;var er=Object.prototype.hasOwnProperty,tr=Object.prototype.propertyIsEnumerable;var Nt=(i,o,r)=>o in i?Jo(i,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):i[o]=r,Rt=(i,o)=>{for(var r in o||(o={}))er.call(o,r)&&Nt(i,r,o[r]);if($t)for(var r of $t(o))tr.call(o,r)&&Nt(i,r,o[r]);return i},Lt=(i,o)=>Qo(i,Zo(o));import{toState as Mt}from"@domphy/core";import{themeColor as pe,themeSize as or,themeSpacing as rr}from"@domphy/theme";function ji(i={}){var e,n;let o=Mt((e=i.color)!=null?e:"neutral","color"),r=Mt((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>or(t),backgroundColor:t=>pe(t),color:t=>pe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>pe(t,"shift-7",o.get(t)),textUnderlineOffset:rr(.72),cursor:"help","&:hover":{color:t=>pe(t,"shift-11",r.get(t)),textDecorationColor:t=>pe(t,"shift-9",r.get(t))}}}}import{toState as nr}from"@domphy/core";import{themeColor as X,themeDensity as D,themeSpacing as z}from"@domphy/theme";function Ui(i={}){var r;let o=nr((r=i.color)!=null?r:"neutral","color");return{style:{display:"grid",gridTemplateColumns:"1fr auto",gridTemplateAreas:'"image image" "title aside" "desc aside" "content content" "footer footer"',borderRadius:e=>z(D(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=>z(D(e)*2),paddingInline:e=>z(D(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>z(D(e)*4),color:e=>X(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>z(D(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>z(D(e)*4),color:e=>X(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:z(2),paddingBlock:e=>z(D(e)*2),paddingInline:e=>z(D(e)*4),borderTop:e=>`1px solid ${X(e,"shift-3",o.get(e))}`}}}}import{merge as ir,toState as ar}from"@domphy/core";import{themeColor as Qe,themeSpacing as lr}from"@domphy/theme";function Zi(i={}){let{direction:o="horizontal",defaultSize:r=50,min:e=10,max:n=90}=i;return{_onSchedule:(t,a)=>{ir(a,{_context:{splitter:{direction:o,size:ar(r),min:e,max:n}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function ea(){return{_onMount:i=>{let o=i.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let r=i.domElement,e=o.direction==="horizontal"?"width":"height";r.style[e]=`${o.size.get()}%`,r.style.flexShrink="0",r.style.overflow="auto";let n=o.size.addListener(t=>{r.style[e]=`${t}%`});i.addHook("Remove",n)}}}function ta(){return{_onMount:i=>{let o=i.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let r=i.domElement,e=o.direction==="horizontal";r.style.cursor=e?"col-resize":"row-resize";let n=t=>{t.preventDefault();let a=r.parentElement,l=m=>{let c=a.getBoundingClientRect(),u=e?(m.clientX-c.left)/c.width*100:(m.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(u,o.min),o.max))},s=()=>{document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",s)};document.addEventListener("mousemove",l),document.addEventListener("mouseup",s)};r.addEventListener("mousedown",n),i.addHook("Remove",()=>r.removeEventListener("mousedown",n))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:i=>Qe(i,"shift-2"),"&:hover":{backgroundColor:i=>Qe(i,"shift-3")},"&::after":{content:'""',borderRadius:lr(999),backgroundColor:i=>Qe(i,"shift-4")}}}}import{merge as sr,toState as cr}from"@domphy/core";import{themeColor as $,themeDensity as Ie,themeSize as Dt,themeSpacing as J}from"@domphy/theme";function ia(){return{_onSchedule:(i,o)=>{sr(o,{_context:{command:{query:cr("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function aa(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{_onInsert:e=>{e.tagName!=="input"&&console.warn('"commandSearch" patch must use input tag')},_onMount:e=>{let n=e.getContext("command");if(!n){console.warn('"commandSearch" patch must be used inside a "command"');return}let t=e.domElement,a=()=>n.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(Ie(e)*3),paddingBlock:e=>J(Ie(e)*2),border:"none",borderBottom:e=>`1px solid ${$(e,"shift-3",o)}`,outline:"none",color:e=>$(e,"shift-10",o),backgroundColor:e=>$(e,"inherit",o),"&::placeholder":{color:e=>$(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>$(e,"shift-6",r)}}}}function la(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{role:"option",_onMount:e=>{var s,m;let n=e.getContext("command");if(!n){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,a=(m=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?m:"",l=n.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+Ie(e)*2),paddingInline:e=>J(Ie(e)*3),border:"none",outline:"none",color:e=>$(e,"shift-9",o),backgroundColor:e=>$(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>$(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${J(.5)} solid ${$(e,"shift-6",r)}`,outlineOffset:`-${J(.5)}`}}}}import{toState as Ht}from"@domphy/core";import{themeColor as Q,themeSize as mr,themeSpacing as Z}from"@domphy/theme";function ua(i={}){var e,n;let o=Ht((e=i.color)!=null?e:"neutral","color"),r=Ht((n=i.accentColor)!=null?n:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,u;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=((u=(c=t.parent)==null?void 0:c.children.items)!=null?u:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),m=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(m):d===m}),t.addEvent("click",()=>{let p=a.value.get();if(a.multiple){let d=Array.isArray(p)?[...p]:[];a.value.set(d.includes(m)?d.filter(h=>h!==m):[...d,m])}else a.value.set(p===m?"":m)})},style:{cursor:"pointer",fontSize:t=>mr(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",r.get(t)),color:t=>Q(t,"shift-12",r.get(t))},"&:focus-visible":{outline:t=>`${Z(.5)} solid ${Q(t,"shift-6",r.get(t))}`,outlineOffset:`-${Z(.5)}`},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as ur}from"@domphy/core";import{themeSpacing as _e,themeColor as Bt,themeSize as dr}from"@domphy/theme";function ga(i={}){var e;let{multiple:o=!1,color:r="neutral"}=i;return{role:"group",_context:{toggleGroup:{value:ur((e=i.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:_e(1),paddingInline:_e(1),gap:_e(1),borderRadius:_e(2),fontSize:n=>dr(n,"inherit"),backgroundColor:n=>Bt(n,"inherit",r),outline:n=>`1px solid ${Bt(n,"shift-3",r)}`,outlineOffset:"-1px"}}}import{themeSpacing as Ft}from"@domphy/theme";function Sa(){return{style:{display:"flex",alignItems:"center",gap:Ft(2),"& > *":{minWidth:Ft(9)+"!important"}},_onMount:i=>{let o=i.domElement,r=()=>Array.from(o.querySelectorAll("input")),e=a=>{let l=r(),s=a.target,m=l.indexOf(s);s.value&&m<l.length-1&&l[m+1].focus()},n=a=>{let l=r(),s=a.target,m=l.indexOf(s);a.key==="Backspace"&&!s.value&&m>0&&l[m-1].focus(),a.key==="ArrowLeft"&&m>0&&l[m-1].focus(),a.key==="ArrowRight"&&m<l.length-1&&l[m+1].focus()},t=a=>{var u,p,d;a.preventDefault();let l=(p=(u=a.clipboardData)==null?void 0:u.getData("text"))!=null?p:"",s=r(),m=s.indexOf(a.target);[...l].forEach((h,y)=>{s[m+y]&&(s[m+y].value=h)});let c=Math.min(m+l.length-1,s.length-1);(d=s[c])==null||d.focus()};o.addEventListener("input",e),o.addEventListener("keydown",n),o.addEventListener("paste",t),i.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",n),o.removeEventListener("paste",t)})}}}import{toState as hr}from"@domphy/core";import{themeColor as Ze,themeDensity as At,themeSize as pr,themeSpacing as Ve}from"@domphy/theme";function ka(i={}){var r;let o=hr((r=i.color)!=null?r:"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 ${Ze(e,"shift-8",o.get(e))}`,backgroundColor:e=>Ze(e,"inherit",o.get(e)),color:e=>Ze(e,"shift-10",o.get(e)),fontSize:e=>pr(e,"inherit")}}}import{toState as fr}from"@domphy/core";import{themeColor as Wt,themeSize as gr,themeSpacing as jt}from"@domphy/theme";function Ia(i={}){var r;let o=fr((r=i.color)!=null?r:"primary","color");return{dataTone:"shift-2",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",overflow:"hidden",borderRadius:"50%",flexShrink:0,width:jt(9),height:jt(9),fontSize:e=>gr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>Wt(e,"inherit",o.get(e)),color:e=>Wt(e,"shift-11",o.get(e)),"& img":{position:"absolute",inset:0,width:"100%",height:"100%",objectFit:"cover"}}}}import{toState as Kt}from"@domphy/core";import{themeSpacing as et,themeColor as qt,themeSize as yr}from"@domphy/theme";function Na(i={}){var n;let{label:o=999}=i,r=Kt(o),e=Kt((n=i.color)!=null?n:"danger","color");return{style:{position:"relative","&::after":{content:t=>`"${r.get(t)}"`,position:"absolute",top:0,right:0,transform:"translate(50%,-50%)",paddingInline:et(1),minWidth:et(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>yr(t,"decrease-1"),borderRadius:et(999),backgroundColor:t=>qt(t,"shift-9",e.get(t)),color:t=>qt(t,"shift-0",e.get(t))}}}}import{toState as br}from"@domphy/core";import{themeColor as fe,themeSize as Sr,themeSpacing as Yt}from"@domphy/theme";function Ha(i={}){var e;let{separator:o="/"}=i,r=br((e=i.color)!=null?e:"neutral","color");return{_onInsert:n=>{n.tagName!=="nav"&&console.warn('"breadcrumb" patch must use nav tag')},ariaLabel:"breadcrumb",style:{display:"flex",alignItems:"center",flexWrap:"wrap",fontSize:n=>Sr(n,"inherit"),gap:Yt(1),color:n=>fe(n,"shift-9",r.get(n)),backgroundColor:n=>fe(n,"inherit",r.get(n)),"& > *":{display:"inline-flex",alignItems:"center",color:n=>fe(n,"shift-8",r.get(n))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:n=>fe(n,"shift-4",r.get(n)),paddingInlineStart:Yt(1)},"& > [aria-current=page]":{color:n=>fe(n,"shift-10",r.get(n)),pointerEvents:"none"}}}}import{toState as Cr}from"@domphy/core";import{themeColor as ze,themeSize as vr,themeSpacing as $e}from"@domphy/theme";function ja(i={}){var r;let o=Cr((r=i.color)!=null?r:"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=>vr(e,"inherit"),paddingInline:$e(1),border:"none",background:"none",cursor:"pointer",color:e=>ze(e,"shift-8",o.get(e)),borderRadius:$e(1),"&:hover":{color:e=>ze(e,"shift-10",o.get(e)),backgroundColor:e=>ze(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${$e(.5)} solid ${ze(e,"shift-6",o.get(e))}`,outlineOffset:$e(.5)}}}}import{toState as tt,merge as ot}from"@domphy/core";import{themeSpacing as G,themeColor as ge,themeDensity as rt,themeSize as Gt}from"@domphy/theme";import{toState as Er}from"@domphy/core";import{themeColor as Ne,themeSize as xr,themeSpacing as N}from"@domphy/theme";var kr='<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 Re(i={}){var e;let{removable:o=!1}=i,r=Er((e=i.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:n=>{let t={span:kr,onClick:a=>{a.stopPropagation(),n.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:N(1),width:N(4),height:N(4),flexShrink:0,"&:hover":{backgroundColor:a=>Ne(a,"shift-4",r.get(a))}}};o&&n.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:N(6),paddingBlock:"0px",borderRadius:N(1),paddingInlineStart:N(2),paddingInlineEnd:o?N(1):N(2),gap:N(2),fontSize:n=>xr(n,"inherit"),backgroundColor:n=>Ne(n,"inherit",r.get(n)),color:n=>Ne(n,"shift-9",r.get(n)),border:"none",outlineOffset:"-1px",outline:n=>`1px solid ${Ne(n,"shift-4",r.get(n))}`}}}import{toState as Tr,merge as wr}from"@domphy/core";import{computePosition as Pr,autoUpdate as Or,offset as Ir,flip as _r,shift as Vr}from"@floating-ui/dom";function H(i){let{open:o=!1,placement:r}=i,e=null,n=null,t=null,a=null,l=null,s=null,m=!1,c=Tr(o),u=()=>{m||!s||(m=!0,l=s.children.insert(i.content))},p=()=>{u(),t&&a&&(n&&n(),n=Or(t,a,()=>{Pr(t,a,{placement:r.get(),middleware:[Ir(12),_r(),Vr()],strategy:"fixed"}).then(({x:g,y:E,placement:b})=>{Object.assign(a.style,{left:`${g}px`,top:`${E}px`}),r.set(b)})}),c.set(!0))},d=()=>{n&&n(),n=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 E=g.domElement.querySelector("#domphy-floating");if(!E){let b={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};E=g.children.insert(b).domElement}return E}};return wr(i.content,f),{show:h,hide:y,anchorPartial:{onKeyDown:g=>g.key==="Escape"&&y(),_onMount:g=>{s=g.getRoot(),t=g.domElement;let E=b=>{if(!c.get()||!t||!a)return;let S=b.target;!t.contains(S)&&!a.contains(S)&&y()};g.getRoot().domElement.addEventListener("click",E),g.addHook("BeforeRemove",()=>{e&&clearTimeout(e),n&&(n(),n=null),l&&l.remove(),g.getRoot().domElement.removeEventListener("click",E)})}}}}function ll(i){let{options:o=[],placement:r="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=i,a=tt(i.value),l=tt(n),{show:s,hide:m,anchorPartial:c}=H({open:l,placement:tt(r),content:i.content}),u={onClick:()=>!t&&m()};ot(i.content,u);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:G(6),marginInlineStart:G(2),fontSize:f=>Gt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)},d;i.input?(ot(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 v=a.get(f),g=Array.isArray(v)?v:[v],b=o.filter(S=>g.includes(S.value)).map(S=>({span:S.label,$:[Re({color:e,removable:!0})],_key:S.value,_onRemove:Je=>{let he=a.get(),zt=(Array.isArray(he)?he:[he]).filter(Xo=>Xo!==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 ${ge(f,"shift-4","neutral")}`,paddingBlock:f=>G(rt(f)*1),paddingInline:f=>G(rt(f)*1),borderRadius:f=>G(rt(f)*1),fontSize:f=>Gt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)}};return ot(c,y),c}import{toState as zr}from"@domphy/core";import{themeSpacing as nt,themeColor as Le,themeSize as $r}from"@domphy/theme";function Ut(i={}){let{placement:o="bottom-end",color:r="neutral",sideOffset:e=nt(6),bordered:n=!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 u;return(u=a[t.get(c)])!=null?u:a["bottom-end"]},s=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",m=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>$r(c),backgroundColor:c=>Le(c),color:c=>Le(c,"shift-9",r),position:"relative","&::after":{content:'""',position:"absolute",width:nt(1.5),height:nt(1.5),backgroundColor:c=>Le(c,"inherit",r),borderWidth:n?"1px":"0px",borderColor:c=>Le(c,"inherit",r),borderTopStyle:c=>{let u=l(c);return u.includes("top")||u.includes("right")?"solid":"none"},borderBottomStyle:c=>{let u=l(c);return u.includes("bottom")||u.includes("left")?"solid":"none"},borderLeftStyle:c=>{let u=l(c);return u.includes("top")||u.includes("left")?"solid":"none"},borderRightStyle:c=>{let u=l(c);return u.includes("bottom")||u.includes("right")?"solid":"none"},top:c=>{let u=l(c);return u.includes("top")?0:u.includes("bottom")?"auto":s(u)},right:c=>{let u=l(c);return u.includes("right")?0:u.includes("left")?"auto":m(u)},bottom:c=>{let u=l(c);return u.includes("bottom")?0:u.includes("top")?"auto":m(u)},left:c=>{let u=l(c);return u.includes("left")?0:u.includes("right")?"auto":s(u)},transform:c=>{let u=l(c),p=u.includes("right")||u.includes("end")&&!u.includes("left")?"50%":"-50%",d=u.includes("bottom")||u.includes("end")&&!u.includes("top")?"50%":"-50%";return`translate(${p},${d}) rotate(45deg)`}}}}}import{toState as Nr}from"@domphy/core";import{themeSpacing as it,themeColor as Xt,themeDensity as Jt,themeSize as Rr}from"@domphy/theme";function Sl(i={}){var r;let o=Nr((r=i.color)!=null?r:"inherit","color");return{_onInsert:e=>{e.tagName!="blockquote"&&console.warn('"blockquote" primitive patch must use blockquote tag')},dataTone:"shift-2",style:{fontSize:e=>Rr(e,"inherit"),backgroundColor:e=>Xt(e,"inherit",o.get(e)),boxShadow:e=>`inset ${it(1)} 0 0 0 ${Xt(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>it(Jt(e)*2),paddingInline:e=>it(Jt(e)*4),margin:0}}}import{toState as Lr}from"@domphy/core";import{themeColor as R,themeDensity as Me,themeSize as Mr,themeSpacing as ye}from"@domphy/theme";function xl(i={}){var r;let o=Lr((r=i.color)!=null?r:"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=>ye(Me(e)*1),paddingInline:e=>ye(Me(e)*3),borderRadius:e=>ye(Me(e)*1),width:"fit-content",display:"flex",justifyContent:"center",alignItems:"center",gap:e=>ye(Me(e)*1),userSelect:"none",fontFamily:"inherit",lineHeight:"inherit",border:"none",outlineOffset:"-1px",outlineWidth:"1px",outline:e=>`1px solid ${R(e,"shift-4",o.get(e))}`,color:e=>R(e,"shift-9",o.get(e)),backgroundColor:e=>R(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>R(e,"shift-10",o.get(e)),backgroundColor:e=>R(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${ye(.5)} ${R(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>R(e,"shift-2","neutral"),outline:e=>`1px solid ${R(e,"shift-4","neutral")}`,color:e=>R(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Qt}from"@domphy/core";import{themeColor as x,themeSpacing as B,themeSize as Dr}from"@domphy/theme";function _l(i={}){var e,n;let o=Qt((e=i.color)!=null?e:"neutral","color"),r=Qt((n=i.accentColor)!=null?n:"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",r.get(t))}`,backgroundColor:t=>x(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>x(t,"shift-7",r.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",r.get(t))}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg)"},"&:indeterminate::before":{outline:t=>`1px solid ${x(t,"shift-6",r.get(t))}`,backgroundColor:t=>x(t,"shift-3",r.get(t))},"&:indeterminate::after":{content:'""',position:"absolute",inset:"30%",backgroundColor:t=>x(t,"shift-8",r.get(t))},"&:indeterminate:hover:not([disabled])::after":{backgroundColor:t=>x(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:B(1.5),outline:t=>`${B(.5)} solid ${x(t,"shift-6",r.get(t))}`},"&[disabled]":{cursor:"not-allowed"},"&[disabled]::before, &[disabled]::after":{outline:"none",backgroundColor:t=>x(t,"shift-4","neutral"),pointerEvents:"none"}}}}import{toState as Hr}from"@domphy/core";import{themeSpacing as at,themeColor as Zt,themeSize as Br}from"@domphy/theme";function Ml(i={}){var r;let o=Hr((r=i.color)!=null?r:"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=>Br(e,"inherit"),color:e=>Zt(e,"shift-9",o.get(e)),backgroundColor:e=>Zt(e,"inherit",o.get(e)),height:at(6),paddingInline:at(1.5),borderRadius:at(1)}}}import{toState as eo}from"@domphy/core";import{themeColor as F,themeDensity as be,themeSize as to,themeSpacing as C}from"@domphy/theme";function jl(i={}){var n,t;let{duration:o=240}=i,r=eo((n=i.color)!=null?n:"neutral","color"),e=eo((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=>to(a,"inherit"),color:a=>F(a,"shift-9",r.get(a)),backgroundColor:a=>F(a,"inherit",r.get(a)),overflow:"hidden","& > summary":{backgroundColor:a=>F(a,"shift-2",r.get(a)),color:a=>F(a,"shift-10",r.get(a)),fontSize:a=>to(a,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:C(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:a=>C(be(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 ${F(a,"shift-9",r.get(a))}`,borderBottom:a=>`${C(.5)} solid ${F(a,"shift-9",r.get(a))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:a=>F(a,"shift-3",r.get(a))},"& > summary:focus-visible":{borderRadius:a=>C(be(a)*2),outlineOffset:`-${C(.5)}`,outline:a=>`${C(.5)} solid ${F(a,"shift-6",e.get(a))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:a=>C(be(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(be(a)*1),paddingBottom:a=>C(be(a)*3)}}}}import{toState as Fr}from"@domphy/core";import{themeColor as oo,themeSpacing as ro,themeSize as no}from"@domphy/theme";function Jl(i={}){var r;let o=Fr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="dl"&&console.warn('"descriptionList" primitive patch must use dl tag')},style:{display:"grid",gridTemplateColumns:`minmax(${ro(24)}, max-content) 1fr`,columnGap:ro(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>no(e,"inherit"),color:e=>oo(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>no(e,"inherit"),color:e=>oo(e,"shift-9",o.get(e))}}}}import{toState as Ar}from"@domphy/core";import{themeColor as De,themeDensity as Wr,themeSize as jr,themeSpacing as lt}from"@domphy/theme";function os(i={}){let{color:o="neutral",open:r=!1}=i,e=Ar(r);return{_onInsert:n=>{n.tagName!="dialog"&&console.warn('"dialog" primitive patch must use dialog tag')},onClick:(n,t)=>{if(n.target!==t.domElement)return;let a=t.domElement.getBoundingClientRect();n.clientX>=a.left&&n.clientX<=a.right&&n.clientY>=a.top&&n.clientY<=a.bottom||e.set(!1)},onTransitionEnd:(n,t)=>{let a=t.domElement;a.style.opacity==="0"&&(a.close(),document.body.style.overflow="")},_onMount:n=>{let t=n.domElement,a=s=>{s?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let m=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');m==null||m.focus()})):t.style.opacity="0"};a(e.get());let l=e.addListener(a);n.addHook("Remove",()=>{l(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:n=>jr(n,"inherit"),color:n=>De(n,"shift-10",o),backgroundColor:n=>De(n,"inherit",o),border:"none",padding:n=>lt(Wr(n)*3),boxShadow:n=>`0 ${lt(9)} ${lt(16)} ${De(n,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:n=>De(n,"shift-2","neutral"),opacity:.75}}}}import{toState as Kr}from"@domphy/core";import{themeColor as qr,themeSize as Yr}from"@domphy/theme";function cs(i={}){var r;let o=Kr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>Yr(e,"inherit"),fontStyle:"italic",color:e=>qr(e,"shift-10",o.get(e))}}}import{toState as Gr}from"@domphy/core";import{themeColor as io,themeSize as Ur,themeSpacing as He}from"@domphy/theme";function gs(i={}){var r;let o=Gr((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="figure"&&console.warn('"figure" primitive patch must use figure tag')},style:{display:"flex",flexDirection:"column",gap:He(2),marginInline:0,marginTop:He(3),marginBottom:He(3),color:e=>io(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:He(2)},"& figcaption":{fontSize:e=>Ur(e,"decrease-1"),color:e=>io(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Xr}from"@domphy/core";import{themeColor as Be,themeDensity as ee,themeSpacing as L,themeSize as st}from"@domphy/theme";function vs(i={}){var n;let{layout:o="horizontal"}=i,r=Xr((n=i.color)!=null?n:"neutral","color"),e=o==="vertical";return{_onInsert:t=>{t.tagName!="fieldset"&&console.warn('"formGroup" patch must use fieldset tag')},style:{margin:0,paddingInline:t=>L(ee(t)*3),paddingBlock:t=>L(ee(t)*3),border:"none",borderRadius:t=>L(ee(t)*2),fontSize:t=>st(t,"inherit"),backgroundColor:t=>Be(t,"inherit",r.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:L(4),rowGap:L(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>st(t,"inherit"),fontWeight:600,paddingBlock:t=>L(ee(t)*1),borderRadius:t=>L(ee(t)*2),color:t=>Be(t,"shift-9",r.get(t)),backgroundColor:t=>Be(t,"inherit",r.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":L(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(${L(2)} * -1)`,fontSize:t=>st(t,"decrease-1"),color:t=>Be(t,"shift-9",r.get(t))}}}}import{toState as Jr}from"@domphy/core";import{themeColor as Qr,themeSize as Zr,themeSpacing as en}from"@domphy/theme";var tn={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Os(i={}){var r;let o=Jr((r=i.color)!=null?r:"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=>Qr(e,"shift-11",o.get(e)),marginTop:0,marginBottom:en(2),fontSize:e=>{let n=tn[e.elementNode.tagName]||"inherit";return Zr(e,n)}}}}import{toState as on}from"@domphy/core";import{themeColor as rn,themeSpacing as ao}from"@domphy/theme";function Rs(i={}){var r;let o=on((r=i.color)!=null?r:"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:ao(3),marginBottom:ao(3),backgroundColor:e=>rn(e,"shift-4",o.get(e))}}}import{toState as nn}from"@domphy/core";import{themeColor as an,themeSpacing as ln}from"@domphy/theme";function As(i={}){var r;let o=nn((r=i.color)!=null?r:"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:ln(2),backgroundColor:e=>an(e,"inherit",o.get(e))}}}import{toState as sn}from"@domphy/core";import{themeSpacing as lo,themeColor as cn,themeSize as mn}from"@domphy/theme";function Ys(i={}){var r;let o=sn((r=i.color)!=null?r:"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:lo(4),height:lo(4),flexShrink:"0",fontSize:e=>mn(e),backgroundColor:"transparent",color:e=>cn(e,"shift-9",o.get(e))}}}import{toState as so}from"@domphy/core";import{themeColor as co,themeDensity as Se,themeSpacing as Ce,themeSize as un}from"@domphy/theme";function Zs(i={}){var e,n;let o=so((e=i.color)!=null?e:"neutral","color"),r=so((n=i.accentColor)!=null?n:"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=>un(t,"inherit"),paddingBlock:t=>Ce(Se(t)*1),paddingInline:t=>Ce(Se(t)*1),blockSize:t=>Ce(6+Se(t)*2),inlineSize:t=>Ce(6+Se(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Ce(Se(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>co(t,"shift-2","neutral"),outline:t=>`1px solid ${co(t,"shift-4","neutral")}`}}}}import{toState as mo}from"@domphy/core";import{themeColor as A,themeDensity as ct,themeSpacing as ve,themeSize as dn}from"@domphy/theme";function ac(i={}){var n,t;let{mode:o="datetime-local"}=i,r=mo((n=i.color)!=null?n:"neutral","color"),e=mo((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=>dn(a,"inherit"),lineHeight:"inherit",color:a=>A(a,"shift-9",r.get(a)),backgroundColor:a=>A(a,"inherit",r.get(a)),border:"none",outlineOffset:"-1px",outline:a=>`1px solid ${A(a,"shift-4",r.get(a))}`,borderRadius:a=>ve(ct(a)*1),paddingInline:a=>ve(ct(a)*3),height:a=>ve(6+ct(a)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:a=>`${ve(.5)} solid ${A(a,"shift-6",e.get(a))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>A(a,"shift-8","neutral"),backgroundColor:a=>A(a,"shift-2","neutral"),outline:a=>`1px solid ${A(a,"shift-4","neutral")}`},"&:invalid":{outline:a=>`${ve(.5)} solid ${A(a,"shift-6","error")}`}}}}import{toState as uo}from"@domphy/core";import{themeColor as w,themeDensity as Fe,themeSpacing as W,themeSize as hn}from"@domphy/theme";function hc(i={}){var e,n;let o=uo((e=i.color)!=null?e:"neutral","color"),r=uo((n=i.accentColor)!=null?n:"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=>hn(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(Fe(t)*1),height:t=>W(6+Fe(t)*2),paddingInline:t=>W(Fe(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>W(Fe(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",r.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 ho}from"@domphy/core";import{themeColor as j,themeDensity as mt,themeSpacing as Ee,themeSize as pn}from"@domphy/theme";function Cc(i={}){var e,n;let o=ho((e=i.color)!=null?e:"neutral","color"),r=ho((n=i.accentColor)!=null?n:"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=>pn(t,"inherit"),lineHeight:"inherit",color:t=>j(t,"shift-9",o.get(t)),backgroundColor:t=>j(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${j(t,"shift-4",o.get(t))}`,borderRadius:t=>Ee(mt(t)*1),minWidth:Ee(32),paddingInline:t=>Ee(mt(t)*3),paddingBlock:t=>Ee(mt(t)*1),"&::placeholder":{color:t=>j(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=>`${Ee(.5)} solid ${j(t,"shift-6",r.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>j(t,"shift-8","neutral"),backgroundColor:t=>j(t,"shift-2","neutral"),outline:t=>`1px solid ${j(t,"shift-4","neutral")}`}}}}import{toState as po}from"@domphy/core";import{themeColor as k,themeDensity as ut,themeSpacing as K,themeSize as fn}from"@domphy/theme";function Pc(i={}){var e,n;let o=po((e=i.color)!=null?e:"neutral","color"),r=po((n=i.accentColor)!=null?n:"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:K(10),paddingInline:t=>K(ut(t)*3),paddingBlock:t=>K(ut(t)*1),borderRadius:t=>K(ut(t)*1),fontSize:t=>fn(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=>`${K(.5)} solid ${k(t,"shift-6",r.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=>`${K(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${K(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${K(.5)} solid ${k(t,"shift-6","warning")}`}}}}import{toState as fo}from"@domphy/core";import{themeColor as Ae,themeSpacing as P}from"@domphy/theme";function Nc(i={}){var e,n;let o=fo((e=i.color)!=null?e:"neutral","color"),r=fo((n=i.accentColor)!=null?n:"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=>Ae(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=>Ae(t,"shift-9",r.get(t))},"&:hover:not([disabled])::-webkit-slider-thumb":{backgroundColor:t=>Ae(t,"shift-10",r.get(t))},"&:focus-visible":{outline:t=>`${P(.5)} solid ${Ae(t,"shift-6",r.get(t))}`,outlineOffset:P(1),borderRadius:P(2)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as go}from"@domphy/core";import{themeColor as U,themeDensity as We,themeSpacing as te,themeSize as gn}from"@domphy/theme";function Fc(i={}){var e,n;let o=go((e=i.color)!=null?e:"neutral","color"),r=go((n=i.accentColor)!=null?n:"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(We(t)*3),paddingInlineEnd:t=>te(We(t)*1.5),paddingBlock:t=>te(We(t)*1),borderRadius:t=>te(We(t)*1),fontSize:t=>gn(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",r.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 yn}from"@domphy/core";import{themeColor as dt,themeSize as bn,themeSpacing as ht}from"@domphy/theme";function Gc(i={}){var r;let o=yn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>bn(e,"inherit"),color:e=>dt(e,"shift-9",o.get(e)),backgroundColor:e=>dt(e,"inherit",o.get(e)),paddingBlock:ht(.5),paddingInline:ht(1.5),borderRadius:ht(1),outline:e=>`1px solid ${dt(e,"shift-4",o.get(e))}`}}}import{toState as yo}from"@domphy/core";import{themeColor as pt,themeSize as Sn,themeSpacing as Cn}from"@domphy/theme";function tm(i={}){var e,n;let o=yo((e=i.color)!=null?e:"neutral","color"),r=yo((n=i.accentColor)!=null?n:"primary","accentColor");return{_onInsert:t=>{t.tagName!="label"&&console.warn('"label" primitive patch must use label tag')},style:{display:"inline-flex",alignItems:"center",gap:Cn(2),fontSize:t=>Sn(t,"inherit"),color:t=>pt(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>pt(t,"shift-10",r.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>pt(t,"shift-8","neutral")}}}}import{toState as bo}from"@domphy/core";import{themeColor as oe,themeSize as vn,themeSpacing as ft}from"@domphy/theme";function lm(i={}){var e,n;let o=bo((e=i.color)!=null?e:"primary","color"),r=bo((n=i.accentColor)!=null?n:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>vn(t,"inherit"),backgroundColor:t=>oe(t),color:t=>oe(t,"shift-9",o.get(t)),textDecoration:"none","&:visited":{color:t=>oe(t,"shift-9",r.get(t))},"&:hover:not([disabled])":{color:t=>oe(t,"shift-10",o.get(t)),textDecoration:"underline"},"&:focus-visible":{borderRadius:ft(1),outlineOffset:ft(1),outline:t=>`${ft(.5)} solid ${oe(t,"shift-6",r.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 gt,themeSize as xn,themeColor as So}from"@domphy/theme";function pm(i={}){var r;let o=En((r=i.accentColor)!=null?r:"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=>xn(e,"inherit"),color:e=>So(e,"shift-9",o.get(e)),backgroundColor:e=>So(e,"inherit",o.get(e)),height:gt(6),borderRadius:gt(1),paddingInline:gt(1.5)}}}import{toState as kn}from"@domphy/core";import{themeColor as Tn,themeSize as wn}from"@domphy/theme";function Em(i={}){var r;let o=kn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>wn(e,"inherit"),color:e=>Tn(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as Pn}from"@domphy/core";import{themeColor as Co,themeDensity as yt,themeSpacing as bt,themeSize as On}from"@domphy/theme";function Im(i={}){var r;let o=Pn((r=i.color)!=null?r:"neutral","color");return{dataTone:"shift-2",_onInsert:e=>{e.tagName!="pre"&&console.warn('"preformated" primitive patch must use pre tag')},style:{fontSize:e=>On(e,"inherit"),color:e=>Co(e,"shift-9",o.get(e)),backgroundColor:e=>Co(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>bt(yt(e)*2),paddingInline:e=>bt(yt(e)*3),borderRadius:e=>bt(yt(e)*2)}}}import{toState as vo}from"@domphy/core";import{themeColor as St,themeSpacing as je}from"@domphy/theme";function Lm(i={}){var e,n;let o=vo((e=i.color)!=null?e:"neutral","color"),r=vo((n=i.accentColor)!=null?n:"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=>St(t,"shift-3",o.get(t)),"&::-webkit-progress-bar":{backgroundColor:t=>St(t,"shift-3",o.get(t)),borderRadius:je(999)},"&::-webkit-progress-value":{backgroundColor:t=>St(t,"shift-9",r.get(t)),borderRadius:je(999),transition:"width 220ms ease"}}}}import{toState as Eo}from"@domphy/core";import{themeColor as q,themeSize as In,themeSpacing as xe}from"@domphy/theme";function Wm(i={}){var e,n;let o=Eo((e=i.color)!=null?e:"neutral","color"),r=Eo((n=i.accentColor)!=null?n:"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=>In(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:xe(6),height:xe(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:xe(4),height:xe(4)},"&:hover::before":{backgroundColor:t=>q(t,"shift-2",o.get(t))},"&:checked::before":{outline:t=>`1px solid ${q(t,"shift-6",r.get(t))}`},"&:checked::after":{content:'""',position:"absolute",inset:"30%",borderRadius:"50%",backgroundColor:t=>q(t,"shift-8",r.get(t))},"&:checked:hover:not([disabled])::before":{backgroundColor:t=>q(t,"shift-7",r.get(t))},"&:focus-visible":{borderRadius:"50%",outline:t=>`${xe(.5)} solid ${q(t,"shift-6",r.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 ke,themeSize as _n,themeSpacing as I,themeColorToken as Vn}from"@domphy/theme";function qm(i={}){let{color:o="neutral",accentColor:r="primary"}=i;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>_n(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(ke(e)*1),paddingBlock:e=>I(ke(e)*1),paddingLeft:e=>I(ke(e)*3),paddingRight:e=>I(ke(e)*5),backgroundImage:e=>{let n=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 6"><path d="M1 1l4 4 4-4" stroke="${Vn(e,"shift-7")}" stroke-width="1.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg>`;return`url("data:image/svg+xml,${encodeURIComponent(n)}")`},backgroundRepeat:"no-repeat",backgroundPosition:`right ${I(2)} center`,backgroundSize:`${I(2.5)} ${I(1.5)}`,"&:not([multiple])":{height:e=>I(6+ke(e)*2)},"&:hover:not([disabled]):not([aria-busy=true])":{outline:e=>`${I(.5)} solid ${O(e,"shift-5",r)}`},"&:focus-visible":{outline:e=>`${I(.5)} solid ${O(e,"shift-6",r)}`},"& 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 $n}from"@domphy/core";import{themeColor as xo,themeSize as Nn,themeSpacing as ko}from"@domphy/theme";function Xm(i={}){var n;let o=$n((n=i.color)!=null?n:"neutral","color"),r={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=zn(JSON.stringify(r));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>Nn(t),color:t=>xo(t,"shift-9",o.get(t)),height:ko(6),display:"block",borderRadius:ko(1),backgroundColor:t=>xo(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:r}}}import{hashString as Rn,toState as Ln}from"@domphy/core";import{themeColor as Ke,themeSize as Mn,themeSpacing as Ct}from"@domphy/theme";var wo={to:{transform:"rotate(360deg)"}},To=Rn(JSON.stringify(wo));function eu(i={}){var r;let o=Ln((r=i.color)!=null?r:"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=>Ke(e),color:e=>Ke(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:Ct(6),height:Ct(6),borderRadius:"50%",border:e=>`${Ct(.5)} solid ${Ke(e,"shift-4",o.get(e))}`,borderTopColor:e=>Ke(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${To} 0.7s linear infinite`,[`@keyframes ${To}`]:wo}}}import{toState as Dn}from"@domphy/core";import{themeColor as Hn,themeDensity as Po,themeSize as Bn,themeSpacing as Oo}from"@domphy/theme";function iu(i={}){var a;let{color:o="neutral",multiple:r=!1}=i,e=Dn((a=i.value)!=null?a:r?[]:null),n={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:r}},_onInit:l=>{l.tagName!="div"&&console.warn('"selectList" patch must use a div tag'),l.children.insert(n)},style:{display:"flex",flexDirection:"column",paddingBlock:l=>Oo(Po(l)*2),paddingInline:l=>Oo(Po(l)*2),fontSize:l=>Bn(l,"inherit"),backgroundColor:l=>Hn(l,"inherit",o)}}}import{themeSpacing as qe,themeColor as re,themeDensity as Io,themeSize as Fn}from"@domphy/theme";function cu(i={}){let{accentColor:o="primary",color:r="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 m=l.get(s);return a.multiple?m.includes(e):m==e}),t.addEvent("click",()=>{let s=l.get();a.multiple?s.includes(e)?l.set(s.filter(m=>m!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Fn(t,"inherit"),height:t=>qe(6+Io(t)*2),paddingInline:t=>qe(Io(t)*3),border:"none",outline:"none",color:t=>re(t,"shift-9",r),backgroundColor:t=>re(t,"inherit",r),"&:hover:not([disabled]):not([aria-selected=true])":{backgroundColor:t=>re(t,"shift-2",r)},"&[aria-selected=true]":{backgroundColor:t=>re(t,"shift-6",o),color:t=>re(t,"shift-11")},"&:focus-visible":{outline:t=>`${qe(.5)} solid ${re(t,"shift-6",o)}`,outlineOffset:`-${qe(.5)}`}}}}import{toState as vt,merge as _o}from"@domphy/core";import{themeSpacing as Te,themeColor as Et,themeDensity as xt,themeSize as An}from"@domphy/theme";function fu(i){let{options:o=[],placement:r="bottom",color:e="neutral",open:n=!1,multiple:t=!1}=i,a=vt(i.value),l=vt(n),{show:s,hide:m,anchorPartial:c}=H({open:l,placement:vt(r),content:i.content}),u={onClick:()=>!t&&m()};_o(i.content,u);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,$:[Re({color:e,removable:t})],_key:g.value,_onRemove:E=>{let b=a.get(),Je=(Array.isArray(b)?b:[b]).filter(he=>he!==g.value);t?a.set(Je):a.set(Je[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Te(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()?m():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:h=>Te(6+xt(h)*2),minWidth:Te(32),outlineOffset:"-1px",outline:h=>`1px solid ${Et(h,"shift-4","neutral")}`,paddingInline:h=>Te(xt(h)*2),borderRadius:h=>Te(xt(h)*1),fontSize:h=>An(h,"inherit"),color:h=>Et(h,"shift-9",e),backgroundColor:h=>Et(h,"inherit",e)}};return _o(c,d),c}import{toState as Wn}from"@domphy/core";import{themeColor as kt,themeSize as Vo,themeSpacing as M}from"@domphy/theme";function Eu(i={}){var r;let o=Wn((r=i.accentColor)!=null?r:"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=>Vo(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:M(9),height:M(6),cursor:"pointer",margin:"0",paddingBlock:M(1),"&:checked":{"&::before":{backgroundColor:e=>kt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${M(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:M(3),height:M(3),borderRadius:M(999),left:M(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>kt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:M(999),display:"inline-block",fontSize:e=>Vo(e,"inherit"),lineHeight:1,backgroundColor:e=>kt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as Tt}from"@domphy/core";import{themeColor as ne,themeSize as jn,themeSpacing as T}from"@domphy/theme";function wu(i={}){var t,a;let{checked:o=!1}=i,r=Tt(o),e=Tt((t=i.color)!=null?t:"neutral","color"),n=Tt((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=>r.get(l),dataTone:"shift-2",onClick:()=>r.set(!r.get()),style:{position:"relative",display:"inline-flex",alignItems:"center",fontSize:l=>jn(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",n.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 Kn}from"@domphy/core";import{themeColor as qn,themeSize as Yn}from"@domphy/theme";function $u(i={}){var r;let o=Kn((r=i.color)!=null?r:"neutral","color");return{dataSize:"decrease-1",_onInsert:e=>{e.tagName!="small"&&console.warn('"small" primitive patch must use small tag')},style:{fontSize:e=>Yn(e,"inherit"),color:e=>qn(e,"shift-9",o.get(e))}}}import{toState as Gn}from"@domphy/core";import{themeColor as zo,themeSize as Un}from"@domphy/theme";function Bu(i={}){var r;let o=Gn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>Un(e,"inherit"),fontWeight:700,color:e=>zo(e,"shift-11",o.get(e)),backgroundColor:e=>zo(e)}}}import{toState as Xn}from"@domphy/core";import{themeColor as Jn,themeSize as Qn}from"@domphy/theme";function Yu(i={}){var r;let o=Xn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Qn(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Jn(e,"shift-9",o.get(e))}}}import{toState as Zn}from"@domphy/core";import{themeColor as ei,themeSize as ti}from"@domphy/theme";function ed(i={}){var r;let o=Zn((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>ti(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>ei(e,"shift-9",o.get(e))}}}import{toState as oi}from"@domphy/core";import{themeColor as _,themeDensity as ie,themeSpacing as ae,themeSize as $o}from"@domphy/theme";function nd(i={}){var r;let o=oi((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>$o(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=>$o(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 No}from"@domphy/core";import{themeColor as V,themeDensity as wt,themeSpacing as le,themeSize as ri}from"@domphy/theme";function ud(i={}){var n,t;let o=No((n=i.color)!=null?n:"neutral","color"),r=No((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(wt(a)*2),paddingBlock:a=>le(wt(a)*1.5),border:"none",borderRadius:a=>le(wt(a)*1.5),fontSize:a=>ri(a,"inherit"),color:a=>V(a,"shift-9",o.get(a)),outlineOffset:"-1px",outline:a=>`1px solid ${V(a,"shift-4",o.get(a))}`,backgroundColor:a=>V(a,"inherit",o.get(a)),"&::placeholder":{color:a=>V(a,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:a=>`${le(.5)} solid ${V(a,"shift-5",r.get(a))}`},"&:focus-visible":{outline:a=>`${le(.5)} solid ${V(a,"shift-6",r.get(a))}`},"&:invalid":{outline:a=>`${le(.5)} solid ${V(a,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:a=>V(a,"shift-8","neutral"),outline:a=>`1px solid ${V(a,"shift-4","neutral")}`,backgroundColor:a=>V(a,"shift-2","neutral")}}}}import{toState as ni}from"@domphy/core";import{themeColor as Ro,themeSize as ii,themeSpacing as ai}from"@domphy/theme";function bd(i={}){var r;let o=ni((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>ii(e,"inherit"),backgroundColor:e=>Ro(e),color:e=>Ro(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ai(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as li}from"@domphy/core";import{themeColor as Lo,themeSize as si,themeSpacing as ci}from"@domphy/theme";function Td(i={}){var r;let o=li((r=i.color)!=null?r:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>si(e,"inherit"),backgroundColor:e=>Lo(e),color:e=>Lo(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ci(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as mi}from"@domphy/core";import{themeColor as se,themeDensity as we,themeSize as ui,themeSpacing as ce}from"@domphy/theme";function di(i,o){if(o<=7)return Array.from({length:o},(t,a)=>a+1);let r=[1];i>3&&r.push("...");let e=Math.max(2,i-1),n=Math.min(o-1,i+1);for(let t=e;t<=n;t++)r.push(t);return i<o-2&&r.push("..."),r.push(o),r}function Id(i){var l;let{total:o,color:r="neutral",accentColor:e="primary"}=i,n=mi((l=i.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ce(6+we(s)*2),height:s=>ce(6+we(s)*2),paddingInline:s=>ce(we(s)*2),borderRadius:s=>ce(we(s)*1),border:"none",cursor:"pointer",fontSize:s=>ui(s,"inherit"),backgroundColor:"transparent",color:s=>se(s,"shift-9",r),"&:hover:not([disabled])":{backgroundColor:s=>se(s,"shift-2",r)},"&[disabled]":{opacity:.4,cursor:"not-allowed"}},a=Lt(Rt({},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 m={div:c=>{let u=n.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:u<=1,onClick:()=>u>1&&n.set(u-1),style:t});for(let d of di(u,o))if(d==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:h=>ce(we(h)*2),color:h=>se(h,"shift-7",r)}});else{let h=d===u;p.push({button:String(d),type:"button",ariaLabel:`Page ${d}`,ariaCurrent:h?"page":void 0,disabled:h,onClick:()=>n.set(d),style:h?a:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:u>=o,onClick:()=>u<o&&n.set(u+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:ce(1)}};s.children.insert(m)},style:{display:"inline-flex"}}}import{toState as hi}from"@domphy/core";import{themeColor as Ye,themeSize as pi,themeSpacing as fi}from"@domphy/theme";function Rd(i={}){var r;let o=hi((r=i.color)!=null?r:"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:fi(2),fontSize:e=>pi(e,"inherit"),backgroundColor:e=>Ye(e),color:e=>Ye(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ye(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ye(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as gi}from"@domphy/core";import{themeColor as Ge,themeDensity as yi,themeSize as bi,themeSpacing as Pe}from"@domphy/theme";var Mo={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},Si={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Pt=i=>i==="left"||i==="right";function Hd(i={}){let{color:o="neutral",open:r=!1,placement:e="right",size:n}=i,t=gi(r),a=Pt(e)?Pe(80):Pe(64),l=n!=null?n:a;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,m)=>{s.target===m.domElement&&t.set(!1)},onTransitionEnd:(s,m)=>{let c=m.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let m=s.domElement,c=p=>{p?(m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):m.style.transform=Mo[e]};c(t.get());let u=t.addListener(c);s.addHook("Remove",()=>{u(),document.body.style.overflow=""})},style:{transform:Mo[e],transition:"transform 0.25s ease",fontSize:s=>bi(s,"inherit"),color:s=>Ge(s,"shift-10",o),backgroundColor:s=>Ge(s,"inherit",o),border:"none",padding:s=>Pe(yi(s)*3),margin:Si[e],width:Pt(e)?l:"100dvw",height:Pt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Pe(4)} ${Pe(12)} ${Ge(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ge(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Do,merge as Ci}from"@domphy/core";function Yd(i){var p;let{open:o=!1,placement:r="bottom",openOn:e="click"}=i,n=null,t=Do(o),a=Do(r),{show:l,hide:s,anchorPartial:m}=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");n=h||d.nodeId,!h&&d.attributes.set("id",n)}};return(p=i.content).$||(p.$=[]),i.content.$.push(c),Ci(m,{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,v=n?f.querySelector(`#${CSS.escape(n)}`):null;y&&(v!=null&&v.contains(y))||s()},_onMount:d=>n&&d.attributes.set("ariaControls",n)}),m}import{toState as vi}from"@domphy/core";import{themeColor as Ot,themeDensity as It,themeSize as Ei,themeSpacing as Y}from"@domphy/theme";function Jd(i={}){let{position:o="top-center",color:r="neutral"}=i,e=vi(!1),n=o.startsWith("top"),t=o.endsWith("center"),a=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:n?"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 m=s.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=s.children.insert(l).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Y(32),pointerEvents:"auto",paddingBlock:s=>Y(It(s)*2),paddingInline:s=>Y(It(s)*4),borderRadius:s=>Y(It(s)*2),fontSize:s=>Ei(s,"inherit"),color:s=>Ot(s,"shift-9",r),backgroundColor:s=>Ot(s,"inherit",r),boxShadow:s=>`0 ${Y(2)} ${Y(9)} ${Ot(s,"shift-4","neutral")}`,opacity:s=>Number(e.get(s)),transform:s=>e.get(s)?"translateY(0)":n?"translateY(-100%)":"translateY(100%)",transition:"opacity 300ms ease, transform 300ms ease"},_onMount:()=>requestAnimationFrame(()=>e.set(!0)),_onBeforeRemove:(s,m)=>{let c=u=>{u.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),m())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as xi,toState as Ho}from"@domphy/core";import{themeSpacing as _t,themeColor as Bo,themeDensity as Vt,themeSize as ki}from"@domphy/theme";function ih(i={}){let{open:o=!1,placement:r="top",content:e="Tooltip Content"}=i,n=Ho(r),t=Ho(e),a=null,l={span:d=>t.get(d)},{show:s,hide:m,anchorPartial:c}=H({open:o,placement:n,content:l}),u={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=>_t(Vt(d)*1),paddingInline:d=>_t(Vt(d)*3),borderRadius:d=>_t(Vt(d)*1),color:d=>Bo(d,"shift-9"),backgroundColor:d=>Bo(d),fontSize:d=>ki(d,"inherit")},$:[Ut({placement:n,bordered:!1})]};return l.$||(l.$=[]),l.$.push(u),xi(c,{onMouseEnter:()=>s(),onMouseLeave:()=>m(),onFocus:()=>s(),onBlur:()=>m(),onKeyDown:d=>d.key==="Escape"&&m(),_onMount:d=>a&&d.attributes.set("ariaDescribedby",a)}),c}import{ElementNode as Fo}from"@domphy/core";function Ao(i,o){return i.key!==void 0&&i.key!==null?String(i.key):`index-${o}`}function ch(i={}){let{duration:o=300,delay:r=0}=i,e=new Map;return{_onBeforeUpdate:n=>{e=new Map,n.children.items.forEach((t,a)=>{if(!(t instanceof Fo))return;let l=t.domElement;l&&e.set(Ao(t,a),l.getBoundingClientRect())})},_onUpdate:n=>{n.children.items.forEach((t,a)=>{if(!(t instanceof Fo))return;let l=t.domElement;if(!l)return;let s=Ao(t,a),m=e.get(s);if(!m)return;let c=l.getBoundingClientRect(),u=m.left-c.left,p=m.top-c.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;let d=l.style.transition,h=l.style.transform;l.style.transition="none",l.style.transform=`translate(${u}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${r}ms`,l.style.transform="translate(0px, 0px)"});let y=()=>{l.style.transition=d,l.style.transform=h,l.removeEventListener("transitionend",f)},f=v=>{v.propertyName==="transform"&&y()};l.addEventListener("transitionend",f),setTimeout(y,o+r+34)}),e.clear()}}}import{merge as Ti}from"@domphy/core";import{toState as wi}from"@domphy/core";function fh(i={}){return{role:"tablist",_onSchedule:(r,e)=>{let n={_context:{tabs:{activeKey:wi(i.activeKey||0)}}};Ti(e,n)}}}import{themeSpacing as me,themeColor as ue,themeDensity as Wo,themeSize as Pi}from"@domphy/theme";function Sh(i={}){let{accentColor:o="primary",color:r="neutral"}=i;return{role:"tab",_onInsert:n=>{var m,c;n.tagName!="button"&&console.warn('"tab" patch must use button tag');let t=n.getContext("tabs");if(!t){console.warn('"tab" patch must be used inside a "tabs"');return}let a=(c=(m=n.parent)==null?void 0:m.children.items)!=null?c:[];a=a.filter(u=>u.type=="ElementNode"&&u.attributes.get("role")=="tab");let l=n.key!==null&&n.key!==void 0?n.key:a.findIndex(u=>u==n),s={id:"tab"+n.parent.nodeId+l,ariaControls:"tabpanel"+n.parent.nodeId+l,ariaSelected:u=>t.activeKey.get(u)==l,onClick:()=>t.activeKey.set(l),onKeyDown:u=>{var v,g,E,b;let p=u.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;u.preventDefault();let d=((g=(v=n.parent)==null?void 0:v.children.items)!=null?g:[]).filter(S=>S.type==="ElementNode"&&S.attributes.get("role")==="tab"),h=d.findIndex(S=>S===n),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((E=f.key)!=null?E:y),(b=f.domElement)==null||b.focus()}};n.merge(s)},style:{cursor:"pointer",fontSize:n=>Pi(n,"inherit"),height:n=>me(6+Wo(n)*2),paddingInline:n=>me(Wo(n)*4),border:"none",outline:"none",color:n=>ue(n,"shift-9"),backgroundColor:n=>ue(n,"inherit"),boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-1",r)}`,"&:hover:not([disabled])":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-2",r)}`},"&[aria-selected=true]:not([disabled])":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-6",o)}`},"&:focus-visible":{boxShadow:n=>`inset 0 -${me(.5)} 0 0 ${ue(n,"shift-6",o)}`}}}}import{themeSpacing as jo,themeDensity as Ko}from"@domphy/theme";function xh(){return{role:"tabpanel",style:{paddingBlock:o=>jo(Ko(o)*2),paddingInline:o=>jo(Ko(o)*2)},_onInsert:o=>{var a,l;let r=o.getContext("tabs");if(!r){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 n=o.key!==null&&o.key!==void 0?o.key:e.findIndex(s=>s==o),t={id:"tabpanel"+o.parent.nodeId+n,ariaLabelledby:"tab"+o.parent.nodeId+n,hidden:s=>r.activeKey.get(s)!=n};o.merge(t)}}}import{merge as Oi}from"@domphy/core";import{toState as Ii}from"@domphy/core";import{themeColor as _i,themeDensity as qo,themeSize as Vi,themeSpacing as Yo}from"@domphy/theme";function _h(i={}){let{color:o="neutral",selectable:r=!0}=i;return{role:"menu",dataTone:"shift-17",_onSchedule:(n,t)=>{var l;let a={_context:{menu:{activeKey:Ii((l=i.activeKey)!=null?l:null),selectable:r}}};Oi(t,a)},style:{display:"flex",flexDirection:"column",paddingBlock:n=>Yo(qo(n)*2),paddingInline:n=>Yo(qo(n)*2),fontSize:n=>Vi(n,"inherit"),backgroundColor:n=>_i(n,"inherit",o)}}}import{themeSpacing as Oe,themeColor as de,themeDensity as Go,themeSize as zi}from"@domphy/theme";function Nh(i={}){let{accentColor:o="primary",color:r="neutral"}=i;return{role:"menuitem",_onInsert:n=>{var s,m;n.tagName!="button"&&console.warn('"menuItem" patch must use button tag');let t=n.getContext("menu");if(!t){console.warn('"menuItem" patch must be used inside a "menu"');return}let a=(m=(s=n.parent)==null?void 0:s.children.items)!=null?m:[];a=a.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="menuitem");let l=n.key!==null&&n.key!==void 0?n.key:a.findIndex(c=>c==n);t.selectable&&(n.attributes.set("ariaCurrent",c=>t.activeKey.get(c)==l||void 0),n.addEvent("click",()=>t.activeKey.set(l)))},onKeyDown:(n,t)=>{var c,u,p,d;let a=n.key;if(a==="Enter"||a===" "){n.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(a))return;n.preventDefault();let l=((p=(u=t.parent)==null?void 0:u.children.items)!=null?p:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="menuitem"),s=l.findIndex(h=>h===t),m=s;a==="ArrowDown"?m=(s+1)%l.length:a==="ArrowUp"?m=(s-1+l.length)%l.length:a==="Home"?m=0:a==="End"&&(m=l.length-1),(d=l[m].domElement)==null||d.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:n=>Oe(2),width:"100%",fontSize:n=>zi(n,"inherit"),height:n=>Oe(6+Go(n)*2),paddingInline:n=>Oe(Go(n)*3),border:"none",outline:"none",color:n=>de(n,"shift-9"),backgroundColor:n=>de(n,"inherit"),"&:hover:not([disabled]):not([aria-current=true])":{backgroundColor:n=>de(n,"shift-2")},"&[aria-current=true]":{backgroundColor:n=>de(n,"shift-3",o),color:n=>de(n,"shift-10")},"&:focus-visible":{outline:n=>`${Oe(.5)} solid ${de(n,"shift-6",o)}`,outlineOffset:`-${Oe(.5)}`}}}}import{merge as $i}from"@domphy/core";function Dh(i){return{_onSchedule:(o,r)=>{$i(r,{_context:{form:i}})}}}function Bh(i,o){return{_onInsert:r=>{let e=r.getContext("form");if(!e){console.warn('"field" patch must be used inside a "form"');return}let n=e.setField(i,void 0,o),t=r.tagName,a=r.attributes.get("type");["input","select","textarea"].includes(t)||console.warn('"field" patch must use input, select, or textarea tag');let l={onBlur:()=>n.setTouched(),ariaInvalid:s=>!!n.message("error",s)||void 0,dataStatus:s=>n.status(s)};t==="input"&&a==="checkbox"?(l.checked=n.value(),l.onChange=s=>n.setValue(s.target.checked)):t==="input"&&a==="radio"?l.onChange=s=>n.setValue(s.target.value):t==="select"?(l.value=n.value(),l.onChange=s=>n.setValue(s.target.value)):t==="textarea"?(l.value=n.value(),l.onInput=s=>n.setValue(s.target.value)):(l.value=n.value(),l.onInput=s=>n.setValue(s.target.value)),r.merge(l)}}}import{Notifier as Ni}from"@domphy/core";function Ri(i){return!!i&&typeof i.then=="function"}var Xe=class{constructor(o,r){this._notifier=new Ni;this._messages={};this._touched=!1;this._pending=!1;this._validationToken=0;this._value=o,this._initValue=o,this._validator=r,r&&this.validate()}value(o){return o&&this._notifier.addListener("value",o),this._value}setValue(o){this._value=o,this._notifier.notify("value",o),this._notifier.notify("dirty",o!==this._initValue),this.validate()}dirty(o){return o&&this._notifier.addListener("dirty",o),this._value!==this._initValue}touched(o){return o&&this._notifier.addListener("touched",o),this._touched}setTouched(){this._touched||(this._touched=!0,this._notifier.notify("touched",!0))}configure(o,r){let e=!1;o!==void 0&&this._value===void 0&&this._initValue===void 0&&(this._value=o,this._initValue=o,this._notifier.notify("value",o),this._notifier.notify("dirty",!1),e=!0),r!==void 0&&r!==this._validator&&(this._validator=r,e=!0),e&&this.validate()}message(o,r){return r&&this._notifier.addListener(o,r),this._messages[o]}status(o){return o&&this._notifier.addListener("status",o),Ue(this._messages)}setMessages(o){let r=this._messages;this._messages=o;for(let e of["error","warning","success"])r[e]!==o[e]&&this._notifier.notify(e,o[e]);Ue(r)!==Ue(o)&&this._notifier.notify("status",Ue(o))}reset(){this._value=this._initValue,this._touched=!1,this._notifier.notify("value",this._value),this._notifier.notify("dirty",!1),this._notifier.notify("touched",!1),this.setMessages({}),this.validate()}validate(){let o=++this._validationToken;if(!this._validator){this._pending=!1,this.setMessages({});return}try{let r=this._validator(this._value);Ri(r)?(this._pending=!0,Promise.resolve(r).then(e=>{o===this._validationToken&&(this._pending=!1,this.setMessages(e!=null?e:{}))}).catch(e=>{o===this._validationToken&&(this._pending=!1,console.error(e))})):(this._pending=!1,this.setMessages(r!=null?r:{}))}catch(r){o===this._validationToken&&(this._pending=!1),console.error(r)}}_dispose(){this._validationToken+=1,this._pending=!1,this._notifier._dispose()}};function Ue(i){if(i.error)return"error";if(i.warning)return"warning";if(i.success)return"success"}var Uo=class{constructor(){this.fields=new Map}setField(o,r,e){let n=this.fields.get(o);return n?n.configure(r,e):(n=new Xe(r,e),this.fields.set(o,n)),n}getField(o){return this.setField(o)}removeField(o){var r;(r=this.fields.get(o))==null||r._dispose(),this.fields.delete(o)}get valid(){for(let o of this.fields.values())if(o._pending||o._messages.error)return!1;return!0}reset(){for(let o of this.fields.values())o.reset()}snapshot(){let o={};for(let[r,e]of this.fields)Li(o,r,e._value);return o}_dispose(){for(let o of this.fields.values())o._dispose();this.fields.clear()}};function Li(i,o,r){let e=o.split("."),n=i;for(let t=0;t<e.length-1;t++){let a=e[t];n[a]==null&&(n[a]=isNaN(Number(e[t+1]))?{}:[]),n=n[a]}n[e[e.length-1]]=r}export{Xe as FieldState,Uo as FormState,ji as abbreviation,ka as alert,Ia as avatar,Na as badge,Sl as blockquote,Ha as breadcrumb,ja as breadcrumbEllipsis,xl as button,wu as buttonSwitch,Ui as card,Ml as code,ll as combobox,ia as command,la as commandItem,aa as commandSearch,Jl as descriptionList,jl as details,os as dialog,Rd as divider,Hd as drawer,cs as emphasis,Bh as field,gs as figure,Dh as form,vs as formGroup,Os as heading,Rs as horizontalRule,Ys as icon,As as image,_l as inputCheckbox,Zs as inputColor,ac as inputDateTime,hc as inputFile,Fc as inputNumber,Sa as inputOTP,Wm as inputRadio,Nc as inputRange,Cc as inputSearch,Eu as inputSwitch,Pc as inputText,Gc as keyboard,tm as label,lm as link,pm as mark,_h as menu,Nh as menuItem,Td as orderedList,Id as pagination,Em as paragraph,Yd as popover,Ut as popoverArrow,Im as preformated,Lm as progress,qm as select,fu as selectBox,cu as selectItem,iu as selectList,Xm as skeleton,$u as small,eu as spinner,Zi as splitter,ta as splitterHandle,ea as splitterPanel,Bu as strong,Yu as subscript,ed as superscript,Sh as tab,xh as tabPanel,nd as table,fh as tabs,Re as tag,ud as textarea,Jd as toast,ua as toggle,ga as toggleGroup,ih as tooltip,ch as transitionGroup,bd as unorderedList};
|
|
1
|
+
var Go=Object.defineProperty,Uo=Object.defineProperties;var Xo=Object.getOwnPropertyDescriptors;var $t=Object.getOwnPropertySymbols;var Jo=Object.prototype.hasOwnProperty,Qo=Object.prototype.propertyIsEnumerable;var Vt=(a,o,n)=>o in a?Go(a,o,{enumerable:!0,configurable:!0,writable:!0,value:n}):a[o]=n,_t=(a,o)=>{for(var n in o||(o={}))Jo.call(o,n)&&Vt(a,n,o[n]);if($t)for(var n of $t(o))Qo.call(o,n)&&Vt(a,n,o[n]);return a},Nt=(a,o)=>Uo(a,Xo(o));import{toState as Rt}from"@domphy/core";import{themeColor as pe,themeSize as Zo,themeSpacing as er}from"@domphy/theme";function Li(a={}){var e,r;let o=Rt((e=a.color)!=null?e:"neutral","color"),n=Rt((r=a.accentColor)!=null?r:"primary","accentColor");return{_onInsert:t=>{t.tagName!="abbr"&&console.warn('"abbreviation" primitive patch must use abbr tag')},style:{fontSize:t=>Zo(t),backgroundColor:t=>pe(t),color:t=>pe(t,"shift-10",o.get(t)),textDecorationLine:"underline",textDecorationStyle:"dotted",textDecorationColor:t=>pe(t,"shift-7",o.get(t)),textUnderlineOffset:er(.72),cursor:"help","&:hover":{color:t=>pe(t,"shift-11",n.get(t)),textDecorationColor:t=>pe(t,"shift-9",n.get(t))}}}}import{toState as tr}from"@domphy/core";import{themeColor as X,themeDensity as M,themeSpacing as V}from"@domphy/theme";function Wi(a={}){var n;let o=tr((n=a.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(M(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(M(e)*2),paddingInline:e=>V(M(e)*4),fontWeight:"600",margin:0},"& > p":{gridArea:"desc",paddingInline:e=>V(M(e)*4),color:e=>X(e,"shift-9",o.get(e)),margin:0},"& > aside":{gridArea:"aside",alignSelf:"center",padding:e=>V(M(e)*2),height:"auto"},"& > div":{gridArea:"content",padding:e=>V(M(e)*4),color:e=>X(e,"shift-10",o.get(e))},"& > footer":{gridArea:"footer",display:"flex",gap:V(2),paddingBlock:e=>V(M(e)*2),paddingInline:e=>V(M(e)*4),borderTop:e=>`1px solid ${X(e,"shift-3",o.get(e))}`}}}}import{merge as or,toState as rr}from"@domphy/core";import{themeColor as Xe,themeSpacing as nr}from"@domphy/theme";function qi(a={}){let{direction:o="horizontal",defaultSize:n=50,min:e=10,max:r=90}=a;return{_onSchedule:(t,i)=>{or(i,{_context:{splitter:{direction:o,size:rr(n),min:e,max:r}}})},style:{display:"flex",flexDirection:o==="horizontal"?"row":"column",overflow:"hidden"}}}function Yi(){return{_onMount:a=>{let o=a.getContext("splitter");if(!o){console.warn('"splitterPanel" patch must be used inside a "splitter"');return}let n=a.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}%`});a.addHook("Remove",r)}}}function Gi(){return{_onMount:a=>{let o=a.getContext("splitter");if(!o){console.warn('"splitterHandle" patch must be used inside a "splitter"');return}let n=a.domElement,e=o.direction==="horizontal";n.style.cursor=e?"col-resize":"row-resize";let r=t=>{t.preventDefault();let i=n.parentElement,l=m=>{let c=i.getBoundingClientRect(),u=e?(m.clientX-c.left)/c.width*100:(m.clientY-c.top)/c.height*100;o.size.set(Math.min(Math.max(u,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),a.addHook("Remove",()=>n.removeEventListener("mousedown",r))},style:{flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:a=>Xe(a,"shift-2"),"&:hover":{backgroundColor:a=>Xe(a,"shift-3")},"&::after":{content:'""',borderRadius:nr(999),backgroundColor:a=>Xe(a,"shift-4")}}}}import{merge as ir,toState as ar}from"@domphy/core";import{themeColor as _,themeDensity as Ie,themeSize as Dt,themeSpacing as J}from"@domphy/theme";function Qi(){return{_onSchedule:(a,o)=>{ir(o,{_context:{command:{query:ar("")}}})},style:{display:"flex",flexDirection:"column",overflow:"hidden"}}}function Zi(a={}){let{color:o="neutral",accentColor:n="primary"}=a;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,i=()=>r.query.set(t.value);t.addEventListener("input",i),e.addHook("Remove",()=>t.removeEventListener("input",i))},style:{fontFamily:"inherit",fontSize:e=>Dt(e,"inherit"),paddingInline:e=>J(Ie(e)*3),paddingBlock:e=>J(Ie(e)*2),border:"none",borderBottom:e=>`1px solid ${_(e,"shift-3",o)}`,outline:"none",color:e=>_(e,"shift-10",o),backgroundColor:e=>_(e,"inherit",o),"&::placeholder":{color:e=>_(e,"shift-7")},"&:focus-visible":{borderBottomColor:e=>_(e,"shift-6",n)}}}}function ea(a={}){let{color:o="neutral",accentColor:n="primary"}=a;return{role:"option",_onMount:e=>{var s,m;let r=e.getContext("command");if(!r){console.warn('"commandItem" patch must be used inside a "command"');return}let t=e.domElement,i=(m=(s=t.textContent)==null?void 0:s.toLowerCase())!=null?m:"",l=r.query.addListener(c=>{t.hidden=c.length>0&&!i.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+Ie(e)*2),paddingInline:e=>J(Ie(e)*3),border:"none",outline:"none",color:e=>_(e,"shift-9",o),backgroundColor:e=>_(e,"inherit",o),"&:hover:not([disabled])":{backgroundColor:e=>_(e,"shift-2",o)},"&:focus-visible":{outline:e=>`${J(.5)} solid ${_(e,"shift-6",n)}`,outlineOffset:`-${J(.5)}`}}}}import{toState as Lt}from"@domphy/core";import{themeColor as Q,themeSize as lr,themeSpacing as Z}from"@domphy/theme";function na(a={}){var e,r;let o=Lt((e=a.color)!=null?e:"neutral","color"),n=Lt((r=a.accentColor)!=null?r:"primary","accentColor");return{role:"button",_onInsert:t=>{var c,u;t.tagName!=="button"&&console.warn('"toggle" patch must use button tag');let i=t.getContext("toggleGroup");if(!i){console.warn('"toggle" patch must be used inside a "toggleGroup"');return}let s=((u=(c=t.parent)==null?void 0:c.children.items)!=null?u:[]).filter(p=>p.type==="ElementNode"&&p.attributes.get("role")==="button"),m=t.key!==null&&t.key!==void 0?String(t.key):String(s.findIndex(p=>p===t));t.attributes.set("ariaPressed",p=>{let d=i.value.get(p);return Array.isArray(d)?d.includes(m):d===m}),t.addEvent("click",()=>{let p=i.value.get();if(i.multiple){let d=Array.isArray(p)?[...p]:[];i.value.set(d.includes(m)?d.filter(h=>h!==m):[...d,m])}else i.value.set(p===m?"":m)})},style:{cursor:"pointer",fontSize:t=>lr(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 sr}from"@domphy/core";import{themeSpacing as ze,themeColor as Mt,themeSize as cr}from"@domphy/theme";function ca(a={}){var e;let{multiple:o=!1,color:n="neutral"}=a;return{role:"group",_context:{toggleGroup:{value:sr((e=a.value)!=null?e:o?[]:""),multiple:o}},style:{display:"flex",paddingBlock:ze(1),paddingInline:ze(1),gap:ze(1),borderRadius:ze(2),fontSize:r=>cr(r,"inherit"),backgroundColor:r=>Mt(r,"inherit",n),outline:r=>`1px solid ${Mt(r,"shift-3",n)}`,outlineOffset:"-1px"}}}import{themeSpacing as Ht}from"@domphy/theme";function da(){return{style:{display:"flex",alignItems:"center",gap:Ht(2),"& > *":{minWidth:Ht(9)+"!important"}},_onMount:a=>{let o=a.domElement,n=()=>Array.from(o.querySelectorAll("input")),e=i=>{let l=n(),s=i.target,m=l.indexOf(s);s.value&&m<l.length-1&&l[m+1].focus()},r=i=>{let l=n(),s=i.target,m=l.indexOf(s);i.key==="Backspace"&&!s.value&&m>0&&l[m-1].focus(),i.key==="ArrowLeft"&&m>0&&l[m-1].focus(),i.key==="ArrowRight"&&m<l.length-1&&l[m+1].focus()},t=i=>{var u,p,d;i.preventDefault();let l=(p=(u=i.clipboardData)==null?void 0:u.getData("text"))!=null?p:"",s=n(),m=s.indexOf(i.target);[...l].forEach((h,b)=>{s[m+b]&&(s[m+b].value=h)});let c=Math.min(m+l.length-1,s.length-1);(d=s[c])==null||d.focus()};o.addEventListener("input",e),o.addEventListener("keydown",r),o.addEventListener("paste",t),a.addHook("Remove",()=>{o.removeEventListener("input",e),o.removeEventListener("keydown",r),o.removeEventListener("paste",t)})}}}import{toState as mr}from"@domphy/core";import{themeColor as Je,themeDensity as Bt,themeSize as ur,themeSpacing as $e}from"@domphy/theme";function ba(a={}){var n;let o=mr((n=a.color)!=null?n:"primary","color");return{role:"alert",dataTone:"shift-2",style:{display:"flex",alignItems:"flex-start",gap:$e(3),paddingBlock:e=>$e(Bt(e)*2),paddingInline:e=>$e(Bt(e)*4),boxShadow:e=>`inset ${$e(1)} 0 0 0 ${Je(e,"shift-8",o.get(e))}`,backgroundColor:e=>Je(e,"inherit",o.get(e)),color:e=>Je(e,"shift-10",o.get(e)),fontSize:e=>ur(e,"inherit")}}}import{toState as dr}from"@domphy/core";import{themeColor as At,themeSize as hr,themeSpacing as Wt}from"@domphy/theme";function va(a={}){var n;let o=dr((n=a.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=>hr(e,"inherit"),fontWeight:"600",userSelect:"none",backgroundColor:e=>At(e,"inherit",o.get(e)),color:e=>At(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 Qe,themeColor as jt,themeSize as pr}from"@domphy/theme";function Pa(a={}){var r;let{label:o=999}=a,n=Ft(o),e=Ft((r=a.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:Qe(1),minWidth:Qe(6),display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:t=>pr(t,"decrease-1"),borderRadius:Qe(999),backgroundColor:t=>jt(t,"shift-9",e.get(t)),color:t=>jt(t,"shift-0",e.get(t))}}}}import{toState as fr}from"@domphy/core";import{themeColor as fe,themeSize as gr,themeSpacing as Kt}from"@domphy/theme";function Va(a={}){var e;let{separator:o="/"}=a,n=fr((e=a.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=>gr(r,"inherit"),gap:Kt(1),color:r=>fe(r,"shift-9",n.get(r)),backgroundColor:r=>fe(r,"inherit",n.get(r)),"& > *":{display:"inline-flex",alignItems:"center",color:r=>fe(r,"shift-8",n.get(r))},"& > *:not(:last-child)::after":{content:`"${o}"`,color:r=>fe(r,"shift-4",n.get(r)),paddingInlineStart:Kt(1)},"& > [aria-current=page]":{color:r=>fe(r,"shift-10",n.get(r)),pointerEvents:"none"}}}}import{toState as br}from"@domphy/core";import{themeColor as Ve,themeSize as yr,themeSpacing as _e}from"@domphy/theme";function La(a={}){var n;let o=br((n=a.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=>yr(e,"inherit"),paddingInline:_e(1),border:"none",background:"none",cursor:"pointer",color:e=>Ve(e,"shift-8",o.get(e)),borderRadius:_e(1),"&:hover":{color:e=>Ve(e,"shift-10",o.get(e)),backgroundColor:e=>Ve(e,"shift-2",o.get(e))},"&:focus-visible":{outline:e=>`${_e(.5)} solid ${Ve(e,"shift-6",o.get(e))}`,outlineOffset:_e(.5)}}}}import{toState as Ze,merge as et}from"@domphy/core";import{themeSpacing as G,themeColor as ge,themeDensity as tt,themeSize as qt}from"@domphy/theme";import{toState as Sr}from"@domphy/core";import{themeColor as Ne,themeSize as Cr,themeSpacing as N}from"@domphy/theme";var Er='<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 Re(a={}){var e;let{removable:o=!1}=a,n=Sr((e=a.color)!=null?e:"neutral","color");return{dataTone:"shift-2",_onInit:r=>{let t={span:Er,onClick:i=>{i.stopPropagation(),r.remove()},style:{display:"inline-flex",alignItems:"center",cursor:"pointer",borderRadius:N(1),width:N(4),height:N(4),flexShrink:0,"&:hover":{backgroundColor:i=>Ne(i,"shift-4",n.get(i))}}};o&&r.children.insert(t)},style:{display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",height:N(6),paddingBlock:"0px",borderRadius:N(1),paddingInlineStart:N(2),paddingInlineEnd:o?N(1):N(2),gap:N(2),fontSize:r=>Cr(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 vr,merge as xr}from"@domphy/core";import{computePosition as kr,autoUpdate as Tr,offset as wr,flip as Pr,shift as Or}from"@floating-ui/dom";function H(a){let{open:o=!1,placement:n}=a,e=null,r=null,t=null,i=null,l=null,s=null,m=!1,c=vr(o),u=()=>{m||!s||(m=!0,l=s.children.insert(a.content))},p=()=>{u(),t&&i&&(r&&r(),r=Tr(t,i,()=>{kr(t,i,{placement:n.get(),middleware:[wr(12),Pr(),Or()],strategy:"fixed"}).then(({x:g,y:v,placement:y})=>{Object.assign(i.style,{left:`${g}px`,top:`${v}px`}),n.set(y)})}),c.set(!0))},d=()=>{r&&r(),r=null,c.set(!1)},h=()=>{e&&clearTimeout(e),e=setTimeout(p,100)},b=()=>{e&&clearTimeout(e),e=setTimeout(d,100)},f={style:{position:"fixed",pointerEvents:"auto",visibility:g=>c.get(g)?"visible":"hidden"},_onMount:g=>i=g.domElement,_portal:g=>{let v=g.domElement.querySelector("#domphy-floating");if(!v){let y={div:[],id:"domphy-floating",style:{position:"fixed",inset:0,zIndex:20,pointerEvents:"none"}};v=g.children.insert(y).domElement}return v}};return xr(a.content,f),{show:h,hide:b,anchorPartial:{onKeyDown:g=>g.key==="Escape"&&b(),_onMount:g=>{s=g.getRoot(),t=g.domElement;let v=y=>{if(!c.get()||!t||!i)return;let S=y.target;!t.contains(S)&&!i.contains(S)&&b()};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 el(a){let{options:o=[],placement:n="bottom",color:e="neutral",open:r=!1,multiple:t=!1}=a,i=Ze(a.value),l=Ze(r),{show:s,hide:m,anchorPartial:c}=H({open:l,placement:Ze(n),content:a.content}),u={onClick:()=>!t&&m()};et(a.content,u);let p={border:"none",outline:"none",padding:0,margin:0,flex:1,height:G(6),marginInlineStart:G(2),fontSize:f=>qt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)},d;a.input?(et(a.input,{onFocus:()=>s(),style:p,_key:"combobox-input"}),d=a.input):d={input:null,onFocus:()=>s(),value:f=>(i.get(f),""),style:p,_key:"combobox-input"};let h={div:f=>{let E=i.get(f),g=Array.isArray(E)?E:[E],y=o.filter(S=>g.includes(S.value)).map(S=>({span:S.label,$:[Re({color:e,removable:!0})],_key:S.value,_onRemove:Ue=>{let he=i.get(),zt=(Array.isArray(he)?he:[he]).filter(Yo=>Yo!==S.value);t?i.set(zt):i.set(zt[0])}}));return y.push(d),y},style:{display:"flex",flexWrap:"wrap",gap:G(1)}},b={_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 ${ge(f,"shift-4","neutral")}`,paddingBlock:f=>G(tt(f)*1),paddingInline:f=>G(tt(f)*1),borderRadius:f=>G(tt(f)*1),fontSize:f=>qt(f,"inherit"),color:f=>ge(f,"shift-9",e),backgroundColor:f=>ge(f,"inherit",e)}};return et(c,b),c}import{toState as Ir}from"@domphy/core";import{themeSpacing as ot,themeColor as De,themeSize as zr}from"@domphy/theme";function Yt(a={}){let{placement:o="bottom-end",color:n="neutral",sideOffset:e=ot(6),bordered:r=!0}=a,t=Ir(o),i={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 u;return(u=i[t.get(c)])!=null?u:i["bottom-end"]},s=c=>c.includes("start")?e:c.includes("end")?"auto":"50%",m=c=>c.includes("end")?e:c.includes("start")?"auto":"50%";return{style:{fontSize:c=>zr(c),backgroundColor:c=>De(c),color:c=>De(c,"shift-9",n),position:"relative","&::after":{content:'""',position:"absolute",width:ot(1.5),height:ot(1.5),backgroundColor:c=>De(c,"inherit",n),borderWidth:r?"1px":"0px",borderColor:c=>De(c,"inherit",n),borderTopStyle:c=>{let u=l(c);return u.includes("top")||u.includes("right")?"solid":"none"},borderBottomStyle:c=>{let u=l(c);return u.includes("bottom")||u.includes("left")?"solid":"none"},borderLeftStyle:c=>{let u=l(c);return u.includes("top")||u.includes("left")?"solid":"none"},borderRightStyle:c=>{let u=l(c);return u.includes("bottom")||u.includes("right")?"solid":"none"},top:c=>{let u=l(c);return u.includes("top")?0:u.includes("bottom")?"auto":s(u)},right:c=>{let u=l(c);return u.includes("right")?0:u.includes("left")?"auto":m(u)},bottom:c=>{let u=l(c);return u.includes("bottom")?0:u.includes("top")?"auto":m(u)},left:c=>{let u=l(c);return u.includes("left")?0:u.includes("right")?"auto":s(u)},transform:c=>{let u=l(c),p=u.includes("right")||u.includes("end")&&!u.includes("left")?"50%":"-50%",d=u.includes("bottom")||u.includes("end")&&!u.includes("top")?"50%":"-50%";return`translate(${p},${d}) rotate(45deg)`}}}}}import{toState as $r}from"@domphy/core";import{themeSpacing as rt,themeColor as Gt,themeDensity as Ut,themeSize as Vr}from"@domphy/theme";function dl(a={}){var n;let o=$r((n=a.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=>Vr(e,"inherit"),backgroundColor:e=>Gt(e,"inherit",o.get(e)),boxShadow:e=>`inset ${rt(1)} 0 0 0 ${Gt(e,"shift-4",o.get(e))}`,border:"none",paddingBlock:e=>rt(Ut(e)*2),paddingInline:e=>rt(Ut(e)*4),margin:0}}}import{toState as _r}from"@domphy/core";import{themeColor as R,themeDensity as Le,themeSize as Nr,themeSpacing as be}from"@domphy/theme";function gl(a={}){var n;let o=_r((n=a.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=>Nr(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 ${R(e,"shift-4",o.get(e))}`,color:e=>R(e,"shift-9",o.get(e)),backgroundColor:e=>R(e,"inherit",o.get(e)),"&:hover:not([disabled]):not([aria-busy=true])":{color:e=>R(e,"shift-10",o.get(e)),backgroundColor:e=>R(e,"shift-2",o.get(e))},"&:focus-visible":{boxShadow:e=>`inset 0 0 0 ${be(.5)} ${R(e,"shift-6",o.get(e))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:e=>R(e,"shift-2","neutral"),outline:e=>`1px solid ${R(e,"shift-4","neutral")}`,color:e=>R(e,"shift-8","neutral")},"&[aria-busy=true]":{opacity:.7,cursor:"wait",pointerEvents:"none"}}}}import{toState as Xt}from"@domphy/core";import{themeColor as x,themeSpacing as B,themeSize as Rr}from"@domphy/theme";function xl(a={}){var e,r;let o=Xt((e=a.color)!=null?e:"neutral","color"),n=Xt((r=a.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=>Rr(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 Dr}from"@domphy/core";import{themeSpacing as nt,themeColor as Jt,themeSize as Lr}from"@domphy/theme";function zl(a={}){var n;let o=Dr((n=a.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=>Lr(e,"inherit"),color:e=>Jt(e,"shift-9",o.get(e)),backgroundColor:e=>Jt(e,"inherit",o.get(e)),height:nt(6),paddingInline:nt(1.5),borderRadius:nt(1)}}}import{toState as Qt}from"@domphy/core";import{themeColor as A,themeDensity as ye,themeSize as Zt,themeSpacing as C}from"@domphy/theme";function Ll(a={}){var r,t;let{duration:o=240}=a,n=Qt((r=a.color)!=null?r:"neutral","color"),e=Qt((t=a.accentColor)!=null?t:"primary","accentColor");return{_onInsert:i=>{i.tagName!="details"&&console.warn('"details" primitive patch must use details tag')},style:{fontSize:i=>Zt(i,"inherit"),color:i=>A(i,"shift-9",n.get(i)),backgroundColor:i=>A(i,"inherit",n.get(i)),overflow:"hidden","& > summary":{backgroundColor:i=>A(i,"shift-2",n.get(i)),color:i=>A(i,"shift-10",n.get(i)),fontSize:i=>Zt(i,"inherit"),listStyle:"none",display:"flex",justifyContent:"space-between",alignItems:"center",gap:C(2),cursor:"pointer",userSelect:"none",fontWeight:500,paddingInline:i=>C(ye(i)*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:i=>`${C(.5)} solid ${A(i,"shift-9",n.get(i))}`,borderBottom:i=>`${C(.5)} solid ${A(i,"shift-9",n.get(i))}`,transform:"rotate(45deg)",transition:`transform ${o}ms ease`},"&[open] > summary::after":{transform:"rotate(-135deg)"},"& > summary:hover":{backgroundColor:i=>A(i,"shift-3",n.get(i))},"& > summary:focus-visible":{borderRadius:i=>C(ye(i)*2),outlineOffset:`-${C(.5)}`,outline:i=>`${C(.5)} solid ${A(i,"shift-6",e.get(i))}`},"& > :not(summary)":{maxHeight:"0px",opacity:0,overflow:"hidden",paddingInline:i=>C(ye(i)*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:i=>C(ye(i)*1),paddingBottom:i=>C(ye(i)*3)}}}}import{toState as Mr}from"@domphy/core";import{themeColor as eo,themeSpacing as to,themeSize as oo}from"@domphy/theme";function jl(a={}){var n;let o=Mr((n=a.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(${to(24)}, max-content) 1fr`,columnGap:to(4),margin:0,"& dt":{margin:0,fontWeight:600,fontSize:e=>oo(e,"inherit"),color:e=>eo(e,"shift-10",o.get(e))},"& dd":{margin:0,fontSize:e=>oo(e,"inherit"),color:e=>eo(e,"shift-9",o.get(e))}}}}import{toState as Hr}from"@domphy/core";import{themeColor as Me,themeDensity as Br,themeSize as Ar,themeSpacing as it}from"@domphy/theme";function Ul(a={}){let{color:o="neutral",open:n=!1}=a,e=Hr(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 i=t.domElement.getBoundingClientRect();r.clientX>=i.left&&r.clientX<=i.right&&r.clientY>=i.top&&r.clientY<=i.bottom||e.set(!1)},onTransitionEnd:(r,t)=>{let i=t.domElement;i.style.opacity==="0"&&(i.close(),document.body.style.overflow="")},_onMount:r=>{let t=r.domElement,i=s=>{s?(t.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{t.style.opacity="1";let m=t.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');m==null||m.focus()})):t.style.opacity="0"};i(e.get());let l=e.addListener(i);r.addHook("Remove",()=>{l(),document.body.style.overflow=""})},style:{opacity:"0",transition:"opacity 200ms ease",fontSize:r=>Ar(r,"inherit"),color:r=>Me(r,"shift-10",o),backgroundColor:r=>Me(r,"inherit",o),border:"none",padding:r=>it(Br(r)*3),boxShadow:r=>`0 ${it(9)} ${it(16)} ${Me(r,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:r=>Me(r,"shift-2","neutral"),opacity:.75}}}}import{toState as Wr}from"@domphy/core";import{themeColor as Fr,themeSize as jr}from"@domphy/theme";function os(a={}){var n;let o=Wr((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="em"&&console.warn('"emphasis" primitive patch must use em tag')},style:{fontSize:e=>jr(e,"inherit"),fontStyle:"italic",color:e=>Fr(e,"shift-10",o.get(e))}}}import{toState as Kr}from"@domphy/core";import{themeColor as ro,themeSize as qr,themeSpacing as He}from"@domphy/theme";function cs(a={}){var n;let o=Kr((n=a.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:He(2),marginInline:0,marginTop:He(3),marginBottom:He(3),color:e=>ro(e,"shift-9",o.get(e)),"& img, & svg, & video, & canvas":{display:"block",maxWidth:"100%",borderRadius:He(2)},"& figcaption":{fontSize:e=>qr(e,"decrease-1"),color:e=>ro(e,"shift-8",o.get(e)),lineHeight:1.45}}}}import{toState as Yr}from"@domphy/core";import{themeColor as Be,themeDensity as ee,themeSpacing as D,themeSize as at}from"@domphy/theme";function ps(a={}){var r;let{layout:o="horizontal"}=a,n=Yr((r=a.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=>D(ee(t)*3),paddingBlock:t=>D(ee(t)*3),border:"none",borderRadius:t=>D(ee(t)*2),fontSize:t=>at(t,"inherit"),backgroundColor:t=>Be(t,"inherit",n.get(t)),display:"grid",gridTemplateColumns:e?"minmax(0, 1fr)":"max-content minmax(0, 1fr)",columnGap:D(4),rowGap:D(3),alignItems:"start","& > legend":{gridColumn:"1 / -1",margin:0,fontSize:t=>at(t,"inherit"),fontWeight:600,paddingBlock:t=>D(ee(t)*1),borderRadius:t=>D(ee(t)*2),color:t=>Be(t,"shift-9",n.get(t)),backgroundColor:t=>Be(t,"inherit",n.get(t))},"& > label":{gridColumn:"1",alignSelf:"start",margin:0,paddingBlock:t=>e?"0px":D(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(${D(2)} * -1)`,fontSize:t=>at(t,"decrease-1"),color:t=>Be(t,"shift-9",n.get(t))}}}}import{toState as Gr}from"@domphy/core";import{themeColor as Ur,themeSize as Xr,themeSpacing as Jr}from"@domphy/theme";var Qr={h6:"decrease-1",h5:"inherit",h4:"increase-1",h3:"increase-2",h2:"increase-3",h1:"increase-4"};function Es(a={}){var n;let o=Gr((n=a.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=>Ur(e,"shift-11",o.get(e)),marginTop:0,marginBottom:Jr(2),fontSize:e=>{let r=Qr[e.elementNode.tagName]||"inherit";return Xr(e,r)}}}}import{toState as Zr}from"@domphy/core";import{themeColor as en,themeSpacing as no}from"@domphy/theme";function Os(a={}){var n;let o=Zr((n=a.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:no(3),marginBottom:no(3),backgroundColor:e=>en(e,"shift-4",o.get(e))}}}import{toState as tn}from"@domphy/core";import{themeColor as on,themeSpacing as rn}from"@domphy/theme";function Rs(a={}){var n;let o=tn((n=a.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:rn(2),backgroundColor:e=>on(e,"inherit",o.get(e))}}}import{toState as nn}from"@domphy/core";import{themeSpacing as io,themeColor as an,themeSize as ln}from"@domphy/theme";function Bs(a={}){var n;let o=nn((n=a.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:io(4),height:io(4),flexShrink:"0",fontSize:e=>ln(e),backgroundColor:"transparent",color:e=>an(e,"shift-9",o.get(e))}}}import{toState as ao}from"@domphy/core";import{themeColor as lo,themeDensity as Se,themeSpacing as Ce,themeSize as sn}from"@domphy/theme";function qs(a={}){var e,r;let o=ao((e=a.color)!=null?e:"neutral","color"),n=ao((r=a.accentColor)!=null?r:"primary","accentColor");return{type:"color",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputColor" primitive patch must use input tag'),i.type="color"},style:{appearance:"none",border:"none",cursor:"pointer",fontSize:t=>sn(t,"inherit"),paddingBlock:t=>Ce(Se(t)*1),paddingInline:t=>Ce(Se(t)*1),blockSize:t=>Ce(6+Se(t)*2),inlineSize:t=>Ce(6+Se(t)*2),backgroundColor:"transparent","&::-webkit-color-swatch-wrapper":{margin:0,padding:0},"&::-webkit-color-swatch":{borderRadius:t=>Ce(Se(t)*1)},"&:hover:not([disabled]), &:focus-visible":{},"&[disabled]":{opacity:.7,cursor:"not-allowed",backgroundColor:t=>lo(t,"shift-2","neutral"),outline:t=>`1px solid ${lo(t,"shift-4","neutral")}`}}}}import{toState as so}from"@domphy/core";import{themeColor as W,themeDensity as lt,themeSpacing as Ee,themeSize as cn}from"@domphy/theme";function Zs(a={}){var r,t;let{mode:o="datetime-local"}=a,n=so((r=a.color)!=null?r:"neutral","color"),e=so((t=a.accentColor)!=null?t:"primary","accentColor");return{type:o,_onSchedule:(i,l)=>{i.tagName!="input"&&console.warn('"inputDateTime" primitive patch must use input tag'),l.type=o},style:{fontFamily:"inherit",fontSize:i=>cn(i,"inherit"),lineHeight:"inherit",color:i=>W(i,"shift-9",n.get(i)),backgroundColor:i=>W(i,"inherit",n.get(i)),border:"none",outlineOffset:"-1px",outline:i=>`1px solid ${W(i,"shift-4",n.get(i))}`,borderRadius:i=>Ee(lt(i)*1),paddingInline:i=>Ee(lt(i)*3),height:i=>Ee(6+lt(i)*2),"&::-webkit-calendar-picker-indicator":{cursor:"pointer",opacity:.85},"&:hover:not([disabled]):not([aria-busy=true]), &:focus-visible":{outline:i=>`${Ee(.5)} solid ${W(i,"shift-6",e.get(i))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>W(i,"shift-8","neutral"),backgroundColor:i=>W(i,"shift-2","neutral"),outline:i=>`1px solid ${W(i,"shift-4","neutral")}`},"&:invalid":{outline:i=>`${Ee(.5)} solid ${W(i,"shift-6","error")}`}}}}import{toState as co}from"@domphy/core";import{themeColor as w,themeDensity as Ae,themeSpacing as F,themeSize as mn}from"@domphy/theme";function ac(a={}){var e,r;let o=co((e=a.color)!=null?e:"neutral","color"),n=co((r=a.accentColor)!=null?r:"primary","accentColor");return{type:"file",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputFile" primitive patch must use input tag'),i.type="file"},style:{display:"inline-flex",alignItems:"center",fontFamily:"inherit",fontSize:t=>mn(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=>F(Ae(t)*1),height:t=>F(6+Ae(t)*2),paddingInline:t=>F(Ae(t)*1),"&::-webkit-file-upload-button":{marginTop:t=>F(Ae(t)),fontFamily:"inherit",fontSize:"inherit",border:"none",borderRadius:F(1),height:F(6),paddingInline:F(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=>`${F(.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 mo}from"@domphy/core";import{themeColor as j,themeDensity as st,themeSpacing as ve,themeSize as un}from"@domphy/theme";function hc(a={}){var e,r;let o=mo((e=a.color)!=null?e:"neutral","color"),n=mo((r=a.accentColor)!=null?r:"primary","accentColor");return{type:"search",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputSearch" primitive patch must use input tag'),i.type="search"},style:{fontFamily:"inherit",fontSize:t=>un(t,"inherit"),lineHeight:"inherit",color:t=>j(t,"shift-9",o.get(t)),backgroundColor:t=>j(t,"inherit",o.get(t)),border:"none",outlineOffset:"-1px",outline:t=>`1px solid ${j(t,"shift-4",o.get(t))}`,borderRadius:t=>ve(st(t)*1),minWidth:ve(32),paddingInline:t=>ve(st(t)*3),paddingBlock:t=>ve(st(t)*1),"&::placeholder":{color:t=>j(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=>`${ve(.5)} solid ${j(t,"shift-6",n.get(t))}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:t=>j(t,"shift-8","neutral"),backgroundColor:t=>j(t,"shift-2","neutral"),outline:t=>`1px solid ${j(t,"shift-4","neutral")}`}}}}import{toState as uo}from"@domphy/core";import{themeColor as k,themeDensity as ct,themeSpacing as K,themeSize as dn}from"@domphy/theme";function Cc(a={}){var e,r;let o=uo((e=a.color)!=null?e:"neutral","color"),n=uo((r=a.accentColor)!=null?r:"primary","accentColor");return{type:"text",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputText" primitive patch must use input tag and text type'),i.type="text"},style:{fontFamily:"inherit",lineHeight:"inherit",minWidth:K(10),paddingInline:t=>K(ct(t)*3),paddingBlock:t=>K(ct(t)*1),borderRadius:t=>K(ct(t)*1),fontSize:t=>dn(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=>`${K(.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=>`${K(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=error]":{outline:t=>`${K(.5)} solid ${k(t,"shift-6","error")}`},"&[data-status=warning]":{outline:t=>`${K(.5)} solid ${k(t,"shift-6","warning")}`}}}}import{toState as ho}from"@domphy/core";import{themeColor as We,themeSpacing as P}from"@domphy/theme";function Pc(a={}){var e,r;let o=ho((e=a.color)!=null?e:"neutral","color"),n=ho((r=a.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 po}from"@domphy/core";import{themeColor as U,themeDensity as Fe,themeSpacing as te,themeSize as hn}from"@domphy/theme";function Nc(a={}){var e,r;let o=po((e=a.color)!=null?e:"neutral","color"),n=po((r=a.accentColor)!=null?r:"primary","accentColor");return{type:"number",_onSchedule:(t,i)=>{t.tagName!="input"&&console.warn('"inputNumber" primitive patch must use input tag'),i.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=>hn(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 pn}from"@domphy/core";import{themeColor as mt,themeSize as fn,themeSpacing as ut}from"@domphy/theme";function Ac(a={}){var n;let o=pn((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="kbd"&&console.warn('"keyboard" primitive patch must use kbd tag')},style:{fontSize:e=>fn(e,"inherit"),color:e=>mt(e,"shift-9",o.get(e)),backgroundColor:e=>mt(e,"inherit",o.get(e)),paddingBlock:ut(.5),paddingInline:ut(1.5),borderRadius:ut(1),outline:e=>`1px solid ${mt(e,"shift-4",o.get(e))}`}}}import{toState as fo}from"@domphy/core";import{themeColor as dt,themeSize as gn,themeSpacing as bn}from"@domphy/theme";function Gc(a={}){var e,r;let o=fo((e=a.color)!=null?e:"neutral","color"),n=fo((r=a.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:bn(2),fontSize:t=>gn(t,"inherit"),color:t=>dt(t,"shift-9",o.get(t)),cursor:"pointer","&:focus-within":{color:t=>dt(t,"shift-10",n.get(t))},"&[aria-disabled=true]":{opacity:.7,cursor:"not-allowed",color:t=>dt(t,"shift-8","neutral")}}}}import{toState as go}from"@domphy/core";import{themeColor as oe,themeSize as yn,themeSpacing as ht}from"@domphy/theme";function em(a={}){var e,r;let o=go((e=a.color)!=null?e:"primary","color"),n=go((r=a.accentColor)!=null?r:"secondary","accentColor");return{_onInsert:t=>{t.tagName!="a"&&console.warn('"link" primitive patch must use a tag')},style:{fontSize:t=>yn(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:ht(1),outlineOffset:ht(1),outline:t=>`${ht(.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 Sn}from"@domphy/core";import{themeSpacing as pt,themeSize as Cn,themeColor as bo}from"@domphy/theme";function lm(a={}){var n;let o=Sn((n=a.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=>Cn(e,"inherit"),color:e=>bo(e,"shift-9",o.get(e)),backgroundColor:e=>bo(e,"inherit",o.get(e)),height:pt(6),borderRadius:pt(1),paddingInline:pt(1.5)}}}import{toState as En}from"@domphy/core";import{themeColor as vn,themeSize as xn}from"@domphy/theme";function fm(a={}){var n;let o=En((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="p"&&console.warn('"paragraph" primitive patch must use p tag')},style:{fontSize:e=>xn(e,"inherit"),color:e=>vn(e,"shift-9",o.get(e)),lineHeight:1.5,marginTop:0,marginBottom:0}}}import{toState as kn}from"@domphy/core";import{themeColor as yo,themeDensity as ft,themeSpacing as gt,themeSize as Tn}from"@domphy/theme";function vm(a={}){var n;let o=kn((n=a.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=>Tn(e,"inherit"),color:e=>yo(e,"shift-9",o.get(e)),backgroundColor:e=>yo(e,"inherit",o.get(e)),border:"none",paddingBlock:e=>gt(ft(e)*2),paddingInline:e=>gt(ft(e)*3),borderRadius:e=>gt(ft(e)*2)}}}import{toState as So}from"@domphy/core";import{themeColor as bt,themeSpacing as je}from"@domphy/theme";function Im(a={}){var e,r;let o=So((e=a.color)!=null?e:"neutral","color"),n=So((r=a.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 Co}from"@domphy/core";import{themeColor as q,themeSize as wn,themeSpacing as xe}from"@domphy/theme";function Dm(a={}){var e,r;let o=Co((e=a.color)!=null?e:"neutral","color"),n=Co((r=a.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=>wn(t,"inherit"),appearance:"none",display:"inline-flex",position:"relative",width:xe(6),height:xe(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:xe(4),height:xe(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=>`${xe(.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 ke,themeSize as Pn,themeSpacing as I,themeColorToken as On}from"@domphy/theme";function Hm(a={}){let{color:o="neutral",accentColor:n="primary"}=a;return{_onInsert:e=>{e.tagName!="select"&&console.warn('"select" primitive patch must use select tag')},style:{appearance:"none",fontFamily:"inherit",fontSize:e=>Pn(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(ke(e)*1),paddingBlock:e=>I(ke(e)*1),paddingLeft:e=>I(ke(e)*3),paddingRight:e=>I(ke(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="${On(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+ke(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 In,toState as zn}from"@domphy/core";import{themeColor as Eo,themeSize as $n,themeSpacing as vo}from"@domphy/theme";function Fm(a={}){var r;let o=zn((r=a.color)!=null?r:"neutral","color"),n={"0%,100%":{opacity:1},"50%":{opacity:.4}},e=In(JSON.stringify(n));return{ariaHidden:"true",dataTone:"shift-2",style:{fontSize:t=>$n(t),color:t=>Eo(t,"shift-9",o.get(t)),height:vo(6),display:"block",borderRadius:vo(1),backgroundColor:t=>Eo(t,"inherit",o.get(t)),animation:`${e} 1.5s ease-in-out infinite`,[`@keyframes ${e}`]:n}}}import{hashString as Vn,toState as _n}from"@domphy/core";import{themeColor as Ke,themeSize as Nn,themeSpacing as yt}from"@domphy/theme";var ko={to:{transform:"rotate(360deg)"}},xo=Vn(JSON.stringify(ko));function Ym(a={}){var n;let o=_n((n=a.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=>Nn(e),backgroundColor:e=>Ke(e),color:e=>Ke(e,"shift-9",o.get(e)),display:"inline-block",margin:0,flexShrink:0,width:yt(6),height:yt(6),borderRadius:"50%",border:e=>`${yt(.5)} solid ${Ke(e,"shift-4",o.get(e))}`,borderTopColor:e=>Ke(e,"shift-9",o.get(e)),boxSizing:"border-box",padding:0,animation:`${xo} 0.7s linear infinite`,[`@keyframes ${xo}`]:ko}}}import{toState as Rn}from"@domphy/core";import{themeColor as Dn,themeDensity as To,themeSize as Ln,themeSpacing as wo}from"@domphy/theme";function Qm(a={}){var i;let{color:o="neutral",multiple:n=!1}=a,e=Rn((i=a.value)!=null?i:n?[]:null),r={div:l=>{let s=e.get(l);return(Array.isArray(s)?s:[s]).map(c=>({input:null,name:a.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=>wo(To(l)*2),paddingInline:l=>wo(To(l)*2),fontSize:l=>Ln(l,"inherit"),backgroundColor:l=>Dn(l,"inherit",o)}}}import{themeSpacing as qe,themeColor as re,themeDensity as Po,themeSize as Mn}from"@domphy/theme";function ou(a={}){let{accentColor:o="primary",color:n="neutral",value:e=null}=a;return{role:"option",_onInit:t=>{t.tagName!="div"&&console.warn('"selectItem" patch must use div tag');let i=t.getContext("select");if(i){let l=i.value;t.attributes.set("ariaSelected",s=>{let m=l.get(s);return i.multiple?m.includes(e):m==e}),t.addEvent("click",()=>{let s=l.get();i.multiple?s.includes(e)?l.set(s.filter(m=>m!==e)):l.set(s.concat([e])):s!=e&&l.set(e)})}},style:{cursor:"pointer",display:"flex",alignItems:"center",fontSize:t=>Mn(t,"inherit"),height:t=>qe(6+Po(t)*2),paddingInline:t=>qe(Po(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=>`${qe(.5)} solid ${re(t,"shift-6",o)}`,outlineOffset:`-${qe(.5)}`}}}}import{toState as St,merge as Oo}from"@domphy/core";import{themeSpacing as Te,themeColor as Ct,themeDensity as Et,themeSize as Hn}from"@domphy/theme";function su(a){let{options:o=[],placement:n="bottom",color:e="neutral",open:r=!1,multiple:t=!1}=a,i=St(a.value),l=St(r),{show:s,hide:m,anchorPartial:c}=H({open:l,placement:St(n),content:a.content}),u={onClick:()=>!t&&m()};Oo(a.content,u);let p={div:h=>{let b=i.get(h),f=Array.isArray(b)?b:[b];return o.filter(g=>f.includes(g.value)).map(g=>({span:g.label,$:[Re({color:e,removable:t})],_key:g.value,_onRemove:v=>{let y=i.get(),Ue=(Array.isArray(y)?y:[y]).filter(he=>he!==g.value);t?i.set(Ue):i.set(Ue[0])}}))},style:{display:"flex",flexWrap:"wrap",gap:Te(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()?m():s(),style:{cursor:"pointer",display:"flex",alignItems:"center",minHeight:h=>Te(6+Et(h)*2),minWidth:Te(32),outlineOffset:"-1px",outline:h=>`1px solid ${Ct(h,"shift-4","neutral")}`,paddingInline:h=>Te(Et(h)*2),borderRadius:h=>Te(Et(h)*1),fontSize:h=>Hn(h,"inherit"),color:h=>Ct(h,"shift-9",e),backgroundColor:h=>Ct(h,"inherit",e)}};return Oo(c,d),c}import{toState as Bn}from"@domphy/core";import{themeColor as vt,themeSize as Io,themeSpacing as L}from"@domphy/theme";function fu(a={}){var n;let o=Bn((n=a.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=>Io(e,"inherit"),appearance:"none",position:"relative",display:"inline-flex",width:L(9),height:L(6),cursor:"pointer",margin:"0",paddingBlock:L(1),"&:checked":{"&::before":{backgroundColor:e=>vt(e,"increase-3",o.get(e))},"&::after":{left:`calc(100% - ${L(3.5)})`}},"&::after":{content:'""',aspectRatio:"1/1",position:"absolute",width:L(3),height:L(3),borderRadius:L(999),left:L(.5),top:"50%",transform:"translateY(-50%)",transition:"left 0.3s",backgroundColor:e=>vt(e,"decrease-3")},"&::before":{content:'""',width:"100%",borderRadius:L(999),display:"inline-block",fontSize:e=>Io(e,"inherit"),lineHeight:1,backgroundColor:e=>vt(e)},"&[disabled]":{opacity:.7,cursor:"not-allowed"}}}}import{toState as xt}from"@domphy/core";import{themeColor as ne,themeSize as An,themeSpacing as T}from"@domphy/theme";function Su(a={}){var t,i;let{checked:o=!1}=a,n=xt(o),e=xt((t=a.color)!=null?t:"neutral","color"),r=xt((i=a.accentColor)!=null?i:"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=>An(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 Wn}from"@domphy/core";import{themeColor as Fn,themeSize as jn}from"@domphy/theme";function wu(a={}){var n;let o=Wn((n=a.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=>jn(e,"inherit"),color:e=>Fn(e,"shift-9",o.get(e))}}}import{toState as Kn}from"@domphy/core";import{themeColor as zo,themeSize as qn}from"@domphy/theme";function _u(a={}){var n;let o=Kn((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="strong"&&console.warn('"strong" primitive patch must use strong tag')},style:{fontSize:e=>qn(e,"inherit"),fontWeight:700,color:e=>zo(e,"shift-11",o.get(e)),backgroundColor:e=>zo(e)}}}import{toState as Yn}from"@domphy/core";import{themeColor as Gn,themeSize as Un}from"@domphy/theme";function Bu(a={}){var n;let o=Yn((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="sub"&&console.warn('"subscript" primitive patch must use sub tag')},style:{fontSize:e=>Un(e,"decrease-1"),verticalAlign:"sub",lineHeight:0,color:e=>Gn(e,"shift-9",o.get(e))}}}import{toState as Xn}from"@domphy/core";import{themeColor as Jn,themeSize as Qn}from"@domphy/theme";function Yu(a={}){var n;let o=Xn((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="sup"&&console.warn('"superscript" primitive patch must use sup tag')},style:{fontSize:e=>Qn(e,"decrease-1"),verticalAlign:"super",lineHeight:0,color:e=>Jn(e,"shift-9",o.get(e))}}}import{toState as Zn}from"@domphy/core";import{themeColor as z,themeDensity as ie,themeSpacing as ae,themeSize as $o}from"@domphy/theme";function Ju(a={}){var n;let o=Zn((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="table"&&console.warn('"table" primitive patch must use table tag')},style:{fontSize:e=>$o(e,"inherit"),color:e=>z(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=>z(e,"shift-10",o.get(e)),backgroundColor:e=>z(e,"inherit")},"& td":{textAlign:"left",paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>z(e,"shift-9",o.get(e)),boxShadow:e=>`inset 0 1px 0 ${z(e,"shift-3",o.get(e))}`,fontSize:e=>$o(e,"inherit")},"& tfoot th, & tfoot td":{textAlign:"left",fontWeight:500,paddingInline:e=>ae(ie(e)*3),paddingBlock:e=>ae(ie(e)*1),color:e=>z(e,"shift-10",o.get(e)),backgroundColor:e=>z(e,"inherit"),boxShadow:e=>`inset 0 -1px 0 ${z(e,"shift-4",o.get(e))}`},"& tr":{backgroundColor:e=>z(e,"inherit")},"& tbody tr:hover":{backgroundColor:e=>z(e,"shift-2")+"!important"}}}}import{toState as Vo}from"@domphy/core";import{themeColor as $,themeDensity as kt,themeSpacing as le,themeSize as ei}from"@domphy/theme";function nd(a={}){var r,t;let o=Vo((r=a.color)!=null?r:"neutral","color"),n=Vo((t=a.accentColor)!=null?t:"primary","accentColor"),{autoResize:e=!1}=a;return{_onInsert:i=>{i.tagName!="textarea"&&console.warn('"textarea" primitive patch must use textarea tag')},_onMount:i=>{if(e){let l=i.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:i=>le(kt(i)*2),paddingBlock:i=>le(kt(i)*1.5),border:"none",borderRadius:i=>le(kt(i)*1.5),fontSize:i=>ei(i,"inherit"),color:i=>$(i,"shift-9",o.get(i)),outlineOffset:"-1px",outline:i=>`1px solid ${$(i,"shift-4",o.get(i))}`,backgroundColor:i=>$(i,"inherit",o.get(i)),"&::placeholder":{color:i=>$(i,"shift-7")},"&:hover:not([disabled]):not([aria-busy=true])":{outline:i=>`${le(.5)} solid ${$(i,"shift-5",n.get(i))}`},"&:focus-visible":{outline:i=>`${le(.5)} solid ${$(i,"shift-6",n.get(i))}`},"&:invalid":{outline:i=>`${le(.5)} solid ${$(i,"shift-5","error")}`},"&[disabled]":{opacity:.7,cursor:"not-allowed",color:i=>$(i,"shift-8","neutral"),outline:i=>`1px solid ${$(i,"shift-4","neutral")}`,backgroundColor:i=>$(i,"shift-2","neutral")}}}}import{toState as ti}from"@domphy/core";import{themeColor as _o,themeSize as oi,themeSpacing as ri}from"@domphy/theme";function ud(a={}){var n;let o=ti((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="ul"&&console.warn('"unorderedList" primitive patch must use ul tag')},style:{fontSize:e=>oi(e,"inherit"),backgroundColor:e=>_o(e),color:e=>_o(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ri(3),listStyleType:"disc",listStylePosition:"outside"}}}import{toState as ni}from"@domphy/core";import{themeColor as No,themeSize as ii,themeSpacing as ai}from"@domphy/theme";function yd(a={}){var n;let o=ni((n=a.color)!=null?n:"neutral","color");return{_onInsert:e=>{e.tagName!="ol"&&console.warn('"orderedList" primitive patch must use ol tag')},style:{fontSize:e=>ii(e,"inherit"),backgroundColor:e=>No(e),color:e=>No(e,"shift-9",o.get(e)),marginTop:0,marginBottom:0,paddingLeft:ai(3),listStyleType:"decimal",listStylePosition:"outside"}}}import{toState as li}from"@domphy/core";import{themeColor as se,themeDensity as we,themeSize as si,themeSpacing as ce}from"@domphy/theme";function ci(a,o){if(o<=7)return Array.from({length:o},(t,i)=>i+1);let n=[1];a>3&&n.push("...");let e=Math.max(2,a-1),r=Math.min(o-1,a+1);for(let t=e;t<=r;t++)n.push(t);return a<o-2&&n.push("..."),n.push(o),n}function vd(a){var l;let{total:o,color:n="neutral",accentColor:e="primary"}=a,r=li((l=a.value)!=null?l:1),t={display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:s=>ce(6+we(s)*2),height:s=>ce(6+we(s)*2),paddingInline:s=>ce(we(s)*2),borderRadius:s=>ce(we(s)*1),border:"none",cursor:"pointer",fontSize:s=>si(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"}},i=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 m={div:c=>{let u=r.get(c),p=[];p.push({button:"\u2039",type:"button",ariaLabel:"Previous page",disabled:u<=1,onClick:()=>u>1&&r.set(u-1),style:t});for(let d of ci(u,o))if(d==="...")p.push({span:"\u2026",style:{display:"inline-flex",alignItems:"center",paddingInline:h=>ce(we(h)*2),color:h=>se(h,"shift-7",n)}});else{let h=d===u;p.push({button:String(d),type:"button",ariaLabel:`Page ${d}`,ariaCurrent:h?"page":void 0,disabled:h,onClick:()=>r.set(d),style:h?i:t})}return p.push({button:"\u203A",type:"button",ariaLabel:"Next page",disabled:u>=o,onClick:()=>u<o&&r.set(u+1),style:t}),p},style:{display:"flex",alignItems:"center",gap:ce(1)}};s.children.insert(m)},style:{display:"inline-flex"}}}import{toState as mi}from"@domphy/core";import{themeColor as Ye,themeSize as ui,themeSpacing as di}from"@domphy/theme";function Od(a={}){var n;let o=mi((n=a.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:di(2),fontSize:e=>ui(e,"inherit"),backgroundColor:e=>Ye(e),color:e=>Ye(e,"shift-9",o.get(e)),minHeight:"1lh","&::before":{content:'""',flex:1,borderColor:e=>Ye(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"},"&::after":{content:'""',flex:1,borderColor:e=>Ye(e,"shift-4",o.get(e)),borderWidth:"1px",borderBottomStyle:"solid"}}}}import{toState as hi}from"@domphy/core";import{themeColor as Ge,themeDensity as pi,themeSize as fi,themeSpacing as Pe}from"@domphy/theme";var Ro={left:"translateX(-100%)",right:"translateX(100%)",top:"translateY(-100%)",bottom:"translateY(100%)"},gi={left:"0 auto 0 0",right:"0 0 0 auto",top:"0 0 auto 0",bottom:"auto 0 0 0"},Tt=a=>a==="left"||a==="right";function Vd(a={}){let{color:o="neutral",open:n=!1,placement:e="right",size:r}=a,t=hi(n),i=Tt(e)?Pe(80):Pe(64),l=r!=null?r:i;return{_onInsert:s=>{s.tagName!=="dialog"&&console.warn('"drawer" patch must use dialog tag')},onClick:(s,m)=>{s.target===m.domElement&&t.set(!1)},onTransitionEnd:(s,m)=>{let c=m.domElement;t.get()||(c.close(),document.body.style.overflow="")},_onMount:s=>{let m=s.domElement,c=p=>{p?(m.showModal(),document.body.style.overflow="hidden",requestAnimationFrame(()=>{m.style.transform="translate(0, 0)"})):m.style.transform=Ro[e]};c(t.get());let u=t.addListener(c);s.addHook("Remove",()=>{u(),document.body.style.overflow=""})},style:{transform:Ro[e],transition:"transform 0.25s ease",fontSize:s=>fi(s,"inherit"),color:s=>Ge(s,"shift-10",o),backgroundColor:s=>Ge(s,"inherit",o),border:"none",padding:s=>Pe(pi(s)*3),margin:gi[e],width:Tt(e)?l:"100dvw",height:Tt(e)?"100dvh":l,maxWidth:"100dvw",maxHeight:"100dvh",boxShadow:s=>`0 ${Pe(4)} ${Pe(12)} ${Ge(s,"shift-4","neutral")}`,"&::backdrop":{backgroundColor:s=>Ge(s,"shift-2","neutral"),opacity:.75}}}}import{toState as Do,merge as bi}from"@domphy/core";function Bd(a){var p;let{open:o=!1,placement:n="bottom",openOn:e="click"}=a,r=null,t=Do(o),i=Do(n),{show:l,hide:s,anchorPartial:m}=H({open:t,placement:i,content:a.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=a.content).$||(p.$=[]),a.content.$.push(c),bi(m,{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 b=d.relatedTarget,f=h.getRoot().domElement,E=r?f.querySelector(`#${CSS.escape(r)}`):null;b&&(E!=null&&E.contains(b))||s()},_onMount:d=>r&&d.attributes.set("ariaControls",r)}),m}import{toState as yi}from"@domphy/core";import{themeColor as wt,themeDensity as Pt,themeSize as Si,themeSpacing as Y}from"@domphy/theme";function jd(a={}){let{position:o="top-center",color:n="neutral"}=a,e=yi(!1),r=o.startsWith("top"),t=o.endsWith("center"),i=o.endsWith("right"),l={div:[],id:`domphy-toast-${o}`,style:{position:"fixed",display:"flex",flexDirection:r?"column":"column-reverse",alignItems:t?"center":i?"end":"start",inset:0,gap:Y(4),zIndex:30,padding:Y(6),pointerEvents:"none"}};return{_portal:s=>{let m=s.domElement.querySelector(`#domphy-toast-${o}`);return m||(m=s.children.insert(l).domElement),m},role:"status",ariaAtomic:"true",dataTone:"shift-17",style:{minWidth:Y(32),pointerEvents:"auto",paddingBlock:s=>Y(Pt(s)*2),paddingInline:s=>Y(Pt(s)*4),borderRadius:s=>Y(Pt(s)*2),fontSize:s=>Si(s,"inherit"),color:s=>wt(s,"shift-9",n),backgroundColor:s=>wt(s,"inherit",n),boxShadow:s=>`0 ${Y(2)} ${Y(9)} ${wt(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,m)=>{let c=u=>{u.propertyName==="transform"&&(s.domElement.removeEventListener("transitionend",c),m())};s.domElement.addEventListener("transitionend",c),e.set(!1)}}}import{merge as Ci,toState as Lo}from"@domphy/core";import{themeSpacing as Ot,themeColor as Mo,themeDensity as It,themeSize as Ei}from"@domphy/theme";function Qd(a={}){let{open:o=!1,placement:n="top",content:e="Tooltip Content"}=a,r=Lo(n),t=Lo(e),i=null,l={span:d=>t.get(d)},{show:s,hide:m,anchorPartial:c}=H({open:o,placement:r,content:l}),u={role:"tooltip",dataSize:"decrease-1",dataTone:"shift-17",_onInsert:d=>{let h=d.attributes.get("id");i=h||d.nodeId,!h&&d.attributes.set("id",i)},style:{paddingBlock:d=>Ot(It(d)*1),paddingInline:d=>Ot(It(d)*3),borderRadius:d=>Ot(It(d)*1),color:d=>Mo(d,"shift-9"),backgroundColor:d=>Mo(d),fontSize:d=>Ei(d,"inherit")},$:[Yt({placement:r,bordered:!1})]};return l.$||(l.$=[]),l.$.push(u),Ci(c,{onMouseEnter:()=>s(),onMouseLeave:()=>m(),onFocus:()=>s(),onBlur:()=>m(),onKeyDown:d=>d.key==="Escape"&&m(),_onMount:d=>i&&d.attributes.set("ariaDescribedby",i)}),c}import{ElementNode as Ho}from"@domphy/core";function Bo(a,o){return a.key!==void 0&&a.key!==null?String(a.key):`index-${o}`}function oh(a={}){let{duration:o=300,delay:n=0}=a,e=new Map;return{_onBeforeUpdate:r=>{e=new Map,r.children.items.forEach((t,i)=>{if(!(t instanceof Ho))return;let l=t.domElement;l&&e.set(Bo(t,i),l.getBoundingClientRect())})},_onUpdate:r=>{r.children.items.forEach((t,i)=>{if(!(t instanceof Ho))return;let l=t.domElement;if(!l)return;let s=Bo(t,i),m=e.get(s);if(!m)return;let c=l.getBoundingClientRect(),u=m.left-c.left,p=m.top-c.top;if(Math.abs(u)<.5&&Math.abs(p)<.5)return;let d=l.style.transition,h=l.style.transform;l.style.transition="none",l.style.transform=`translate(${u}px, ${p}px)`,l.getBoundingClientRect(),requestAnimationFrame(()=>{l.style.transition=`transform ${o}ms ease ${n}ms`,l.style.transform="translate(0px, 0px)"});let b=()=>{l.style.transition=d,l.style.transform=h,l.removeEventListener("transitionend",f)},f=E=>{E.propertyName==="transform"&&b()};l.addEventListener("transitionend",f),setTimeout(b,o+n+34)}),e.clear()}}}import{merge as vi}from"@domphy/core";import{toState as xi}from"@domphy/core";function sh(a={}){return{role:"tablist",_onSchedule:(n,e)=>{let r={_context:{tabs:{activeKey:xi(a.activeKey||0)}}};vi(e,r)}}}import{themeSpacing as me,themeColor as ue,themeDensity as Ao,themeSize as ki}from"@domphy/theme";function dh(a={}){let{accentColor:o="primary",color:n="neutral"}=a;return{role:"tab",_onInsert:r=>{var m,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 i=(c=(m=r.parent)==null?void 0:m.children.items)!=null?c:[];i=i.filter(u=>u.type=="ElementNode"&&u.attributes.get("role")=="tab");let l=r.key!==null&&r.key!==void 0?r.key:i.findIndex(u=>u==r),s={id:"tab"+r.parent.nodeId+l,ariaControls:"tabpanel"+r.parent.nodeId+l,ariaSelected:u=>t.activeKey.get(u)==l,onClick:()=>t.activeKey.set(l),onKeyDown:u=>{var E,g,v,y;let p=u.key;if(!["ArrowLeft","ArrowRight","Home","End"].includes(p))return;u.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),b=h;p==="ArrowRight"?b=(h+1)%d.length:p==="ArrowLeft"?b=(h-1+d.length)%d.length:p==="Home"?b=0:p==="End"&&(b=d.length-1);let f=d[b];t.activeKey.set((v=f.key)!=null?v:b),(y=f.domElement)==null||y.focus()}};r.merge(s)},style:{cursor:"pointer",fontSize:r=>ki(r,"inherit"),height:r=>me(6+Ao(r)*2),paddingInline:r=>me(Ao(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 gh(){return{role:"tabpanel",style:{paddingBlock:o=>Wo(Fo(o)*2),paddingInline:o=>Wo(Fo(o)*2)},_onInsert:o=>{var i,l;let n=o.getContext("tabs");if(!n){console.warn('"tabPanel" patch must be used inside a "tabs"');return}let e=(l=(i=o.parent)==null?void 0:i.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 Ti}from"@domphy/core";import{toState as wi}from"@domphy/core";import{themeColor as Pi,themeDensity as jo,themeSize as Oi,themeSpacing as Ko}from"@domphy/theme";function xh(a={}){let{color:o="neutral",selectable:n=!0}=a;return{role:"menu",dataTone:"shift-17",_onSchedule:(r,t)=>{var l;let i={_context:{menu:{activeKey:wi((l=a.activeKey)!=null?l:null),selectable:n}}};Ti(t,i)},style:{display:"flex",flexDirection:"column",paddingBlock:r=>Ko(jo(r)*2),paddingInline:r=>Ko(jo(r)*2),fontSize:r=>Oi(r,"inherit"),backgroundColor:r=>Pi(r,"inherit",o)}}}import{themeSpacing as Oe,themeColor as de,themeDensity as qo,themeSize as Ii}from"@domphy/theme";function Ph(a={}){let{accentColor:o="primary",color:n="neutral"}=a;return{role:"menuitem",_onInsert:r=>{var s,m;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 i=(m=(s=r.parent)==null?void 0:s.children.items)!=null?m:[];i=i.filter(c=>c.type=="ElementNode"&&c.attributes.get("role")=="menuitem");let l=r.key!==null&&r.key!==void 0?r.key:i.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,u,p,d;let i=r.key;if(i==="Enter"||i===" "){r.preventDefault(),(c=t.domElement)==null||c.click();return}if(!["ArrowDown","ArrowUp","Home","End"].includes(i))return;r.preventDefault();let l=((p=(u=t.parent)==null?void 0:u.children.items)!=null?p:[]).filter(h=>h.type==="ElementNode"&&h.attributes.get("role")==="menuitem"),s=l.findIndex(h=>h===t),m=s;i==="ArrowDown"?m=(s+1)%l.length:i==="ArrowUp"?m=(s-1+l.length)%l.length:i==="Home"?m=0:i==="End"&&(m=l.length-1),(d=l[m].domElement)==null||d.focus()},style:{cursor:"pointer",display:"flex",alignItems:"center",gap:r=>Oe(2),width:"100%",fontSize:r=>Ii(r,"inherit"),height:r=>Oe(6+qo(r)*2),paddingInline:r=>Oe(qo(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=>`${Oe(.5)} solid ${de(r,"shift-6",o)}`,outlineOffset:`-${Oe(.5)}`}}}}export{Li as abbreviation,ba as alert,va as avatar,Pa as badge,dl as blockquote,Va as breadcrumb,La as breadcrumbEllipsis,gl as button,Su as buttonSwitch,Wi as card,zl as code,el as combobox,Qi as command,ea as commandItem,Zi as commandSearch,jl as descriptionList,Ll as details,Ul as dialog,Od as divider,Vd as drawer,os as emphasis,cs as figure,ps as formGroup,Es as heading,Os as horizontalRule,Bs as icon,Rs as image,xl as inputCheckbox,qs as inputColor,Zs as inputDateTime,ac as inputFile,Nc as inputNumber,da as inputOTP,Dm as inputRadio,Pc as inputRange,hc as inputSearch,fu as inputSwitch,Cc as inputText,Ac as keyboard,Gc as label,em as link,lm as mark,xh as menu,Ph as menuItem,yd as orderedList,vd as pagination,fm as paragraph,Bd as popover,Yt as popoverArrow,vm as preformated,Im as progress,Hm as select,su as selectBox,ou as selectItem,Qm as selectList,Fm as skeleton,wu as small,Ym as spinner,qi as splitter,Gi as splitterHandle,Yi as splitterPanel,_u as strong,Bu as subscript,Yu as superscript,dh as tab,gh as tabPanel,Ju as table,sh as tabs,Re as tag,nd as textarea,jd as toast,na as toggle,ca as toggleGroup,Qd as tooltip,oh as transitionGroup,ud as unorderedList};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|