@pure-ds/core 0.5.35 → 0.5.39
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/types/public/assets/js/pds-manager.d.ts +141 -426
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts +3 -4
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/pds-bootstrap.js +29 -14
- package/packages/pds-cli/bin/pds-static.js +13 -3
- package/public/assets/js/app.js +62 -49
- package/public/assets/js/pds-manager.js +12 -12
- package/public/assets/js/pds.js +6 -6
- package/src/js/pds-core/pds-start-helpers.js +23 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Re=Object.defineProperty;var N=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)Re(n,e,{get:t[e],enumerable:!0})};var ne={};P(ne,{enums:()=>u});var u,_=N(()=>{u={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}}});var ce={};P(ce,{default:()=>Ne,findComponentForElement:()=>Ae,getAllSelectors:()=>We,getAllTags:()=>De,getByCategory:()=>je,ontology:()=>z,searchOntology:()=>Be});function W(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function se(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function Ae(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,r=0;for(;e&&r<t;){if(r++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let o of PDS.ontology.enhancements){let i=o.selector||o;if(W(e,i))return{element:e,componentType:"enhanced-component",displayName:o.description||i,id:o.id}}if(e.tagName==="FIELDSET"){let o=e.getAttribute("role");if(o==="group"||o==="radiogroup")return{element:e,componentType:"form-group",displayName:o==="radiogroup"?"radio group":"form group"}}if(e.tagName==="LABEL"&&e.querySelector&&e.querySelector("input,select,textarea"))return{element:e,componentType:"form-control",displayName:"label with input"};let a=e.closest?e.closest("label"):null;if(a&&a.querySelector&&a.querySelector("input,select,textarea"))return{element:a,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let l=String(i||"").trim();if(l.includes("*")){if(l.startsWith(".")){let p=l.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(g=>g.startsWith(p)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let c=e.parentElement,d=0;for(;c&&d<t;){if(c.classList&&Array.from(c.classList).some(g=>g.startsWith(p))&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};c=c.parentElement,d++}continue}continue}if(W(e,l))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let s=se(e,l);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.classList){let i=Array.from(e.classList);for(let l of o.selectors||[])if(typeof l=="string"&&l.includes("*")&&l.startsWith(".")){let s=l.slice(1).replace(/\*/g,"");if(i.some(p=>p.startsWith(s)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}}}for(let o of PDS.ontology.layoutPatterns||[])for(let i of o.selectors||[]){let l=String(i||"").trim();if(l.includes("*")){if(l.startsWith(".")){let p=l.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(c=>c.startsWith(p)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(W(e,l))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let s=se(e,l);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.tagName&&e.tagName.includes("-")){let o=e.tagName.toLowerCase(),i=PDS.ontology.components.find(l=>l.selectors.includes(o));return{element:e,componentType:"web-component",displayName:i?.name||o,id:i?.id||o,tags:i?.tags}}if(e.tagName==="BUTTON"){let o=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:o?"button with icon":"button",id:"button"}}if(W(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let o=W(e,"pds-icon")?e:e.closest("pds-icon");return{element:o,componentType:"icon",displayName:`pds-icon (${o.getAttribute&&o.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(W(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:W(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function We(){let n=[];for(let t of PDS.ontology.primitives)n.push(...t.selectors||[]);for(let t of PDS.ontology.components)n.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])n.push(...t.selectors||[]);return Array.from(new Set(n))}function Be(n,t={}){let e=n.toLowerCase(),r=[],a=(o,i)=>{for(let l of o)(l.id?.toLowerCase().includes(e)||l.name?.toLowerCase().includes(e)||l.description?.toLowerCase().includes(e)||l.tags?.some(p=>p.toLowerCase().includes(e))||l.category?.toLowerCase().includes(e)||l.selectors?.some(p=>p.toLowerCase().includes(e)))&&r.push({...l,type:i})};return(!t.type||t.type==="primitive")&&a(z.primitives,"primitive"),(!t.type||t.type==="component")&&a(z.components,"component"),(!t.type||t.type==="layout")&&a(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&a(z.enhancements,"enhancement"),r}function je(n){let t=n.toLowerCase();return{primitives:z.primitives.filter(e=>e.category===t),components:z.components.filter(e=>e.category===t),layouts:z.layoutPatterns.filter(e=>e.category===t)}}function De(){let n=new Set;return z.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var z,Ne,Z=N(()=>{z={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"callout",name:"Callout",description:"Contextual information and notification messages",selectors:[".callout",".callout-info",".callout-success",".callout-warning",".callout-danger",".callout-error",".callout-dismissible"],tags:["feedback","message","notification","status","information"],category:"feedback"},{id:"empty-state",name:"Empty State",description:"Empty state layout for missing data or onboarding",selectors:[".empty-state"],tags:["empty","no-data","zero","placeholder","onboarding","state"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-fab",name:"FAB",description:"Floating Action Button with expandable satellite actions",selectors:["pds-fab"],tags:["button","action","floating","interactive"],category:"action"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["callout","badge","empty-state"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]},action:{description:"Interactive actions and buttons",primitives:["button"],components:["pds-fab"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],empty:["empty-state","placeholder","zero","no-data","onboarding","callout","card","icon","button"],"empty state":["empty-state","empty","no-data","zero","onboarding"],"no data":["empty-state","empty","zero","placeholder"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working","pds-fab","floating"],btn:["button","interactive","action","pds-fab"],fab:["pds-fab","floating","button","action","menu"],floating:["fab","pds-fab","button","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],callout:["notification","feedback","message","status","toast","information","alert","warning","error","info","success","danger"],alert:["callout","notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["callout","toast","pds-toaster","feedback","message","popup","alert"],toast:["pds-toaster","notification","callout","feedback","popup","snackbar","alert"],feedback:["callout","notification","toast","status","badge","validation","error","success","alert"],message:["callout","notification","feedback","dialog","toast","alert"],status:["badge","callout","indicator","feedback","state","alert"],error:["callout","danger","validation","feedback","warning","alert"],success:["callout","feedback","badge","status","check","alert"],warning:["callout","caution","feedback","status","alert"],info:["callout","information","feedback","status","alert"],danger:["callout","error","feedback","destructive","delete","alert"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};Ne=z});var ye={};P(ye,{AutoDefiner:()=>ee});async function at(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:r,mapper:a=p=>`${p}.js`,onError:o=(p,c)=>console.error(`[defineWebComponents] ${p}:`,c)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=p=>p.toLowerCase().replace(/(^|-)([a-z])/g,(c,d,g)=>g.toUpperCase()),s=async p=>{try{if(customElements.get(p))return{tag:p,status:"already-defined"};let c=a(p),g=await import(c instanceof URL?c.href:new URL(c,i).href),h=g?.default??g?.[l(p)];if(!h){if(customElements.get(p))return{tag:p,status:"self-defined"};throw new Error(`No export found for ${p}. Expected default export or named export "${l(p)}".`)}return customElements.get(p)?{tag:p,status:"race-already-defined"}:(customElements.define(p,h),{tag:p,status:"defined"})}catch(c){throw o(p,c),c}};return Promise.all(e.map(s))}var ee,ve=N(()=>{ee=class{constructor(t={}){let{baseURL:e,mapper:r,onError:a,predicate:o=()=>!0,attributeModule:i="data-module",root:l=document,scanExisting:s=!0,debounceMs:p=16,observeShadows:c=!0,enhancers:d=[],patchAttachShadow:g=!0}=t,h=new Set,v=new Set,x=new Set,m=new Map,w=new WeakMap,M=new WeakMap,k=0,T=!1,R=null,B=f=>{if(!f||!d.length)return;let y=M.get(f);y||(y=new Set,M.set(f,y));for(let b of d)if(!(!b.selector||!b.run)&&!y.has(b.selector))try{f.matches&&f.matches(b.selector)&&(b.run(f),y.add(b.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${b.selector}":`,C)}},j=(f,y)=>{if(!T&&!(!f||!f.includes("-"))&&!customElements.get(f)&&!v.has(f)&&!x.has(f)){if(y&&y.getAttribute){let b=y.getAttribute(i);b&&!m.has(f)&&m.set(f,b)}h.add(f),$()}},$=()=>{k||(k=setTimeout(L,p))},S=f=>{if(f){if(f.nodeType===1){let y=f,b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&j(b,y),B(y),c&&y.shadowRoot&&F(y.shadowRoot)}f.querySelectorAll&&f.querySelectorAll("*").forEach(y=>{let b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&j(b,y),B(y),c&&y.shadowRoot&&F(y.shadowRoot)})}},F=f=>{if(!f||w.has(f))return;S(f);let y=new MutationObserver(b=>{for(let C of b)C.addedNodes?.forEach(D=>{S(D)}),C.type==="attributes"&&C.target&&S(C.target)});y.observe(f,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...d.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),w.set(f,y)};async function L(){if(clearTimeout(k),k=0,!h.size)return;let f=Array.from(h);h.clear(),f.forEach(y=>v.add(y));try{let y=b=>m.get(b)??(r?r(b):`${b}.js`);await at(...f,{baseURL:e,mapper:y,onError:(b,C)=>{x.add(b),a?.(b,C)}})}catch{}finally{f.forEach(y=>v.delete(y))}}let G=l===document?document.documentElement:l,A=new MutationObserver(f=>{for(let y of f)y.addedNodes?.forEach(b=>{S(b)}),y.type==="attributes"&&y.target&&S(y.target)});if(A.observe(G,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...d.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),c&&g&&Element.prototype.attachShadow){let f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(b){let C=f.call(this,b);if(b&&b.mode==="open"){F(C);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&j(D,this)}return C},R=()=>Element.prototype.attachShadow=f}return s&&S(G),{stop(){T=!0,A.disconnect(),R&&R(),k&&(clearTimeout(k),k=0),w.forEach(f=>f.disconnect())},flush:L}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:a,mapper:o=c=>`${c}.js`,onError:i=(c,d)=>console.error(`[defineWebComponents] ${c}:`,d)}=e,l=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(d,g,h)=>h.toUpperCase()),p=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let d=o(c),h=await import(d instanceof URL?d.href:new URL(d,l).href),v=h?.default??h?.[s(c)];if(!v){if(customElements.get(c))return{tag:c,status:"self-defined"};throw new Error(`No export found for ${c}. Expected default export or named export "${s(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,v),{tag:c,status:"defined"})}catch(d){throw i(c,d),d}};return Promise.all(r.map(p))}}});var ae={};P(ae,{PDSQuery:()=>re});var re,oe=N(()=>{re=class{constructor(t){this.pds=t,this.intents={color:["color","colours","shade","tint","hue","foreground","background","text","fill","bg","fg"],spacing:["spacing","space","gap","padding","margin","distance","rhythm"],typography:["font","text","type","typography","heading","body","size","weight","family"],border:["border","outline","stroke","edge","frame"],radius:["radius","rounded","corner","curve","round"],shadow:["shadow","elevation","depth","glow","drop-shadow"],component:["component","element","widget"],utility:["utility","class","helper","css"],layout:["layout","container","grid","flex","group","arrange","organize"],pattern:["pattern","example","template","structure"],interaction:["hover","focus","active","disabled","pressed","selected","checked"]},this.entities={button:["button","btn","cta"],input:["input","field","textbox","text-field","form-control"],card:["card","panel"],badge:["badge","pill","tag","chip"],surface:["surface","background","layer","container"],icon:["icon","svg","glyph","symbol"],link:["link","anchor","hyperlink"],nav:["nav","navigation","menu"],modal:["modal","dialog","popup","overlay"],drawer:["drawer","sidebar","panel"],tab:["tab","tabstrip"],toast:["toast","notification","callout","message","alert"]},this.questionWords=["what","which","how","where","when","show","find","get","give","tell"]}async search(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),r=this.tokenize(e),a=this.analyzeQuery(r,e),o=[];a.intents.has("color")&&o.push(...this.queryColors(a,e)),(a.intents.has("utility")||a.intents.has("border")||a.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(a,e)),(a.intents.has("component")||a.entities.size>0)&&o.push(...this.queryComponents(a,e)),(a.intents.has("layout")||a.intents.has("pattern"))&&o.push(...this.queryPatterns(a,e)),a.intents.has("typography")&&o.push(...this.queryTypography(a,e)),a.intents.has("spacing")&&o.push(...this.querySpacing(a,e));let i=new Map;for(let l of o){let s=l.value;(!i.has(s)||i.get(s).score<l.score)&&i.set(s,l)}return Array.from(i.values()).sort((l,s)=>s.score-l.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let r={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};r.isQuestion=this.questionWords.some(a=>t.includes(a));for(let[a,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(a);for(let[a,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&r.entities.add(a);return(t.includes("hover")||e.includes("hover"))&&r.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&r.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&r.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&r.modifiers.add("disabled"),r}queryColors(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.colors)return r;let o=a.tokens.colors,i=Array.from(t.entities),l=Array.from(t.modifiers);if(l.includes("focus")&&t.intents.has("border")&&i.includes("input")&&r.push({text:"Focus border color: var(--color-primary-500)",value:"--color-primary-500",icon:"palette",category:"Color Token",score:100,cssVar:"var(--color-primary-500)",description:"Primary color used for focus states on form inputs"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(r.push({text:"Text on surface: var(--surface-text)",value:"--surface-text",icon:"palette",category:"Surface Token",score:95,cssVar:"var(--surface-text)",description:"Default text color for current surface"}),r.push({text:"Secondary text: var(--surface-text-secondary)",value:"--surface-text-secondary",icon:"palette",category:"Surface Token",score:90,cssVar:"var(--surface-text-secondary)",description:"Secondary/muted text on surface"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let s=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let p of[500,600,700]){let c=`--color-${s}-${p}`;r.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} ${p}: var(${c})`,value:c,icon:"palette",category:"Color Scale",score:80-(p-500)/100,cssVar:`var(${c})`,description:`${s} color scale shade ${p}`})}}if(i.includes("button")&&t.intents.has("color")){let s=l[0];s?r.push({text:`Button ${s} fill: var(--primary-fill-${s})`,value:`--primary-fill-${s}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${s} state`}):r.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return r}queryUtilities(t,e){let r=[],a=this.pds.ontology;if(!a?.utilities)return r;let o=a.utilities,i=[];for(let l of Object.values(o))if(typeof l=="object")for(let s of Object.values(l))Array.isArray(s)&&i.push(...s);return t.intents.has("border")&&i.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let p=80;e.includes("gradient")&&s.includes("gradient")&&(p=95),e.includes("glow")&&s.includes("glow")&&(p=95),r.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:p,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.intents.has("layout")&&i.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{r.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),e.includes("group")&&t.entities.has("button")&&r.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
1
|
+
var Re=Object.defineProperty;var N=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)Re(n,e,{get:t[e],enumerable:!0})};var ie={};P(ie,{enums:()=>u});var u,_=N(()=>{u={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}}});var le={};P(le,{default:()=>Ne,findComponentForElement:()=>Ae,getAllSelectors:()=>We,getAllTags:()=>De,getByCategory:()=>je,ontology:()=>z,searchOntology:()=>Be});function A(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function ce(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function Ae(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,r=0;for(;e&&r<t;){if(r++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let o of PDS.ontology.enhancements){let i=o.selector||o;if(A(e,i))return{element:e,componentType:"enhanced-component",displayName:o.description||i,id:o.id}}if(e.tagName==="FIELDSET"){let o=e.getAttribute("role");if(o==="group"||o==="radiogroup")return{element:e,componentType:"form-group",displayName:o==="radiogroup"?"radio group":"form group"}}if(e.tagName==="LABEL"&&e.querySelector&&e.querySelector("input,select,textarea"))return{element:e,componentType:"form-control",displayName:"label with input"};let a=e.closest?e.closest("label"):null;if(a&&a.querySelector&&a.querySelector("input,select,textarea"))return{element:a,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let l=String(i||"").trim();if(l.includes("*")){if(l.startsWith(".")){let p=l.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(g=>g.startsWith(p)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let c=e.parentElement,d=0;for(;c&&d<t;){if(c.classList&&Array.from(c.classList).some(g=>g.startsWith(p))&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};c=c.parentElement,d++}continue}continue}if(A(e,l))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let s=ce(e,l);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.classList){let i=Array.from(e.classList);for(let l of o.selectors||[])if(typeof l=="string"&&l.includes("*")&&l.startsWith(".")){let s=l.slice(1).replace(/\*/g,"");if(i.some(p=>p.startsWith(s)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}}}for(let o of PDS.ontology.layoutPatterns||[])for(let i of o.selectors||[]){let l=String(i||"").trim();if(l.includes("*")){if(l.startsWith(".")){let p=l.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(c=>c.startsWith(p)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(A(e,l))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let s=ce(e,l);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.tagName&&e.tagName.includes("-")){let o=e.tagName.toLowerCase(),i=PDS.ontology.components.find(l=>l.selectors.includes(o));return{element:e,componentType:"web-component",displayName:i?.name||o,id:i?.id||o,tags:i?.tags}}if(e.tagName==="BUTTON"){let o=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:o?"button with icon":"button",id:"button"}}if(A(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let o=A(e,"pds-icon")?e:e.closest("pds-icon");return{element:o,componentType:"icon",displayName:`pds-icon (${o.getAttribute&&o.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(A(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:A(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function We(){let n=[];for(let t of PDS.ontology.primitives)n.push(...t.selectors||[]);for(let t of PDS.ontology.components)n.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])n.push(...t.selectors||[]);return Array.from(new Set(n))}function Be(n,t={}){let e=n.toLowerCase(),r=[],a=(o,i)=>{for(let l of o)(l.id?.toLowerCase().includes(e)||l.name?.toLowerCase().includes(e)||l.description?.toLowerCase().includes(e)||l.tags?.some(p=>p.toLowerCase().includes(e))||l.category?.toLowerCase().includes(e)||l.selectors?.some(p=>p.toLowerCase().includes(e)))&&r.push({...l,type:i})};return(!t.type||t.type==="primitive")&&a(z.primitives,"primitive"),(!t.type||t.type==="component")&&a(z.components,"component"),(!t.type||t.type==="layout")&&a(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&a(z.enhancements,"enhancement"),r}function je(n){let t=n.toLowerCase();return{primitives:z.primitives.filter(e=>e.category===t),components:z.components.filter(e=>e.category===t),layouts:z.layoutPatterns.filter(e=>e.category===t)}}function De(){let n=new Set;return z.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var z,Ne,Z=N(()=>{z={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"callout",name:"Callout",description:"Contextual information and notification messages",selectors:[".callout",".callout-info",".callout-success",".callout-warning",".callout-danger",".callout-error",".callout-dismissible"],tags:["feedback","message","notification","status","information"],category:"feedback"},{id:"empty-state",name:"Empty State",description:"Empty state layout for missing data or onboarding",selectors:[".empty-state"],tags:["empty","no-data","zero","placeholder","onboarding","state"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-fab",name:"FAB",description:"Floating Action Button with expandable satellite actions",selectors:["pds-fab"],tags:["button","action","floating","interactive"],category:"action"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["callout","badge","empty-state"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]},action:{description:"Interactive actions and buttons",primitives:["button"],components:["pds-fab"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],empty:["empty-state","placeholder","zero","no-data","onboarding","callout","card","icon","button"],"empty state":["empty-state","empty","no-data","zero","onboarding"],"no data":["empty-state","empty","zero","placeholder"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working","pds-fab","floating"],btn:["button","interactive","action","pds-fab"],fab:["pds-fab","floating","button","action","menu"],floating:["fab","pds-fab","button","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],callout:["notification","feedback","message","status","toast","information","alert","warning","error","info","success","danger"],alert:["callout","notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["callout","toast","pds-toaster","feedback","message","popup","alert"],toast:["pds-toaster","notification","callout","feedback","popup","snackbar","alert"],feedback:["callout","notification","toast","status","badge","validation","error","success","alert"],message:["callout","notification","feedback","dialog","toast","alert"],status:["badge","callout","indicator","feedback","state","alert"],error:["callout","danger","validation","feedback","warning","alert"],success:["callout","feedback","badge","status","check","alert"],warning:["callout","caution","feedback","status","alert"],info:["callout","information","feedback","status","alert"],danger:["callout","error","feedback","destructive","delete","alert"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};Ne=z});var ve={};P(ve,{AutoDefiner:()=>ee});async function at(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:r,mapper:a=p=>`${p}.js`,onError:o=(p,c)=>console.error(`[defineWebComponents] ${p}:`,c)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=p=>p.toLowerCase().replace(/(^|-)([a-z])/g,(c,d,g)=>g.toUpperCase()),s=async p=>{try{if(customElements.get(p))return{tag:p,status:"already-defined"};let c=a(p),g=await import(c instanceof URL?c.href:new URL(c,i).href),h=g?.default??g?.[l(p)];if(!h){if(customElements.get(p))return{tag:p,status:"self-defined"};throw new Error(`No export found for ${p}. Expected default export or named export "${l(p)}".`)}return customElements.get(p)?{tag:p,status:"race-already-defined"}:(customElements.define(p,h),{tag:p,status:"defined"})}catch(c){throw o(p,c),c}};return Promise.all(e.map(s))}var ee,xe=N(()=>{ee=class{constructor(t={}){let{baseURL:e,mapper:r,onError:a,predicate:o=()=>!0,attributeModule:i="data-module",root:l=document,scanExisting:s=!0,debounceMs:p=16,observeShadows:c=!0,enhancers:d=[],patchAttachShadow:g=!0}=t,h=new Set,y=new Set,x=new Set,m=new Map,w=new WeakMap,M=new WeakMap,k=0,T=!1,L=null,W=f=>{if(!f||!d.length)return;let v=M.get(f);v||(v=new Set,M.set(f,v));for(let b of d)if(!(!b.selector||!b.run)&&!v.has(b.selector))try{f.matches&&f.matches(b.selector)&&(b.run(f),v.add(b.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${b.selector}":`,C)}},B=(f,v)=>{if(!T&&!(!f||!f.includes("-"))&&!customElements.get(f)&&!y.has(f)&&!x.has(f)){if(v&&v.getAttribute){let b=v.getAttribute(i);b&&!m.has(f)&&m.set(f,b)}h.add(f),$()}},$=()=>{k||(k=setTimeout(R,p))},S=f=>{if(f){if(f.nodeType===1){let v=f,b=v.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,v)&&B(b,v),W(v),c&&v.shadowRoot&&F(v.shadowRoot)}f.querySelectorAll&&f.querySelectorAll("*").forEach(v=>{let b=v.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,v)&&B(b,v),W(v),c&&v.shadowRoot&&F(v.shadowRoot)})}},F=f=>{if(!f||w.has(f))return;S(f);let v=new MutationObserver(b=>{for(let C of b)C.addedNodes?.forEach(j=>{S(j)}),C.type==="attributes"&&C.target&&S(C.target)});v.observe(f,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...d.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),w.set(f,v)};async function R(){if(clearTimeout(k),k=0,!h.size)return;let f=Array.from(h);h.clear(),f.forEach(v=>y.add(v));try{let v=b=>m.get(b)??(r?r(b):`${b}.js`);await at(...f,{baseURL:e,mapper:v,onError:(b,C)=>{x.add(b),a?.(b,C)}})}catch{}finally{f.forEach(v=>y.delete(v))}}let q=l===document?document.documentElement:l,G=new MutationObserver(f=>{for(let v of f)v.addedNodes?.forEach(b=>{S(b)}),v.type==="attributes"&&v.target&&S(v.target)});if(G.observe(q,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...d.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),c&&g&&Element.prototype.attachShadow){let f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(b){let C=f.call(this,b);if(b&&b.mode==="open"){F(C);let j=this.tagName?.toLowerCase();j&&j.includes("-")&&!customElements.get(j)&&B(j,this)}return C},L=()=>Element.prototype.attachShadow=f}return s&&S(q),{stop(){T=!0,G.disconnect(),L&&L(),k&&(clearTimeout(k),k=0),w.forEach(f=>f.disconnect())},flush:R}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:a,mapper:o=c=>`${c}.js`,onError:i=(c,d)=>console.error(`[defineWebComponents] ${c}:`,d)}=e,l=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(d,g,h)=>h.toUpperCase()),p=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let d=o(c),h=await import(d instanceof URL?d.href:new URL(d,l).href),y=h?.default??h?.[s(c)];if(!y){if(customElements.get(c))return{tag:c,status:"self-defined"};throw new Error(`No export found for ${c}. Expected default export or named export "${s(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,y),{tag:c,status:"defined"})}catch(d){throw i(c,d),d}};return Promise.all(r.map(p))}}});var oe={};P(oe,{PDSQuery:()=>ae});var ae,ne=N(()=>{ae=class{constructor(t){this.pds=t,this.intents={color:["color","colours","shade","tint","hue","foreground","background","text","fill","bg","fg"],spacing:["spacing","space","gap","padding","margin","distance","rhythm"],typography:["font","text","type","typography","heading","body","size","weight","family"],border:["border","outline","stroke","edge","frame"],radius:["radius","rounded","corner","curve","round"],shadow:["shadow","elevation","depth","glow","drop-shadow"],component:["component","element","widget"],utility:["utility","class","helper","css"],layout:["layout","container","grid","flex","group","arrange","organize"],pattern:["pattern","example","template","structure"],interaction:["hover","focus","active","disabled","pressed","selected","checked"]},this.entities={button:["button","btn","cta"],input:["input","field","textbox","text-field","form-control"],card:["card","panel"],badge:["badge","pill","tag","chip"],surface:["surface","background","layer","container"],icon:["icon","svg","glyph","symbol"],link:["link","anchor","hyperlink"],nav:["nav","navigation","menu"],modal:["modal","dialog","popup","overlay"],drawer:["drawer","sidebar","panel"],tab:["tab","tabstrip"],toast:["toast","notification","callout","message","alert"]},this.questionWords=["what","which","how","where","when","show","find","get","give","tell"]}async search(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),r=this.tokenize(e),a=this.analyzeQuery(r,e),o=[];a.intents.has("color")&&o.push(...this.queryColors(a,e)),(a.intents.has("utility")||a.intents.has("border")||a.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(a,e)),(a.intents.has("component")||a.entities.size>0)&&o.push(...this.queryComponents(a,e)),(a.intents.has("layout")||a.intents.has("pattern"))&&o.push(...this.queryPatterns(a,e)),a.intents.has("typography")&&o.push(...this.queryTypography(a,e)),a.intents.has("spacing")&&o.push(...this.querySpacing(a,e));let i=new Map;for(let l of o){let s=l.value;(!i.has(s)||i.get(s).score<l.score)&&i.set(s,l)}return Array.from(i.values()).sort((l,s)=>s.score-l.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let r={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};r.isQuestion=this.questionWords.some(a=>t.includes(a));for(let[a,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(a);for(let[a,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&r.entities.add(a);return(t.includes("hover")||e.includes("hover"))&&r.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&r.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&r.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&r.modifiers.add("disabled"),r}queryColors(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.colors)return r;let o=a.tokens.colors,i=Array.from(t.entities),l=Array.from(t.modifiers);if(l.includes("focus")&&t.intents.has("border")&&i.includes("input")&&r.push({text:"Focus border color: var(--color-primary-500)",value:"--color-primary-500",icon:"palette",category:"Color Token",score:100,cssVar:"var(--color-primary-500)",description:"Primary color used for focus states on form inputs"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(r.push({text:"Text on surface: var(--surface-text)",value:"--surface-text",icon:"palette",category:"Surface Token",score:95,cssVar:"var(--surface-text)",description:"Default text color for current surface"}),r.push({text:"Secondary text: var(--surface-text-secondary)",value:"--surface-text-secondary",icon:"palette",category:"Surface Token",score:90,cssVar:"var(--surface-text-secondary)",description:"Secondary/muted text on surface"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let s=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let p of[500,600,700]){let c=`--color-${s}-${p}`;r.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} ${p}: var(${c})`,value:c,icon:"palette",category:"Color Scale",score:80-(p-500)/100,cssVar:`var(${c})`,description:`${s} color scale shade ${p}`})}}if(i.includes("button")&&t.intents.has("color")){let s=l[0];s?r.push({text:`Button ${s} fill: var(--primary-fill-${s})`,value:`--primary-fill-${s}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${s} state`}):r.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return r}queryUtilities(t,e){let r=[],a=this.pds.ontology;if(!a?.utilities)return r;let o=a.utilities,i=[];for(let l of Object.values(o))if(typeof l=="object")for(let s of Object.values(l))Array.isArray(s)&&i.push(...s);return t.intents.has("border")&&i.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let p=80;e.includes("gradient")&&s.includes("gradient")&&(p=95),e.includes("glow")&&s.includes("glow")&&(p=95),r.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:p,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.intents.has("layout")&&i.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{r.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),e.includes("group")&&t.entities.has("button")&&r.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
2
2
|
<button class="btn-primary">One</button>
|
|
3
3
|
<button class="btn-primary">Two</button>
|
|
4
4
|
</div>`,description:"Container for grouped buttons with connected styling"}),r}queryComponents(t,e){let r=[],a=this.pds.ontology;return!a?.components&&!a?.primitives||(a.components&&a.components.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);i>50&&r.push({text:`<${o.id}> - ${o.name}`,value:o.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${o.id}></${o.id}>`,description:o.description||`${o.name} web component`})}),a.primitives&&a.primitives.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);if(i>50){let l=o.selectors?.[0]||o.id;r.push({text:`${l} - ${o.name}`,value:o.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(o),description:o.description||`${o.name} primitive element`})}}),e.includes("icon")&&(e.includes("only")||e.includes("button"))&&r.push({text:'Icon-only button: <button class="btn-icon">',value:"btn-icon",icon:"star",category:"Pattern",score:95,code:`<button class="btn-icon btn-primary">
|
|
@@ -16,7 +16,7 @@ var Re=Object.defineProperty;var N=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
16
16
|
</section>`,description:"Semantic section element for content grouping"}))),r}queryTypography(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.typography)return r;let o=a.tokens.typography;return(e.includes("heading")||e.includes("title"))&&r.push({text:"Heading font: var(--font-family-heading)",value:"--font-family-heading",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-heading)",description:"Font family for headings"}),(e.includes("body")||e.includes("text"))&&r.push({text:"Body font: var(--font-family-body)",value:"--font-family-body",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-body)",description:"Font family for body text"}),r}querySpacing(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.spacing)return r;let o=a.tokens.spacing;for(let[i,l]of Object.entries(o))["2","4","6","8"].includes(i)&&r.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${l}`});return r}scoreMatch(t,e){let r=t.toLowerCase(),a=e.toLowerCase(),o=0;if(r===a)return 100;a.includes(r)&&(o+=80);let i=this.tokenize(r),l=this.tokenize(a),s=i.filter(p=>l.includes(p)).length;return o+=s/i.length*40,a.startsWith(r)&&(o+=20),Math.min(100,o)}generatePrimitiveExample(t){let e=t.selectors?.[0]||t.id;return e.includes("button")||t.id==="button"?'<button class="btn-primary">Click me</button>':e.includes("card")||t.id==="card"?`<article class="card">
|
|
17
17
|
<h3>Title</h3>
|
|
18
18
|
<p>Content</p>
|
|
19
|
-
</article>`:e.includes("badge")||t.id==="badge"?'<span class="badge">New</span>':`<${e}>Content</${e}>`}describeUtility(t){return t.includes("border-gradient")?"Apply animated gradient border effect":t.includes("border-glow")?"Apply glowing border effect":t.includes("flex")?"Flexbox container utility":t.includes("grid")?"Grid container utility":t.includes("gap-")?"Set gap between flex/grid children":t.includes("items-")?"Align items in flex container":t.includes("justify-")?"Justify content in flex container":t===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}}});var Ce={};P(Ce,{deepMerge:()=>Ee,fragmentFromTemplateLike:()=>nt,isObject:()=>Y});function Y(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ee(n,t){let e={...n};return Y(n)&&Y(t)&&Object.keys(t).forEach(r=>{Y(t[r])?r in n?e[r]=Ee(n[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function nt(n){let t=Array.isArray(n?.strings)?n.strings:[],e=Array.isArray(n?.values)?n.values:[],r=new Set,a=[],o=/(\s)(\.[\w-]+)=\s*$/;for(let d=0;d<t.length;d+=1){let g=t[d]??"",h=g.match(o);if(h&&d<e.length){let x=h[2].slice(1),m=`pds-val-${d}`;g=g.replace(o,`$1data-pds-prop="${x}:${m}"`),r.add(d)}a.push(g),d<e.length&&!r.has(d)&&a.push(`<!--pds-val-${d}-->`)}let i=document.createElement("template");i.innerHTML=a.join("");let l=(d,g)=>{let h=d.parentNode;if(!h)return;if(g==null){h.removeChild(d);return}let v=x=>{if(x!=null){if(x instanceof Node){h.insertBefore(x,d);return}if(Array.isArray(x)){x.forEach(m=>v(m));return}h.insertBefore(document.createTextNode(String(x)),d)}};v(g),h.removeChild(d)},s=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),p=[];for(;s.nextNode();){let d=s.currentNode;d?.nodeValue?.startsWith("pds-val-")&&p.push(d)}return p.forEach(d=>{let g=Number(d.nodeValue.replace("pds-val-",""));l(d,e[g])}),i.content.querySelectorAll("*").forEach(d=>{let g=d.getAttribute("data-pds-prop");if(!g)return;let[h,v]=g.split(":"),x=Number(String(v).replace("pds-val-",""));h&&Number.isInteger(x)&&(d[h]=e[x]),d.removeAttribute("data-pds-prop")}),i.content}var Te=N(()=>{});_();var U={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};U.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:u.IconSizes,include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function ie(n="log",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let a=console[n]||console.log;e.length>0?a(t,...e):a(t)}}_();Z();var E=class n{static#u;static get instance(){return this.#u}#e;#o;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#u=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ve(),typeof CSSStyleSheet<"u"?this.#$e():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{};return{colors:this.#k(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#A(t.shape||{}),borderWidths:this.#W(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#B(t.layers||{}),layout:this.#j(t.layout||{}),transitions:this.#D(t.behavior||{}),zIndex:this.#N(t.layers||{}),icons:this.#P(t.icons||{})}}#k(t){let{primary:e="#3b82f6",secondary:r="#64748b",accent:a="#ec4899",background:o="#ffffff",success:i=null,warning:l="#FFBF00",danger:s=null,info:p=null,darkMode:c={}}=t,d={primary:this.#r(e),secondary:this.#r(r),accent:this.#r(a),success:this.#r(i||this.#S(e)),warning:this.#r(l||a),danger:this.#r(s||this.#$(e)),info:this.#r(p||e),gray:this.#g(r),surface:this.#h(o)};return d.surface.fieldset=this.#z(d.surface),d.surfaceSmart=this.#v(d.surface),d.dark=this.#F(d,o,c),d.dark&&d.dark.surface&&(d.dark.surfaceSmart=this.#v(d.dark.surface)),d.interactive={light:{fill:this.#y(d.primary,4.5),text:d.primary[600]},dark:{fill:this.#y(d.dark.primary,4.5),text:this.#L(d.dark.primary,d.dark.surface.base,4.5)}},d}#r(t){let e=this.#n(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#S(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#$(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#g(t){let e=this.#n(t),r=e.h,a=Math.min(e.s,10);return{50:this.#t(r,a,98),100:this.#t(r,a,95),200:this.#t(r,a,88),300:this.#t(r,a,78),400:this.#t(r,a,60),500:t,600:this.#t(r,Math.min(a+5,15),45),700:this.#t(r,Math.min(a+8,18),35),800:this.#t(r,Math.min(a+10,20),20),900:this.#t(r,Math.min(a+12,22),10)}}#h(t){let e=this.#n(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#m(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#z(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#M(t.sunken,.05),overlay:t.elevated}}#M(t,e=.05){let r=this.#n(t),a=Math.max(r.l-r.l*e,5);return this.#t(r.h,r.s,a)}#m(t){let e=this.#n(t);if(e.l>50){let r=Math.min(e.s+5,25),a=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,r,a)}else{let r=Math.max(e.s-10,5),a=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,r,a)}}#F(t,e="#ffffff",r={}){let a=r.background?r.background:this.#m(e),o=this.#h(a),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...o,fieldset:this.#T(o)},primary:i,secondary:r.secondary?this.#r(r.secondary):this.#i(t.secondary),accent:r.accent?this.#r(r.accent):this.#i(t.accent),gray:r.secondary?this.#g(r.secondary):t.gray,success:this.#i(t.success),info:this.#i(t.info),warning:this.#i(t.warning),danger:this.#i(t.danger)}}#l(t){let e=String(t||"").replace("#",""),r=e.length===3?e.split("").map(o=>o+o).join(""):e,a=parseInt(r,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}#p(t){let{r:e,g:r,b:a}=this.#l(t),o=[e/255,r/255,a/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}#d(t,e){let r=this.#p(t),a=this.#p(e),o=Math.max(r,a),i=Math.min(r,a);return(o+.05)/(i+.05)}#f(t,e=4.5){if(!t)return"#000000";let r="#ffffff",a="#000000",o=this.#d(t,r);if(o>=e)return r;let i=this.#d(t,a);return i>=e||i>o?a:r}#b(t,e=1){let{r,g:a,b:o}=this.#l(t);return`rgba(${r}, ${a}, ${o}, ${e})`}#E(t,e,r=.5){let a=this.#l(t),o=this.#l(e),i=Math.round(a.r+(o.r-a.r)*r),l=Math.round(a.g+(o.g-a.g)*r),s=Math.round(a.b+(o.b-a.b)*r);return this.#C(i,l,s)}#C(t,e,r){let a=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${a(t)}${a(e)}${a(r)}`}#T(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#x(t.elevated,.08),sunken:t.elevated,overlay:this.#x(t.overlay,.05)}}#L(t={},e="#000000",r=4.5){let a=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of a){let l=t?.[i];if(!l||typeof l!="string")continue;let s=this.#d(l,e);if(s>o.ratio&&(o={shade:i,color:l,ratio:s}),s>=r)return l}return o.color||t?.["600"]||t?.["500"]}#y(t={},e=4.5){let r=["600","700","800","500","400","900"],a={shade:null,color:null,ratio:0};for(let o of r){let i=t?.[o];if(!i||typeof i!="string")continue;let l=this.#d(i,"#ffffff");if(l>a.ratio&&(a={shade:o,color:i,ratio:l}),l>=e)return i}return a.color||t?.["600"]||t?.["500"]}#v(t){let e={};return Object.entries(t).forEach(([r,a])=>{if(!a||typeof a!="string"||!a.startsWith("#"))return;let o=this.#p(a)<.5,i=this.#f(a,4.5),l=this.#f(a,3),s=this.#E(i,a,.4),p=i,c=s,d=o?"#ffffff":"#000000",g=o?.25:.1,h=this.#b(d,g),v=o?"#ffffff":"#000000",x=o?.15:.1,m=this.#b(v,x);e[r]={bg:a,text:i,textSecondary:l,textMuted:s,icon:p,iconSubtle:c,shadow:h,border:m,scheme:o?"dark":"light"}}),e}#x(t,e=.05){let r=this.#n(t),a=Math.min(r.l+(100-r.l)*e,95);return this.#t(r.h,r.s,a)}#i(t){let e={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([a,o])=>{let i=t[o.source];e[a]=this.#R(i,o.dimFactor)}),e}#R(t,e=.8){let r=this.#n(t),a=Math.max(r.s*e,5),o=Math.max(r.l*e,5);return this.#t(r.h,a,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:a=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(a))?Number(a):12,12),l={0:"0"};for(let s=1;s<=i;s++)l[s]=`${o*s}px`;return l}#A(t){let{radiusSize:e="medium",customRadius:r=null}=t,a;r!=null?a=r:typeof e=="number"?a=e:typeof e=="string"?a=u.RadiusSizes[e]??u.RadiusSizes.medium:a=u.RadiusSizes.medium;let o=Number.isFinite(Number(a))?Number(a):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(o*.25)?Math.round(o*.25):0}px`,sm:`${Number.isFinite(o*.5)?Math.round(o*.5):0}px`,md:`${o}px`,lg:`${Number.isFinite(o*1.5)?Math.round(o*1.5):0}px`,xl:`${Number.isFinite(o*2)?Math.round(o*2):0}px`,full:"9999px"}}#W(t){let{borderWidth:e="medium"}=t,r;return typeof e=="number"?r=e:typeof e=="string"?r=u.BorderWidths[e]??u.BorderWidths.medium:r=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:r="system-ui, -apple-system, sans-serif",fontFamilyMono:a='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:l=u.FontWeights.light,fontWeightNormal:s=u.FontWeights.normal,fontWeightMedium:p=u.FontWeights.medium,fontWeightSemibold:c=u.FontWeights.semibold,fontWeightBold:d=u.FontWeights.bold,lineHeightTight:g=u.LineHeights.tight,lineHeightNormal:h=u.LineHeights.normal,lineHeightRelaxed:v=u.LineHeights.relaxed}=t,x=Number.isFinite(Number(o))?Number(o):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:a},fontSize:{xs:`${Math.round(x/Math.pow(m,2))}px`,sm:`${Math.round(x/m)}px`,base:`${x}px`,lg:`${Math.round(x*m)}px`,xl:`${Math.round(x*Math.pow(m,2))}px`,"2xl":`${Math.round(x*Math.pow(m,3))}px`,"3xl":`${Math.round(x*Math.pow(m,4))}px`,"4xl":`${Math.round(x*Math.pow(m,5))}px`},fontWeight:{light:l?.toString()||"300",normal:s?.toString()||"400",medium:p?.toString()||"500",semibold:c?.toString()||"600",bold:d?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:v?.toString()||"1.75"}}}#B(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:a=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*a}px ${2*r}px 0 ${i}`,base:`0 ${1*a}px ${3*r}px 0 ${o}, 0 ${1*a}px ${2*r}px 0 ${i}`,md:`0 ${4*a}px ${6*r}px ${-1*a}px ${o}, 0 ${2*a}px ${4*r}px ${-1*a}px ${i}`,lg:`0 ${10*a}px ${15*r}px ${-3*a}px ${o}, 0 ${4*a}px ${6*r}px ${-2*a}px ${i}`,xl:`0 ${20*a}px ${25*r}px ${-5*a}px ${o}, 0 ${10*a}px ${10*r}px ${-5*a}px ${i}`,inner:`inset 0 ${2*a}px ${4*r}px 0 ${i}`}}#j(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:a={sm:640,md:768,lg:1024,xl:1280}}=t,o=this.#w(t);return{maxWidth:this.#a(e,"1200px"),maxWidthSm:o.sm,maxWidthMd:o.md,maxWidthLg:o.lg,maxWidthXl:o.xl,minHeight:"100vh",containerPadding:this.#a(r,"16px"),breakpoints:{sm:this.#a(a.sm,"640px"),md:this.#a(a.md,"768px"),lg:this.#a(a.lg,"1024px"),xl:this.#a(a.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#w(t={}){let e={sm:640,md:768,lg:1024,xl:1280},{maxWidths:r={},maxWidth:a=1200,containerPadding:o=16,breakpoints:i=e}=t||{},l=this.#s(o,16),s=this.#s(a,e.xl),p={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},c=g=>g?Math.max(320,g-l*2):s,d={sm:Math.min(s,c(p.sm)),md:Math.min(s,c(p.md)),lg:Math.min(s,c(p.lg)),xl:Math.max(320,s)};return{sm:this.#a(r.sm,`${d.sm}px`),md:this.#a(r.md,`${d.md}px`),lg:this.#a(r.lg,`${d.lg}px`),xl:this.#a(r.xl,`${d.xl}px`)}}#a(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let r=parseFloat(t);if(Number.isFinite(r))return r}return e}#D(t){let{transitionSpeed:e=u.TransitionSpeeds.normal,animationEasing:r=u.AnimationEasings["ease-out"]}=t,a;return typeof e=="number"?a=e:typeof e=="string"&&u.TransitionSpeeds[e]?a=u.TransitionSpeeds[e]:a=u.TransitionSpeeds.normal,{fast:`${Math.round(a*.6)}ms`,normal:`${a}ms`,slow:`${Math.round(a*1.4)}ms`}}#N(t){let{baseZIndex:e=1e3,zIndexStep:r=10}=t;return{dropdown:e.toString(),sticky:(e+r*2).toString(),fixed:(e+r*3).toString(),modal:(e+r*4).toString(),drawer:(e+r*5).toString(),popover:(e+r*6).toString(),tooltip:(e+r*7).toString(),notification:(e+r*8).toString()}}#P(t){let{set:e="phosphor",weight:r="regular",defaultSize:a=24,sizes:o={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:l="/assets/img/icons/"}=t;return{set:e,weight:r,defaultSize:`${a}px`,sizes:Object.fromEntries(Object.entries(o).map(([s,p])=>[s,`${p}px`])),spritePath:i,externalPath:l}}#U(t){let e=[];e.push(` /* Colors */
|
|
19
|
+
</article>`:e.includes("badge")||t.id==="badge"?'<span class="badge">New</span>':`<${e}>Content</${e}>`}describeUtility(t){return t.includes("border-gradient")?"Apply animated gradient border effect":t.includes("border-glow")?"Apply glowing border effect":t.includes("flex")?"Flexbox container utility":t.includes("grid")?"Grid container utility":t.includes("gap-")?"Set gap between flex/grid children":t.includes("items-")?"Align items in flex container":t.includes("justify-")?"Justify content in flex container":t===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}}});var Ce={};P(Ce,{deepMerge:()=>Ee,fragmentFromTemplateLike:()=>nt,isObject:()=>Y});function Y(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ee(n,t){let e={...n};return Y(n)&&Y(t)&&Object.keys(t).forEach(r=>{Y(t[r])?r in n?e[r]=Ee(n[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function nt(n){let t=Array.isArray(n?.strings)?n.strings:[],e=Array.isArray(n?.values)?n.values:[],r=new Set,a=[],o=/(\s)(\.[\w-]+)=\s*$/;for(let d=0;d<t.length;d+=1){let g=t[d]??"",h=g.match(o);if(h&&d<e.length){let x=h[2].slice(1),m=`pds-val-${d}`;g=g.replace(o,`$1data-pds-prop="${x}:${m}"`),r.add(d)}a.push(g),d<e.length&&!r.has(d)&&a.push(`<!--pds-val-${d}-->`)}let i=document.createElement("template");i.innerHTML=a.join("");let l=(d,g)=>{let h=d.parentNode;if(!h)return;if(g==null){h.removeChild(d);return}let y=x=>{if(x!=null){if(x instanceof Node){h.insertBefore(x,d);return}if(Array.isArray(x)){x.forEach(m=>y(m));return}h.insertBefore(document.createTextNode(String(x)),d)}};y(g),h.removeChild(d)},s=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),p=[];for(;s.nextNode();){let d=s.currentNode;d?.nodeValue?.startsWith("pds-val-")&&p.push(d)}return p.forEach(d=>{let g=Number(d.nodeValue.replace("pds-val-",""));l(d,e[g])}),i.content.querySelectorAll("*").forEach(d=>{let g=d.getAttribute("data-pds-prop");if(!g)return;let[h,y]=g.split(":"),x=Number(String(y).replace("pds-val-",""));h&&Number.isInteger(x)&&(d[h]=e[x]),d.removeAttribute("data-pds-prop")}),i.content}var Te=N(()=>{});_();var O={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};O.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:u.IconSizes,include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function se(n="log",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let a=console[n]||console.log;e.length>0?a(t,...e):a(t)}}_();Z();var E=class n{static#u;static get instance(){return this.#u}#e;#o;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#u=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ve(),typeof CSSStyleSheet<"u"?this.#$e():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{};return{colors:this.#k(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#A(t.shape||{}),borderWidths:this.#W(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#B(t.layers||{}),layout:this.#j(t.layout||{}),transitions:this.#D(t.behavior||{}),zIndex:this.#N(t.layers||{}),icons:this.#P(t.icons||{})}}#k(t){let{primary:e="#3b82f6",secondary:r="#64748b",accent:a="#ec4899",background:o="#ffffff",success:i=null,warning:l="#FFBF00",danger:s=null,info:p=null,darkMode:c={}}=t,d={primary:this.#r(e),secondary:this.#r(r),accent:this.#r(a),success:this.#r(i||this.#S(e)),warning:this.#r(l||a),danger:this.#r(s||this.#$(e)),info:this.#r(p||e),gray:this.#g(r),surface:this.#h(o)};return d.surface.fieldset=this.#z(d.surface),d.surfaceSmart=this.#v(d.surface),d.dark=this.#F(d,o,c),d.dark&&d.dark.surface&&(d.dark.surfaceSmart=this.#v(d.dark.surface)),d.interactive={light:{fill:this.#y(d.primary,4.5),text:d.primary[600]},dark:{fill:this.#y(d.dark.primary,4.5),text:this.#L(d.dark.primary,d.dark.surface.base,4.5)}},d}#r(t){let e=this.#n(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#S(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#$(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#g(t){let e=this.#n(t),r=e.h,a=Math.min(e.s,10);return{50:this.#t(r,a,98),100:this.#t(r,a,95),200:this.#t(r,a,88),300:this.#t(r,a,78),400:this.#t(r,a,60),500:t,600:this.#t(r,Math.min(a+5,15),45),700:this.#t(r,Math.min(a+8,18),35),800:this.#t(r,Math.min(a+10,20),20),900:this.#t(r,Math.min(a+12,22),10)}}#h(t){let e=this.#n(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#m(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#z(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#M(t.sunken,.05),overlay:t.elevated}}#M(t,e=.05){let r=this.#n(t),a=Math.max(r.l-r.l*e,5);return this.#t(r.h,r.s,a)}#m(t){let e=this.#n(t);if(e.l>50){let r=Math.min(e.s+5,25),a=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,r,a)}else{let r=Math.max(e.s-10,5),a=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,r,a)}}#F(t,e="#ffffff",r={}){let a=r.background?r.background:this.#m(e),o=this.#h(a),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...o,fieldset:this.#T(o)},primary:i,secondary:r.secondary?this.#r(r.secondary):this.#i(t.secondary),accent:r.accent?this.#r(r.accent):this.#i(t.accent),gray:r.secondary?this.#g(r.secondary):t.gray,success:this.#i(t.success),info:this.#i(t.info),warning:this.#i(t.warning),danger:this.#i(t.danger)}}#l(t){let e=String(t||"").replace("#",""),r=e.length===3?e.split("").map(o=>o+o).join(""):e,a=parseInt(r,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}#p(t){let{r:e,g:r,b:a}=this.#l(t),o=[e/255,r/255,a/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}#d(t,e){let r=this.#p(t),a=this.#p(e),o=Math.max(r,a),i=Math.min(r,a);return(o+.05)/(i+.05)}#f(t,e=4.5){if(!t)return"#000000";let r="#ffffff",a="#000000",o=this.#d(t,r);if(o>=e)return r;let i=this.#d(t,a);return i>=e||i>o?a:r}#b(t,e=1){let{r,g:a,b:o}=this.#l(t);return`rgba(${r}, ${a}, ${o}, ${e})`}#E(t,e,r=.5){let a=this.#l(t),o=this.#l(e),i=Math.round(a.r+(o.r-a.r)*r),l=Math.round(a.g+(o.g-a.g)*r),s=Math.round(a.b+(o.b-a.b)*r);return this.#C(i,l,s)}#C(t,e,r){let a=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${a(t)}${a(e)}${a(r)}`}#T(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#x(t.elevated,.08),sunken:t.elevated,overlay:this.#x(t.overlay,.05)}}#L(t={},e="#000000",r=4.5){let a=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of a){let l=t?.[i];if(!l||typeof l!="string")continue;let s=this.#d(l,e);if(s>o.ratio&&(o={shade:i,color:l,ratio:s}),s>=r)return l}return o.color||t?.["600"]||t?.["500"]}#y(t={},e=4.5){let r=["600","700","800","500","400","900"],a={shade:null,color:null,ratio:0};for(let o of r){let i=t?.[o];if(!i||typeof i!="string")continue;let l=this.#d(i,"#ffffff");if(l>a.ratio&&(a={shade:o,color:i,ratio:l}),l>=e)return i}return a.color||t?.["600"]||t?.["500"]}#v(t){let e={};return Object.entries(t).forEach(([r,a])=>{if(!a||typeof a!="string"||!a.startsWith("#"))return;let o=this.#p(a)<.5,i=this.#f(a,4.5),l=this.#f(a,3),s=this.#E(i,a,.4),p=i,c=s,d=o?"#ffffff":"#000000",g=o?.25:.1,h=this.#b(d,g),y=o?"#ffffff":"#000000",x=o?.15:.1,m=this.#b(y,x);e[r]={bg:a,text:i,textSecondary:l,textMuted:s,icon:p,iconSubtle:c,shadow:h,border:m,scheme:o?"dark":"light"}}),e}#x(t,e=.05){let r=this.#n(t),a=Math.min(r.l+(100-r.l)*e,95);return this.#t(r.h,r.s,a)}#i(t){let e={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([a,o])=>{let i=t[o.source];e[a]=this.#R(i,o.dimFactor)}),e}#R(t,e=.8){let r=this.#n(t),a=Math.max(r.s*e,5),o=Math.max(r.l*e,5);return this.#t(r.h,a,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:a=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(a))?Number(a):12,12),l={0:"0"};for(let s=1;s<=i;s++)l[s]=`${o*s}px`;return l}#A(t){let{radiusSize:e="medium",customRadius:r=null}=t,a;r!=null?a=r:typeof e=="number"?a=e:typeof e=="string"?a=u.RadiusSizes[e]??u.RadiusSizes.medium:a=u.RadiusSizes.medium;let o=Number.isFinite(Number(a))?Number(a):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(o*.25)?Math.round(o*.25):0}px`,sm:`${Number.isFinite(o*.5)?Math.round(o*.5):0}px`,md:`${o}px`,lg:`${Number.isFinite(o*1.5)?Math.round(o*1.5):0}px`,xl:`${Number.isFinite(o*2)?Math.round(o*2):0}px`,full:"9999px"}}#W(t){let{borderWidth:e="medium"}=t,r;return typeof e=="number"?r=e:typeof e=="string"?r=u.BorderWidths[e]??u.BorderWidths.medium:r=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:r="system-ui, -apple-system, sans-serif",fontFamilyMono:a='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:l=u.FontWeights.light,fontWeightNormal:s=u.FontWeights.normal,fontWeightMedium:p=u.FontWeights.medium,fontWeightSemibold:c=u.FontWeights.semibold,fontWeightBold:d=u.FontWeights.bold,lineHeightTight:g=u.LineHeights.tight,lineHeightNormal:h=u.LineHeights.normal,lineHeightRelaxed:y=u.LineHeights.relaxed}=t,x=Number.isFinite(Number(o))?Number(o):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:a},fontSize:{xs:`${Math.round(x/Math.pow(m,2))}px`,sm:`${Math.round(x/m)}px`,base:`${x}px`,lg:`${Math.round(x*m)}px`,xl:`${Math.round(x*Math.pow(m,2))}px`,"2xl":`${Math.round(x*Math.pow(m,3))}px`,"3xl":`${Math.round(x*Math.pow(m,4))}px`,"4xl":`${Math.round(x*Math.pow(m,5))}px`},fontWeight:{light:l?.toString()||"300",normal:s?.toString()||"400",medium:p?.toString()||"500",semibold:c?.toString()||"600",bold:d?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:y?.toString()||"1.75"}}}#B(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:a=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*a}px ${2*r}px 0 ${i}`,base:`0 ${1*a}px ${3*r}px 0 ${o}, 0 ${1*a}px ${2*r}px 0 ${i}`,md:`0 ${4*a}px ${6*r}px ${-1*a}px ${o}, 0 ${2*a}px ${4*r}px ${-1*a}px ${i}`,lg:`0 ${10*a}px ${15*r}px ${-3*a}px ${o}, 0 ${4*a}px ${6*r}px ${-2*a}px ${i}`,xl:`0 ${20*a}px ${25*r}px ${-5*a}px ${o}, 0 ${10*a}px ${10*r}px ${-5*a}px ${i}`,inner:`inset 0 ${2*a}px ${4*r}px 0 ${i}`}}#j(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:a={sm:640,md:768,lg:1024,xl:1280}}=t,o=this.#w(t);return{maxWidth:this.#a(e,"1200px"),maxWidthSm:o.sm,maxWidthMd:o.md,maxWidthLg:o.lg,maxWidthXl:o.xl,minHeight:"100vh",containerPadding:this.#a(r,"16px"),breakpoints:{sm:this.#a(a.sm,"640px"),md:this.#a(a.md,"768px"),lg:this.#a(a.lg,"1024px"),xl:this.#a(a.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#w(t={}){let e={sm:640,md:768,lg:1024,xl:1280},{maxWidths:r={},maxWidth:a=1200,containerPadding:o=16,breakpoints:i=e}=t||{},l=this.#s(o,16),s=this.#s(a,e.xl),p={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},c=g=>g?Math.max(320,g-l*2):s,d={sm:Math.min(s,c(p.sm)),md:Math.min(s,c(p.md)),lg:Math.min(s,c(p.lg)),xl:Math.max(320,s)};return{sm:this.#a(r.sm,`${d.sm}px`),md:this.#a(r.md,`${d.md}px`),lg:this.#a(r.lg,`${d.lg}px`),xl:this.#a(r.xl,`${d.xl}px`)}}#a(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let r=parseFloat(t);if(Number.isFinite(r))return r}return e}#D(t){let{transitionSpeed:e=u.TransitionSpeeds.normal,animationEasing:r=u.AnimationEasings["ease-out"]}=t,a;return typeof e=="number"?a=e:typeof e=="string"&&u.TransitionSpeeds[e]?a=u.TransitionSpeeds[e]:a=u.TransitionSpeeds.normal,{fast:`${Math.round(a*.6)}ms`,normal:`${a}ms`,slow:`${Math.round(a*1.4)}ms`}}#N(t){let{baseZIndex:e=1e3,zIndexStep:r=10}=t;return{dropdown:e.toString(),sticky:(e+r*2).toString(),fixed:(e+r*3).toString(),modal:(e+r*4).toString(),drawer:(e+r*5).toString(),popover:(e+r*6).toString(),tooltip:(e+r*7).toString(),notification:(e+r*8).toString()}}#P(t){let{set:e="phosphor",weight:r="regular",defaultSize:a=24,sizes:o={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:l="/assets/img/icons/"}=t;return{set:e,weight:r,defaultSize:`${a}px`,sizes:Object.fromEntries(Object.entries(o).map(([s,p])=>[s,`${p}px`])),spritePath:i,externalPath:l}}#O(t){let e=[];e.push(` /* Colors */
|
|
20
20
|
`);let r=(a,o="")=>{Object.entries(a).forEach(([i,l])=>{typeof l=="object"&&l!==null?r(l,`${o}${i}-`):typeof l=="string"&&e.push(` --color-${o}${i}: ${l};
|
|
21
21
|
`)})};return Object.entries(t).forEach(([a,o])=>{a!=="dark"&&a!=="surfaceSmart"&&a!=="interactive"&&typeof o=="object"&&o!==null&&r(o,`${a}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
22
|
`),Object.entries(t.surfaceSmart).forEach(([a,o])=>{e.push(` --surface-${a}-bg: ${o.bg};
|
|
@@ -59,8 +59,8 @@ var Re=Object.defineProperty;var N=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
59
59
|
|
|
60
60
|
/* Legacy alias for backwards compatibility */
|
|
61
61
|
--backdrop-background: var(--backdrop-bg);
|
|
62
|
-
`),e.push(this.#
|
|
63
|
-
`}#
|
|
62
|
+
`),e.push(this.#U(t)),`${e.join("")}
|
|
63
|
+
`}#U(t){let e=t.primary?.[500]||"#3b82f6",r=t.secondary?.[500]||"#8b5cf6",a=t.accent?.[500]||"#f59e0b";return`
|
|
64
64
|
/* Mesh Gradient Backgrounds */
|
|
65
65
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${e} 25%, transparent) 0px, transparent 50%),
|
|
66
66
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 22%, transparent) 0px, transparent 50%),
|
|
@@ -626,7 +626,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
626
626
|
|
|
627
627
|
/* Dialog styles moved to #generateDialogStyles() */
|
|
628
628
|
|
|
629
|
-
`}#ie(){let{gap:t,inputPadding:e,buttonPadding:r,focusRingWidth:a,focusRingOpacity:o,borderWidthThin:i,sectionSpacing:l,buttonMinHeight:s,inputMinHeight:p}=this.options.design,c=e||.75,d=r||1,g=a||3,h=i||1,
|
|
629
|
+
`}#ie(){let{gap:t,inputPadding:e,buttonPadding:r,focusRingWidth:a,focusRingOpacity:o,borderWidthThin:i,sectionSpacing:l,buttonMinHeight:s,inputMinHeight:p}=this.options.design,c=e||.75,d=r||1,g=a||3,h=i||1,y=t||1,x=l||2,m=s||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
630
630
|
form {
|
|
631
631
|
margin: 0;
|
|
632
632
|
width: 100%;
|
|
@@ -2646,7 +2646,7 @@ nav[data-dropdown] {
|
|
|
2646
2646
|
|
|
2647
2647
|
`}#n(t){let e=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,a=parseInt(t.slice(5,7),16)/255,o=Math.max(e,r,a),i=Math.min(e,r,a),l,s,p=(o+i)/2;if(o===i)l=s=0;else{let c=o-i;switch(s=p>.5?c/(2-o-i):c/(o+i),o){case e:l=(r-a)/c+(r<a?6:0);break;case r:l=(a-e)/c+2;break;case a:l=(e-r)/c+4;break}l/=6}return{h:l*360,s:s*100,l:p*100}}#t(t,e,r){t=t/360,e=e/100,r=r/100;let a=(p,c,d)=>(d<0&&(d+=1),d>1&&(d-=1),d<1/6?p+(c-p)*6*d:d<1/2?c:d<2/3?p+(c-p)*(2/3-d)*6:p),o,i,l;if(e===0)o=i=l=r;else{let p=r<.5?r*(1+e):r+e-r*e,c=2*r-p;o=a(c,p,t+1/3),i=a(c,p,t),l=a(c,p,t-1/3)}let s=p=>{let c=Math.round(p*255).toString(16);return c.length===1?"0"+c:c};return`#${s(o)}${s(i)}${s(l)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#ve(){this.#e={tokens:this.#xe(),primitives:this.#we(),components:this.#ke(),utilities:this.#Se()},this.options.debug&&this.options.log?.("debug","[Generator] Layer sizes:",{tokens:`${(this.#e.tokens.length/1024).toFixed(2)} KB`,primitives:`${(this.#e.primitives.length/1024).toFixed(2)} KB`,components:`${(this.#e.components.length/1024).toFixed(2)} KB`,utilities:`${(this.#e.utilities.length/1024).toFixed(2)} KB`})}#xe(){let{colors:t,spacing:e,radius:r,borderWidths:a,typography:o,shadows:i,layout:l,transitions:s,zIndex:p,icons:c}=this.tokens,d=[`@layer tokens {
|
|
2648
2648
|
:root {
|
|
2649
|
-
${this.#
|
|
2649
|
+
${this.#O(t)}
|
|
2650
2650
|
${this.#I(e)}
|
|
2651
2651
|
${this.#H(r)}
|
|
2652
2652
|
${this.#q(a)}
|
|
@@ -3282,7 +3282,7 @@ export const ${t} = new CSSStyleSheet();
|
|
|
3282
3282
|
${t}.replaceSync(\`${r}\`);
|
|
3283
3283
|
|
|
3284
3284
|
export const ${t}CSS = \`${r}\`;
|
|
3285
|
-
`}};var J=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let r=new CSSStyleSheet;return r.replaceSync("/* Failed to load "+t+" */"),r}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},X=new J;function Pe(n){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(n),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(o=>o._pds!==!0);document.adoptedStyleSheets=[...a,r];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(e):document.documentElement.appendChild(e)}e.textContent=n}catch(t){console.warn("installRuntimeStyles failed:",t)}}function K(n){let t=n;if(!t||typeof t!="object"){console.error("[Runtime] applyStyles requires an explicit generator instance in live mode");return}let e=t.layeredCSS||t.css||"";if(!e){t.options?.log?.("warn","[Runtime] No CSS available on generator to apply");return}Pe(e)}async function le(n,t=[],e=null){try{let r=e?.primitivesStylesheet?e.primitivesStylesheet:await X.getStylesheet("primitives");n.adoptedStyleSheets=[r,...t]}catch(r){let a=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,r),n.adoptedStyleSheets=t}}async function de(n,t=["primitives"],e=[],r=null){try{let o=(await Promise.all(t.map(async i=>{if(r)switch(i){case"tokens":return r.tokensStylesheet;case"primitives":return r.primitivesStylesheet;case"components":return r.componentsStylesheet;case"utilities":return r.utilitiesStylesheet;default:break}return X.getStylesheet(i)}))).filter(i=>i!==null);n.adoptedStyleSheets=[...o,...e]}catch(a){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,a),n.adoptedStyleSheets=e}}var Ue=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function Oe(n){n.dataset.enhancedAccordion||(n.dataset.enhancedAccordion="true",n.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===n&&n.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function Ie(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let t=n.lastElementChild;if(!t)return;let e=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("role","menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"));let a=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let p=n.getBoundingClientRect(),c=Math.max(0,window.innerHeight-p.bottom);return Math.max(0,p.top)>c?"up":"down"},o=()=>{n.dataset.dropdownDirection=a(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},i=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},l=()=>{t.getAttribute("aria-hidden")==="false"?i():o()};e?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),l()}),document.addEventListener("click",s=>{n.contains(s.target)||i()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(i(),e?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&i()})}function He(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let t=n.querySelector('input[type="checkbox"]');if(!t)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",t.checked?"true":"false");let e=document.createElement("span");e.className="toggle-switch",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true");let r=document.createElement("span");r.className="toggle-knob",e.appendChild(r),n.insertBefore(e,t.nextSibling);let a=()=>{n.setAttribute("aria-checked",t.checked?"true":"false")},o=()=>{t.disabled||(t.checked=!t.checked,a(),t.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),o()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),o())}),t.addEventListener("change",a)}function qe(n){if(n.dataset.enhancedRange)return;let t=n.closest("label"),e=t?.classList.contains("range-output"),r=n.id||`range-${Math.random().toString(36).substring(2,11)}`,a=`${r}-output`;if(n.id=r,e){let o=t.querySelector("span");if(o&&!o.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let l=document.createElement("span");l.textContent=o.textContent,i.appendChild(l);let s=document.createElement("output");s.id=a,s.setAttribute("for",r),s.style.color="var(--surface-text-secondary, var(--color-text-secondary))",s.style.fontSize="0.875rem",s.textContent=n.value,i.appendChild(s),o.textContent="",o.appendChild(i);let p=()=>{s.textContent=n.value};n.addEventListener("input",p)}}else{let o=n.closest(".range-container");o||(o=document.createElement("div"),o.className="range-container",n.parentNode?.insertBefore(o,n),o.appendChild(n)),o.style.position="relative";let i=document.createElement("output");i.id=a,i.setAttribute("for",r),i.className="range-bubble",i.setAttribute("aria-live","polite"),o.appendChild(i);let l=()=>{let c=parseFloat(n.min)||0,d=parseFloat(n.max)||100,g=parseFloat(n.value),h=(g-c)/(d-c);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},s=()=>i.classList.add("visible"),p=()=>i.classList.remove("visible");n.addEventListener("input",l),n.addEventListener("pointerdown",s),n.addEventListener("pointerup",p),n.addEventListener("pointerleave",p),n.addEventListener("focus",s),n.addEventListener("blur",p),l()}n.dataset.enhancedRange="1"}function Ge(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let t=e=>{let r=e.closest("label");if(!r||r.querySelector(".required-asterisk"))return;let a=document.createElement("span");a.classList.add("required-asterisk"),a.textContent="*",a.style.marginLeft="4px",r.querySelector("span").appendChild(a);let o=e.closest("form");if(o&&!o.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",o.insertBefore(i,o.querySelector(".form-actions")||o.lastElementChild)}};n.querySelectorAll("[required]").forEach(e=>{t(e)})}function _e(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let t=document.createElement("input");t.type="text",t.placeholder="Add item...",t.classList.add("input-text","input-sm"),t.style.width="auto";let e=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(t),t.addEventListener("keydown",r=>{if(r.key==="Enter"||r.key==="Tab"){let a=t.value.trim();if(a){r.preventDefault();let o=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,l=document.createElement("label"),s=document.createElement("span");s.setAttribute("data-label",""),s.textContent=a;let p=document.createElement("input");p.type=o,p.name=e.name||n.getAttribute("data-name")||"open-group",p.value=a,p.id=i,l.appendChild(s),l.appendChild(p),n.insertBefore(l,t),t.value=""}}else if(r.key==="Backspace"&&t.value===""){r.preventDefault();let a=n.querySelectorAll("label");a.length>0&&a[a.length-1].remove()}})}function Ve(n){if(n.dataset.enhancedClip)return;n.dataset.enhancedClip="true",n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button");let t=()=>{let r=n.getAttribute("data-clip-open")==="true";n.setAttribute("aria-expanded",r?"true":"false")},e=()=>{let r=n.getAttribute("data-clip-open")==="true";n.setAttribute("data-clip-open",r?"false":"true"),t()};n.addEventListener("click",r=>{r.defaultPrevented||e()}),n.addEventListener("keydown",r=>{(r.key===" "||r.key==="Enter")&&(r.preventDefault(),e())}),t()}function Qe(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(a=>{a.forEach(o=>{if(o.attributeName==="class"){let i=n.classList.contains("btn-working"),l=n.querySelector("pds-icon");if(i)if(l)t||(t=l.getAttribute("icon")),l.setAttribute("icon","circle-notch");else{let s=document.createElement("pds-icon");s.setAttribute("icon","circle-notch"),s.setAttribute("size","sm"),n.insertBefore(s,n.firstChild),e=!0}else o.oldValue?.includes("btn-working")&&l&&(e?(l.remove(),e=!1):t&&(l.setAttribute("icon",t),t=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Ye=new Map([[".accordion",Oe],["nav[data-dropdown]",Ie],["label[data-toggle]",He],['input[type="range"]',qe],["form[data-required]",Ge],["fieldset[role=group][data-open]",_e],["[data-clip]",Ve],["button, a[class*='btn-']",Qe]]),pe=Ue.map(n=>({...n,run:Ye.get(n.selector)||(()=>{})}));var ue=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3285
|
+
`}};var J=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let r=new CSSStyleSheet;return r.replaceSync("/* Failed to load "+t+" */"),r}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},X=new J;function Pe(n){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(n),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(o=>o._pds!==!0);document.adoptedStyleSheets=[...a,r];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(e):document.documentElement.appendChild(e)}e.textContent=n}catch(t){console.warn("installRuntimeStyles failed:",t)}}function K(n){let t=n;if(!t||typeof t!="object"){console.error("[Runtime] applyStyles requires an explicit generator instance in live mode");return}let e=t.layeredCSS||t.css||"";if(!e){t.options?.log?.("warn","[Runtime] No CSS available on generator to apply");return}Pe(e)}async function de(n,t=[],e=null){try{let r=e?.primitivesStylesheet?e.primitivesStylesheet:await X.getStylesheet("primitives");n.adoptedStyleSheets=[r,...t]}catch(r){let a=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,r),n.adoptedStyleSheets=t}}async function pe(n,t=["primitives"],e=[],r=null){try{let o=(await Promise.all(t.map(async i=>{if(r)switch(i){case"tokens":return r.tokensStylesheet;case"primitives":return r.primitivesStylesheet;case"components":return r.componentsStylesheet;case"utilities":return r.utilitiesStylesheet;default:break}return X.getStylesheet(i)}))).filter(i=>i!==null);n.adoptedStyleSheets=[...o,...e]}catch(a){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,a),n.adoptedStyleSheets=e}}var Oe=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function Ue(n){n.dataset.enhancedAccordion||(n.dataset.enhancedAccordion="true",n.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===n&&n.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function Ie(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let t=n.lastElementChild;if(!t)return;let e=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("role","menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"));let a=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let p=n.getBoundingClientRect(),c=Math.max(0,window.innerHeight-p.bottom);return Math.max(0,p.top)>c?"up":"down"},o=()=>{n.dataset.dropdownDirection=a(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},i=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},l=()=>{t.getAttribute("aria-hidden")==="false"?i():o()};e?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),l()}),document.addEventListener("click",s=>{n.contains(s.target)||i()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(i(),e?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&i()})}function He(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let t=n.querySelector('input[type="checkbox"]');if(!t)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",t.checked?"true":"false");let e=document.createElement("span");e.className="toggle-switch",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true");let r=document.createElement("span");r.className="toggle-knob",e.appendChild(r),n.insertBefore(e,t.nextSibling);let a=()=>{n.setAttribute("aria-checked",t.checked?"true":"false")},o=()=>{t.disabled||(t.checked=!t.checked,a(),t.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),o()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),o())}),t.addEventListener("change",a)}function qe(n){if(n.dataset.enhancedRange)return;let t=n.closest("label"),e=t?.classList.contains("range-output"),r=n.id||`range-${Math.random().toString(36).substring(2,11)}`,a=`${r}-output`;if(n.id=r,e){let o=t.querySelector("span");if(o&&!o.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let l=document.createElement("span");l.textContent=o.textContent,i.appendChild(l);let s=document.createElement("output");s.id=a,s.setAttribute("for",r),s.style.color="var(--surface-text-secondary, var(--color-text-secondary))",s.style.fontSize="0.875rem",s.textContent=n.value,i.appendChild(s),o.textContent="",o.appendChild(i);let p=()=>{s.textContent=n.value};n.addEventListener("input",p)}}else{let o=n.closest(".range-container");o||(o=document.createElement("div"),o.className="range-container",n.parentNode?.insertBefore(o,n),o.appendChild(n)),o.style.position="relative";let i=document.createElement("output");i.id=a,i.setAttribute("for",r),i.className="range-bubble",i.setAttribute("aria-live","polite"),o.appendChild(i);let l=()=>{let c=parseFloat(n.min)||0,d=parseFloat(n.max)||100,g=parseFloat(n.value),h=(g-c)/(d-c);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},s=()=>i.classList.add("visible"),p=()=>i.classList.remove("visible");n.addEventListener("input",l),n.addEventListener("pointerdown",s),n.addEventListener("pointerup",p),n.addEventListener("pointerleave",p),n.addEventListener("focus",s),n.addEventListener("blur",p),l()}n.dataset.enhancedRange="1"}function Ge(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let t=e=>{let r=e.closest("label");if(!r||r.querySelector(".required-asterisk"))return;let a=document.createElement("span");a.classList.add("required-asterisk"),a.textContent="*",a.style.marginLeft="4px",r.querySelector("span").appendChild(a);let o=e.closest("form");if(o&&!o.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",o.insertBefore(i,o.querySelector(".form-actions")||o.lastElementChild)}};n.querySelectorAll("[required]").forEach(e=>{t(e)})}function _e(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let t=document.createElement("input");t.type="text",t.placeholder="Add item...",t.classList.add("input-text","input-sm"),t.style.width="auto";let e=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(t),t.addEventListener("keydown",r=>{if(r.key==="Enter"||r.key==="Tab"){let a=t.value.trim();if(a){r.preventDefault();let o=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,l=document.createElement("label"),s=document.createElement("span");s.setAttribute("data-label",""),s.textContent=a;let p=document.createElement("input");p.type=o,p.name=e.name||n.getAttribute("data-name")||"open-group",p.value=a,p.id=i,l.appendChild(s),l.appendChild(p),n.insertBefore(l,t),t.value=""}}else if(r.key==="Backspace"&&t.value===""){r.preventDefault();let a=n.querySelectorAll("label");a.length>0&&a[a.length-1].remove()}})}function Ve(n){if(n.dataset.enhancedClip)return;n.dataset.enhancedClip="true",n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button");let t=()=>{let r=n.getAttribute("data-clip-open")==="true";n.setAttribute("aria-expanded",r?"true":"false")},e=()=>{let r=n.getAttribute("data-clip-open")==="true";n.setAttribute("data-clip-open",r?"false":"true"),t()};n.addEventListener("click",r=>{r.defaultPrevented||e()}),n.addEventListener("keydown",r=>{(r.key===" "||r.key==="Enter")&&(r.preventDefault(),e())}),t()}function Qe(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(a=>{a.forEach(o=>{if(o.attributeName==="class"){let i=n.classList.contains("btn-working"),l=n.querySelector("pds-icon");if(i)if(l)t||(t=l.getAttribute("icon")),l.setAttribute("icon","circle-notch");else{let s=document.createElement("pds-icon");s.setAttribute("icon","circle-notch"),s.setAttribute("size","sm"),n.insertBefore(s,n.firstChild),e=!0}else o.oldValue?.includes("btn-working")&&l&&(e?(l.remove(),e=!1):t&&(l.setAttribute("icon",t),t=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Ye=new Map([[".accordion",Ue],["nav[data-dropdown]",Ie],["label[data-toggle]",He],['input[type="range"]',qe],["form[data-required]",Ge],["fieldset[role=group][data-open]",_e],["[data-clip]",Ve],["button, a[class*='btn-']",Qe]]),ue=Oe.map(n=>({...n,run:Ye.get(n.selector)||(()=>{})}));var ge=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3286
3286
|
<div class="accordion">
|
|
3287
3287
|
<details>
|
|
3288
3288
|
<summary>Section 1</summary>
|
|
@@ -3345,10 +3345,10 @@ export const ${t}CSS = \`${r}\`;
|
|
|
3345
3345
|
<button class="btn-primary btn-working">
|
|
3346
3346
|
<span>Saving</span>
|
|
3347
3347
|
</button>
|
|
3348
|
-
`.trim()}];var
|
|
3349
|
-
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,w)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof a=="function")try{let w=a(m);return w===void 0?d(m):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),d(m)}return d(m)}};c&&(p=new c(x),r.length>0&&typeof c.define=="function"&&await c.define(...r,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:p,mergedEnhancers:s}}var Le=!1,
|
|
3350
|
-
`);if(w){let M=document.head.querySelector("style[data-pds-preload]");M&&M.remove();let k=document.createElement("style");k.setAttribute("data-pds-preload",""),k.textContent=w,document.head.insertBefore(k,document.head.firstChild)}}catch(
|
|
3348
|
+
`.trim()}];var me="pds",Ze=/^([a-z][a-z0-9+\-.]*:)?\/\//i,he=/^[a-z]:/i;function U(n=""){return n.endsWith("/")?n:`${n}/`}function Je(n="",t=me){let e=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function Xe(n){return n.replace(/^\.\/+/,"")}function Ke(n){return he.test(n)?n.replace(he,"").replace(/^\/+/,""):n}function et(n){return n.startsWith("public/")?n.substring(7):n}function fe(n,t={}){let e=t.segment||me,r=t.defaultRoot||`/assets/${e}/`,a=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!a||typeof a!="string")return U(r);let o=a.trim();return o?(o=o.replace(/\\/g,"/"),o=Je(o,e),o=U(o),Ze.test(o)?o:(o=Xe(o),o=Ke(o),o.startsWith("/")||(o=et(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(i,l)=>l===0?i:"/")),U(o))):U(r)}function be(n){let t=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(t.toLowerCase()))return!0;let a=document.createElement("canvas").getContext("2d");if(!a)return!1;let o="mmmmmmmmmmlli",i="72px",l="monospace";a.font=`${i} ${l}`;let s=a.measureText(o).width;a.font=`${i} "${t}", ${l}`;let p=a.measureText(o).width;return s!==p}function tt(n){return n?n.split(",").map(r=>r.trim())[0].replace(/['"]/g,"").trim():null}async function rt(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:r=!1}=t,a=tt(n);if(!a||be(a))return Promise.resolve();let o=encodeURIComponent(a);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${o}"]`)?(console.log(`Font "${a}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${a}" from Google Fonts...`),new Promise((l,s)=>{let p=document.createElement("link");p.rel="stylesheet";let c=r?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;p.href=`https://fonts.googleapis.com/css2?family=${o}:${c}&display=swap`,p.setAttribute("data-font-loader",a),p.onload=()=>{console.log(`Successfully loaded font "${a}"`),l()},p.onerror=()=>{console.warn(`Failed to load font "${a}" from Google Fonts`),s(new Error(`Failed to load font: ${a}`))},document.head.appendChild(p),setTimeout(()=>{be(a)||console.warn(`Font "${a}" did not load within timeout`),l()},5e3)}))}async function ye(n){if(!n)return Promise.resolve();let t=new Set;n.fontFamilyHeadings&&t.add(n.fontFamilyHeadings),n.fontFamilyBody&&t.add(n.fontFamilyBody),n.fontFamilyMono&&t.add(n.fontFamilyMono);let e=Array.from(t).map(r=>rt(r).catch(a=>{console.warn(`Could not load font: ${r}`,a)}));await Promise.all(e)}var ot=/^[a-z][a-z0-9+\-.]*:\/\//i,I=(()=>{try{return import.meta.url}catch{return}})(),V=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function Q(n,t={}){if(!n||ot.test(n))return n;let{preferModule:e=!0}=t,r=()=>{if(!I)return null;try{return new URL(n,I).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(e?r()||a():a()||r())||n}var we=(()=>{if(I)try{let n=new URL(I);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",I).href}catch{return}})(),ke=!1;function Se(n){ke||typeof document>"u"||(ke=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function re(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[r,a]of Object.entries(t))a&&typeof a=="object"&&!Array.isArray(a)?e[r]=re(e[r]&&typeof e[r]=="object"?e[r]:{},a):e[r]=a;return e}function te(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function D(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(e=>D(e)).filter(e=>e!==void 0);let t={};for(let e in n)if(n.hasOwnProperty(e)){let r=n[e];if(typeof r!="function"){let a=D(r);a!==void 0&&(t[e]=a)}}return t}function $e(n={},t={},{presets:e,defaultLog:r}){let a=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),o=n&&n.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let i=o??t.enhancers??[],l=n&&n.preset,s=n&&n.design,p=n&&n.icons&&typeof n.icons=="object"?n.icons:null,c="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),d,g=null;if(c){let h=String(l||"default").toLowerCase(),y=e?.[h]||Object.values(e||{}).find(f=>te(f.name)===h||String(f.name||"").toLowerCase()===h);if(!y)throw new Error(`PDS preset not found: "${l||"default"}"`);g={id:y.id||te(y.name),name:y.name||y.id||String(h)};let x=structuredClone(y);if(s&&typeof s=="object"||p){let f=s?D(s):{},v=p?D(p):null,b=v?re(f,{icons:v}):f;x=re(x,structuredClone(b))}let{mode:m,autoDefine:w,applyGlobalStyles:M,manageTheme:k,themeStorageKey:T,preloadStyles:L,criticalLayers:W,managerURL:B,manager:$,preset:S,design:F,enhancers:R,log:q,...G}=n;d={...G,design:x,preset:g.name,log:q||r}}else if(a){let{log:h,...y}=n;d={design:structuredClone(y),log:h||r}}else{let h=e?.default||Object.values(e||{}).find(y=>te(y.name)==="default");if(!h)throw new Error("PDS default preset not available");g={id:h.id||"default",name:h.name||"Default"},d={design:structuredClone(h),preset:g.name,log:r}}return{generatorConfig:d,enhancers:i,presetInfo:g}}function ze({manageTheme:n,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:r}){let a="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(t)||null}catch{o=null}try{e?.(o),r?.(o)}catch{}o?o==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=o:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:o}}function Me(n,{resolvePublicAssetURL:t}){let e=!!(n?.public?.root||n?.static?.root),r=t(n);return!e&&we&&(r=we),V(Q(r))}async function Fe(n,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:r=[],autoDefineMapper:a=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:l=!0}=n,s=(()=>{let c=new Map;return(t||[]).forEach(d=>c.set(d.selector,d)),(o||[]).forEach(d=>c.set(d.selector,d)),Array.from(c.values())})(),p=null;if(typeof window<"u"&&typeof document<"u"){let c=null;try{let m=await Promise.resolve().then(()=>(xe(),ve));c=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let d=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:g,...h}=i&&typeof i=="object"?i:{},x={baseURL:e&&V(Q(e,{preferModule:l})),predefine:r,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(m,w)=>{if(typeof m=="string"&&m.startsWith("pds-")){let k=["pds-form","pds-drawer"].includes(m),T=w?.message?.includes("#pds/lit")||w?.message?.includes("Failed to resolve module specifier");k&&T?console.error(`\u274C PDS component <${m}> requires Lit but #pds/lit is not in import map.
|
|
3349
|
+
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,w)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof a=="function")try{let w=a(m);return w===void 0?d(m):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),d(m)}return d(m)}};c&&(p=new c(x),r.length>0&&typeof c.define=="function"&&await c.define(...r,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:p,mergedEnhancers:s}}var Le=!1,H=null;async function it(n,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(Le)return;let[r,a,o,i]=await Promise.all([Promise.resolve().then(()=>(Z(),le)),Promise.resolve().then(()=>(_(),ie)),Promise.resolve().then(()=>(ne(),oe)),Promise.resolve().then(()=>(Te(),Ce))]),l=r?.default||r?.ontology,s=r?.findComponentForElement,p=a?.enums;H=o?.PDSQuery||o?.default||null,n.ontology=l,n.findComponentForElement=s,n.enums=p,n.common=i||{},n.presets=O,n.enhancerMetadata=ge,n.applyStyles=function(c){return K(c||E.instance)},n.adoptLayers=function(c,d,g){return pe(c,d,g,E.instance)},n.adoptPrimitives=function(c,d){return de(c,d,E.instance)},n.getGenerator=async function(){return E},n.query=async function(c){if(!H){let g=await Promise.resolve().then(()=>(ne(),oe));H=g?.PDSQuery||g?.default||null}return H?await new H(n).search(c):[]},Object.getOwnPropertyDescriptor(n,"compiled")||Object.defineProperty(n,"compiled",{get(){return n.registry?.isLive&&E.instance?E.instance.compiled:null},enumerable:!0,configurable:!1}),n.preloadCritical=function(c,d={}){if(typeof window>"u"||!document.head||!c)return;let{theme:g,layers:h=["tokens"]}=d;try{let y=g||"light";(g==="system"||!g)&&(y=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",y);let x=c.design?{...c,theme:y}:{design:c,theme:y},m=new E(x),w=h.map(M=>{try{return m.css?.[M]||""}catch{return""}}).filter(M=>M.trim()).join(`
|
|
3350
|
+
`);if(w){let M=document.head.querySelector("style[data-pds-preload]");M&&M.remove();let k=document.createElement("style");k.setAttribute("data-pds-preload",""),k.textContent=w,document.head.insertBefore(k,document.head.firstChild)}}catch(y){console.warn("PDS preload failed:",y)}},Le=!0}async function st(n,t,{emitReady:e,applyResolvedTheme:r,setupSystemListenerIfNeeded:a}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(await it(n,{applyResolvedTheme:r,setupSystemListenerIfNeeded:a}),Se(n),typeof document<"u"&&document.adoptedStyleSheets){let d=`
|
|
3351
3351
|
html { opacity: 0; }
|
|
3352
3352
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3353
|
-
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(d),h._pdsFouc=!0,document.adoptedStyleSheets=[h,...document.adoptedStyleSheets]}}catch(g){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",g),!document.head.querySelector("style[data-pds-fouc]")){let
|
|
3354
|
-
`);if($){let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let F=document.createElement("style");F.setAttribute("data-pds-critical",""),F.textContent=$;let
|
|
3353
|
+
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(d),h._pdsFouc=!0,document.adoptedStyleSheets=[h,...document.adoptedStyleSheets]}}catch(g){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",g),!document.head.querySelector("style[data-pds-fouc]")){let y=document.createElement("style");y.setAttribute("data-pds-fouc",""),y.textContent=d,document.head.insertBefore(y,document.head.firstChild)}}}let o=t.applyGlobalStyles??!0,i=t.manageTheme??!0,l=t.themeStorageKey??"pure-ds-theme",s=t.preloadStyles??!1,p=t.criticalLayers??["tokens","primitives"],c=t&&t.autoDefine||null;try{let{resolvedTheme:d}=ze({manageTheme:i,themeStorageKey:l,applyResolvedTheme:r,setupSystemListenerIfNeeded:a}),g=$e(t,{},{presets:O,defaultLog:se}),h=g.enhancers,{log:y,...x}=g.generatorConfig,m=structuredClone(x);m.log=y,i&&(m.theme=d);let w=new E(m);if(m.design?.typography)try{await ye(m.design.typography)}catch($){m?.log?.("warn","Failed to load some fonts from Google Fonts:",$)}if(s&&typeof window<"u"&&document.head)try{let $=p.map(S=>{try{return w.css?.[S]||""}catch(F){return m?.log?.("warn",`Failed to generate critical CSS for layer "${S}":`,F),""}}).filter(S=>S.trim()).join(`
|
|
3354
|
+
`);if($){let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let F=document.createElement("style");F.setAttribute("data-pds-critical",""),F.textContent=$;let R=document.head.querySelector('meta[charset], meta[name="viewport"]');R?R.parentNode.insertBefore(F,R.nextSibling):document.head.insertBefore(F,document.head.firstChild)}}catch($){m?.log?.("warn","Failed to preload critical styles:",$)}n.registry.setLiveMode(),g.presetInfo?.name?m?.log?.("log",`PDS live with preset "${g.presetInfo.name}"`):m?.log?.("log","PDS live with custom config"),o&&(await K(E.instance),typeof window<"u"&&setTimeout(()=>{let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let S=document.head.querySelector("style[data-pds-preload]");S&&S.remove();let F=document.getElementById("pds-runtime-stylesheet");F&&F.remove()},100));let M=Me(t,{resolvePublicAssetURL:fe}),k;c&&c.baseURL?k=V(Q(c.baseURL,{preferModule:!1})):k=`${M}components/`;let T=null,L=[];try{let $=await Fe({autoDefineBaseURL:k,autoDefinePreload:c&&Array.isArray(c.predefine)&&c.predefine||[],autoDefineMapper:c&&typeof c.mapper=="function"&&c.mapper||null,enhancers:h,autoDefineOverrides:c||null,autoDefinePreferModule:!(c&&c.baseURL)},{baseEnhancers:ue});T=$.autoDefiner,L=$.mergedEnhancers||[]}catch($){m?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",$)}let W=w?.options||m,B=D(t);return n.currentConfig=Object.freeze({mode:"live",...structuredClone(B),design:structuredClone(g.generatorConfig.design),preset:g.generatorConfig.preset,theme:d,enhancers:L}),e({mode:"live",generator:w,config:W,theme:d,autoDefiner:T}),{generator:w,config:W,theme:d,autoDefiner:T}}catch(d){throw n.dispatchEvent(new CustomEvent("pds:error",{detail:{error:d}})),d}}export{st as startLive};
|