@pure-ds/core 0.5.19 → 0.5.21
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/pds.d.ts +0 -1
- package/dist/types/public/assets/js/pds-manager.d.ts +5 -5
- package/dist/types/public/assets/js/pds.d.ts +3 -1
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-drawer.d.ts +1 -0
- package/dist/types/public/assets/pds/components/pds-drawer.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts +0 -3
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/dist/types/src/js/pds.d.ts +2 -0
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +1 -1
- package/packages/pds-cli/bin/generate-css-data.js +7 -2
- package/packages/pds-cli/bin/pds-bootstrap.js +35 -92
- package/packages/pds-cli/bin/postinstall.mjs +2 -61
- package/packages/pds-cli/bin/templates/starter-templates.js +62 -0
- package/public/assets/js/app.js +16 -16
- package/public/assets/js/pds-manager.js +47 -47
- package/public/assets/js/pds.js +5 -5
- package/public/assets/pds/components/pds-drawer.js +142 -2
- package/readme.md +4 -162
- package/src/js/pds-core/pds-live.js +0 -26
- package/src/js/pds-core/pds-start-helpers.js +0 -60
- package/src/js/pds.d.ts +0 -1
- package/src/js/pds.js +26 -39
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Ae=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{for(var e in t)Ae(n,e,{get:t[e],enumerable:!0})};var ne={};N(ne,{enums:()=>u});var u,_=P(()=>{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"}}});var ce={};N(ce,{default:()=>Ne,findComponentForElement:()=>We,getAllSelectors:()=>Be,getAllTags:()=>Pe,getByCategory:()=>De,ontology:()=>z,searchOntology:()=>je});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 We(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,a=0;for(;e&&a<t;){if(a++,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 r=e.closest?e.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(g=>g.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let c=e.parentElement,p=0;for(;c&&p<t;){if(c.classList&&Array.from(c.classList).some(g=>g.startsWith(d))&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};c=c.parentElement,p++}continue}continue}if(W(e,s))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,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 s of o.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(l)))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 s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(c=>c.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(W(e,s))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,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(s=>s.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 Be(){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 je(n,t={}){let e=n.toLowerCase(),a=[],r=(o,i)=>{for(let s of o)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(d=>d.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(d=>d.toLowerCase().includes(e)))&&a.push({...s,type:i})};return(!t.type||t.type==="primitive")&&r(z.primitives,"primitive"),(!t.type||t.type==="component")&&r(z.components,"component"),(!t.type||t.type==="layout")&&r(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&r(z.enhancements,"enhancement"),a}function De(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 Pe(){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,Y=P(()=>{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:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],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-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:["alert","badge"],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"]}},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"],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"],btn:["button","interactive","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"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],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={};N(ye,{AutoDefiner:()=>ee});async function at(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:a,mapper:r=d=>`${d}.js`,onError:o=(d,c)=>console.error(`[defineWebComponents] ${d}:`,c)}=t,i=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(c,p,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let c=r(d),g=await import(c instanceof URL?c.href:new URL(c,i).href),m=g?.default??g?.[s(d)];if(!m){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${s(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,m),{tag:d,status:"defined"})}catch(c){throw o(d,c),c}};return Promise.all(e.map(l))}var ee,ve=P(()=>{ee=class{constructor(t={}){let{baseURL:e,mapper:a,onError:r,predicate:o=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:l=!0,debounceMs:d=16,observeShadows:c=!0,enhancers:p=[],patchAttachShadow:g=!0}=t,m=new Set,v=new Set,x=new Set,h=new Map,w=new WeakMap,F=new WeakMap,k=0,T=!1,R=null,B=f=>{if(!f||!p.length)return;let y=F.get(f);y||(y=new Set,F.set(f,y));for(let b of p)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&&!h.has(f)&&h.set(f,b)}m.add(f),$()}},$=()=>{k||(k=setTimeout(L,d))},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&&E(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&&E(y.shadowRoot)})}},E=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,...p.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),w.set(f,y)};async function L(){if(clearTimeout(k),k=0,!m.size)return;let f=Array.from(m);m.clear(),f.forEach(y=>v.add(y));try{let y=b=>h.get(b)??(a?a(b):`${b}.js`);await at(...f,{baseURL:e,mapper:y,onError:(b,C)=>{x.add(b),r?.(b,C)}})}catch{}finally{f.forEach(y=>v.delete(y))}}let G=s===document?document.documentElement:s,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,...p.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"){E(C);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&j(D,this)}return C},R=()=>Element.prototype.attachShadow=f}return l&&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 a=t,{baseURL:r,mapper:o=c=>`${c}.js`,onError:i=(c,p)=>console.error(`[defineWebComponents] ${c}:`,p)}=e,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(p,g,m)=>m.toUpperCase()),d=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let p=o(c),m=await import(p instanceof URL?p.href:new URL(p,s).href),v=m?.default??m?.[l(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 "${l(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,v),{tag:c,status:"defined"})}catch(p){throw i(c,p),p}};return Promise.all(a.map(d))}}});var ae={};N(ae,{PDSQuery:()=>re});var re,oe=P(()=>{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","alert","message"]},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(),a=this.tokenize(e),r=this.analyzeQuery(a,e),o=[];r.intents.has("color")&&o.push(...this.queryColors(r,e)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(r,e)),(r.intents.has("component")||r.entities.size>0)&&o.push(...this.queryComponents(r,e)),(r.intents.has("layout")||r.intents.has("pattern"))&&o.push(...this.queryPatterns(r,e)),r.intents.has("typography")&&o.push(...this.queryTypography(r,e)),r.intents.has("spacing")&&o.push(...this.querySpacing(r,e));let i=new Map;for(let s of o){let l=s.value;(!i.has(l)||i.get(l).score<s.score)&&i.set(l,s)}return Array.from(i.values()).sort((s,l)=>l.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let a={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};a.isQuestion=this.questionWords.some(r=>t.includes(r));for(let[r,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&a.intents.add(r);for(let[r,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&a.entities.add(r);return(t.includes("hover")||e.includes("hover"))&&a.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&a.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&a.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&a.modifiers.add("disabled"),a}queryColors(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.colors)return a;let o=r.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&a.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"))&&(a.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"}),a.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 l=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let c=`--color-${l}-${d}`;a.push({text:`${l.charAt(0).toUpperCase()+l.slice(1)} ${d}: var(${c})`,value:c,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${c})`,description:`${l} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let l=s[0];l?a.push({text:`Button ${l} fill: var(--primary-fill-${l})`,value:`--primary-fill-${l}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${l} state`}):a.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return a}queryUtilities(t,e){let a=[],r=this.pds.ontology;if(!r?.utilities)return a;let o=r.utilities,i=[];for(let s of Object.values(o))if(typeof s=="object")for(let l of Object.values(s))Array.isArray(l)&&i.push(...l);return t.intents.has("border")&&i.filter(l=>l.includes("border")||l.includes("outline")).forEach(l=>{let d=80;e.includes("gradient")&&l.includes("gradient")&&(d=95),e.includes("glow")&&l.includes("glow")&&(d=95),a.push({text:`${l} - Border utility class`,value:l,icon:"code",category:"Utility Class",score:d,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),t.intents.has("layout")&&i.filter(l=>l.includes("flex")||l.includes("grid")||l.includes("items-")||l.includes("justify-")||l.includes("gap-")).forEach(l=>{a.push({text:`${l} - Layout utility`,value:l,icon:"layout",category:"Utility Class",score:85,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),e.includes("group")&&t.entities.has("button")&&a.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 P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{for(var e in t)Re(n,e,{get:t[e],enumerable:!0})};var ne={};N(ne,{enums:()=>p});var p,_=P(()=>{p={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"}}});var ce={};N(ce,{default:()=>Pe,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,a=0;for(;e&&a<t;){if(a++,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 r=e.closest?e.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(g=>g.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let c=e.parentElement,u=0;for(;c&&u<t;){if(c.classList&&Array.from(c.classList).some(g=>g.startsWith(d))&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};c=c.parentElement,u++}continue}continue}if(W(e,s))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,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 s of o.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(l)))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 s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let d=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(c=>c.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(W(e,s))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,s);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,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(s=>s.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(),a=[],r=(o,i)=>{for(let s of o)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(d=>d.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(d=>d.toLowerCase().includes(e)))&&a.push({...s,type:i})};return(!t.type||t.type==="primitive")&&r(z.primitives,"primitive"),(!t.type||t.type==="component")&&r(z.components,"component"),(!t.type||t.type==="layout")&&r(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&r(z.enhancements,"enhancement"),a}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,Pe,J=P(()=>{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:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],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-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:["alert","badge"],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"]}},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"],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"],btn:["button","interactive","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"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],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"]}};Pe=z});var ye={};N(ye,{AutoDefiner:()=>ee});async function rt(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:a,mapper:r=d=>`${d}.js`,onError:o=(d,c)=>console.error(`[defineWebComponents] ${d}:`,c)}=t,i=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(c,u,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let c=r(d),g=await import(c instanceof URL?c.href:new URL(c,i).href),h=g?.default??g?.[s(d)];if(!h){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${s(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,h),{tag:d,status:"defined"})}catch(c){throw o(d,c),c}};return Promise.all(e.map(l))}var ee,ve=P(()=>{ee=class{constructor(t={}){let{baseURL:e,mapper:a,onError:r,predicate:o=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:l=!0,debounceMs:d=16,observeShadows:c=!0,enhancers:u=[],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||!u.length)return;let y=M.get(f);y||(y=new Set,M.set(f,y));for(let b of u)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,d))},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,...u.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)??(a?a(b):`${b}.js`);await rt(...f,{baseURL:e,mapper:y,onError:(b,C)=>{x.add(b),r?.(b,C)}})}catch{}finally{f.forEach(y=>v.delete(y))}}let G=s===document?document.documentElement:s,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,...u.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 l&&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 a=t,{baseURL:r,mapper:o=c=>`${c}.js`,onError:i=(c,u)=>console.error(`[defineWebComponents] ${c}:`,u)}=e,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(u,g,h)=>h.toUpperCase()),d=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let u=o(c),h=await import(u instanceof URL?u.href:new URL(u,s).href),v=h?.default??h?.[l(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 "${l(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,v),{tag:c,status:"defined"})}catch(u){throw i(c,u),u}};return Promise.all(a.map(d))}}});var ae={};N(ae,{PDSQuery:()=>re});var re,oe=P(()=>{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","alert","message"]},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(),a=this.tokenize(e),r=this.analyzeQuery(a,e),o=[];r.intents.has("color")&&o.push(...this.queryColors(r,e)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(r,e)),(r.intents.has("component")||r.entities.size>0)&&o.push(...this.queryComponents(r,e)),(r.intents.has("layout")||r.intents.has("pattern"))&&o.push(...this.queryPatterns(r,e)),r.intents.has("typography")&&o.push(...this.queryTypography(r,e)),r.intents.has("spacing")&&o.push(...this.querySpacing(r,e));let i=new Map;for(let s of o){let l=s.value;(!i.has(l)||i.get(l).score<s.score)&&i.set(l,s)}return Array.from(i.values()).sort((s,l)=>l.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let a={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};a.isQuestion=this.questionWords.some(r=>t.includes(r));for(let[r,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&a.intents.add(r);for(let[r,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&a.entities.add(r);return(t.includes("hover")||e.includes("hover"))&&a.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&a.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&a.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&a.modifiers.add("disabled"),a}queryColors(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.colors)return a;let o=r.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&a.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"))&&(a.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"}),a.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 l=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let c=`--color-${l}-${d}`;a.push({text:`${l.charAt(0).toUpperCase()+l.slice(1)} ${d}: var(${c})`,value:c,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${c})`,description:`${l} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let l=s[0];l?a.push({text:`Button ${l} fill: var(--primary-fill-${l})`,value:`--primary-fill-${l}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${l} state`}):a.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return a}queryUtilities(t,e){let a=[],r=this.pds.ontology;if(!r?.utilities)return a;let o=r.utilities,i=[];for(let s of Object.values(o))if(typeof s=="object")for(let l of Object.values(s))Array.isArray(l)&&i.push(...l);return t.intents.has("border")&&i.filter(l=>l.includes("border")||l.includes("outline")).forEach(l=>{let d=80;e.includes("gradient")&&l.includes("gradient")&&(d=95),e.includes("glow")&&l.includes("glow")&&(d=95),a.push({text:`${l} - Border utility class`,value:l,icon:"code",category:"Utility Class",score:d,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),t.intents.has("layout")&&i.filter(l=>l.includes("flex")||l.includes("grid")||l.includes("items-")||l.includes("justify-")||l.includes("gap-")).forEach(l=>{a.push({text:`${l} - Layout utility`,value:l,icon:"layout",category:"Utility Class",score:85,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),e.includes("group")&&t.entities.has("button")&&a.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"}),a}queryComponents(t,e){let a=[],r=this.pds.ontology;return!r?.components&&!r?.primitives||(r.components&&r.components.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);i>50&&a.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`})}),r.primitives&&r.primitives.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);if(i>50){let s=o.selectors?.[0]||o.id;a.push({text:`${s} - ${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"))&&a.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 Ae=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
16
16
|
</section>`,description:"Semantic section element for content grouping"}))),a}queryTypography(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.typography)return a;let o=r.tokens.typography;return(e.includes("heading")||e.includes("title"))&&a.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"))&&a.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"}),a}querySpacing(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.spacing)return a;let o=r.tokens.spacing;for(let[i,s]of Object.entries(o))["2","4","6","8"].includes(i)&&a.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${s}`});return a}scoreMatch(t,e){let a=t.toLowerCase(),r=e.toLowerCase(),o=0;if(a===r)return 100;r.includes(a)&&(o+=80);let i=this.tokenize(a),s=this.tokenize(r),l=i.filter(d=>s.includes(d)).length;return o+=l/i.length*40,r.startsWith(a)&&(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 Te={};N(Te,{deepMerge:()=>Ce,isObject:()=>J});function J(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ce(n,t){let e={...n};return J(n)&&J(t)&&Object.keys(t).forEach(a=>{J(t[a])?a in n?e[a]=Ce(n[a],t[a]):Object.assign(e,{[a]:t[a]}):Object.assign(e,{[a]:t[a]})}),e}var Le=P(()=>{});_();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:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},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 r=console[n]||console.log;e.length>0?r(t,...e):r(t)}}_();Y();var M=class n{static#d;static get instance(){return this.#d}#e;#a;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.#d=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#fe(),typeof CSSStyleSheet<"u"?this.#we():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{};return{colors:this.#v(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#T(t.shape||{}),borderWidths:this.#L(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#R(t.layers||{}),layout:this.#A(t.layout||{}),transitions:this.#W(t.behavior||{}),zIndex:this.#B(t.layers||{}),icons:this.#j(t.icons||{})}}#v(t){let{primary:e="#3b82f6",secondary:a="#64748b",accent:r="#ec4899",background:o="#ffffff",success:i=null,warning:s="#FFBF00",danger:l=null,info:d=null,darkMode:c={}}=t,p={primary:this.#r(e),secondary:this.#r(a),accent:this.#r(r),success:this.#r(i||this.#x(e)),warning:this.#r(s||r),danger:this.#r(l||this.#w(e)),info:this.#r(d||e),gray:this.#p(a),surface:this.#u(o)};return p.surface.fieldset=this.#k(p.surface),p.surfaceSmart=this.#b(p.surface),p.dark=this.#$(p,o,c),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#b(p.dark.surface)),p.interactive={light:{fill:this.#f(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#f(p.dark.primary,4.5),text:this.#E(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(t){let e=this.#o(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))}}#x(t){let e=this.#o(t);return this.#t(120,Math.max(e.s,60),45)}#w(t){let e=this.#o(t);return this.#t(0,Math.max(e.s,70),50)}#p(t){let e=this.#o(t),a=e.h,r=Math.min(e.s,10);return{50:this.#t(a,r,98),100:this.#t(a,r,95),200:this.#t(a,r,88),300:this.#t(a,r,78),400:this.#t(a,r,60),500:t,600:this.#t(a,Math.min(r+5,15),45),700:this.#t(a,Math.min(r+8,18),35),800:this.#t(a,Math.min(r+10,20),20),900:this.#t(a,Math.min(r+12,22),10)}}#u(t){let e=this.#o(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.#g(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#S(t.sunken,.05),overlay:t.elevated}}#S(t,e=.05){let a=this.#o(t),r=Math.max(a.l-a.l*e,5);return this.#t(a.h,a.s,r)}#g(t){let e=this.#o(t);if(e.l>50){let a=Math.min(e.s+5,25),r=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,a,r)}else{let a=Math.max(e.s-10,5),r=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,a,r)}}#$(t,e="#ffffff",a={}){let r=a.background?a.background:this.#g(e),o=this.#u(r),i=a.primary?this.#r(a.primary):this.#n(t.primary);return{surface:{...o,fieldset:this.#F(o)},primary:i,secondary:a.secondary?this.#r(a.secondary):this.#n(t.secondary),accent:a.accent?this.#r(a.accent):this.#n(t.accent),gray:a.secondary?this.#p(a.secondary):t.gray,success:this.#n(t.success),info:this.#n(t.info),warning:this.#n(t.warning),danger:this.#n(t.danger)}}#s(t){let e=String(t||"").replace("#",""),a=e.length===3?e.split("").map(o=>o+o).join(""):e,r=parseInt(a,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(t){let{r:e,g:a,b:r}=this.#s(t),o=[e/255,a/255,r/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]}#c(t,e){let a=this.#l(t),r=this.#l(e),o=Math.max(a,r),i=Math.min(a,r);return(o+.05)/(i+.05)}#h(t,e=4.5){if(!t)return"#000000";let a="#ffffff",r="#000000",o=this.#c(t,a);if(o>=e)return a;let i=this.#c(t,r);return i>=e||i>o?r:a}#m(t,e=1){let{r:a,g:r,b:o}=this.#s(t);return`rgba(${a}, ${r}, ${o}, ${e})`}#z(t,e,a=.5){let r=this.#s(t),o=this.#s(e),i=Math.round(r.r+(o.r-r.r)*a),s=Math.round(r.g+(o.g-r.g)*a),l=Math.round(r.b+(o.b-r.b)*a);return this.#M(i,s,l)}#M(t,e,a){let r=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${r(t)}${r(e)}${r(a)}`}#F(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#y(t.elevated,.08),sunken:t.elevated,overlay:this.#y(t.overlay,.05)}}#E(t={},e="#000000",a=4.5){let r=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of r){let s=t?.[i];if(!s||typeof s!="string")continue;let l=this.#c(s,e);if(l>o.ratio&&(o={shade:i,color:s,ratio:l}),l>=a)return s}return o.color||t?.["600"]||t?.["500"]}#f(t={},e=4.5){let a=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let o of a){let i=t?.[o];if(!i||typeof i!="string")continue;let s=this.#c(i,"#ffffff");if(s>r.ratio&&(r={shade:o,color:i,ratio:s}),s>=e)return i}return r.color||t?.["600"]||t?.["500"]}#b(t){let e={};return Object.entries(t).forEach(([a,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let o=this.#l(r)<.5,i=this.#h(r,4.5),s=this.#h(r,3),l=this.#z(i,r,.4),d=i,c=l,p=o?"#ffffff":"#000000",g=o?.25:.1,m=this.#m(p,g),v=o?"#ffffff":"#000000",x=o?.15:.1,h=this.#m(v,x);e[a]={bg:r,text:i,textSecondary:s,textMuted:l,icon:d,iconSubtle:c,shadow:m,border:h,scheme:o?"dark":"light"}}),e}#y(t,e=.05){let a=this.#o(t),r=Math.min(a.l+(100-a.l)*e,95);return this.#t(a.h,a.s,r)}#n(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(([r,o])=>{let i=t[o.source];e[r]=this.#C(i,o.dimFactor)}),e}#C(t,e=.8){let a=this.#o(t),r=Math.max(a.s*e,5),o=Math.max(a.l*e,5);return this.#t(a.h,r,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:a=1.25,maxSpacingSteps:r=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let l=1;l<=i;l++)s[l]=`${o*l}px`;return s}#T(t){let{radiusSize:e="medium",customRadius:a=null}=t,r;a!=null?r=a:typeof e=="number"?r=e:typeof e=="string"?r=u.RadiusSizes[e]??u.RadiusSizes.medium:r=u.RadiusSizes.medium;let o=Number.isFinite(Number(r))?Number(r):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"}}#L(t){let{borderWidth:e="medium"}=t,a;return typeof e=="number"?a=e:typeof e=="string"?a=u.BorderWidths[e]??u.BorderWidths.medium:a=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:a="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:s=u.FontWeights.light,fontWeightNormal:l=u.FontWeights.normal,fontWeightMedium:d=u.FontWeights.medium,fontWeightSemibold:c=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:g=u.LineHeights.tight,lineHeightNormal:m=u.LineHeights.normal,lineHeightRelaxed:v=u.LineHeights.relaxed}=t,x=Number.isFinite(Number(o))?Number(o):16,h=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:a,mono:r},fontSize:{xs:`${Math.round(x/Math.pow(h,2))}px`,sm:`${Math.round(x/h)}px`,base:`${x}px`,lg:`${Math.round(x*h)}px`,xl:`${Math.round(x*Math.pow(h,2))}px`,"2xl":`${Math.round(x*Math.pow(h,3))}px`,"3xl":`${Math.round(x*Math.pow(h,4))}px`,"4xl":`${Math.round(x*Math.pow(h,5))}px`},fontWeight:{light:s?.toString()||"300",normal:l?.toString()||"400",medium:d?.toString()||"500",semibold:c?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:m?.toString()||"1.5",relaxed:v?.toString()||"1.75"}}}#R(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:r=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*r}px ${2*a}px 0 ${i}`,base:`0 ${1*r}px ${3*a}px 0 ${o}, 0 ${1*r}px ${2*a}px 0 ${i}`,md:`0 ${4*r}px ${6*a}px ${-1*r}px ${o}, 0 ${2*r}px ${4*a}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*a}px ${-3*r}px ${o}, 0 ${4*r}px ${6*a}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*a}px ${-5*r}px ${o}, 0 ${10*r}px ${10*a}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*a}px 0 ${i}`}}#A(t){let{maxWidth:e=1200,containerPadding:a=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=t;return{maxWidth:`${e}px`,minHeight:"100vh",containerPadding:`${a}px`,breakpoints:{sm:`${r.sm}px`,md:`${r.md}px`,lg:`${r.lg}px`,xl:`${r.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#W(t){let{transitionSpeed:e=u.TransitionSpeeds.normal,animationEasing:a=u.AnimationEasings["ease-out"]}=t,r;return typeof e=="number"?r=e:typeof e=="string"&&u.TransitionSpeeds[e]?r=u.TransitionSpeeds[e]:r=u.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#B(t){let{baseZIndex:e=1e3,zIndexStep:a=10}=t;return{dropdown:e.toString(),sticky:(e+a*2).toString(),fixed:(e+a*3).toString(),modal:(e+a*4).toString(),drawer:(e+a*5).toString(),popover:(e+a*6).toString(),tooltip:(e+a*7).toString(),notification:(e+a*8).toString()}}#j(t){let{set:e="phosphor",weight:a="regular",defaultSize:r=24,sizes:o={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:s="/assets/img/icons/"}=t;return{set:e,weight:a,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(o).map(([l,d])=>[l,`${d}px`])),spritePath:i,externalPath:s}}#D(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={};N(Ce,{deepMerge:()=>Ee,isObject:()=>Z});function Z(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Ee(n,t){let e={...n};return Z(n)&&Z(t)&&Object.keys(t).forEach(a=>{Z(t[a])?a in n?e[a]=Ee(n[a],t[a]):Object.assign(e,{[a]:t[a]}):Object.assign(e,{[a]:t[a]})}),e}var Te=P(()=>{});_();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:p.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:p.RadiusSizes.small,borderWidth:p.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:p.RadiusSizes.xlarge,borderWidth:p.BorderWidths.medium},behavior:{transitionSpeed:p.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:p.RadiusSizes.none,borderWidth:p.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:p.RadiusSizes.xxlarge,borderWidth:p.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:p.RadiusSizes.none,borderWidth:p.BorderWidths.thick},behavior:{transitionSpeed:p.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:p.RadiusSizes.medium,borderWidth:p.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:p.RadiusSizes.small,borderWidth:p.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:p.RadiusSizes.medium,borderWidth:p.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:p.RadiusSizes.small,borderWidth:p.BorderWidths.thick},behavior:{transitionSpeed:p.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:p.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:p.RadiusSizes.xxlarge,borderWidth:p.BorderWidths.thin},behavior:{transitionSpeed:p.TransitionSpeeds.slow,animationEasing:p.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:p.RadiusSizes.none,borderWidth:p.BorderWidths.thick},behavior:{transitionSpeed:p.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:p.RadiusSizes.large,borderWidth:p.BorderWidths.medium},behavior:{transitionSpeed:p.TransitionSpeeds.normal,animationEasing:p.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:p.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:p.RadiusSizes.large,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.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:p.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:p.RadiusSizes.medium,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:p.TransitionSpeeds.normal,animationEasing:p.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:p.RadiusSizes.small,borderWidth:p.BorderWidths.medium},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:p.TouchTargetSizes.comfortable,focusStyle:p.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:p.RadiusSizes.medium,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:p.TouchTargetSizes.standard,focusStyle:p.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:p.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:p.RadiusSizes.medium,borderWidth:p.BorderWidths.thin},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.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:p.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:p.RadiusSizes.small,borderWidth:p.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:p.TransitionSpeeds.fast,animationEasing:p.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:p.FontWeights.light,fontWeightNormal:p.FontWeights.normal,fontWeightMedium:p.FontWeights.medium,fontWeightSemibold:p.FontWeights.semibold,fontWeightBold:p.FontWeights.bold,lineHeightTight:p.LineHeights.tight,lineHeightNormal:p.LineHeights.normal,lineHeightRelaxed:p.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:p.RadiusSizes.large,borderWidth:p.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:p.TransitionSpeeds.normal,animationEasing:p.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:p.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:p.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:p.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:p.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},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 r=console[n]||console.log;e.length>0?r(t,...e):r(t)}}_();J();var E=class n{static#d;static get instance(){return this.#d}#e;#a;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.#d=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#fe(),typeof CSSStyleSheet<"u"?this.#we():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{};return{colors:this.#v(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#T(t.shape||{}),borderWidths:this.#L(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#R(t.layers||{}),layout:this.#A(t.layout||{}),transitions:this.#W(t.behavior||{}),zIndex:this.#B(t.layers||{}),icons:this.#j(t.icons||{})}}#v(t){let{primary:e="#3b82f6",secondary:a="#64748b",accent:r="#ec4899",background:o="#ffffff",success:i=null,warning:s="#FFBF00",danger:l=null,info:d=null,darkMode:c={}}=t,u={primary:this.#r(e),secondary:this.#r(a),accent:this.#r(r),success:this.#r(i||this.#x(e)),warning:this.#r(s||r),danger:this.#r(l||this.#w(e)),info:this.#r(d||e),gray:this.#p(a),surface:this.#u(o)};return u.surface.fieldset=this.#k(u.surface),u.surfaceSmart=this.#b(u.surface),u.dark=this.#$(u,o,c),u.dark&&u.dark.surface&&(u.dark.surfaceSmart=this.#b(u.dark.surface)),u.interactive={light:{fill:this.#f(u.primary,4.5),text:u.primary[600]},dark:{fill:this.#f(u.dark.primary,4.5),text:this.#E(u.dark.primary,u.dark.surface.base,4.5)}},u}#r(t){let e=this.#o(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))}}#x(t){let e=this.#o(t);return this.#t(120,Math.max(e.s,60),45)}#w(t){let e=this.#o(t);return this.#t(0,Math.max(e.s,70),50)}#p(t){let e=this.#o(t),a=e.h,r=Math.min(e.s,10);return{50:this.#t(a,r,98),100:this.#t(a,r,95),200:this.#t(a,r,88),300:this.#t(a,r,78),400:this.#t(a,r,60),500:t,600:this.#t(a,Math.min(r+5,15),45),700:this.#t(a,Math.min(r+8,18),35),800:this.#t(a,Math.min(r+10,20),20),900:this.#t(a,Math.min(r+12,22),10)}}#u(t){let e=this.#o(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.#g(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#S(t.sunken,.05),overlay:t.elevated}}#S(t,e=.05){let a=this.#o(t),r=Math.max(a.l-a.l*e,5);return this.#t(a.h,a.s,r)}#g(t){let e=this.#o(t);if(e.l>50){let a=Math.min(e.s+5,25),r=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,a,r)}else{let a=Math.max(e.s-10,5),r=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,a,r)}}#$(t,e="#ffffff",a={}){let r=a.background?a.background:this.#g(e),o=this.#u(r),i=a.primary?this.#r(a.primary):this.#n(t.primary);return{surface:{...o,fieldset:this.#F(o)},primary:i,secondary:a.secondary?this.#r(a.secondary):this.#n(t.secondary),accent:a.accent?this.#r(a.accent):this.#n(t.accent),gray:a.secondary?this.#p(a.secondary):t.gray,success:this.#n(t.success),info:this.#n(t.info),warning:this.#n(t.warning),danger:this.#n(t.danger)}}#s(t){let e=String(t||"").replace("#",""),a=e.length===3?e.split("").map(o=>o+o).join(""):e,r=parseInt(a,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(t){let{r:e,g:a,b:r}=this.#s(t),o=[e/255,a/255,r/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]}#c(t,e){let a=this.#l(t),r=this.#l(e),o=Math.max(a,r),i=Math.min(a,r);return(o+.05)/(i+.05)}#m(t,e=4.5){if(!t)return"#000000";let a="#ffffff",r="#000000",o=this.#c(t,a);if(o>=e)return a;let i=this.#c(t,r);return i>=e||i>o?r:a}#h(t,e=1){let{r:a,g:r,b:o}=this.#s(t);return`rgba(${a}, ${r}, ${o}, ${e})`}#z(t,e,a=.5){let r=this.#s(t),o=this.#s(e),i=Math.round(r.r+(o.r-r.r)*a),s=Math.round(r.g+(o.g-r.g)*a),l=Math.round(r.b+(o.b-r.b)*a);return this.#M(i,s,l)}#M(t,e,a){let r=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${r(t)}${r(e)}${r(a)}`}#F(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#y(t.elevated,.08),sunken:t.elevated,overlay:this.#y(t.overlay,.05)}}#E(t={},e="#000000",a=4.5){let r=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of r){let s=t?.[i];if(!s||typeof s!="string")continue;let l=this.#c(s,e);if(l>o.ratio&&(o={shade:i,color:s,ratio:l}),l>=a)return s}return o.color||t?.["600"]||t?.["500"]}#f(t={},e=4.5){let a=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let o of a){let i=t?.[o];if(!i||typeof i!="string")continue;let s=this.#c(i,"#ffffff");if(s>r.ratio&&(r={shade:o,color:i,ratio:s}),s>=e)return i}return r.color||t?.["600"]||t?.["500"]}#b(t){let e={};return Object.entries(t).forEach(([a,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let o=this.#l(r)<.5,i=this.#m(r,4.5),s=this.#m(r,3),l=this.#z(i,r,.4),d=i,c=l,u=o?"#ffffff":"#000000",g=o?.25:.1,h=this.#h(u,g),v=o?"#ffffff":"#000000",x=o?.15:.1,m=this.#h(v,x);e[a]={bg:r,text:i,textSecondary:s,textMuted:l,icon:d,iconSubtle:c,shadow:h,border:m,scheme:o?"dark":"light"}}),e}#y(t,e=.05){let a=this.#o(t),r=Math.min(a.l+(100-a.l)*e,95);return this.#t(a.h,a.s,r)}#n(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(([r,o])=>{let i=t[o.source];e[r]=this.#C(i,o.dimFactor)}),e}#C(t,e=.8){let a=this.#o(t),r=Math.max(a.s*e,5),o=Math.max(a.l*e,5);return this.#t(a.h,r,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:a=1.25,maxSpacingSteps:r=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let l=1;l<=i;l++)s[l]=`${o*l}px`;return s}#T(t){let{radiusSize:e="medium",customRadius:a=null}=t,r;a!=null?r=a:typeof e=="number"?r=e:typeof e=="string"?r=p.RadiusSizes[e]??p.RadiusSizes.medium:r=p.RadiusSizes.medium;let o=Number.isFinite(Number(r))?Number(r):p.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"}}#L(t){let{borderWidth:e="medium"}=t,a;return typeof e=="number"?a=e:typeof e=="string"?a=p.BorderWidths[e]??p.BorderWidths.medium:a=p.BorderWidths.medium,{hairline:`${p.BorderWidths.hairline}px`,thin:`${p.BorderWidths.thin}px`,medium:`${p.BorderWidths.medium}px`,thick:`${p.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:a="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:s=p.FontWeights.light,fontWeightNormal:l=p.FontWeights.normal,fontWeightMedium:d=p.FontWeights.medium,fontWeightSemibold:c=p.FontWeights.semibold,fontWeightBold:u=p.FontWeights.bold,lineHeightTight:g=p.LineHeights.tight,lineHeightNormal:h=p.LineHeights.normal,lineHeightRelaxed:v=p.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:a,mono:r},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:s?.toString()||"300",normal:l?.toString()||"400",medium:d?.toString()||"500",semibold:c?.toString()||"600",bold:u?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:v?.toString()||"1.75"}}}#R(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:r=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*r}px ${2*a}px 0 ${i}`,base:`0 ${1*r}px ${3*a}px 0 ${o}, 0 ${1*r}px ${2*a}px 0 ${i}`,md:`0 ${4*r}px ${6*a}px ${-1*r}px ${o}, 0 ${2*r}px ${4*a}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*a}px ${-3*r}px ${o}, 0 ${4*r}px ${6*a}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*a}px ${-5*r}px ${o}, 0 ${10*r}px ${10*a}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*a}px 0 ${i}`}}#A(t){let{maxWidth:e=1200,containerPadding:a=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=t;return{maxWidth:`${e}px`,minHeight:"100vh",containerPadding:`${a}px`,breakpoints:{sm:`${r.sm}px`,md:`${r.md}px`,lg:`${r.lg}px`,xl:`${r.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#W(t){let{transitionSpeed:e=p.TransitionSpeeds.normal,animationEasing:a=p.AnimationEasings["ease-out"]}=t,r;return typeof e=="number"?r=e:typeof e=="string"&&p.TransitionSpeeds[e]?r=p.TransitionSpeeds[e]:r=p.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#B(t){let{baseZIndex:e=1e3,zIndexStep:a=10}=t;return{dropdown:e.toString(),sticky:(e+a*2).toString(),fixed:(e+a*3).toString(),modal:(e+a*4).toString(),drawer:(e+a*5).toString(),popover:(e+a*6).toString(),tooltip:(e+a*7).toString(),notification:(e+a*8).toString()}}#j(t){let{set:e="phosphor",weight:a="regular",defaultSize:r=24,sizes:o={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:s="/assets/img/icons/"}=t;return{set:e,weight:a,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(o).map(([l,d])=>[l,`${d}px`])),spritePath:i,externalPath:s}}#D(t){let e=[];e.push(` /* Colors */
|
|
20
20
|
`);let a=(r,o="")=>{Object.entries(r).forEach(([i,s])=>{typeof s=="object"&&s!==null?a(s,`${o}${i}-`):typeof s=="string"&&e.push(` --color-${o}${i}: ${s};
|
|
21
21
|
`)})};return Object.entries(t).forEach(([r,o])=>{r!=="dark"&&r!=="surfaceSmart"&&r!=="interactive"&&typeof o=="object"&&o!==null&&a(o,`${r}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
22
|
`),Object.entries(t.surfaceSmart).forEach(([r,o])=>{e.push(` --surface-${r}-bg: ${o.bg};
|
|
@@ -116,7 +116,7 @@ var Ae=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
116
116
|
`),e.push(` --icon-size: ${t.defaultSize};
|
|
117
117
|
`),Object.entries(t.sizes).forEach(([a,r])=>{e.push(` --icon-size-${a}: ${r};
|
|
118
118
|
`)}),`${e.join("")}
|
|
119
|
-
`}#Q(t){if(!t?.dark)return"";let e=[],a=(d,c="")=>{Object.entries(d).forEach(([
|
|
119
|
+
`}#Q(t){if(!t?.dark)return"";let e=[],a=(d,c="")=>{Object.entries(d).forEach(([u,g])=>{typeof g=="object"&&g!==null?a(g,`${c}${u}-`):typeof g=="string"&&e.push(` --color-${c}${u}: ${g};
|
|
120
120
|
`)})};Object.entries(t.dark).forEach(([d,c])=>{d!=="surfaceSmart"&&typeof c=="object"&&c!==null&&a(c,`${d}-`)});let r=[];t.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
121
121
|
`),Object.entries(t.dark.surfaceSmart).forEach(([d,c])=>{r.push(` --surface-${d}-bg: ${c.bg};
|
|
122
122
|
`),r.push(` --surface-${d}-text: ${c.text};
|
|
@@ -151,16 +151,16 @@ var Ae=Object.defineProperty;var P=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{fo
|
|
|
151
151
|
--backdrop-background: var(--backdrop-bg);
|
|
152
152
|
`,s=this.#Y(t);return`html[data-theme="dark"] {
|
|
153
153
|
${[...e,...r,o,i,s].join("")}}
|
|
154
|
-
`}#Z(t){if(!t?.dark)return"";let e=[],a=(c,
|
|
155
|
-
`)})};Object.entries(t.dark).forEach(([c,
|
|
156
|
-
`),Object.entries(t.dark.surfaceSmart).forEach(([c,
|
|
157
|
-
`),r.push(` --surface-${c}-text: ${
|
|
158
|
-
`),r.push(` --surface-${c}-text-secondary: ${
|
|
159
|
-
`),r.push(` --surface-${c}-text-muted: ${
|
|
160
|
-
`),r.push(` --surface-${c}-icon: ${
|
|
161
|
-
`),r.push(` --surface-${c}-icon-subtle: ${
|
|
162
|
-
`),r.push(` --surface-${c}-shadow: ${
|
|
163
|
-
`),r.push(` --surface-${c}-border: ${
|
|
154
|
+
`}#Z(t){if(!t?.dark)return"";let e=[],a=(c,u="")=>{Object.entries(c).forEach(([g,h])=>{typeof h=="object"&&h!==null?a(h,`${u}${g}-`):typeof h=="string"&&e.push(` --color-${u}${g}: ${h};
|
|
155
|
+
`)})};Object.entries(t.dark).forEach(([c,u])=>{c!=="surfaceSmart"&&typeof u=="object"&&u!==null&&a(u,`${c}-`)});let r=[];t.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
156
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([c,u])=>{r.push(` --surface-${c}-bg: ${u.bg};
|
|
157
|
+
`),r.push(` --surface-${c}-text: ${u.text};
|
|
158
|
+
`),r.push(` --surface-${c}-text-secondary: ${u.textSecondary};
|
|
159
|
+
`),r.push(` --surface-${c}-text-muted: ${u.textMuted};
|
|
160
|
+
`),r.push(` --surface-${c}-icon: ${u.icon};
|
|
161
|
+
`),r.push(` --surface-${c}-icon-subtle: ${u.iconSubtle};
|
|
162
|
+
`),r.push(` --surface-${c}-shadow: ${u.shadow};
|
|
163
|
+
`),r.push(` --surface-${c}-border: ${u.border};
|
|
164
164
|
`)}),r.push(`
|
|
165
165
|
`));let o=[];t.interactive&&t.interactive.dark&&(o.push(` /* Interactive Colors - optimized for specific use cases (dark mode) */
|
|
166
166
|
`),o.push(` --color-primary-fill: ${t.interactive.dark.fill}; /* For button backgrounds with white text */
|
|
@@ -241,7 +241,7 @@ ${[...e,...r,i,s,l].join("")} }
|
|
|
241
241
|
radial-gradient(at 10% 10%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
242
242
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
243
243
|
radial-gradient(at 50% 90%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
244
|
-
`}#
|
|
244
|
+
`}#X(){return`/* Alert dark mode adjustments */
|
|
245
245
|
html[data-theme="dark"] {
|
|
246
246
|
.alert-success { background-color: var(--color-success-50); border-color: var(--color-success-500); color: var(--color-success-900); }
|
|
247
247
|
.alert-info { background-color: var(--color-info-50); border-color: var(--color-info-500); color: var(--color-info-900); }
|
|
@@ -249,7 +249,7 @@ html[data-theme="dark"] {
|
|
|
249
249
|
.alert-danger, .alert-error { background-color: var(--color-danger-50); border-color: var(--color-danger-500); color: var(--color-danger-900); }
|
|
250
250
|
img, video { opacity: 0.8; transition: opacity var(--transition-normal); }
|
|
251
251
|
img:hover, video:hover { opacity: 1; }
|
|
252
|
-
}`}#
|
|
252
|
+
}`}#K(){try{let t=this.options?.design?.options?.backgroundMesh;this.options.debug&&this.options.log?.("debug","backgroundMesh check:",t);let e=Number(t);return!Number.isFinite(e)||e===0?"":`/* Optional background mesh applied from config */
|
|
253
253
|
body {
|
|
254
254
|
background: var(--background-mesh-0${Math.max(1,Math.min(5,Math.floor(e)))});
|
|
255
255
|
background-attachment: fixed;
|
|
@@ -626,7 +626,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
626
626
|
|
|
627
627
|
/* Dialog styles moved to #generateDialogStyles() */
|
|
628
628
|
|
|
629
|
-
`}#ae(){let{gap:t,inputPadding:e,buttonPadding:a,focusRingWidth:r,focusRingOpacity:o,borderWidthThin:i,sectionSpacing:s,buttonMinHeight:l,inputMinHeight:d}=this.options.design,c=e||.75,
|
|
629
|
+
`}#ae(){let{gap:t,inputPadding:e,buttonPadding:a,focusRingWidth:r,focusRingOpacity:o,borderWidthThin:i,sectionSpacing:s,buttonMinHeight:l,inputMinHeight:d}=this.options.design,c=e||.75,u=a||1,g=r||3,h=i||1,v=t||1,x=s||2,m=l||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
630
630
|
form {
|
|
631
631
|
margin: 0;
|
|
632
632
|
width: 100%;
|
|
@@ -756,7 +756,7 @@ input, textarea, select {
|
|
|
756
756
|
width: 100%;
|
|
757
757
|
min-height: ${d||40}px;
|
|
758
758
|
padding: calc(var(--spacing-1) * ${c}) var(--spacing-4);
|
|
759
|
-
border: ${
|
|
759
|
+
border: ${h}px solid var(--color-border);
|
|
760
760
|
border-radius: var(--radius-md);
|
|
761
761
|
font-family: var(--font-family-body);
|
|
762
762
|
font-size: var(--font-size-base);
|
|
@@ -925,9 +925,9 @@ input[type="checkbox"] + label:not(fieldset label):not(label[data-toggle]) {
|
|
|
925
925
|
display: inline-flex;
|
|
926
926
|
align-items: center;
|
|
927
927
|
justify-content: center;
|
|
928
|
-
min-height: calc(${
|
|
929
|
-
padding: calc(var(--spacing-1) * ${
|
|
930
|
-
border: ${
|
|
928
|
+
min-height: calc(${m}px * 0.75);
|
|
929
|
+
padding: calc(var(--spacing-1) * ${u*.6}) calc(var(--spacing-4) * 0.85);
|
|
930
|
+
border: ${h}px solid var(--color-border);
|
|
931
931
|
border-radius: var(--radius-md);
|
|
932
932
|
font-family: var(--font-family-body);
|
|
933
933
|
font-size: var(--font-size-sm);
|
|
@@ -1029,8 +1029,8 @@ fieldset[role="group"].buttons {
|
|
|
1029
1029
|
display: inline-flex;
|
|
1030
1030
|
align-items: center;
|
|
1031
1031
|
justify-content: center;
|
|
1032
|
-
min-height: calc(${
|
|
1033
|
-
padding: calc(var(--spacing-1) * ${
|
|
1032
|
+
min-height: calc(${m}px * 0.75);
|
|
1033
|
+
padding: calc(var(--spacing-1) * ${u*.6}) calc(var(--spacing-4) * 0.85);
|
|
1034
1034
|
border: 2px solid var(--color-border);
|
|
1035
1035
|
border-radius: var(--radius-md);
|
|
1036
1036
|
font-family: var(--font-family-body);
|
|
@@ -1227,9 +1227,9 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1227
1227
|
gap: var(--spacing-1);
|
|
1228
1228
|
align-items: center;
|
|
1229
1229
|
justify-content: center;
|
|
1230
|
-
min-height: ${
|
|
1231
|
-
padding: calc(var(--spacing-1) * ${
|
|
1232
|
-
border: ${
|
|
1230
|
+
min-height: ${m}px;
|
|
1231
|
+
padding: calc(var(--spacing-1) * ${u}) var(--spacing-6);
|
|
1232
|
+
border: ${h}px solid transparent;
|
|
1233
1233
|
border-radius: var(--radius-md);
|
|
1234
1234
|
font-family: var(--font-family-body);
|
|
1235
1235
|
font-size: var(--font-size-base);
|
|
@@ -1336,20 +1336,20 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1336
1336
|
.btn-sm {
|
|
1337
1337
|
padding: var(--spacing-2) var(--spacing-4);
|
|
1338
1338
|
font-size: var(--font-size-sm);
|
|
1339
|
-
min-height: calc(${
|
|
1339
|
+
min-height: calc(${m}px * 0.8);
|
|
1340
1340
|
}
|
|
1341
1341
|
|
|
1342
1342
|
.btn-xs {
|
|
1343
1343
|
padding: var(--spacing-1) var(--spacing-2);
|
|
1344
1344
|
font-size: var(--font-size-xs);
|
|
1345
|
-
min-height: calc(${
|
|
1345
|
+
min-height: calc(${m}px * 0.6);
|
|
1346
1346
|
}
|
|
1347
1347
|
|
|
1348
1348
|
|
|
1349
1349
|
.btn-lg {
|
|
1350
1350
|
padding: var(--spacing-4) var(--spacing-8);
|
|
1351
1351
|
font-size: var(--font-size-lg);
|
|
1352
|
-
min-height: calc(${
|
|
1352
|
+
min-height: calc(${m}px * 1.2);
|
|
1353
1353
|
}
|
|
1354
1354
|
|
|
1355
1355
|
/* Working/loading state for buttons */
|
|
@@ -1442,13 +1442,13 @@ a.btn-working {
|
|
|
1442
1442
|
.array-item {
|
|
1443
1443
|
position: relative;
|
|
1444
1444
|
padding: var(--spacing-4);
|
|
1445
|
-
border: ${
|
|
1445
|
+
border: ${h}px solid var(--color-border);
|
|
1446
1446
|
border-radius: var(--radius-md);
|
|
1447
1447
|
background-color: var(--color-surface-base);
|
|
1448
1448
|
|
|
1449
1449
|
.array-controls {
|
|
1450
1450
|
padding-top: var(--spacing-3);
|
|
1451
|
-
border-top: ${
|
|
1451
|
+
border-top: ${h}px solid var(--color-border);
|
|
1452
1452
|
margin-top: var(--spacing-4);
|
|
1453
1453
|
}
|
|
1454
1454
|
}
|
|
@@ -2101,7 +2101,7 @@ pds-tabstrip {
|
|
|
2101
2101
|
*:hover { scrollbar-color: var(--color-secondary-400) transparent; }
|
|
2102
2102
|
@media (prefers-color-scheme: dark) { *:hover { scrollbar-color: var(--color-secondary-500) transparent; } }
|
|
2103
2103
|
|
|
2104
|
-
`}#pe(){let{a11y:t={}}=this.options.design,e=t.minTouchTarget||
|
|
2104
|
+
`}#pe(){let{a11y:t={}}=this.options.design,e=t.minTouchTarget||p.TouchTargetSizes.standard;return`/* Icon System */
|
|
2105
2105
|
|
|
2106
2106
|
pds-icon {
|
|
2107
2107
|
display: inline-flex;
|
|
@@ -2419,7 +2419,7 @@ nav[data-dropdown] {
|
|
|
2419
2419
|
.backdrop-light { --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)); --backdrop-brightness: 1.1; }
|
|
2420
2420
|
.backdrop-dark { --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)); --backdrop-brightness: 0.6; }
|
|
2421
2421
|
.backdrop-blur-sm { --backdrop-blur: 5px; } .backdrop-blur-md { --backdrop-blur: 10px; } .backdrop-blur-lg { --backdrop-blur: 20px; }
|
|
2422
|
-
`),i.join("")}#
|
|
2422
|
+
`),i.join("")}#me(){return`/* Media Element Utilities */
|
|
2423
2423
|
|
|
2424
2424
|
/* Gallery images */
|
|
2425
2425
|
.img-gallery {
|
|
@@ -2457,7 +2457,7 @@ nav[data-dropdown] {
|
|
|
2457
2457
|
height: auto;
|
|
2458
2458
|
}
|
|
2459
2459
|
|
|
2460
|
-
`}#
|
|
2460
|
+
`}#he(){let{layout:t={},a11y:e={}}=this.options.design,a=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=e.minTouchTarget||p.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2461
2461
|
|
|
2462
2462
|
/* Small devices (${a.sm}px and up) */
|
|
2463
2463
|
@media (min-width: ${a.sm}px) {
|
|
@@ -2561,7 +2561,7 @@ nav[data-dropdown] {
|
|
|
2561
2561
|
}
|
|
2562
2562
|
}
|
|
2563
2563
|
|
|
2564
|
-
`}#o(t){let e=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,o=Math.max(e,a,r),i=Math.min(e,a,r),s,l,d=(o+i)/2;if(o===i)s=l=0;else{let c=o-i;switch(l=d>.5?c/(2-o-i):c/(o+i),o){case e:s=(a-r)/c+(a<r?6:0);break;case a:s=(r-e)/c+2;break;case r:s=(e-a)/c+4;break}s/=6}return{h:s*360,s:l*100,l:d*100}}#t(t,e,a){t=t/360,e=e/100,a=a/100;let r=(d,c,
|
|
2564
|
+
`}#o(t){let e=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,o=Math.max(e,a,r),i=Math.min(e,a,r),s,l,d=(o+i)/2;if(o===i)s=l=0;else{let c=o-i;switch(l=d>.5?c/(2-o-i):c/(o+i),o){case e:s=(a-r)/c+(a<r?6:0);break;case a:s=(r-e)/c+2;break;case r:s=(e-a)/c+4;break}s/=6}return{h:s*360,s:l*100,l:d*100}}#t(t,e,a){t=t/360,e=e/100,a=a/100;let r=(d,c,u)=>(u<0&&(u+=1),u>1&&(u-=1),u<1/6?d+(c-d)*6*u:u<1/2?c:u<2/3?d+(c-d)*(2/3-u)*6:d),o,i,s;if(e===0)o=i=s=a;else{let d=a<.5?a*(1+e):a+e-a*e,c=2*a-d;o=r(c,d,t+1/3),i=r(c,d,t),s=r(c,d,t-1/3)}let l=d=>{let c=Math.round(d*255).toString(16);return c.length===1?"0"+c:c};return`#${l(o)}${l(i)}${l(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#fe(){this.#e={tokens:this.#be(),primitives:this.#ye(),components:this.#ve(),utilities:this.#xe()},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`})}#be(){let{colors:t,spacing:e,radius:a,borderWidths:r,typography:o,shadows:i,layout:s,transitions:l,zIndex:d,icons:c}=this.tokens,u=[`@layer tokens {
|
|
2565
2565
|
:root {
|
|
2566
2566
|
${this.#D(t)}
|
|
2567
2567
|
${this.#N(e)}
|
|
@@ -2575,9 +2575,9 @@ nav[data-dropdown] {
|
|
|
2575
2575
|
${this.#V(c)}
|
|
2576
2576
|
}
|
|
2577
2577
|
${this.#Z(t)}
|
|
2578
|
-
}`];return
|
|
2578
|
+
}`];return u.push(`
|
|
2579
2579
|
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2580
|
-
`),
|
|
2580
|
+
`),u.push(this.#Q(t)),u.join("")}#ye(){let{advanced:t={},a11y:e={},layout:a={}}=this.options.design,r=t.tabSize||p.TabSizes.standard,o=e.minTouchTarget||p.TouchTargetSizes.standard,i=a.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2581
2581
|
/* Base HTML reset */
|
|
2582
2582
|
*, *::before, *::after {
|
|
2583
2583
|
box-sizing: border-box;
|
|
@@ -2973,7 +2973,7 @@ ${this.#oe()}
|
|
|
2973
2973
|
|
|
2974
2974
|
${this.#de()}
|
|
2975
2975
|
|
|
2976
|
-
${this.#
|
|
2976
|
+
${this.#X()}
|
|
2977
2977
|
|
|
2978
2978
|
}
|
|
2979
2979
|
`}#xe(){return`@layer utilities {
|
|
@@ -2985,7 +2985,7 @@ ${this.#ge()}
|
|
|
2985
2985
|
/* Optional utilities/features controlled by config options */
|
|
2986
2986
|
/* - Body background mesh rule (applies one of the generated mesh vars) */
|
|
2987
2987
|
/* - Liquid glass utility class */
|
|
2988
|
-
${this.#
|
|
2988
|
+
${this.#K()}
|
|
2989
2989
|
${this.#ee()}
|
|
2990
2990
|
|
|
2991
2991
|
${this.#te()}
|
|
@@ -3169,22 +3169,22 @@ html[data-theme="dark"] .surface-inverse {
|
|
|
3169
3169
|
}
|
|
3170
3170
|
|
|
3171
3171
|
|
|
3172
|
-
${this.#he()}
|
|
3173
|
-
|
|
3174
3172
|
${this.#me()}
|
|
3175
3173
|
|
|
3174
|
+
${this.#he()}
|
|
3175
|
+
|
|
3176
3176
|
}
|
|
3177
3177
|
`}#we(){this.#a={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#ke()}#ke(){this.#a.tokens.replaceSync(this.#e.tokens),this.#a.primitives.replaceSync(this.#e.primitives),this.#a.components.replaceSync(this.#e.components),this.#a.utilities.replaceSync(this.#e.utilities)}get tokensCSS(){return this.#e?.tokens||""}get primitivesCSS(){return this.#e?.primitives||""}get componentsCSS(){return this.#e?.components||""}get utilitiesCSS(){return this.#e?.utilities||""}get layeredCSS(){return this.#e?`${this.#e.tokens}
|
|
3178
3178
|
${this.#e.primitives}
|
|
3179
3179
|
${this.#e.components}
|
|
3180
|
-
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof z<"u"?z:null,enums:typeof
|
|
3180
|
+
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof z<"u"?z:null,enums:typeof p<"u"?p:null},meta:{generatedAt:new Date().toISOString(),totalSize:(this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0),totalSizeKB:(((this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0))/1024).toFixed(2),layerCount:4,tokenGroups:Object.keys(this.tokens).length},helpers:{getColorScales:()=>{let t=[],e=this.tokens.colors;for(let[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&t.push({name:a,scale:r});return t},getColorScale:t=>this.tokens.colors[t]||null,getSpacingValues:()=>Object.entries(this.tokens.spacing).map(([t,e])=>({key:t,value:e})),getTypography:()=>this.tokens.typography,getLayerCSS:t=>{let e=["tokens","primitives","components","utilities"];if(!e.includes(t))throw new Error(`Invalid layer: ${t}. Must be one of ${e.join(", ")}`);return this.#e?.[t]||""},usesEnumValue:(t,e)=>{let a=this.options.design||{};return JSON.stringify(a).includes(e)}}}}get tokensStylesheet(){return this.#a?.tokens}get primitivesStylesheet(){return this.#a?.primitives}get componentsStylesheet(){return this.#a?.components}get utilitiesStylesheet(){return this.#a?.utilities}getCSSModules(){return{"pds-tokens.css.js":this.#i("tokens",this.#e.tokens),"pds-primitives.css.js":this.#i("primitives",this.#e.primitives),"pds-components.css.js":this.#i("components",this.#e.components),"pds-utilities.css.js":this.#i("utilities",this.#e.utilities),"pds-styles.css.js":this.#i("styles",this.layeredCSS)}}#i(t,e){let a=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${t}
|
|
3181
3181
|
// Auto-generated - do not edit directly
|
|
3182
3182
|
|
|
3183
3183
|
export const ${t} = new CSSStyleSheet();
|
|
3184
3184
|
${t}.replaceSync(\`${a}\`);
|
|
3185
3185
|
|
|
3186
3186
|
export const ${t}CSS = \`${a}\`;
|
|
3187
|
-
`}};var
|
|
3187
|
+
`}};var Y=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},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}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 a=new CSSStyleSheet;return a.replaceSync("/* Failed to load "+t+" */"),a}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},X=new Y;function Ne(n){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let a=new CSSStyleSheet;a.replaceSync(n),a._pds=!0;let r=(document.adoptedStyleSheets||[]).filter(o=>o._pds!==!0);document.adoptedStyleSheets=[...r,a];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let a=document.head||document.getElementsByTagName("head")[0];a?a.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}Ne(e)}async function le(n,t=[],e=null){try{let a=e?.primitivesStylesheet?e.primitivesStylesheet:await X.getStylesheet("primitives");n.adoptedStyleSheets=[a,...t]}catch(a){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt primitives:`,a),n.adoptedStyleSheets=t}}async function de(n,t=["primitives"],e=[],a=null){try{let o=(await Promise.all(t.map(async i=>{if(a)switch(i){case"tokens":return a.tokensStylesheet;case"primitives":return a.primitivesStylesheet;case"components":return a.componentsStylesheet;case"utilities":return a.utilitiesStylesheet;default:break}return X.getStylesheet(i)}))).filter(i=>i!==null);n.adoptedStyleSheets=[...o,...e]}catch(r){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,r),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:"button, a[class*='btn-']"}];function Ie(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 Oe(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let t=n.querySelector("menu");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.setAttribute("role",t.getAttribute("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 l=n.getBoundingClientRect(),d=Math.max(0,window.innerHeight-l.bottom);return Math.max(0,l.top)>d?"up":"down"},r=()=>{n.dataset.dropdownDirection=a(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},o=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},i=()=>{t.getAttribute("aria-hidden")==="false"?o():r()};e?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||o()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(o(),e?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&o()})}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 a=document.createElement("span");a.className="toggle-knob",e.appendChild(a),n.insertBefore(e,t.nextSibling);let r=()=>{n.setAttribute("aria-checked",t.checked?"true":"false")},o=()=>{t.disabled||(t.checked=!t.checked,r(),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",r)}function qe(n){if(n.dataset.enhancedRange)return;let t=n.closest("label"),e=t?.classList.contains("range-output"),a=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${a}-output`;if(n.id=a,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 s=document.createElement("span");s.textContent=o.textContent,i.appendChild(s);let l=document.createElement("output");l.id=r,l.setAttribute("for",a),l.style.color="var(--surface-text-secondary, var(--color-text-secondary))",l.style.fontSize="0.875rem",l.textContent=n.value,i.appendChild(l),o.textContent="",o.appendChild(i);let d=()=>{l.textContent=n.value};n.addEventListener("input",d)}}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=r,i.setAttribute("for",a),i.className="range-bubble",i.setAttribute("aria-live","polite"),o.appendChild(i);let s=()=>{let c=parseFloat(n.min)||0,u=parseFloat(n.max)||100,g=parseFloat(n.value),h=(g-c)/(u-c);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},l=()=>i.classList.add("visible"),d=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",l),n.addEventListener("pointerup",d),n.addEventListener("pointerleave",d),n.addEventListener("focus",l),n.addEventListener("blur",d),s()}n.dataset.enhancedRange="1"}function Ge(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let t=e=>{let a=e.closest("label");if(!a||a.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px",a.querySelector("span").appendChild(r);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",a=>{if(a.key==="Enter"||a.key==="Tab"){let r=t.value.trim();if(r){a.preventDefault();let o=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),l=document.createElement("span");l.setAttribute("data-label",""),l.textContent=r;let d=document.createElement("input");d.type=o,d.name=e.name||n.getAttribute("data-name")||"open-group",d.value=r,d.id=i,s.appendChild(l),s.appendChild(d),n.insertBefore(s,t),t.value=""}}else if(a.key==="Backspace"&&t.value===""){a.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Ve(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(r=>{r.forEach(o=>{if(o.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)t||(t=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let l=document.createElement("pds-icon");l.setAttribute("icon","circle-notch"),l.setAttribute("size","sm"),n.insertBefore(l,n.firstChild),e=!0}else o.oldValue?.includes("btn-working")&&s&&(e?(s.remove(),e=!1):t&&(s.setAttribute("icon",t),t=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Qe=new Map([[".accordion",Ie],["nav[data-dropdown]",Oe],["label[data-toggle]",He],['input[type="range"]',qe],["form[data-required]",Ge],["fieldset[role=group][data-open]",_e],["button, a[class*='btn-']",Ve]]),pe=Ue.map(n=>({...n,run:Qe.get(n.selector)||(()=>{})}));var ue=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3188
3188
|
<div class="accordion">
|
|
3189
3189
|
<details>
|
|
3190
3190
|
<summary>Section 1</summary>
|
|
@@ -3238,14 +3238,14 @@ export const ${t}CSS = \`${a}\`;
|
|
|
3238
3238
|
<button class="btn-primary btn-working">
|
|
3239
3239
|
<span>Saving</span>
|
|
3240
3240
|
</button>
|
|
3241
|
-
`.trim()}];var
|
|
3241
|
+
`.trim()}];var me="pds",Ze=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ge=/^[a-z]:/i;function I(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 Ye(n){return n.replace(/^\.\/+/,"")}function Xe(n){return ge.test(n)?n.replace(ge,"").replace(/^\/+/,""):n}function Ke(n){return n.startsWith("public/")?n.substring(7):n}function he(n,t={}){let e=t.segment||me,a=t.defaultRoot||`/assets/${e}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return I(a);let o=r.trim();return o?(o=o.replace(/\\/g,"/"),o=Je(o,e),o=I(o),Ze.test(o)?o:(o=Ye(o),o=Xe(o),o.startsWith("/")||(o=Ke(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(i,s)=>s===0?i:"/")),I(o))):I(a)}function fe(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 r=document.createElement("canvas").getContext("2d");if(!r)return!1;let o="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let l=r.measureText(o).width;r.font=`${i} "${t}", ${s}`;let d=r.measureText(o).width;return l!==d}function et(n){return n?n.split(",").map(a=>a.trim())[0].replace(/['"]/g,"").trim():null}async function tt(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:a=!1}=t,r=et(n);if(!r||fe(r))return Promise.resolve();let o=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${o}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,l)=>{let d=document.createElement("link");d.rel="stylesheet";let c=a?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${o}:${c}&display=swap`,d.setAttribute("data-font-loader",r),d.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},d.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),l(new Error(`Failed to load font: ${r}`))},document.head.appendChild(d),setTimeout(()=>{fe(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function be(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(a=>tt(a).catch(r=>{console.warn(`Could not load font: ${a}`,r)}));await Promise.all(e)}var at=/^[a-z][a-z0-9+\-.]*:\/\//i,O=(()=>{try{return import.meta.url}catch{return}})(),V=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function Q(n,t={}){if(!n||at.test(n))return n;let{preferModule:e=!0}=t,a=()=>{if(!O)return null;try{return new URL(n,O).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(e?a()||r():r()||a())||n}var xe=(()=>{if(O)try{let n=new URL(O);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",O).href}catch{return}})(),we=!1;function ke(n){we||typeof document>"u"||(we=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function Se(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[a,r]of Object.entries(t))r&&typeof r=="object"&&!Array.isArray(r)?e[a]=Se(e[a]&&typeof e[a]=="object"?e[a]:{},r):e[a]=r;return e}function te(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function H(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=>H(e)).filter(e=>e!==void 0);let t={};for(let e in n)if(n.hasOwnProperty(e)){let a=n[e];if(typeof a!="function"){let r=H(a);r!==void 0&&(t[e]=r)}}return t}function $e(n={},t={},{presets:e,defaultLog:a}){let r=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??[],s=n&&n.preset,l=n&&n.design,d="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,u=null;if(d){let g=String(s||"default").toLowerCase(),h=e?.[g]||Object.values(e||{}).find(A=>te(A.name)===g||String(A.name||"").toLowerCase()===g);if(!h)throw new Error(`PDS preset not found: "${s||"default"}"`);u={id:h.id||te(h.name),name:h.name||h.id||String(g)};let v=structuredClone(h);if(l&&typeof l=="object"){let A=H(l);v=Se(v,structuredClone(A))}let{mode:x,autoDefine:m,applyGlobalStyles:w,manageTheme:M,themeStorageKey:k,preloadStyles:T,criticalLayers:R,managerURL:B,manager:j,preset:$,design:S,enhancers:F,log:L,...G}=n;c={...G,design:v,preset:u.name,log:L||a}}else if(r){let{log:g,...h}=n;c={design:structuredClone(h),log:g||a}}else{let g=e?.default||Object.values(e||{}).find(h=>te(h.name)==="default");if(!g)throw new Error("PDS default preset not available");u={id:g.id||"default",name:g.name||"Default"},c={design:structuredClone(g),preset:u.name,log:a}}return{generatorConfig:c,enhancers:i,presetInfo:u}}function ze({manageTheme:n,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:a}){let r="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(t)||null}catch{o=null}try{e?.(o),a?.(o)}catch{}o?o==="system"?r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":r=o:r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:r,storedTheme:o}}function Me(n,{resolvePublicAssetURL:t}){let e=!!(n?.public?.root||n?.static?.root),a=t(n);return!e&&xe&&(a=xe),V(Q(a))}async function Fe(n,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:a=[],autoDefineMapper:r=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:s=!0}=n,l=(()=>{let c=new Map;return(t||[]).forEach(u=>c.set(u.selector,u)),(o||[]).forEach(u=>c.set(u.selector,u)),Array.from(c.values())})(),d=null;if(typeof window<"u"&&typeof document<"u"){let c=null;try{let m=await Promise.resolve().then(()=>(ve(),ye));c=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let u=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:s})),predefine:a,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:l,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.
|
|
3242
3242
|
Add this to your HTML <head>:
|
|
3243
3243
|
<script type="importmap">
|
|
3244
3244
|
{ "imports": { "#pds/lit": "./path/to/lit.js" } }
|
|
3245
3245
|
<\/script>
|
|
3246
|
-
See: https://github.com/pure-ds/core#lit-components`):console.warn(`\u26A0\uFE0F PDS component <${
|
|
3247
|
-
`);if(w){let
|
|
3246
|
+
See: https://github.com/pure-ds/core#lit-components`):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 r=="function")try{let w=r(m);return w===void 0?u(m):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),u(m)}return u(m)}};c&&(d=new c(x),a.length>0&&typeof c.define=="function"&&await c.define(...a,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:d,mergedEnhancers:l}}var Le=!1,q=null;async function ot(n,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(Le)return;let[a,r,o,i]=await Promise.all([Promise.resolve().then(()=>(J(),ce)),Promise.resolve().then(()=>(_(),ne)),Promise.resolve().then(()=>(oe(),ae)),Promise.resolve().then(()=>(Te(),Ce))]),s=a?.default||a?.ontology,l=a?.findComponentForElement,d=r?.enums;q=o?.PDSQuery||o?.default||null,n.ontology=s,n.findComponentForElement=l,n.enums=d,n.common=i||{},n.presets=U,n.enhancerMetadata=ue,n.applyStyles=function(c){return K(c||E.instance)},n.adoptLayers=function(c,u,g){return de(c,u,g,E.instance)},n.adoptPrimitives=function(c,u){return le(c,u,E.instance)},n.getGenerator=async function(){return E},n.query=async function(c){if(!q){let g=await Promise.resolve().then(()=>(oe(),ae));q=g?.PDSQuery||g?.default||null}return q?await new q(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,u={}){if(typeof window>"u"||!document.head||!c)return;let{theme:g,layers:h=["tokens"]}=u;try{let v=g||"light";(g==="system"||!g)&&(v=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",v);let x=c.design?{...c,theme:v}:{design:c,theme:v},m=new E(x),w=h.map(M=>{try{return m.css?.[M]||""}catch{return""}}).filter(M=>M.trim()).join(`
|
|
3247
|
+
`);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(v){console.warn("PDS preload failed:",v)}},Le=!0}async function nt(n,t,{emitReady:e,applyResolvedTheme:a,setupSystemListenerIfNeeded:r}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(await ot(n,{applyResolvedTheme:a,setupSystemListenerIfNeeded:r}),ke(n),typeof document<"u"&&document.adoptedStyleSheets){let u=`
|
|
3248
3248
|
html { opacity: 0; }
|
|
3249
3249
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3250
|
-
`;try{if(!document.adoptedStyleSheets.some(
|
|
3251
|
-
`);if($){let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let
|
|
3250
|
+
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(u),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 v=document.createElement("style");v.setAttribute("data-pds-fouc",""),v.textContent=u,document.head.insertBefore(v,document.head.firstChild)}}}let o=t.applyGlobalStyles??!0,i=t.manageTheme??!0,s=t.themeStorageKey??"pure-ds-theme",l=t.preloadStyles??!1,d=t.criticalLayers??["tokens","primitives"],c=t&&t.autoDefine||null;try{let{resolvedTheme:u}=ze({manageTheme:i,themeStorageKey:s,applyResolvedTheme:a,setupSystemListenerIfNeeded:r}),g=$e(t,{},{presets:U,defaultLog:ie}),h=g.enhancers,{log:v,...x}=g.generatorConfig,m=structuredClone(x);m.log=v,i&&(m.theme=u);let w=new E(m);if(m.design?.typography)try{await be(m.design.typography)}catch($){m?.log?.("warn","Failed to load some fonts from Google Fonts:",$)}if(l&&typeof window<"u"&&document.head)try{let $=d.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(`
|
|
3251
|
+
`);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 L=document.head.querySelector('meta[charset], meta[name="viewport"]');L?L.parentNode.insertBefore(F,L.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:he}),k;c&&c.baseURL?k=V(Q(c.baseURL,{preferModule:!1})):k=`${M}components/`;let T=null,R=[];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:pe});T=$.autoDefiner,R=$.mergedEnhancers||[]}catch($){m?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",$)}let B=w?.options||m,j=H(t);return n.currentConfig=Object.freeze({mode:"live",...structuredClone(j),design:structuredClone(g.generatorConfig.design),preset:g.generatorConfig.preset,theme:u,enhancers:R}),e({mode:"live",generator:w,config:B,theme:u,autoDefiner:T}),{generator:w,config:B,theme:u,autoDefiner:T}}catch(u){throw n.dispatchEvent(new CustomEvent("pds:error",{detail:{error:u}})),u}}export{nt as startLive};
|