@pure-ds/core 0.5.60 → 0.6.1
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/packages/pds-configurator/src/pds-home-content.d.ts +375 -0
- package/dist/types/packages/pds-configurator/src/pds-home-content.d.ts.map +1 -0
- package/dist/types/packages/pds-configurator/src/pds-home.d.ts +2 -0
- package/dist/types/packages/pds-configurator/src/pds-home.d.ts.map +1 -0
- package/dist/types/pds.config.d.ts +4 -8
- package/dist/types/pds.config.d.ts.map +1 -1
- package/dist/types/pds.d.ts +3 -1
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-live-edit.d.ts +150 -0
- package/dist/types/public/assets/pds/components/pds-live-edit.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-omnibox.d.ts +2 -0
- package/dist/types/public/assets/pds/components/pds-omnibox.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-richtext.d.ts.map +1 -1
- package/dist/types/public/assets/pds/components/pds-theme.d.ts +5 -0
- package/dist/types/public/assets/pds/components/pds-theme.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-config.d.ts +457 -0
- package/dist/types/src/js/pds-core/pds-config.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-enhancers.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-ontology.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-theme-utils.d.ts +6 -0
- package/dist/types/src/js/pds-core/pds-theme-utils.d.ts.map +1 -0
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +1 -4
- package/packages/pds-cli/bin/templates/bootstrap/pds.config.js +9 -2
- package/public/assets/js/app.js +106 -5636
- package/public/assets/js/pds-manager.js +156 -156
- package/public/assets/js/pds.js +7 -7
- package/public/assets/pds/components/pds-live-edit.js +1555 -0
- package/public/assets/pds/components/pds-omnibox.js +558 -369
- package/public/assets/pds/components/pds-richtext.js +57 -7
- package/public/assets/pds/components/pds-theme.js +58 -0
- package/readme.md +2 -2
- package/src/js/pds-core/pds-config.js +705 -1
- package/src/js/pds-core/pds-enhancers.js +61 -4
- package/src/js/pds-core/pds-live.js +545 -437
- package/src/js/pds-core/pds-ontology.js +8 -0
- package/src/js/pds-core/pds-start-helpers.js +15 -0
- package/src/js/pds-core/pds-theme-utils.js +33 -0
- package/src/js/pds.d.ts +3 -1
- package/src/js/pds.js +22 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{for(var e in t)Be(n,e,{get:t[e],enumerable:!0})};var le={};P(le,{enums:()=>g});var g,_=O(()=>{g={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}}});var ue={};P(ue,{default:()=>Ie,findComponentForElement:()=>je,getAllSelectors:()=>De,getAllTags:()=>Pe,getByCategory:()=>Oe,ontology:()=>F,searchOntology:()=>Ne});function B(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function pe(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function je(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,r=0;for(;e&&r<t;){if(r++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let a of PDS.ontology.enhancements){let i=a.selector||a;if(B(e,i))return{element:e,componentType:"enhanced-component",displayName:a.description||i,id:a.id}}if(e.tagName==="FIELDSET"){let a=e.getAttribute("role");if(a==="group"||a==="radiogroup")return{element:e,componentType:"form-group",displayName:a==="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 o=e.closest?e.closest("label"):null;if(o&&o.querySelector&&o.querySelector("input,select,textarea"))return{element:o,componentType:"form-control",displayName:"label with input"};for(let a of PDS.ontology.primitives){for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let d=c.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(p=>p.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let u=e.parentElement,l=0;for(;u&&l<t;){if(u.classList&&Array.from(u.classList).some(p=>p.startsWith(d))&&u.tagName!=="DS-SHOWCASE")return{element:u,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};u=u.parentElement,l++}continue}continue}if(B(e,c))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=pe(e,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(e.classList){let i=Array.from(e.classList);for(let c of a.selectors||[])if(typeof c=="string"&&c.includes("*")&&c.startsWith(".")){let s=c.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(s)))return{element:e,componentType:"pds-primitive",displayName:a.name||a.id,id:a.id,tags:a.tags}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let c=String(i||"").trim();if(c.includes("*")){if(c.startsWith(".")){let d=c.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(u=>u.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}continue}if(B(e,c))return{element:e,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags};let s=pe(e,c);if(s&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"layout-pattern",displayName:a.name||a.id,id:a.id,tags:a.tags}}if(e.tagName&&e.tagName.includes("-")){let a=e.tagName.toLowerCase(),i=PDS.ontology.components.find(c=>c.selectors.includes(a));return{element:e,componentType:"web-component",displayName:i?.name||a,id:i?.id||a,tags:i?.tags}}if(e.tagName==="BUTTON"){let a=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:a?"button with icon":"button",id:"button"}}if(B(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let a=B(e,"pds-icon")?e:e.closest("pds-icon");return{element:a,componentType:"icon",displayName:`pds-icon (${a.getAttribute&&a.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(B(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:B(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function De(){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 Ne(n,t={}){let e=n.toLowerCase(),r=[],o=(a,i)=>{for(let c of a)(c.id?.toLowerCase().includes(e)||c.name?.toLowerCase().includes(e)||c.description?.toLowerCase().includes(e)||c.tags?.some(d=>d.toLowerCase().includes(e))||c.category?.toLowerCase().includes(e)||c.selectors?.some(d=>d.toLowerCase().includes(e)))&&r.push({...c,type:i})};return(!t.type||t.type==="primitive")&&o(F.primitives,"primitive"),(!t.type||t.type==="component")&&o(F.components,"component"),(!t.type||t.type==="layout")&&o(F.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&o(F.enhancements,"enhancement"),r}function Oe(n){let t=n.toLowerCase();return{primitives:F.primitives.filter(e=>e.category===t),components:F.components.filter(e=>e.category===t),layouts:F.layoutPatterns.filter(e=>e.category===t)}}function Pe(){let n=new Set;return F.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),F.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var F,Ie,J=O(()=>{F={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"callout",name:"Callout",description:"Contextual information and notification messages",selectors:[".callout",".callout-info",".callout-success",".callout-warning",".callout-danger",".callout-error",".callout-dismissible"],tags:["feedback","message","notification","status","information"],category:"feedback"},{id:"empty-state",name:"Empty State",description:"Empty state layout for missing data or onboarding",selectors:[".empty-state"],tags:["empty","no-data","zero","placeholder","onboarding","state"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-fab",name:"FAB",description:"Floating Action Button with expandable satellite actions",selectors:["pds-fab"],tags:["button","action","floating","interactive"],category:"action"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["callout","badge","empty-state"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]},action:{description:"Interactive actions and buttons",primitives:["button"],components:["pds-fab"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],empty:["empty-state","placeholder","zero","no-data","onboarding","callout","card","icon","button"],"empty state":["empty-state","empty","no-data","zero","onboarding"],"no data":["empty-state","empty","zero","placeholder"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working","pds-fab","floating"],btn:["button","interactive","action","pds-fab"],fab:["pds-fab","floating","button","action","menu"],floating:["fab","pds-fab","button","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],callout:["notification","feedback","message","status","toast","information","alert","warning","error","info","success","danger"],alert:["callout","notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["callout","toast","pds-toaster","feedback","message","popup","alert"],toast:["pds-toaster","notification","callout","feedback","popup","snackbar","alert"],feedback:["callout","notification","toast","status","badge","validation","error","success","alert"],message:["callout","notification","feedback","dialog","toast","alert"],status:["badge","callout","indicator","feedback","state","alert"],error:["callout","danger","validation","feedback","warning","alert"],success:["callout","feedback","badge","status","check","alert"],warning:["callout","caution","feedback","status","alert"],info:["callout","information","feedback","status","alert"],danger:["callout","error","feedback","destructive","delete","alert"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};Ie=F});var we={};P(we,{AutoDefiner:()=>te});async function it(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:r,mapper:o=d=>`${d}.js`,onError:a=(d,u)=>console.error(`[defineWebComponents] ${d}:`,u)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(u,l,p)=>p.toUpperCase()),s=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let u=o(d),p=await import(u instanceof URL?u.href:new URL(u,i).href),h=p?.default??p?.[c(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 "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,h),{tag:d,status:"defined"})}catch(u){throw a(d,u),u}};return Promise.all(e.map(s))}var te,ke=O(()=>{te=class{constructor(t={}){let{baseURL:e,mapper:r,onError:o,predicate:a=()=>!0,attributeModule:i="data-module",root:c=document,scanExisting:s=!0,debounceMs:d=16,observeShadows:u=!0,enhancers:l=[],patchAttachShadow:p=!0}=t,h=new Set,m=new Set,y=new Set,f=new Map,w=new WeakMap,$=new WeakMap,z=0,T=!1,R=null,j=b=>{if(!b||!l.length)return;let x=$.get(b);x||(x=new Set,$.set(b,x));for(let v of l)if(!(!v.selector||!v.run)&&!x.has(v.selector))try{b.matches&&b.matches(v.selector)&&(v.run(b),x.add(v.selector))}catch(L){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,L)}},W=(b,x)=>{if(!T&&!(!b||!b.includes("-"))&&!customElements.get(b)&&!m.has(b)&&!y.has(b)){if(x&&x.getAttribute){let v=x.getAttribute(i);v&&!f.has(b)&&f.set(b,v)}h.add(b),G()}},G=()=>{z||(z=setTimeout(S,d))},k=b=>{if(b){if(b.nodeType===1){let x=b,v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&W(v,x),j(x),u&&x.shadowRoot&&M(x.shadowRoot)}b.querySelectorAll&&b.querySelectorAll("*").forEach(x=>{let v=x.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,x)&&W(v,x),j(x),u&&x.shadowRoot&&M(x.shadowRoot)})}},M=b=>{if(!b||w.has(b))return;k(b);let x=new MutationObserver(v=>{for(let L of v)L.addedNodes?.forEach(D=>{k(D)}),L.type==="attributes"&&L.target&&k(L.target)});x.observe(b,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),w.set(b,x)};async function S(){if(clearTimeout(z),z=0,!h.size)return;let b=Array.from(h);h.clear(),b.forEach(x=>m.add(x));try{let x=v=>f.get(v)??(r?r(v):`${v}.js`);await it(...b,{baseURL:e,mapper:x,onError:(v,L)=>{y.add(v),o?.(v,L)}})}catch{}finally{b.forEach(x=>m.delete(x))}}let E=c===document?document.documentElement:c,A=new MutationObserver(b=>{for(let x of b)x.addedNodes?.forEach(v=>{k(v)}),x.type==="attributes"&&x.target&&k(x.target)});if(A.observe(E,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),u&&p&&Element.prototype.attachShadow){let b=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let L=b.call(this,v);if(v&&v.mode==="open"){M(L);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&W(D,this)}return L},R=()=>Element.prototype.attachShadow=b}return s&&k(E),{stop(){T=!0,A.disconnect(),R&&R(),z&&(clearTimeout(z),z=0),w.forEach(b=>b.disconnect())},flush:S}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:o,mapper:a=u=>`${u}.js`,onError:i=(u,l)=>console.error(`[defineWebComponents] ${u}:`,l)}=e,c=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=u=>u.toLowerCase().replace(/(^|-)([a-z])/g,(l,p,h)=>h.toUpperCase()),d=async u=>{try{if(customElements.get(u))return{tag:u,status:"already-defined"};let l=a(u),h=await import(l instanceof URL?l.href:new URL(l,c).href),m=h?.default??h?.[s(u)];if(!m){if(customElements.get(u))return{tag:u,status:"self-defined"};throw new Error(`No export found for ${u}. Expected default export or named export "${s(u)}".`)}return customElements.get(u)?{tag:u,status:"race-already-defined"}:(customElements.define(u,m),{tag:u,status:"defined"})}catch(l){throw i(u,l),l}};return Promise.all(r.map(d))}}});var ne={};P(ne,{PDSQuery:()=>oe});var oe,ie=O(()=>{oe=class{constructor(t){this.pds=t,this.intents={color:["color","colours","shade","tint","hue","foreground","background","text","fill","bg","fg"],spacing:["spacing","space","gap","padding","margin","distance","rhythm"],typography:["font","text","type","typography","heading","body","size","weight","family"],border:["border","outline","stroke","edge","frame"],radius:["radius","rounded","corner","curve","round"],shadow:["shadow","elevation","depth","glow","drop-shadow"],component:["component","element","widget"],utility:["utility","class","helper","css"],layout:["layout","container","grid","flex","group","arrange","organize"],pattern:["pattern","example","template","structure"],interaction:["hover","focus","active","disabled","pressed","selected","checked"]},this.entities={button:["button","btn","cta"],input:["input","field","textbox","text-field","form-control"],card:["card","panel"],badge:["badge","pill","tag","chip"],surface:["surface","background","layer","container"],icon:["icon","svg","glyph","symbol"],link:["link","anchor","hyperlink"],nav:["nav","navigation","menu"],modal:["modal","dialog","popup","overlay"],drawer:["drawer","sidebar","panel"],tab:["tab","tabstrip"],toast:["toast","notification","callout","message","alert"]},this.questionWords=["what","which","how","where","when","show","find","get","give","tell"]}async search(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),r=this.tokenize(e),o=this.analyzeQuery(r,e),a=[];o.intents.has("color")&&a.push(...this.queryColors(o,e)),(o.intents.has("utility")||o.intents.has("border")||o.intents.has("layout")||e.includes("class"))&&a.push(...this.queryUtilities(o,e)),(o.intents.has("component")||o.entities.size>0)&&a.push(...this.queryComponents(o,e)),(o.intents.has("layout")||o.intents.has("pattern"))&&a.push(...this.queryPatterns(o,e)),o.intents.has("typography")&&a.push(...this.queryTypography(o,e)),o.intents.has("spacing")&&a.push(...this.querySpacing(o,e));let i=new Map;for(let c of a){let s=c.value;(!i.has(s)||i.get(s).score<c.score)&&i.set(s,c)}return Array.from(i.values()).sort((c,s)=>s.score-c.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let r={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};r.isQuestion=this.questionWords.some(o=>t.includes(o));for(let[o,a]of Object.entries(this.intents))a.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(o);for(let[o,a]of Object.entries(this.entities))a.some(i=>t.includes(i)||e.includes(i))&&r.entities.add(o);return(t.includes("hover")||e.includes("hover"))&&r.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&r.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&r.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&r.modifiers.add("disabled"),r}queryColors(t,e){let r=[],o=this.pds.compiled;if(!o?.tokens?.colors)return r;let a=o.tokens.colors,i=Array.from(t.entities),c=Array.from(t.modifiers);if(c.includes("focus")&&t.intents.has("border")&&i.includes("input")&&r.push({text:"Focus border color: var(--color-primary-500)",value:"--color-primary-500",icon:"palette",category:"Color Token",score:100,cssVar:"var(--color-primary-500)",description:"Primary color used for focus states on form inputs"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(r.push({text:"Text on surface: var(--surface-text)",value:"--surface-text",icon:"palette",category:"Surface Token",score:95,cssVar:"var(--surface-text)",description:"Default text color for current surface"}),r.push({text:"Secondary text: var(--surface-text-secondary)",value:"--surface-text-secondary",icon:"palette",category:"Surface Token",score:90,cssVar:"var(--surface-text-secondary)",description:"Secondary/muted text on surface"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let s=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let u=`--color-${s}-${d}`;r.push({text:`${s.charAt(0).toUpperCase()+s.slice(1)} ${d}: var(${u})`,value:u,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${u})`,description:`${s} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let s=c[0];s?r.push({text:`Button ${s} fill: var(--primary-fill-${s})`,value:`--primary-fill-${s}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${s} state`}):r.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return r}queryUtilities(t,e){let r=[],o=this.pds.ontology;if(!o?.utilities)return r;let a=o.utilities,i=[];for(let c of Object.values(a))if(typeof c=="object")for(let s of Object.values(c))Array.isArray(s)&&i.push(...s);return t.intents.has("border")&&i.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let d=80;e.includes("gradient")&&s.includes("gradient")&&(d=95),e.includes("glow")&&s.includes("glow")&&(d=95),r.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:d,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.intents.has("layout")&&i.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{r.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),e.includes("group")&&t.entities.has("button")&&r.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
1
|
+
var qe=Object.defineProperty;var D=(o,t)=>()=>(o&&(t=o(o=0)),t);var U=(o,t)=>{for(var e in t)qe(o,e,{get:t[e],enumerable:!0})};var xe={};U(xe,{enums:()=>g});var g,G=D(()=>{g={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}}});var $e={};U($e,{default:()=>Xe,findComponentForElement:()=>Je,getAllSelectors:()=>Ye,getAllTags:()=>Ke,getByCategory:()=>Ze,ontology:()=>M,searchOntology:()=>Qe});function j(o,t){if(!o||!t)return!1;try{return o.matches(t)}catch{return!1}}function Se(o,t){if(!o||!t||!o.closest)return null;try{return o.closest(t)}catch{return null}}function Je(o,{maxDepth:t=5}={}){if(!o||o.closest&&o.closest(".showcase-toc"))return null;let e=o,r=0;for(;e&&r<t;){if(r++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let n of PDS.ontology.enhancements){let i=n.selector||n;if(j(e,i))return{element:e,componentType:"enhanced-component",displayName:n.description||i,id:n.id}}if(e.tagName==="FIELDSET"){let n=e.getAttribute("role");if(n==="group"||n==="radiogroup")return{element:e,componentType:"form-group",displayName:n==="radiogroup"?"radio group":"form group"}}if(e.tagName==="LABEL"&&e.querySelector&&e.querySelector("input,select,textarea"))return{element:e,componentType:"form-control",displayName:"label with input"};let a=e.closest?e.closest("label"):null;if(a&&a.querySelector&&a.querySelector("input,select,textarea"))return{element:a,componentType:"form-control",displayName:"label with input"};for(let n of PDS.ontology.primitives){for(let i of n.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(p=>p.startsWith(l)))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};let d=e.parentElement,u=0;for(;d&&u<t;){if(d.classList&&Array.from(d.classList).some(p=>p.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};d=d.parentElement,u++}continue}continue}if(j(e,s))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags};let c=Se(e,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags}}if(e.classList){let i=Array.from(e.classList);for(let s of n.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(i.some(l=>l.startsWith(c)))return{element:e,componentType:"pds-primitive",displayName:n.name||n.id,id:n.id,tags:n.tags}}}}for(let n of PDS.ontology.layoutPatterns||[])for(let i of n.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(e.classList&&Array.from(e.classList).some(d=>d.startsWith(l)))return{element:e,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags}}continue}if(j(e,s))return{element:e,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags};let c=Se(e,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:n.name||n.id,id:n.id,tags:n.tags}}if(e.tagName&&e.tagName.includes("-")){let n=e.tagName.toLowerCase(),i=PDS.ontology.components.find(s=>s.selectors.includes(n));return{element:e,componentType:"web-component",displayName:i?.name||n,id:i?.id||n,tags:i?.tags}}if(e.tagName==="BUTTON"){let n=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:n?"button with icon":"button",id:"button"}}if(j(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let n=j(e,"pds-icon")?e:e.closest("pds-icon");return{element:n,componentType:"icon",displayName:`pds-icon (${n.getAttribute&&n.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(j(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:j(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function Ye(){let o=[];for(let t of PDS.ontology.primitives)o.push(...t.selectors||[]);for(let t of PDS.ontology.components)o.push(...t.selectors||[]);for(let t of PDS.ontology.layoutPatterns||[])o.push(...t.selectors||[]);return Array.from(new Set(o))}function Qe(o,t={}){let e=o.toLowerCase(),r=[],a=(n,i)=>{for(let s of n)(s.id?.toLowerCase().includes(e)||s.name?.toLowerCase().includes(e)||s.description?.toLowerCase().includes(e)||s.tags?.some(l=>l.toLowerCase().includes(e))||s.category?.toLowerCase().includes(e)||s.selectors?.some(l=>l.toLowerCase().includes(e)))&&r.push({...s,type:i})};return(!t.type||t.type==="primitive")&&a(M.primitives,"primitive"),(!t.type||t.type==="component")&&a(M.components,"component"),(!t.type||t.type==="layout")&&a(M.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&a(M.enhancements,"enhancement"),r}function Ze(o){let t=o.toLowerCase();return{primitives:M.primitives.filter(e=>e.category===t),components:M.components.filter(e=>e.category===t),layouts:M.layoutPatterns.filter(e=>e.category===t)}}function Ke(){let o=new Set;return M.primitives.forEach(t=>t.tags?.forEach(e=>o.add(e))),M.components.forEach(t=>t.tags?.forEach(e=>o.add(e))),M.layoutPatterns.forEach(t=>t.tags?.forEach(e=>o.add(e))),M.enhancements.forEach(t=>t.tags?.forEach(e=>o.add(e))),Array.from(o).sort()}var M,Xe,ae=D(()=>{M={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"callout",name:"Callout",description:"Contextual information and notification messages",selectors:[".callout",".callout-info",".callout-success",".callout-warning",".callout-danger",".callout-error",".callout-dismissible"],tags:["feedback","message","notification","status","information"],category:"feedback"},{id:"empty-state",name:"Empty State",description:"Empty state layout for missing data or onboarding",selectors:[".empty-state"],tags:["empty","no-data","zero","placeholder","onboarding","state"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-fab",name:"FAB",description:"Floating Action Button with expandable satellite actions",selectors:["pds-fab"],tags:["button","action","floating","interactive"],category:"action"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-live-edit",name:"Live Edit",description:"Contextual live editing for PDS design settings",selectors:["pds-live-edit"],tags:["editor","live","config","tooling"],category:"tooling"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["callout","badge","empty-state"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]},action:{description:"Interactive actions and buttons",primitives:["button"],components:["pds-fab"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],empty:["empty-state","placeholder","zero","no-data","onboarding","callout","card","icon","button"],"empty state":["empty-state","empty","no-data","zero","onboarding"],"no data":["empty-state","empty","zero","placeholder"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working","pds-fab","floating"],btn:["button","interactive","action","pds-fab"],fab:["pds-fab","floating","button","action","menu"],floating:["fab","pds-fab","button","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],callout:["notification","feedback","message","status","toast","information","alert","warning","error","info","success","danger"],alert:["callout","notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["callout","toast","pds-toaster","feedback","message","popup","alert"],toast:["pds-toaster","notification","callout","feedback","popup","snackbar","alert"],feedback:["callout","notification","toast","status","badge","validation","error","success","alert"],message:["callout","notification","feedback","dialog","toast","alert"],status:["badge","callout","indicator","feedback","state","alert"],error:["callout","danger","validation","feedback","warning","alert"],success:["callout","feedback","badge","status","check","alert"],warning:["callout","caution","feedback","status","alert"],info:["callout","information","feedback","status","alert"],danger:["callout","error","feedback","destructive","delete","alert"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};Xe=M});var Re={};U(Re,{AutoDefiner:()=>ce});async function yt(...o){let t={};o.length&&typeof o[o.length-1]=="object"&&(t=o.pop()||{});let e=o,{baseURL:r,mapper:a=l=>`${l}.js`,onError:n=(l,d)=>console.error(`[defineWebComponents] ${l}:`,d)}=t,i=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(d,u,p)=>p.toUpperCase()),c=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=a(l),p=await import(d instanceof URL?d.href:new URL(d,i).href),m=p?.default??p?.[s(l)];if(!m){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${s(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,m),{tag:l,status:"defined"})}catch(d){throw n(l,d),d}};return Promise.all(e.map(c))}var ce,We=D(()=>{ce=class{constructor(t={}){let{baseURL:e,mapper:r,onError:a,predicate:n=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:c=!0,debounceMs:l=16,observeShadows:d=!0,enhancers:u=[],patchAttachShadow:p=!0}=t,m=new Set,f=new Set,b=new Set,h=new Map,w=new WeakMap,z=new WeakMap,S=0,L=!1,R=null,F=y=>{if(!y||!u.length)return;let v=z.get(y);v||(v=new Set,z.set(y,v));for(let x of u)if(!(!x.selector||!x.run)&&!v.has(x.selector))try{y.matches&&y.matches(x.selector)&&(x.run(y),v.add(x.selector))}catch(C){console.warn(`[AutoDefiner] Error applying enhancer for selector "${x.selector}":`,C)}},A=(y,v)=>{if(!L&&!(!y||!y.includes("-"))&&!customElements.get(y)&&!f.has(y)&&!b.has(y)){if(v&&v.getAttribute){let x=v.getAttribute(i);x&&!h.has(y)&&h.set(y,x)}m.add(y),k()}},k=()=>{S||(S=setTimeout(W,l))},$=y=>{if(y){if(y.nodeType===1){let v=y,x=v.tagName?.toLowerCase();x&&x.includes("-")&&!customElements.get(x)&&n(x,v)&&A(x,v),F(v),d&&v.shadowRoot&&E(v.shadowRoot)}y.querySelectorAll&&y.querySelectorAll("*").forEach(v=>{let x=v.tagName?.toLowerCase();x&&x.includes("-")&&!customElements.get(x)&&n(x,v)&&A(x,v),F(v),d&&v.shadowRoot&&E(v.shadowRoot)})}},E=y=>{if(!y||w.has(y))return;$(y);let v=new MutationObserver(x=>{for(let C of x)C.addedNodes?.forEach(N=>{$(N)}),C.type==="attributes"&&C.target&&$(C.target)});v.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...u.map(x=>x.selector).filter(x=>x.startsWith("data-"))]}),w.set(y,v)};async function W(){if(clearTimeout(S),S=0,!m.size)return;let y=Array.from(m);m.clear(),y.forEach(v=>f.add(v));try{let v=x=>h.get(x)??(r?r(x):`${x}.js`);await yt(...y,{baseURL:e,mapper:v,onError:(x,C)=>{b.add(x),a?.(x,C)}})}catch{}finally{y.forEach(v=>f.delete(v))}}let K=s===document?document.documentElement:s,q=new MutationObserver(y=>{for(let v of y)v.addedNodes?.forEach(x=>{$(x)}),v.type==="attributes"&&v.target&&$(v.target)});if(q.observe(K,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...u.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),d&&p&&Element.prototype.attachShadow){let y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(x){let C=y.call(this,x);if(x&&x.mode==="open"){E(C);let N=this.tagName?.toLowerCase();N&&N.includes("-")&&!customElements.get(N)&&A(N,this)}return C},R=()=>Element.prototype.attachShadow=y}return c&&$(K),{stop(){L=!0,q.disconnect(),R&&R(),S&&(clearTimeout(S),S=0),w.forEach(y=>y.disconnect())},flush:W}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let r=t,{baseURL:a,mapper:n=d=>`${d}.js`,onError:i=(d,u)=>console.error(`[defineWebComponents] ${d}:`,u)}=e,s=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(u,p,m)=>m.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let u=n(d),m=await import(u instanceof URL?u.href:new URL(u,s).href),f=m?.default??m?.[c(d)];if(!f){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,f),{tag:d,status:"defined"})}catch(u){throw i(d,u),u}};return Promise.all(r.map(l))}}});var be={};U(be,{PDSQuery:()=>fe});var fe,ye=D(()=>{fe=class{constructor(t){this.pds=t,this.intents={color:["color","colours","shade","tint","hue","foreground","background","text","fill","bg","fg"],spacing:["spacing","space","gap","padding","margin","distance","rhythm"],typography:["font","text","type","typography","heading","body","size","weight","family"],border:["border","outline","stroke","edge","frame"],radius:["radius","rounded","corner","curve","round"],shadow:["shadow","elevation","depth","glow","drop-shadow"],component:["component","element","widget"],utility:["utility","class","helper","css"],layout:["layout","container","grid","flex","group","arrange","organize"],pattern:["pattern","example","template","structure"],interaction:["hover","focus","active","disabled","pressed","selected","checked"]},this.entities={button:["button","btn","cta"],input:["input","field","textbox","text-field","form-control"],card:["card","panel"],badge:["badge","pill","tag","chip"],surface:["surface","background","layer","container"],icon:["icon","svg","glyph","symbol"],link:["link","anchor","hyperlink"],nav:["nav","navigation","menu"],modal:["modal","dialog","popup","overlay"],drawer:["drawer","sidebar","panel"],tab:["tab","tabstrip"],toast:["toast","notification","callout","message","alert"]},this.questionWords=["what","which","how","where","when","show","find","get","give","tell"]}async search(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),r=this.tokenize(e),a=this.analyzeQuery(r,e),n=[];a.intents.has("color")&&n.push(...this.queryColors(a,e)),(a.intents.has("utility")||a.intents.has("border")||a.intents.has("layout")||e.includes("class"))&&n.push(...this.queryUtilities(a,e)),(a.intents.has("component")||a.entities.size>0)&&n.push(...this.queryComponents(a,e)),(a.intents.has("layout")||a.intents.has("pattern"))&&n.push(...this.queryPatterns(a,e)),a.intents.has("typography")&&n.push(...this.queryTypography(a,e)),a.intents.has("spacing")&&n.push(...this.querySpacing(a,e));let i=new Map;for(let s of n){let c=s.value;(!i.has(c)||i.get(c).score<s.score)&&i.set(c,s)}return Array.from(i.values()).sort((s,c)=>c.score-s.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let r={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};r.isQuestion=this.questionWords.some(a=>t.includes(a));for(let[a,n]of Object.entries(this.intents))n.some(i=>t.includes(i)||e.includes(i))&&r.intents.add(a);for(let[a,n]of Object.entries(this.entities))n.some(i=>t.includes(i)||e.includes(i))&&r.entities.add(a);return(t.includes("hover")||e.includes("hover"))&&r.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&r.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&r.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&r.modifiers.add("disabled"),r}queryColors(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.colors)return r;let n=a.tokens.colors,i=Array.from(t.entities),s=Array.from(t.modifiers);if(s.includes("focus")&&t.intents.has("border")&&i.includes("input")&&r.push({text:"Focus border color: var(--color-primary-500)",value:"--color-primary-500",icon:"palette",category:"Color Token",score:100,cssVar:"var(--color-primary-500)",description:"Primary color used for focus states on form inputs"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(r.push({text:"Text on surface: var(--surface-text)",value:"--surface-text",icon:"palette",category:"Surface Token",score:95,cssVar:"var(--surface-text)",description:"Default text color for current surface"}),r.push({text:"Secondary text: var(--surface-text-secondary)",value:"--surface-text-secondary",icon:"palette",category:"Surface Token",score:90,cssVar:"var(--surface-text-secondary)",description:"Secondary/muted text on surface"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let c=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let l of[500,600,700]){let d=`--color-${c}-${l}`;r.push({text:`${c.charAt(0).toUpperCase()+c.slice(1)} ${l}: var(${d})`,value:d,icon:"palette",category:"Color Scale",score:80-(l-500)/100,cssVar:`var(${d})`,description:`${c} color scale shade ${l}`})}}if(i.includes("button")&&t.intents.has("color")){let c=s[0];c?r.push({text:`Button ${c} fill: var(--primary-fill-${c})`,value:`--primary-fill-${c}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${c} state`}):r.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return r}queryUtilities(t,e){let r=[],a=this.pds.ontology;if(!a?.utilities)return r;let n=a.utilities,i=[];for(let s of Object.values(n))if(typeof s=="object")for(let c of Object.values(s))Array.isArray(c)&&i.push(...c);return t.intents.has("border")&&i.filter(c=>c.includes("border")||c.includes("outline")).forEach(c=>{let l=80;e.includes("gradient")&&c.includes("gradient")&&(l=95),e.includes("glow")&&c.includes("glow")&&(l=95),r.push({text:`${c} - Border utility class`,value:c,icon:"code",category:"Utility Class",score:l,code:`<div class="${c}">...</div>`,description:this.describeUtility(c)})}),t.intents.has("layout")&&i.filter(c=>c.includes("flex")||c.includes("grid")||c.includes("items-")||c.includes("justify-")||c.includes("gap-")).forEach(c=>{r.push({text:`${c} - Layout utility`,value:c,icon:"layout",category:"Utility Class",score:85,code:`<div class="${c}">...</div>`,description:this.describeUtility(c)})}),e.includes("group")&&t.entities.has("button")&&r.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
2
2
|
<button class="btn-primary">One</button>
|
|
3
3
|
<button class="btn-primary">Two</button>
|
|
4
|
-
</div>`,description:"Container for grouped buttons with connected styling"}),r}queryComponents(t,e){let r=[],
|
|
4
|
+
</div>`,description:"Container for grouped buttons with connected styling"}),r}queryComponents(t,e){let r=[],a=this.pds.ontology;return!a?.components&&!a?.primitives||(a.components&&a.components.forEach(n=>{let i=this.scoreMatch(e,n.name+" "+n.id);i>50&&r.push({text:`<${n.id}> - ${n.name}`,value:n.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${n.id}></${n.id}>`,description:n.description||`${n.name} web component`})}),a.primitives&&a.primitives.forEach(n=>{let i=this.scoreMatch(e,n.name+" "+n.id);if(i>50){let s=n.selectors?.[0]||n.id;r.push({text:`${s} - ${n.name}`,value:n.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(n),description:n.description||`${n.name} primitive element`})}}),e.includes("icon")&&(e.includes("only")||e.includes("button"))&&r.push({text:'Icon-only button: <button class="btn-icon">',value:"btn-icon",icon:"star",category:"Pattern",score:95,code:`<button class="btn-icon btn-primary">
|
|
5
5
|
<pds-icon icon="heart"></pds-icon>
|
|
6
|
-
</button>`,description:"Button with only an icon, no text label"})),r}queryPatterns(t,e){let r=[],
|
|
6
|
+
</button>`,description:"Button with only an icon, no text label"})),r}queryPatterns(t,e){let r=[],a=this.pds.ontology;return a?.layoutPatterns&&(a.layoutPatterns.forEach(n=>{let i=this.scoreMatch(e,n.name+" "+n.id+" "+(n.description||""));if(i>50){let s=n.selectors?.[0]||`.${n.id}`;r.push({text:`${n.name} - ${n.description||"Layout pattern"}`,value:n.id,icon:"layout",category:"Layout Pattern",score:i,code:`<div class="${s.replace(".","")}">
|
|
7
7
|
<!-- content -->
|
|
8
|
-
</div>`,description:
|
|
8
|
+
</div>`,description:n.description||n.name})}}),(e.includes("container")||e.includes("group"))&&(r.push({text:"Card - Container for grouping content",value:"card",icon:"layout",category:"Primitive",score:88,code:`<article class="card">
|
|
9
9
|
<header>
|
|
10
10
|
<h3>Title</h3>
|
|
11
11
|
</header>
|
|
@@ -13,20 +13,20 @@ var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
13
13
|
</article>`,description:"Card container with optional header, body, and footer"}),r.push({text:"Section - Semantic container for grouping",value:"section",icon:"layout",category:"Pattern",score:85,code:`<section>
|
|
14
14
|
<h2>Section Title</h2>
|
|
15
15
|
<!-- content -->
|
|
16
|
-
</section>`,description:"Semantic section element for content grouping"}))),r}queryTypography(t,e){let r=[],
|
|
16
|
+
</section>`,description:"Semantic section element for content grouping"}))),r}queryTypography(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.typography)return r;let n=a.tokens.typography;return(e.includes("heading")||e.includes("title"))&&r.push({text:"Heading font: var(--font-family-heading)",value:"--font-family-heading",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-heading)",description:"Font family for headings"}),(e.includes("body")||e.includes("text"))&&r.push({text:"Body font: var(--font-family-body)",value:"--font-family-body",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-body)",description:"Font family for body text"}),r}querySpacing(t,e){let r=[],a=this.pds.compiled;if(!a?.tokens?.spacing)return r;let n=a.tokens.spacing;for(let[i,s]of Object.entries(n))["2","4","6","8"].includes(i)&&r.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${s}`});return r}scoreMatch(t,e){let r=t.toLowerCase(),a=e.toLowerCase(),n=0;if(r===a)return 100;a.includes(r)&&(n+=80);let i=this.tokenize(r),s=this.tokenize(a),c=i.filter(l=>s.includes(l)).length;return n+=c/i.length*40,a.startsWith(r)&&(n+=20),Math.min(100,n)}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={};P(Te,{deepMerge:()=>Le,fragmentFromTemplateLike:()=>ct,isObject:()=>Z,parseHTML:()=>lt});function Z(n){return n&&typeof n=="object"&&!Array.isArray(n)}function Le(n,t){let e={...n};return Z(n)&&Z(t)&&Object.keys(t).forEach(r=>{Z(t[r])?r in n?e[r]=Le(n[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function ct(n){let t=Array.isArray(n?.strings)?n.strings:[],e=Array.isArray(n?.values)?n.values:[],r=new Set,o=[],a=/(\s)(\.[\w-]+)=\s*$/;for(let l=0;l<t.length;l+=1){let p=t[l]??"",h=p.match(a);if(h&&l<e.length){let y=h[2].slice(1),f=`pds-val-${l}`;p=p.replace(a,`$1data-pds-prop="${y}:${f}"`),r.add(l)}o.push(p),l<e.length&&!r.has(l)&&o.push(`<!--pds-val-${l}-->`)}let i=document.createElement("template");i.innerHTML=o.join("");let c=(l,p)=>{let h=l.parentNode;if(!h)return;if(p==null){h.removeChild(l);return}let m=y=>{if(y!=null){if(y instanceof Node){h.insertBefore(y,l);return}if(Array.isArray(y)){y.forEach(f=>m(f));return}h.insertBefore(document.createTextNode(String(y)),l)}};m(p),h.removeChild(l)},s=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),d=[];for(;s.nextNode();){let l=s.currentNode;l?.nodeValue?.startsWith("pds-val-")&&d.push(l)}return d.forEach(l=>{let p=Number(l.nodeValue.replace("pds-val-",""));c(l,e[p])}),i.content.querySelectorAll("*").forEach(l=>{let p=l.getAttribute("data-pds-prop");if(!p)return;let[h,m]=p.split(":"),y=Number(String(m).replace("pds-val-",""));h&&Number.isInteger(y)&&(l[h]=e[y]),l.removeAttribute("data-pds-prop")}),i.content}function lt(n){return new DOMParser().parseFromString(n,"text/html").body.childNodes}var Ae=O(()=>{});_();var I={"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:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.xlarge,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.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:g.RadiusSizes.none,borderWidth:g.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:g.RadiusSizes.xxlarge,borderWidth:g.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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:g.RadiusSizes.xxlarge,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.slow,animationEasing:g.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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:g.RadiusSizes.large,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:g.TouchTargetSizes.comfortable,focusStyle:g.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:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:g.TouchTargetSizes.standard,focusStyle:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:g.RadiusSizes.small,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};I.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:g.FontWeights.light,fontWeightNormal:g.FontWeights.normal,fontWeightMedium:g.FontWeights.medium,fontWeightSemibold:g.FontWeights.semibold,fontWeightBold:g.FontWeights.bold,lineHeightTight:g.LineHeights.tight,lineHeightNormal:g.LineHeights.normal,lineHeightRelaxed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,baseShadowOpacity:.1,darkMode:{baseShadowOpacity:.25},breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:g.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:g.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:g.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:g.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:g.IconSizes,include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function de(n="log",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let o=console[n]||console.log;e.length>0?o(t,...e):o(t)}}_();J();var C=class n{static#g;static get instance(){return this.#g}#e;#o;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#g=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ke(),typeof CSSStyleSheet<"u"?this.#Fe():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{},e=this.#M(t),r=t.layers||{},o=this.#m(r,e.light),a=this.#$(o),i=e.dark!=null?this.#$(this.#m(r,e.dark)):null;return{colors:this.#F(t.colors||{},e),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#N(t.shape||{}),borderWidths:this.#O(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:a,darkShadows:i,layout:this.#P(t.layout||{}),transitions:this.#I(t.behavior||{}),zIndex:this.#U(t.layers||{}),icons:this.#H(t.icons||{})}}#M(t={}){let e=t.layout||{},r=t.layers||{};return{light:this.#h(e.baseShadowOpacity??r.baseShadowOpacity),dark:this.#h(e.darkMode?.baseShadowOpacity??r.darkMode?.baseShadowOpacity)}}#h(t){let e=Number(t);if(Number.isFinite(e))return Math.min(Math.max(e,0),1)}#m(t={},e){let r={...t};return e!=null&&(r.baseShadowOpacity=e),r}#F(t,e={}){let{primary:r="#3b82f6",secondary:o="#64748b",accent:a="#ec4899",background:i="#ffffff",success:c=null,warning:s="#FFBF00",danger:d=null,info:u=null,darkMode:l={}}=t,p={primary:this.#r(r),secondary:this.#r(o),accent:this.#r(a),success:this.#r(c||this.#E(r)),warning:this.#r(s||a),danger:this.#r(d||this.#C(r)),info:this.#r(u||r),gray:this.#f(o),surface:this.#b(i)};return p.surface.fieldset=this.#L(p.surface),p.surfaceSmart=this.#k(p.surface,e),p.dark=this.#A(p,i,l),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#k(p.dark.surface,e)),p.interactive={light:{fill:this.#w(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#w(p.dark.primary,4.5),text:this.#j(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(t){let e=this.#n(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#E(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#C(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#f(t){let e=this.#n(t),r=e.h,o=Math.min(e.s,10);return{50:this.#t(r,o,98),100:this.#t(r,o,95),200:this.#t(r,o,88),300:this.#t(r,o,78),400:this.#t(r,o,60),500:t,600:this.#t(r,Math.min(o+5,15),45),700:this.#t(r,Math.min(o+8,18),35),800:this.#t(r,Math.min(o+10,20),20),900:this.#t(r,Math.min(o+12,22),10)}}#b(t){let e=this.#n(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#y(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#L(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#T(t.sunken,.05),overlay:t.elevated}}#T(t,e=.05){let r=this.#n(t),o=Math.max(r.l-r.l*e,5);return this.#t(r.h,r.s,o)}#y(t){let e=this.#n(t);if(e.l>50){let r=Math.min(e.s+5,25),o=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,r,o)}else{let r=Math.max(e.s-10,5),o=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,r,o)}}#A(t,e="#ffffff",r={}){let o=r.background?r.background:this.#y(e),a=this.#b(o),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...a,fieldset:this.#B(a)},primary:i,secondary:r.secondary?this.#r(r.secondary):this.#i(t.secondary),accent:r.accent?this.#r(r.accent):this.#i(t.accent),gray:r.secondary?this.#f(r.secondary):t.gray,success:this.#i(t.success),info:this.#i(t.info),warning:this.#i(t.warning),danger:this.#i(t.danger)}}#l(t){let e=String(t||"").replace("#",""),r=e.length===3?e.split("").map(a=>a+a).join(""):e,o=parseInt(r,16);return{r:o>>16&255,g:o>>8&255,b:o&255}}#p(t){let{r:e,g:r,b:o}=this.#l(t),a=[e/255,r/255,o/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*a[0]+.7152*a[1]+.0722*a[2]}#d(t,e){let r=this.#p(t),o=this.#p(e),a=Math.max(r,o),i=Math.min(r,o);return(a+.05)/(i+.05)}#v(t,e=4.5){if(!t)return"#000000";let r="#ffffff",o="#000000",a=this.#d(t,r);if(a>=e)return r;let i=this.#d(t,o);return i>=e||i>a?o:r}#x(t,e=1){let{r,g:o,b:a}=this.#l(t);return`rgba(${r}, ${o}, ${a}, ${e})`}#R(t,e,r=.5){let o=this.#l(t),a=this.#l(e),i=Math.round(o.r+(a.r-o.r)*r),c=Math.round(o.g+(a.g-o.g)*r),s=Math.round(o.b+(a.b-o.b)*r);return this.#W(i,c,s)}#W(t,e,r){let o=a=>{let i=Math.max(0,Math.min(255,Math.round(a))).toString(16);return i.length===1?"0"+i:i};return`#${o(t)}${o(e)}${o(r)}`}#B(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#S(t.elevated,.08),sunken:t.elevated,overlay:this.#S(t.overlay,.05)}}#j(t={},e="#000000",r=4.5){let o=["600","700","800","500","400","900","300","200"],a={shade:null,color:null,ratio:0};for(let i of o){let c=t?.[i];if(!c||typeof c!="string")continue;let s=this.#d(c,e);if(s>a.ratio&&(a={shade:i,color:c,ratio:s}),s>=r)return c}return a.color||t?.["600"]||t?.["500"]}#w(t={},e=4.5){let r=["600","700","800","500","400","900"],o={shade:null,color:null,ratio:0};for(let a of r){let i=t?.[a];if(!i||typeof i!="string")continue;let c=this.#d(i,"#ffffff");if(c>o.ratio&&(o={shade:a,color:i,ratio:c}),c>=e)return i}return o.color||t?.["600"]||t?.["500"]}#k(t,e={}){let r={},o=e.light??.1,a=e.dark??.25;return Object.entries(t).forEach(([i,c])=>{if(!c||typeof c!="string"||!c.startsWith("#"))return;let s=this.#p(c)<.5,d=this.#v(c,4.5),u=this.#v(c,3),l=this.#R(d,c,.4),p=d,h=l,m=s?"#ffffff":"#000000",y=s?a:o,f=this.#x(m,y),w=s?"#ffffff":"#000000",$=s?.15:.1,z=this.#x(w,$);r[i]={bg:c,text:d,textSecondary:u,textMuted:l,icon:p,iconSubtle:h,shadow:f,border:z,scheme:s?"dark":"light"}}),r}#S(t,e=.05){let r=this.#n(t),o=Math.min(r.l+(100-r.l)*e,95);return this.#t(r.h,r.s,o)}#i(t){let e={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([o,a])=>{let i=t[a.source];e[o]=this.#D(i,a.dimFactor)}),e}#D(t,e=.8){let r=this.#n(t),o=Math.max(r.s*e,5),a=Math.max(r.l*e,5);return this.#t(r.h,o,a)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:o=12}=t,a=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(o))?Number(o):12,12),c={0:"0"};for(let s=1;s<=i;s++)c[s]=`${a*s}px`;return c}#N(t){let{radiusSize:e="medium",customRadius:r=null}=t,o;r!=null?o=r:typeof e=="number"?o=e:typeof e=="string"?o=g.RadiusSizes[e]??g.RadiusSizes.medium:o=g.RadiusSizes.medium;let a=Number.isFinite(Number(o))?Number(o):g.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(a*.25)?Math.round(a*.25):0}px`,sm:`${Number.isFinite(a*.5)?Math.round(a*.5):0}px`,md:`${a}px`,lg:`${Number.isFinite(a*1.5)?Math.round(a*1.5):0}px`,xl:`${Number.isFinite(a*2)?Math.round(a*2):0}px`,full:"9999px"}}#O(t){let{borderWidth:e="medium"}=t,r;return typeof e=="number"?r=e:typeof e=="string"?r=g.BorderWidths[e]??g.BorderWidths.medium:r=g.BorderWidths.medium,{hairline:`${g.BorderWidths.hairline}px`,thin:`${g.BorderWidths.thin}px`,medium:`${g.BorderWidths.medium}px`,thick:`${g.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:r="system-ui, -apple-system, sans-serif",fontFamilyMono:o='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:a=16,fontScale:i=1.25,fontWeightLight:c=g.FontWeights.light,fontWeightNormal:s=g.FontWeights.normal,fontWeightMedium:d=g.FontWeights.medium,fontWeightSemibold:u=g.FontWeights.semibold,fontWeightBold:l=g.FontWeights.bold,lineHeightTight:p=g.LineHeights.tight,lineHeightNormal:h=g.LineHeights.normal,lineHeightRelaxed:m=g.LineHeights.relaxed}=t,y=Number.isFinite(Number(a))?Number(a):16,f=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:o},fontSize:{xs:`${Math.round(y/Math.pow(f,2))}px`,sm:`${Math.round(y/f)}px`,base:`${y}px`,lg:`${Math.round(y*f)}px`,xl:`${Math.round(y*Math.pow(f,2))}px`,"2xl":`${Math.round(y*Math.pow(f,3))}px`,"3xl":`${Math.round(y*Math.pow(f,4))}px`,"4xl":`${Math.round(y*Math.pow(f,5))}px`},fontWeight:{light:c?.toString()||"300",normal:s?.toString()||"400",medium:d?.toString()||"500",semibold:u?.toString()||"600",bold:l?.toString()||"700"},lineHeight:{tight:p?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:m?.toString()||"1.75"}}}#$(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:o=1}=t,a=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*o}px ${2*r}px 0 ${i}`,base:`0 ${1*o}px ${3*r}px 0 ${a}, 0 ${1*o}px ${2*r}px 0 ${i}`,md:`0 ${4*o}px ${6*r}px ${-1*o}px ${a}, 0 ${2*o}px ${4*r}px ${-1*o}px ${i}`,lg:`0 ${10*o}px ${15*r}px ${-3*o}px ${a}, 0 ${4*o}px ${6*r}px ${-2*o}px ${i}`,xl:`0 ${20*o}px ${25*r}px ${-5*o}px ${a}, 0 ${10*o}px ${10*r}px ${-5*o}px ${i}`,inner:`inset 0 ${2*o}px ${4*r}px 0 ${i}`}}#P(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:o={sm:640,md:768,lg:1024,xl:1280}}=t,a=this.#z(t);return{maxWidth:this.#a(e,"1200px"),maxWidthSm:a.sm,maxWidthMd:a.md,maxWidthLg:a.lg,maxWidthXl:a.xl,minHeight:"100vh",containerPadding:this.#a(r,"16px"),breakpoints:{sm:this.#a(o.sm,"640px"),md:this.#a(o.md,"768px"),lg:this.#a(o.lg,"1024px"),xl:this.#a(o.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#z(t={}){let e={sm:640,md:768,lg:1024,xl:1280},{maxWidths:r={},maxWidth:o=1200,containerPadding:a=16,breakpoints:i=e}=t||{},c=this.#s(a,16),s=this.#s(o,e.xl),d={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},u=p=>p?Math.max(320,p-c*2):s,l={sm:Math.min(s,u(d.sm)),md:Math.min(s,u(d.md)),lg:Math.min(s,u(d.lg)),xl:Math.max(320,s)};return{sm:this.#a(r.sm,`${l.sm}px`),md:this.#a(r.md,`${l.md}px`),lg:this.#a(r.lg,`${l.lg}px`),xl:this.#a(r.xl,`${l.xl}px`)}}#a(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let r=parseFloat(t);if(Number.isFinite(r))return r}return e}#I(t){let{transitionSpeed:e=g.TransitionSpeeds.normal,animationEasing:r=g.AnimationEasings["ease-out"]}=t,o;return typeof e=="number"?o=e:typeof e=="string"&&g.TransitionSpeeds[e]?o=g.TransitionSpeeds[e]:o=g.TransitionSpeeds.normal,{fast:`${Math.round(o*.6)}ms`,normal:`${o}ms`,slow:`${Math.round(o*1.4)}ms`}}#U(t){let{baseZIndex:e=1e3,zIndexStep:r=10}=t;return{dropdown:e.toString(),sticky:(e+r*2).toString(),fixed:(e+r*3).toString(),modal:(e+r*4).toString(),drawer:(e+r*5).toString(),popover:(e+r*6).toString(),tooltip:(e+r*7).toString(),notification:(e+r*8).toString()}}#H(t){let{set:e="phosphor",weight:r="regular",defaultSize:o=24,sizes:a={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:c="/assets/img/icons/"}=t;return{set:e,weight:r,defaultSize:`${o}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,d])=>[s,`${d}px`])),spritePath:i,externalPath:c}}#q(t){let e=[];e.push(` /* Colors */
|
|
20
|
-
`);let r=(
|
|
21
|
-
`)})};return Object.entries(t).forEach(([
|
|
22
|
-
`),Object.entries(t.surfaceSmart).forEach(([
|
|
23
|
-
`),e.push(` --surface-${
|
|
24
|
-
`),e.push(` --surface-${
|
|
25
|
-
`),e.push(` --surface-${
|
|
26
|
-
`),e.push(` --surface-${
|
|
27
|
-
`),e.push(` --surface-${
|
|
28
|
-
`),e.push(` --surface-${
|
|
29
|
-
`),e.push(` --surface-${
|
|
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 Ie={};U(Ie,{deepMerge:()=>Ue,fragmentFromTemplateLike:()=>wt,isObject:()=>Z,parseHTML:()=>kt});function Z(o){return o&&typeof o=="object"&&!Array.isArray(o)}function Ue(o,t){let e={...o};return Z(o)&&Z(t)&&Object.keys(t).forEach(r=>{Z(t[r])?r in o?e[r]=Ue(o[r],t[r]):Object.assign(e,{[r]:t[r]}):Object.assign(e,{[r]:t[r]})}),e}function wt(o){let t=Array.isArray(o?.strings)?o.strings:[],e=Array.isArray(o?.values)?o.values:[],r=new Set,a=[],n=/(\s)(\.[\w-]+)=\s*$/;for(let u=0;u<t.length;u+=1){let p=t[u]??"",m=p.match(n);if(m&&u<e.length){let b=m[2].slice(1),h=`pds-val-${u}`;p=p.replace(n,`$1data-pds-prop="${b}:${h}"`),r.add(u)}a.push(p),u<e.length&&!r.has(u)&&a.push(`<!--pds-val-${u}-->`)}let i=document.createElement("template");i.innerHTML=a.join("");let s=(u,p)=>{let m=u.parentNode;if(!m)return;if(p==null){m.removeChild(u);return}let f=b=>{if(b!=null){if(b instanceof Node){m.insertBefore(b,u);return}if(Array.isArray(b)){b.forEach(h=>f(h));return}m.insertBefore(document.createTextNode(String(b)),u)}};f(p),m.removeChild(u)},c=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),l=[];for(;c.nextNode();){let u=c.currentNode;u?.nodeValue?.startsWith("pds-val-")&&l.push(u)}return l.forEach(u=>{let p=Number(u.nodeValue.replace("pds-val-",""));s(u,e[p])}),i.content.querySelectorAll("*").forEach(u=>{let p=u.getAttribute("data-pds-prop");if(!p)return;let[m,f]=p.split(":"),b=Number(String(f).replace("pds-val-",""));m&&Number.isInteger(b)&&(u[m]=e[b]),u.removeAttribute("data-pds-prop")}),i.content}function kt(o){return new DOMParser().parseFromString(o,"text/html").body.childNodes}var He=D(()=>{});G();var O="any",te={type:"object",allowUnknown:!1,properties:{id:{type:"string"},name:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},options:{type:"object",allowUnknown:!0},form:{type:"object",allowUnknown:!0},colors:{type:"object",allowUnknown:!1,properties:{primary:{type:"string",relations:{tokens:["--color-primary-*","--color-primary-fill","--color-primary-text","--background-mesh-*"]}},secondary:{type:"string",relations:{tokens:["--color-secondary-*","--color-gray-*","--background-mesh-*"]}},accent:{type:"string",relations:{tokens:["--color-accent-*","--background-mesh-*"]}},background:{type:"string",relations:{tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},success:{type:["string","null"],relations:{tokens:["--color-success-*"]}},warning:{type:["string","null"],relations:{tokens:["--color-warning-*"]}},danger:{type:["string","null"],relations:{tokens:["--color-danger-*"]}},info:{type:["string","null"],relations:{tokens:["--color-info-*"]}},gradientStops:{type:"number"},elevationOpacity:{type:"number",relations:{tokens:["--surface-*-shadow"]}},darkMode:{type:"object",allowUnknown:!0,properties:{background:{type:"string",relations:{theme:"dark",tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},primary:{type:"string",relations:{theme:"dark",tokens:["--color-primary-*","--color-primary-fill","--color-primary-text"]}},secondary:{type:"string",relations:{theme:"dark",tokens:["--color-secondary-*","--color-gray-*"]}},accent:{type:"string",relations:{theme:"dark",tokens:["--color-accent-*"]}}}}}},typography:{type:"object",allowUnknown:!1,properties:{fontFamilyHeadings:{type:"string",relations:{tokens:["--font-family-headings"]}},fontFamilyBody:{type:"string",relations:{tokens:["--font-family-body"]}},fontFamilyMono:{type:"string",relations:{tokens:["--font-family-mono"]}},baseFontSize:{type:"number",relations:{tokens:["--font-size-*"]}},fontScale:{type:"number",relations:{tokens:["--font-size-*"]}},fontWeightLight:{type:["string","number"],relations:{tokens:["--font-weight-light"]}},fontWeightNormal:{type:["string","number"],relations:{tokens:["--font-weight-normal"]}},fontWeightMedium:{type:["string","number"],relations:{tokens:["--font-weight-medium"]}},fontWeightSemibold:{type:["string","number"],relations:{tokens:["--font-weight-semibold"]}},fontWeightBold:{type:["string","number"],relations:{tokens:["--font-weight-bold"]}},lineHeightTight:{type:["string","number"],relations:{tokens:["--font-line-height-tight"]}},lineHeightNormal:{type:["string","number"],relations:{tokens:["--font-line-height-normal"]}},lineHeightRelaxed:{type:["string","number"],relations:{tokens:["--font-line-height-relaxed"]}},letterSpacingTight:{type:"number"},letterSpacingNormal:{type:"number"},letterSpacingWide:{type:"number"}}},spatialRhythm:{type:"object",allowUnknown:!1,properties:{baseUnit:{type:"number",relations:{tokens:["--spacing-*"]}},scaleRatio:{type:"number"},maxSpacingSteps:{type:"number",relations:{tokens:["--spacing-*"]}},containerMaxWidth:{type:["number","string"]},containerPadding:{type:"number"},inputPadding:{type:"number",relations:{rules:[{selectors:["input","textarea","select"],properties:["padding"]}]}},buttonPadding:{type:"number",relations:{rules:[{selectors:["button",".btn"],properties:["padding"]}]}},sectionSpacing:{type:"number",relations:{rules:[{selectors:["section"],properties:["margin","padding"]}]}}}},shape:{type:"object",allowUnknown:!1,properties:{radiusSize:{type:["string","number"],relations:{tokens:["--radius-*"]}},customRadius:{type:["string","number","null"]},borderWidth:{type:["string","number"],relations:{tokens:["--border-width-*"]}}}},behavior:{type:"object",allowUnknown:!1,properties:{transitionSpeed:{type:["string","number"],relations:{tokens:["--transition-*"]}},animationEasing:{type:"string"},customTransitionSpeed:{type:["number","null"]},customEasing:{type:["string","null"]},focusRingWidth:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["outline-width","box-shadow"]}]}},focusRingOpacity:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["box-shadow","outline-color"]}]}},hoverOpacity:{type:"number"}}},layout:{type:"object",allowUnknown:!1,properties:{maxWidth:{type:["number","string"],relations:{tokens:["--layout-max-width","--layout-max-width-*"]}},maxWidths:{type:"object",allowUnknown:!1,properties:{sm:{type:["number","string"],relations:{tokens:["--layout-max-width-sm"]}},md:{type:["number","string"],relations:{tokens:["--layout-max-width-md"]}},lg:{type:["number","string"],relations:{tokens:["--layout-max-width-lg"]}},xl:{type:["number","string"],relations:{tokens:["--layout-max-width-xl"]}}}},containerPadding:{type:["number","string"],relations:{tokens:["--layout-container-padding"]}},breakpoints:{type:"object",allowUnknown:!1,properties:{sm:{type:"number"},md:{type:"number"},lg:{type:"number"},xl:{type:"number"}}},gridColumns:{type:"number"},gridGutter:{type:"number"},densityCompact:{type:"number"},densityNormal:{type:"number"},densityComfortable:{type:"number"},buttonMinHeight:{type:"number"},inputMinHeight:{type:"number"},baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},darkMode:{type:"object",allowUnknown:!0,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}},utilities:{type:"object",allowUnknown:!0},gridSystem:{type:"object",allowUnknown:!0},containerMaxWidth:{type:["number","string"]}}},layers:{type:"object",allowUnknown:!1,properties:{baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},shadowBlurMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowOffsetMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowDepth:{type:"string"},blurLight:{type:"number"},blurMedium:{type:"number"},blurHeavy:{type:"number"},baseZIndex:{type:"number",relations:{tokens:["--z-*"]}},zIndexStep:{type:"number",relations:{tokens:["--z-*"]}},zIndexBase:{type:"number"},zIndexDropdown:{type:"number"},zIndexSticky:{type:"number"},zIndexFixed:{type:"number"},zIndexModal:{type:"number"},zIndexPopover:{type:"number"},zIndexTooltip:{type:"number"},zIndexNotification:{type:"number"},darkMode:{type:"object",allowUnknown:!0,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}}}},advanced:{type:"object",allowUnknown:!0},a11y:{type:"object",allowUnknown:!0},icons:{type:"object",allowUnknown:!1,properties:{set:{type:"string"},weight:{type:"string"},defaultSize:{type:"number",relations:{tokens:["--icon-size"]}},sizes:{type:"object",allowUnknown:!0},spritePath:{type:"string"},externalPath:{type:"string"},include:{type:"object",allowUnknown:!0}}},components:{type:"object",allowUnknown:!0},gap:{type:"number"},debug:{type:"boolean"}}},Ge={type:"object",allowUnknown:!0,properties:{mode:{type:"string"},preset:{type:"string"},design:te,enhancers:{type:["object","array"]},applyGlobalStyles:{type:"boolean"},manageTheme:{type:"boolean"},themeStorageKey:{type:"string"},preloadStyles:{type:"boolean"},criticalLayers:{type:"array",items:{type:"string"}},autoDefine:{type:"object",allowUnknown:!1,properties:{predefine:{type:"array",items:{type:"string"}},mapper:{type:O},enhancers:{type:["object","array"]},scanExisting:{type:"boolean"},observeShadows:{type:"boolean"},patchAttachShadow:{type:"boolean"},debounceMs:{type:"number"},onError:{type:O},baseURL:{type:"string"}}},managerURL:{type:"string"},manager:{type:O},liveEdit:{type:"boolean"},log:{type:O}}};function X(o){return o===null?"null":Array.isArray(o)?"array":typeof o}function Ve(o,t){if(t===O)return!0;let e=X(o);return Array.isArray(t)?t.includes(e):e===t}function V(o,t,e,r){if(!t)return;let a=t.type||O;if(!Ve(o,a)){r.push({path:e,expected:a,actual:X(o),message:`Expected ${a} but got ${X(o)}`});return}if(a==="array"&&t.items&&Array.isArray(o)&&o.forEach((n,i)=>{V(n,t.items,`${e}[${i}]`,r)}),a==="object"&&o&&typeof o=="object"){let n=t.properties||{};for(let[i,s]of Object.entries(o)){if(!Object.prototype.hasOwnProperty.call(n,i)){t.allowUnknown||r.push({path:`${e}.${i}`,expected:"known property",actual:"unknown",message:`Unknown property "${i}"`});continue}V(s,n[i],`${e}.${i}`,r)}}}function ee(o,t="",e={}){if(!o||typeof o!="object")return e;if(o.relations&&t&&(e[t]=o.relations),o.type==="object"&&o.properties&&Object.entries(o.properties).forEach(([r,a])=>{let n=t?`${t}.${r}`:r;ee(a,n,e)}),o.type==="array"&&o.items){let r=`${t}[]`;ee(o.items,r,e)}return e}var we=ee(te,"");function re(o,{log:t,context:e="PDS config"}={}){if(!o||typeof o!="object")return[];let r=[];return V(o,te,"design",r),r.length&&typeof t=="function"&&r.forEach(a=>{t("warn",`[${e}] ${a.message} at ${a.path}`)}),r}function ke(o,{log:t,context:e="PDS config"}={}){if(!o||typeof o!="object")return[];let r=[];return V(o,Ge,"config",r),r.length&&typeof t=="function"&&r.forEach(a=>{t("warn",`[${e}] ${a.message} at ${a.path}`)}),r}var P={"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:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.xlarge,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],themes:["light"],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:g.RadiusSizes.none,borderWidth:g.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:g.RadiusSizes.xxlarge,borderWidth:g.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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.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:g.RadiusSizes.medium,borderWidth:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",themes:["light"],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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:g.RadiusSizes.xxlarge,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.slow,animationEasing:g.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:"#0c0c0c",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:g.RadiusSizes.none,borderWidth:g.BorderWidths.thick},behavior:{transitionSpeed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:g.RadiusSizes.large,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.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:g.RadiusSizes.small,borderWidth:g.BorderWidths.medium},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:g.TouchTargetSizes.comfortable,focusStyle:g.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:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:g.TouchTargetSizes.standard,focusStyle:g.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:g.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:g.RadiusSizes.medium,borderWidth:g.BorderWidths.thin},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.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:g.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:g.RadiusSizes.small,borderWidth:g.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:g.TransitionSpeeds.fast,animationEasing:g.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};P.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:g.FontWeights.light,fontWeightNormal:g.FontWeights.normal,fontWeightMedium:g.FontWeights.medium,fontWeightSemibold:g.FontWeights.semibold,fontWeightBold:g.FontWeights.bold,lineHeightTight:g.LineHeights.tight,lineHeightNormal:g.LineHeights.normal,lineHeightRelaxed:g.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:g.RadiusSizes.large,borderWidth:g.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:g.TransitionSpeeds.normal,animationEasing:g.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,baseShadowOpacity:.1,darkMode:{baseShadowOpacity:.25},breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:g.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:g.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:g.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:g.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:g.IconSizes,include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function oe(o="log",t,...e){if(this?.debug||this?.design?.debug||!1||o==="error"||o==="warn"){let a=console[o]||console.log;e.length>0?a(t,...e):a(t)}}G();ae();var T=class o{static#g;static get instance(){return this.#g}#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),o.#g=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#ke(),typeof CSSStyleSheet<"u"?this.#Ee():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{},e=this.#M(t),r=t.layers||{},a=this.#h(r,e.light),n=this.#$(a),i=e.dark!=null?this.#$(this.#h(r,e.dark)):null;return{colors:this.#E(t.colors||{},e),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#O(t.shape||{}),borderWidths:this.#P(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:n,darkShadows:i,layout:this.#D(t.layout||{}),transitions:this.#U(t.behavior||{}),zIndex:this.#I(t.layers||{}),icons:this.#H(t.icons||{})}}#M(t={}){let e=t.layout||{},r=t.layers||{};return{light:this.#m(e.baseShadowOpacity??r.baseShadowOpacity),dark:this.#m(e.darkMode?.baseShadowOpacity??r.darkMode?.baseShadowOpacity)}}#m(t){let e=Number(t);if(Number.isFinite(e))return Math.min(Math.max(e,0),1)}#h(t={},e){let r={...t};return e!=null&&(r.baseShadowOpacity=e),r}#E(t,e={}){let{primary:r="#3b82f6",secondary:a="#64748b",accent:n="#ec4899",background:i="#ffffff",success:s=null,warning:c="#FFBF00",danger:l=null,info:d=null,darkMode:u={}}=t,p={primary:this.#r(r),secondary:this.#r(a),accent:this.#r(n),success:this.#r(s||this.#F(r)),warning:this.#r(c||n),danger:this.#r(l||this.#C(r)),info:this.#r(d||r),gray:this.#f(a),surface:this.#b(i)};return p.surface.fieldset=this.#T(p.surface),p.surfaceSmart=this.#k(p.surface,e),p.dark=this.#A(p,i,u),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#k(p.dark.surface,e)),p.interactive={light:{fill:this.#w(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#w(p.dark.primary,4.5),text:this.#B(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(t){let e=this.#n(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#F(t){let e=this.#n(t);return this.#t(120,Math.max(e.s,60),45)}#C(t){let e=this.#n(t);return this.#t(0,Math.max(e.s,70),50)}#f(t){let e=this.#n(t),r=e.h,a=Math.min(e.s,10);return{50:this.#t(r,a,98),100:this.#t(r,a,95),200:this.#t(r,a,88),300:this.#t(r,a,78),400:this.#t(r,a,60),500:t,600:this.#t(r,Math.min(a+5,15),45),700:this.#t(r,Math.min(a+8,18),35),800:this.#t(r,Math.min(a+10,20),20),900:this.#t(r,Math.min(a+12,22),10)}}#b(t){let e=this.#n(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#y(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#T(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#L(t.sunken,.05),overlay:t.elevated}}#L(t,e=.05){let r=this.#n(t),a=Math.max(r.l-r.l*e,5);return this.#t(r.h,r.s,a)}#y(t){let e=this.#n(t);if(e.l>50){let r=Math.min(e.s+5,25),a=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,r,a)}else{let r=Math.max(e.s-10,5),a=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,r,a)}}#A(t,e="#ffffff",r={}){let a=r.background?r.background:this.#y(e),n=this.#b(a),i=r.primary?this.#r(r.primary):this.#i(t.primary);return{surface:{...n,fieldset:this.#j(n)},primary:i,secondary:r.secondary?this.#r(r.secondary):this.#i(t.secondary),accent:r.accent?this.#r(r.accent):this.#i(t.accent),gray:r.secondary?this.#f(r.secondary):t.gray,success:this.#i(t.success),info:this.#i(t.info),warning:this.#i(t.warning),danger:this.#i(t.danger)}}#l(t){let e=String(t||"").replace("#",""),r=e.length===3?e.split("").map(n=>n+n).join(""):e,a=parseInt(r,16);return{r:a>>16&255,g:a>>8&255,b:a&255}}#p(t){let{r:e,g:r,b:a}=this.#l(t),n=[e/255,r/255,a/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*n[0]+.7152*n[1]+.0722*n[2]}#d(t,e){let r=this.#p(t),a=this.#p(e),n=Math.max(r,a),i=Math.min(r,a);return(n+.05)/(i+.05)}#v(t,e=4.5){if(!t)return"#000000";let r="#ffffff",a="#000000",n=this.#d(t,r);if(n>=e)return r;let i=this.#d(t,a);return i>=e||i>n?a:r}#x(t,e=1){let{r,g:a,b:n}=this.#l(t);return`rgba(${r}, ${a}, ${n}, ${e})`}#R(t,e,r=.5){let a=this.#l(t),n=this.#l(e),i=Math.round(a.r+(n.r-a.r)*r),s=Math.round(a.g+(n.g-a.g)*r),c=Math.round(a.b+(n.b-a.b)*r);return this.#W(i,s,c)}#W(t,e,r){let a=n=>{let i=Math.max(0,Math.min(255,Math.round(n))).toString(16);return i.length===1?"0"+i:i};return`#${a(t)}${a(e)}${a(r)}`}#j(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#S(t.elevated,.08),sunken:t.elevated,overlay:this.#S(t.overlay,.05)}}#B(t={},e="#000000",r=4.5){let a=["600","700","800","500","400","900","300","200"],n={shade:null,color:null,ratio:0};for(let i of a){let s=t?.[i];if(!s||typeof s!="string")continue;let c=this.#d(s,e);if(c>n.ratio&&(n={shade:i,color:s,ratio:c}),c>=r)return s}return n.color||t?.["600"]||t?.["500"]}#w(t={},e=4.5){let r=["600","700","800","500","400","900"],a={shade:null,color:null,ratio:0};for(let n of r){let i=t?.[n];if(!i||typeof i!="string")continue;let s=this.#d(i,"#ffffff");if(s>a.ratio&&(a={shade:n,color:i,ratio:s}),s>=e)return i}return a.color||t?.["600"]||t?.["500"]}#k(t,e={}){let r={},a=e.light??.1,n=e.dark??.25;return Object.entries(t).forEach(([i,s])=>{if(!s||typeof s!="string"||!s.startsWith("#"))return;let c=this.#p(s)<.5,l=this.#v(s,4.5),d=this.#v(s,3),u=this.#R(l,s,.4),p=l,m=u,f=c?"#ffffff":"#000000",b=c?n:a,h=this.#x(f,b),w=c?"#ffffff":"#000000",z=c?.15:.1,S=this.#x(w,z);r[i]={bg:s,text:l,textSecondary:d,textMuted:u,icon:p,iconSubtle:m,shadow:h,border:S,scheme:c?"dark":"light"}}),r}#S(t,e=.05){let r=this.#n(t),a=Math.min(r.l+(100-r.l)*e,95);return this.#t(r.h,r.s,a)}#i(t){let e={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([a,n])=>{let i=t[n.source];e[a]=this.#N(i,n.dimFactor)}),e}#N(t,e=.8){let r=this.#n(t),a=Math.max(r.s*e,5),n=Math.max(r.l*e,5);return this.#t(r.h,a,n)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:r=1.25,maxSpacingSteps:a=12}=t,n=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(a))?Number(a):12,12),s={0:"0"};for(let c=1;c<=i;c++)s[c]=`${n*c}px`;return s}#O(t){let{radiusSize:e="medium",customRadius:r=null}=t,a;r!=null?a=r:typeof e=="number"?a=e:typeof e=="string"?a=g.RadiusSizes[e]??g.RadiusSizes.medium:a=g.RadiusSizes.medium;let n=Number.isFinite(Number(a))?Number(a):g.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(n*.25)?Math.round(n*.25):0}px`,sm:`${Number.isFinite(n*.5)?Math.round(n*.5):0}px`,md:`${n}px`,lg:`${Number.isFinite(n*1.5)?Math.round(n*1.5):0}px`,xl:`${Number.isFinite(n*2)?Math.round(n*2):0}px`,full:"9999px"}}#P(t){let{borderWidth:e="medium"}=t,r;return typeof e=="number"?r=e:typeof e=="string"?r=g.BorderWidths[e]??g.BorderWidths.medium:r=g.BorderWidths.medium,{hairline:`${g.BorderWidths.hairline}px`,thin:`${g.BorderWidths.thin}px`,medium:`${g.BorderWidths.medium}px`,thick:`${g.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:r="system-ui, -apple-system, sans-serif",fontFamilyMono:a='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:n=16,fontScale:i=1.25,fontWeightLight:s=g.FontWeights.light,fontWeightNormal:c=g.FontWeights.normal,fontWeightMedium:l=g.FontWeights.medium,fontWeightSemibold:d=g.FontWeights.semibold,fontWeightBold:u=g.FontWeights.bold,lineHeightTight:p=g.LineHeights.tight,lineHeightNormal:m=g.LineHeights.normal,lineHeightRelaxed:f=g.LineHeights.relaxed}=t,b=Number.isFinite(Number(n))?Number(n):16,h=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:r,mono:a},fontSize:{xs:`${Math.round(b/Math.pow(h,2))}px`,sm:`${Math.round(b/h)}px`,base:`${b}px`,lg:`${Math.round(b*h)}px`,xl:`${Math.round(b*Math.pow(h,2))}px`,"2xl":`${Math.round(b*Math.pow(h,3))}px`,"3xl":`${Math.round(b*Math.pow(h,4))}px`,"4xl":`${Math.round(b*Math.pow(h,5))}px`},fontWeight:{light:s?.toString()||"300",normal:c?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:u?.toString()||"700"},lineHeight:{tight:p?.toString()||"1.25",normal:m?.toString()||"1.5",relaxed:f?.toString()||"1.75"}}}#$(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:r=1,shadowOffsetMultiplier:a=1}=t,n=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*a}px ${2*r}px 0 ${i}`,base:`0 ${1*a}px ${3*r}px 0 ${n}, 0 ${1*a}px ${2*r}px 0 ${i}`,md:`0 ${4*a}px ${6*r}px ${-1*a}px ${n}, 0 ${2*a}px ${4*r}px ${-1*a}px ${i}`,lg:`0 ${10*a}px ${15*r}px ${-3*a}px ${n}, 0 ${4*a}px ${6*r}px ${-2*a}px ${i}`,xl:`0 ${20*a}px ${25*r}px ${-5*a}px ${n}, 0 ${10*a}px ${10*r}px ${-5*a}px ${i}`,inner:`inset 0 ${2*a}px ${4*r}px 0 ${i}`}}#D(t){let{maxWidth:e=1200,containerPadding:r=16,breakpoints:a={sm:640,md:768,lg:1024,xl:1280}}=t,n=this.#z(t);return{maxWidth:this.#o(e,"1200px"),maxWidthSm:n.sm,maxWidthMd:n.md,maxWidthLg:n.lg,maxWidthXl:n.xl,minHeight:"100vh",containerPadding:this.#o(r,"16px"),breakpoints:{sm:this.#o(a.sm,"640px"),md:this.#o(a.md,"768px"),lg:this.#o(a.lg,"1024px"),xl:this.#o(a.xl,"1280px")},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#z(t={}){let e={sm:640,md:768,lg:1024,xl:1280},{maxWidths:r={},maxWidth:a=1200,containerPadding:n=16,breakpoints:i=e}=t||{},s=this.#s(n,16),c=this.#s(a,e.xl),l={sm:this.#s(i.sm,e.sm),md:this.#s(i.md,e.md),lg:this.#s(i.lg,e.lg),xl:this.#s(i.xl,e.xl)},d=p=>p?Math.max(320,p-s*2):c,u={sm:Math.min(c,d(l.sm)),md:Math.min(c,d(l.md)),lg:Math.min(c,d(l.lg)),xl:Math.max(320,c)};return{sm:this.#o(r.sm,`${u.sm}px`),md:this.#o(r.md,`${u.md}px`),lg:this.#o(r.lg,`${u.lg}px`),xl:this.#o(r.xl,`${u.xl}px`)}}#o(t,e){return typeof t=="number"&&Number.isFinite(t)?`${t}px`:typeof t=="string"&&t.trim().length>0?t:e}#s(t,e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"){let r=parseFloat(t);if(Number.isFinite(r))return r}return e}#U(t){let{transitionSpeed:e=g.TransitionSpeeds.normal,animationEasing:r=g.AnimationEasings["ease-out"]}=t,a;return typeof e=="number"?a=e:typeof e=="string"&&g.TransitionSpeeds[e]?a=g.TransitionSpeeds[e]:a=g.TransitionSpeeds.normal,{fast:`${Math.round(a*.6)}ms`,normal:`${a}ms`,slow:`${Math.round(a*1.4)}ms`}}#I(t){let{baseZIndex:e=1e3,zIndexStep:r=10}=t;return{dropdown:e.toString(),sticky:(e+r*2).toString(),fixed:(e+r*3).toString(),modal:(e+r*4).toString(),drawer:(e+r*5).toString(),popover:(e+r*6).toString(),tooltip:(e+r*7).toString(),notification:(e+r*8).toString()}}#H(t){let{set:e="phosphor",weight:r="regular",defaultSize:a=24,sizes:n={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:r,defaultSize:`${a}px`,sizes:Object.fromEntries(Object.entries(n).map(([c,l])=>[c,`${l}px`])),spritePath:i,externalPath:s}}#_(t){let e=[];e.push(` /* Colors */
|
|
20
|
+
`);let r=(a,n="")=>{Object.entries(a).forEach(([i,s])=>{typeof s=="object"&&s!==null?r(s,`${n}${i}-`):typeof s=="string"&&e.push(` --color-${n}${i}: ${s};
|
|
21
|
+
`)})};return Object.entries(t).forEach(([a,n])=>{a!=="dark"&&a!=="surfaceSmart"&&a!=="interactive"&&typeof n=="object"&&n!==null&&r(n,`${a}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
|
+
`),Object.entries(t.surfaceSmart).forEach(([a,n])=>{e.push(` --surface-${a}-bg: ${n.bg};
|
|
23
|
+
`),e.push(` --surface-${a}-text: ${n.text};
|
|
24
|
+
`),e.push(` --surface-${a}-text-secondary: ${n.textSecondary};
|
|
25
|
+
`),e.push(` --surface-${a}-text-muted: ${n.textMuted};
|
|
26
|
+
`),e.push(` --surface-${a}-icon: ${n.icon};
|
|
27
|
+
`),e.push(` --surface-${a}-icon-subtle: ${n.iconSubtle};
|
|
28
|
+
`),e.push(` --surface-${a}-shadow: ${n.shadow};
|
|
29
|
+
`),e.push(` --surface-${a}-border: ${n.border};
|
|
30
30
|
`)}),e.push(`
|
|
31
31
|
`)),e.push(` /* Semantic Text Colors */
|
|
32
32
|
`),e.push(` --color-text-primary: var(--color-gray-900);
|
|
@@ -59,74 +59,74 @@ var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
59
59
|
|
|
60
60
|
/* Legacy alias for backwards compatibility */
|
|
61
61
|
--backdrop-background: var(--backdrop-bg);
|
|
62
|
-
`),e.push(this.#
|
|
63
|
-
`}#
|
|
62
|
+
`),e.push(this.#q(t)),`${e.join("")}
|
|
63
|
+
`}#q(t){let e=t.primary?.[500]||"#3b82f6",r=t.secondary?.[500]||"#8b5cf6",a=t.accent?.[500]||"#f59e0b";return`
|
|
64
64
|
/* Mesh Gradient Backgrounds */
|
|
65
65
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${e} 25%, transparent) 0px, transparent 50%),
|
|
66
66
|
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 22%, transparent) 0px, transparent 50%),
|
|
67
|
-
radial-gradient(at 52% 99%, color-mix(in oklab, ${
|
|
67
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
68
68
|
radial-gradient(at 10% 29%, color-mix(in oklab, ${e} 15%, transparent) 0px, transparent 50%);
|
|
69
69
|
|
|
70
70
|
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${r} 24%, transparent) 0px, transparent 50%),
|
|
71
71
|
radial-gradient(at 80% 0%, color-mix(in oklab, ${e} 20%, transparent) 0px, transparent 50%),
|
|
72
|
-
radial-gradient(at 0% 50%, color-mix(in oklab, ${
|
|
72
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
73
73
|
radial-gradient(at 80% 100%, color-mix(in oklab, ${r} 15%, transparent) 0px, transparent 50%);
|
|
74
74
|
|
|
75
|
-
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${
|
|
75
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${a} 21%, transparent) 0px, transparent 50%),
|
|
76
76
|
radial-gradient(at 85% 30%, color-mix(in oklab, ${e} 23%, transparent) 0px, transparent 50%),
|
|
77
77
|
radial-gradient(at 50% 80%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
78
|
-
radial-gradient(at 90% 90%, color-mix(in oklab, ${
|
|
78
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%);
|
|
79
79
|
|
|
80
80
|
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${e} 19%, transparent) 0px, transparent 50%),
|
|
81
81
|
radial-gradient(at 20% 80%, color-mix(in oklab, ${r} 22%, transparent) 0px, transparent 50%),
|
|
82
|
-
radial-gradient(at 90% 60%, color-mix(in oklab, ${
|
|
82
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
83
83
|
radial-gradient(at 30% 40%, color-mix(in oklab, ${e} 16%, transparent) 0px, transparent 50%);
|
|
84
84
|
|
|
85
85
|
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${e} 23%, transparent) 0px, transparent 50%),
|
|
86
|
-
radial-gradient(at 10% 10%, color-mix(in oklab, ${
|
|
86
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${a} 20%, transparent) 0px, transparent 50%),
|
|
87
87
|
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
88
|
-
radial-gradient(at 50% 90%, color-mix(in oklab, ${
|
|
89
|
-
`}#
|
|
90
|
-
`];return Object.entries(t).forEach(([r,
|
|
88
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${a} 15%, transparent) 0px, transparent 50%);
|
|
89
|
+
`}#G(t){let e=[` /* Spacing */
|
|
90
|
+
`];return Object.entries(t).forEach(([r,a])=>{r!=null&&r!=="NaN"&&a!==void 0&&!a.includes("NaN")&&e.push(` --spacing-${r}: ${a};
|
|
91
91
|
`)}),`${e.join("")}
|
|
92
92
|
`}#V(t){let e=[` /* Border Radius */
|
|
93
|
-
`];return Object.entries(t).forEach(([r,
|
|
93
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --radius-${r}: ${a};
|
|
94
94
|
`)}),`${e.join("")}
|
|
95
|
-
`}#
|
|
96
|
-
`];return Object.entries(t).forEach(([r,
|
|
95
|
+
`}#J(t){let e=[` /* Border Widths */
|
|
96
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --border-width-${r}: ${a};
|
|
97
97
|
`)}),`${e.join("")}
|
|
98
98
|
`}#Y(t){let e=[` /* Typography */
|
|
99
|
-
`];return Object.entries(t).forEach(([r,
|
|
99
|
+
`];return Object.entries(t).forEach(([r,a])=>{let n=r.replace(/^font/,"").replace(/^(.)/,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();Object.entries(a).forEach(([i,s])=>{let c=i.replace(/([A-Z])/g,"-$1").toLowerCase();e.push(` --font-${n}-${c}: ${s};
|
|
100
100
|
`)})}),`${e.join("")}
|
|
101
101
|
`}#u(t){let e=[` /* Shadows */
|
|
102
|
-
`];return Object.entries(t).forEach(([r,
|
|
102
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --shadow-${r}: ${a};
|
|
103
103
|
`)}),`${e.join("")}
|
|
104
|
-
`}#
|
|
105
|
-
`];return Object.entries(t).forEach(([r,
|
|
104
|
+
`}#Q(t){let e=[` /* Layout */
|
|
105
|
+
`];return Object.entries(t).forEach(([r,a])=>{let n=r.replace(/([A-Z])/g,"-$1").toLowerCase();r!=="breakpoints"&&e.push(` --layout-${n}: ${a};
|
|
106
106
|
`)}),`${e.join("")}
|
|
107
|
-
`}#
|
|
108
|
-
`];return Object.entries(t).forEach(([r,
|
|
107
|
+
`}#Z(t){let e=[` /* Transitions */
|
|
108
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --transition-${r}: ${a};
|
|
109
109
|
`)}),`${e.join("")}
|
|
110
|
-
`}#
|
|
111
|
-
`];return Object.entries(t).forEach(([r,
|
|
110
|
+
`}#K(t){let e=[` /* Z-Index */
|
|
111
|
+
`];return Object.entries(t).forEach(([r,a])=>{e.push(` --z-${r}: ${a};
|
|
112
112
|
`)}),`${e.join("")}
|
|
113
|
-
`}#
|
|
113
|
+
`}#X(t){let e=[` /* Icon System */
|
|
114
114
|
`];return e.push(` --icon-set: ${t.set};
|
|
115
115
|
`),e.push(` --icon-weight: ${t.weight};
|
|
116
116
|
`),e.push(` --icon-size: ${t.defaultSize};
|
|
117
|
-
`),Object.entries(t.sizes).forEach(([r,
|
|
117
|
+
`),Object.entries(t.sizes).forEach(([r,a])=>{e.push(` --icon-size-${r}: ${a};
|
|
118
118
|
`)}),`${e.join("")}
|
|
119
|
-
`}#ee(t,e){if(!t?.dark)return"";let r=[],
|
|
120
|
-
`)})};Object.entries(t.dark).forEach(([
|
|
121
|
-
`),Object.entries(t.dark.surfaceSmart).forEach(([
|
|
122
|
-
`),
|
|
123
|
-
`),
|
|
124
|
-
`),
|
|
125
|
-
`),
|
|
126
|
-
`),
|
|
127
|
-
`),
|
|
128
|
-
`),
|
|
129
|
-
`)}),
|
|
119
|
+
`}#ee(t,e){if(!t?.dark)return"";let r=[],a=(u,p="")=>{Object.entries(u).forEach(([m,f])=>{typeof f=="object"&&f!==null?a(f,`${p}${m}-`):typeof f=="string"&&r.push(` --color-${p}${m}: ${f};
|
|
120
|
+
`)})};Object.entries(t.dark).forEach(([u,p])=>{u!=="surfaceSmart"&&typeof p=="object"&&p!==null&&a(p,`${u}-`)});let n=[];t.dark.surfaceSmart&&(n.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
121
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([u,p])=>{n.push(` --surface-${u}-bg: ${p.bg};
|
|
122
|
+
`),n.push(` --surface-${u}-text: ${p.text};
|
|
123
|
+
`),n.push(` --surface-${u}-text-secondary: ${p.textSecondary};
|
|
124
|
+
`),n.push(` --surface-${u}-text-muted: ${p.textMuted};
|
|
125
|
+
`),n.push(` --surface-${u}-icon: ${p.icon};
|
|
126
|
+
`),n.push(` --surface-${u}-icon-subtle: ${p.iconSubtle};
|
|
127
|
+
`),n.push(` --surface-${u}-shadow: ${p.shadow};
|
|
128
|
+
`),n.push(` --surface-${u}-border: ${p.border};
|
|
129
|
+
`)}),n.push(`
|
|
130
130
|
`));let i=` --color-text-primary: var(--color-gray-100);
|
|
131
131
|
--color-text-secondary: var(--color-gray-300);
|
|
132
132
|
--color-text-muted: var(--color-gray-400);
|
|
@@ -135,7 +135,7 @@ var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
135
135
|
--color-input-disabled-bg: var(--color-gray-900);
|
|
136
136
|
--color-input-disabled-text: var(--color-gray-600);
|
|
137
137
|
--color-code-bg: var(--color-gray-800);
|
|
138
|
-
`,
|
|
138
|
+
`,s=` /* Backdrop tokens - dark mode */
|
|
139
139
|
--backdrop-bg: linear-gradient(
|
|
140
140
|
135deg,
|
|
141
141
|
rgba(0, 0, 0, 0.6),
|
|
@@ -149,23 +149,23 @@ var Be=Object.defineProperty;var O=(n,t)=>()=>(n&&(t=n(n=0)),t);var P=(n,t)=>{fo
|
|
|
149
149
|
|
|
150
150
|
/* Legacy alias for backwards compatibility */
|
|
151
151
|
--backdrop-background: var(--backdrop-bg);
|
|
152
|
-
`,
|
|
153
|
-
${[...r,...
|
|
154
|
-
`}#te(t,e){if(!t?.dark)return"";let r=[],
|
|
155
|
-
`)})};Object.entries(t.dark).forEach(([p,
|
|
156
|
-
`),Object.entries(t.dark.surfaceSmart).forEach(([p,
|
|
157
|
-
`),
|
|
158
|
-
`),
|
|
159
|
-
`),
|
|
160
|
-
`),
|
|
161
|
-
`),
|
|
162
|
-
`),
|
|
163
|
-
`),
|
|
164
|
-
`)}),
|
|
152
|
+
`,c=this.#oe(t),l=e?[this.#u(e)]:[];return`html[data-theme="dark"] {
|
|
153
|
+
${[...r,...n,...l,i,s,c].join("")}}
|
|
154
|
+
`}#te(t,e){if(!t?.dark)return"";let r=[],a=(p,m="")=>{Object.entries(p).forEach(([f,b])=>{typeof b=="object"&&b!==null?a(b,`${m}${f}-`):typeof b=="string"&&r.push(` --color-${m}${f}: ${b};
|
|
155
|
+
`)})};Object.entries(t.dark).forEach(([p,m])=>{p!=="surfaceSmart"&&typeof m=="object"&&m!==null&&a(m,`${p}-`)});let n=[];t.dark.surfaceSmart&&(n.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
156
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([p,m])=>{n.push(` --surface-${p}-bg: ${m.bg};
|
|
157
|
+
`),n.push(` --surface-${p}-text: ${m.text};
|
|
158
|
+
`),n.push(` --surface-${p}-text-secondary: ${m.textSecondary};
|
|
159
|
+
`),n.push(` --surface-${p}-text-muted: ${m.textMuted};
|
|
160
|
+
`),n.push(` --surface-${p}-icon: ${m.icon};
|
|
161
|
+
`),n.push(` --surface-${p}-icon-subtle: ${m.iconSubtle};
|
|
162
|
+
`),n.push(` --surface-${p}-shadow: ${m.shadow};
|
|
163
|
+
`),n.push(` --surface-${p}-border: ${m.border};
|
|
164
|
+
`)}),n.push(`
|
|
165
165
|
`));let i=[];t.interactive&&t.interactive.dark&&(i.push(` /* Interactive Colors - optimized for specific use cases (dark mode) */
|
|
166
166
|
`),i.push(` --color-primary-fill: ${t.interactive.dark.fill}; /* For button backgrounds with white text */
|
|
167
167
|
`),i.push(` --color-primary-text: ${t.interactive.dark.text}; /* For links and outline buttons on dark surfaces */
|
|
168
|
-
`));let
|
|
168
|
+
`));let s=[` --color-text-primary: var(--color-gray-100);
|
|
169
169
|
`,` --color-text-secondary: var(--color-gray-300);
|
|
170
170
|
`,` --color-text-muted: var(--color-gray-400);
|
|
171
171
|
`,` --color-border: var(--color-gray-700);
|
|
@@ -173,7 +173,7 @@ ${[...r,...a,...d,i,c,s].join("")}}
|
|
|
173
173
|
`,` --color-input-disabled-bg: var(--color-gray-900);
|
|
174
174
|
`,` --color-input-disabled-text: var(--color-gray-600);
|
|
175
175
|
`,` --color-code-bg: var(--color-gray-800);
|
|
176
|
-
`,...i].join(""),
|
|
176
|
+
`,...i].join(""),c=` /* Backdrop tokens - dark mode */
|
|
177
177
|
--backdrop-bg: linear-gradient(
|
|
178
178
|
135deg,
|
|
179
179
|
rgba(0, 0, 0, 0.6),
|
|
@@ -187,61 +187,61 @@ ${[...r,...a,...d,i,c,s].join("")}}
|
|
|
187
187
|
|
|
188
188
|
/* Legacy alias for backwards compatibility */
|
|
189
189
|
--backdrop-background: var(--backdrop-bg);
|
|
190
|
-
`,
|
|
190
|
+
`,l=this.#re(t),d=e?[this.#u(e)]:[];return`
|
|
191
191
|
html[data-theme="dark"] {
|
|
192
|
-
${[...r,...
|
|
193
|
-
`}#re(t){let e=t.dark||t,r=e.primary?.[400]||"#60a5fa",
|
|
192
|
+
${[...r,...n,...d,s,c,l].join("")} }
|
|
193
|
+
`}#re(t){let e=t.dark||t,r=e.primary?.[400]||"#60a5fa",a=e.secondary?.[400]||"#a78bfa",n=e.accent?.[400]||"#fbbf24";return` /* Mesh Gradient Variables (Dark Mode) */
|
|
194
194
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${r} 20%, transparent) 0px, transparent 50%),
|
|
195
|
-
radial-gradient(at 97% 21%, color-mix(in oklab, ${
|
|
196
|
-
radial-gradient(at 52% 99%, color-mix(in oklab, ${
|
|
195
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
196
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${n} 13%, transparent) 0px, transparent 50%),
|
|
197
197
|
radial-gradient(at 10% 29%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
198
198
|
|
|
199
|
-
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${
|
|
199
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
200
200
|
radial-gradient(at 80% 0%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
201
|
-
radial-gradient(at 0% 50%, color-mix(in oklab, ${
|
|
202
|
-
radial-gradient(at 80% 100%, color-mix(in oklab, ${
|
|
201
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
202
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
203
203
|
|
|
204
|
-
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${
|
|
204
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${n} 15%, transparent) 0px, transparent 50%),
|
|
205
205
|
radial-gradient(at 85% 30%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
206
|
-
radial-gradient(at 50% 80%, color-mix(in oklab, ${
|
|
207
|
-
radial-gradient(at 90% 90%, color-mix(in oklab, ${
|
|
206
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
207
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${n} 11%, transparent) 0px, transparent 50%);
|
|
208
208
|
|
|
209
209
|
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
210
|
-
radial-gradient(at 20% 80%, color-mix(in oklab, ${
|
|
211
|
-
radial-gradient(at 90% 60%, color-mix(in oklab, ${
|
|
210
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
211
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
212
212
|
radial-gradient(at 30% 40%, color-mix(in oklab, ${r} 11%, transparent) 0px, transparent 50%);
|
|
213
213
|
|
|
214
214
|
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
215
|
-
radial-gradient(at 10% 10%, color-mix(in oklab, ${
|
|
216
|
-
radial-gradient(at 90% 10%, color-mix(in oklab, ${
|
|
217
|
-
radial-gradient(at 50% 90%, color-mix(in oklab, ${
|
|
218
|
-
`}#
|
|
215
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${n} 14%, transparent) 0px, transparent 50%),
|
|
216
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
217
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${n} 10%, transparent) 0px, transparent 50%);
|
|
218
|
+
`}#oe(t){let e=t.dark||t,r=e.primary?.[400]||"#60a5fa",a=e.secondary?.[400]||"#a78bfa",n=e.accent?.[400]||"#fbbf24";return`
|
|
219
219
|
/* Mesh Gradient Backgrounds (Dark Mode) */
|
|
220
220
|
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${r} 20%, transparent) 0px, transparent 50%),
|
|
221
|
-
radial-gradient(at 97% 21%, color-mix(in oklab, ${
|
|
222
|
-
radial-gradient(at 52% 99%, color-mix(in oklab, ${
|
|
221
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
222
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${n} 13%, transparent) 0px, transparent 50%),
|
|
223
223
|
radial-gradient(at 10% 29%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
224
224
|
|
|
225
|
-
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${
|
|
225
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
226
226
|
radial-gradient(at 80% 0%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
227
|
-
radial-gradient(at 0% 50%, color-mix(in oklab, ${
|
|
228
|
-
radial-gradient(at 80% 100%, color-mix(in oklab, ${
|
|
227
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
228
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
229
229
|
|
|
230
|
-
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${
|
|
230
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${n} 15%, transparent) 0px, transparent 50%),
|
|
231
231
|
radial-gradient(at 85% 30%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
232
|
-
radial-gradient(at 50% 80%, color-mix(in oklab, ${
|
|
233
|
-
radial-gradient(at 90% 90%, color-mix(in oklab, ${
|
|
232
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
233
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${n} 11%, transparent) 0px, transparent 50%);
|
|
234
234
|
|
|
235
235
|
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${r} 14%, transparent) 0px, transparent 50%),
|
|
236
|
-
radial-gradient(at 20% 80%, color-mix(in oklab, ${
|
|
237
|
-
radial-gradient(at 90% 60%, color-mix(in oklab, ${
|
|
236
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${a} 16%, transparent) 0px, transparent 50%),
|
|
237
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${n} 12%, transparent) 0px, transparent 50%),
|
|
238
238
|
radial-gradient(at 30% 40%, color-mix(in oklab, ${r} 11%, transparent) 0px, transparent 50%);
|
|
239
239
|
|
|
240
240
|
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
241
|
-
radial-gradient(at 10% 10%, color-mix(in oklab, ${
|
|
242
|
-
radial-gradient(at 90% 10%, color-mix(in oklab, ${
|
|
243
|
-
radial-gradient(at 50% 90%, color-mix(in oklab, ${
|
|
244
|
-
`}#
|
|
241
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${n} 14%, transparent) 0px, transparent 50%),
|
|
242
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
243
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${n} 10%, transparent) 0px, transparent 50%);
|
|
244
|
+
`}#ae(){return`/* Callout dark mode adjustments */
|
|
245
245
|
html[data-theme="dark"] {
|
|
246
246
|
.callout-success { background-color: var(--color-success-50); border-color: var(--color-success-500); color: var(--color-success-900); }
|
|
247
247
|
.callout-info { background-color: var(--color-info-50); border-color: var(--color-info-500); color: var(--color-info-900); }
|
|
@@ -626,7 +626,7 @@ html[data-theme="dark"] .liquid-glass {
|
|
|
626
626
|
|
|
627
627
|
/* Dialog styles moved to #generateDialogStyles() */
|
|
628
628
|
|
|
629
|
-
`}#le(){let{gap:t,inputPadding:e,buttonPadding:r,focusRingWidth:
|
|
629
|
+
`}#le(){let{gap:t,inputPadding:e,buttonPadding:r,focusRingWidth:a,focusRingOpacity:n,borderWidthThin:i,sectionSpacing:s,buttonMinHeight:c,inputMinHeight:l}=this.options.design,d=e||.75,u=r||1,p=a||3,m=i||1,f=t||1,b=s||2,h=c||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
630
630
|
form {
|
|
631
631
|
margin: 0;
|
|
632
632
|
width: 100%;
|
|
@@ -754,9 +754,9 @@ input, textarea, select {
|
|
|
754
754
|
|
|
755
755
|
input, textarea, select {
|
|
756
756
|
width: 100%;
|
|
757
|
-
min-height: ${
|
|
758
|
-
padding: calc(var(--spacing-1) * ${
|
|
759
|
-
border: ${
|
|
757
|
+
min-height: ${l||40}px;
|
|
758
|
+
padding: calc(var(--spacing-1) * ${d}) var(--spacing-4);
|
|
759
|
+
border: ${m}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);
|
|
@@ -785,7 +785,7 @@ input, textarea, select {
|
|
|
785
785
|
border-color: var(--color-danger-500);
|
|
786
786
|
|
|
787
787
|
&:focus {
|
|
788
|
-
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-danger-500) ${Math.round((
|
|
788
|
+
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-danger-500) ${Math.round((n||.3)*100)}%, transparent);
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
}
|
|
@@ -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(${h}px * 0.75);
|
|
929
|
+
padding: calc(var(--spacing-1) * ${u*.6}) calc(var(--spacing-4) * 0.85);
|
|
930
|
+
border: ${m}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);
|
|
@@ -967,7 +967,7 @@ input[type="checkbox"]:checked + label:not(fieldset label):not(label[data-toggle
|
|
|
967
967
|
label:has(input[type="checkbox"]:focus):not(fieldset label):not(label[data-toggle]),
|
|
968
968
|
input[type="checkbox"]:focus + label:not(fieldset label):not(label[data-toggle]) {
|
|
969
969
|
outline: none;
|
|
970
|
-
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((
|
|
970
|
+
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((n||.3)*100)}%, transparent);
|
|
971
971
|
}
|
|
972
972
|
|
|
973
973
|
label:has(input[type="checkbox"]:disabled):not(fieldset label):not(label[data-toggle]),
|
|
@@ -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(${h}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);
|
|
@@ -1075,7 +1075,7 @@ fieldset[role="group"].buttons {
|
|
|
1075
1075
|
label:has(input[type="radio"]:focus),
|
|
1076
1076
|
label:has(input[type="checkbox"]:focus) {
|
|
1077
1077
|
outline: none;
|
|
1078
|
-
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((
|
|
1078
|
+
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((n||.3)*100)}%, transparent);
|
|
1079
1079
|
}
|
|
1080
1080
|
|
|
1081
1081
|
label:has(input[type="radio"]:disabled),
|
|
@@ -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: ${h}px;
|
|
1231
|
+
padding: calc(var(--spacing-1) * ${u}) var(--spacing-6);
|
|
1232
|
+
border: ${m}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);
|
|
@@ -1251,7 +1251,7 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1251
1251
|
|
|
1252
1252
|
&:focus {
|
|
1253
1253
|
outline: none;
|
|
1254
|
-
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((
|
|
1254
|
+
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((n||.3)*100)}%, transparent);
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
1257
|
&:disabled {
|
|
@@ -1281,7 +1281,7 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
|
|
1283
1283
|
&:focus {
|
|
1284
|
-
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((
|
|
1284
|
+
box-shadow: 0 0 0 ${p}px color-mix(in oklab, var(--color-primary-500) ${Math.round((n||.3)*100)}%, transparent);
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
1287
|
&:disabled {
|
|
@@ -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(${h}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(${h}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(${h}px * 1.2);
|
|
1353
1353
|
}
|
|
1354
1354
|
|
|
1355
1355
|
/* Working/loading state for buttons */
|
|
@@ -1527,13 +1527,13 @@ a.btn-working {
|
|
|
1527
1527
|
.array-item {
|
|
1528
1528
|
position: relative;
|
|
1529
1529
|
padding: var(--spacing-4);
|
|
1530
|
-
border: ${
|
|
1530
|
+
border: ${m}px solid var(--color-border);
|
|
1531
1531
|
border-radius: var(--radius-md);
|
|
1532
1532
|
background-color: var(--color-surface-base);
|
|
1533
1533
|
|
|
1534
1534
|
.array-controls {
|
|
1535
1535
|
padding-top: var(--spacing-3);
|
|
1536
|
-
border-top: ${
|
|
1536
|
+
border-top: ${m}px solid var(--color-border);
|
|
1537
1537
|
margin-top: var(--spacing-4);
|
|
1538
1538
|
}
|
|
1539
1539
|
}
|
|
@@ -1867,7 +1867,7 @@ tbody {
|
|
|
1867
1867
|
.badge-lg { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
|
|
1868
1868
|
.pill { padding: var(--spacing-1) var(--spacing-3); border-radius: var(--radius-full); }
|
|
1869
1869
|
|
|
1870
|
-
`}#
|
|
1870
|
+
`}#me(){let{layout:t={},behavior:e={}}=this.options.design;return`/* ============================================================================
|
|
1871
1871
|
Dialog Primitive
|
|
1872
1872
|
Native <dialog> element with PDS integration
|
|
1873
1873
|
============================================================================ */
|
|
@@ -2053,7 +2053,7 @@ dialog.dialog-full { max-width: calc(100vw - var(--spacing-8)); max-height: calc
|
|
|
2053
2053
|
dialog, dialog::backdrop { transition-duration: 0.01s !important; }
|
|
2054
2054
|
}
|
|
2055
2055
|
|
|
2056
|
-
`}#
|
|
2056
|
+
`}#he(){let{layout:t={}}=this.options.design;return`/* Tab Strip Component */
|
|
2057
2057
|
|
|
2058
2058
|
/* Tab navigation */
|
|
2059
2059
|
|
|
@@ -2396,7 +2396,7 @@ nav[data-dropdown] {
|
|
|
2396
2396
|
scale: 0.95;
|
|
2397
2397
|
}
|
|
2398
2398
|
}
|
|
2399
|
-
`}#ve(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=t.gridSystem||{},
|
|
2399
|
+
`}#ve(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=t.gridSystem||{},a=r.columns||[1,2,3,4,6],n=r.autoFitBreakpoints||{sm:"150px",md:"250px",lg:"350px",xl:"450px"},i=this.#z(t),s=[`
|
|
2400
2400
|
/* ============================================================================
|
|
2401
2401
|
Layout Utilities
|
|
2402
2402
|
Modern grid and flex system for building responsive layouts
|
|
@@ -2417,15 +2417,15 @@ nav[data-dropdown] {
|
|
|
2417
2417
|
gap: var(--spacing-4);
|
|
2418
2418
|
}
|
|
2419
2419
|
|
|
2420
|
-
`];for(let
|
|
2421
|
-
`);
|
|
2420
|
+
`];for(let c of a)s.push(`.grid-cols-${c} { grid-template-columns: repeat(${c}, 1fr); }
|
|
2421
|
+
`);s.push(`
|
|
2422
2422
|
/* Auto-fit grids (responsive) */
|
|
2423
|
-
`);for(let[
|
|
2424
|
-
`);return
|
|
2423
|
+
`);for(let[c,l]of Object.entries(n))s.push(`.grid-auto-${c} { grid-template-columns: repeat(auto-fit, minmax(${l}, 1fr)); }
|
|
2424
|
+
`);return s.push(`
|
|
2425
2425
|
/* Gap utilities */
|
|
2426
2426
|
.gap-0 { gap: 0; } .gap-xs { gap: var(--spacing-1); } .gap-sm { gap: var(--spacing-2); } .gap-md { gap: var(--spacing-4); } .gap-lg { gap: var(--spacing-6); } .gap-xl { gap: var(--spacing-8); }
|
|
2427
2427
|
|
|
2428
|
-
`),
|
|
2428
|
+
`),s.push(`
|
|
2429
2429
|
/* Flexbox System */
|
|
2430
2430
|
.flex { display: flex; }
|
|
2431
2431
|
.flex-wrap { flex-wrap: wrap; }
|
|
@@ -2502,7 +2502,7 @@ nav[data-dropdown] {
|
|
|
2502
2502
|
.backdrop-light { --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)); --backdrop-brightness: 1.1; }
|
|
2503
2503
|
.backdrop-dark { --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)); --backdrop-brightness: 0.6; }
|
|
2504
2504
|
.backdrop-blur-sm { --backdrop-blur: 5px; } .backdrop-blur-md { --backdrop-blur: 10px; } .backdrop-blur-lg { --backdrop-blur: 20px; }
|
|
2505
|
-
`),
|
|
2505
|
+
`),s.join("")}#xe(){return`/* Media Element Utilities */
|
|
2506
2506
|
|
|
2507
2507
|
/* Gallery images */
|
|
2508
2508
|
.img-gallery {
|
|
@@ -2540,7 +2540,7 @@ nav[data-dropdown] {
|
|
|
2540
2540
|
height: auto;
|
|
2541
2541
|
}
|
|
2542
2542
|
|
|
2543
|
-
`}#we(){let{layout:t={},a11y:e={}}=this.options.design,r=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},
|
|
2543
|
+
`}#we(){let{layout:t={},a11y:e={}}=this.options.design,r=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},a=e.minTouchTarget||g.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2544
2544
|
|
|
2545
2545
|
/* Small devices (${r.sm}px and up) */
|
|
2546
2546
|
@media (min-width: ${r.sm}px) {
|
|
@@ -2562,8 +2562,8 @@ nav[data-dropdown] {
|
|
|
2562
2562
|
/* Touch devices - larger touch targets for interactive elements */
|
|
2563
2563
|
button, a, select, textarea,
|
|
2564
2564
|
input:not([type="radio"]):not([type="checkbox"]) {
|
|
2565
|
-
min-height: ${
|
|
2566
|
-
min-width: ${
|
|
2565
|
+
min-height: ${a}px;
|
|
2566
|
+
min-width: ${a}px;
|
|
2567
2567
|
}
|
|
2568
2568
|
|
|
2569
2569
|
/* Radio and checkbox inputs: keep reasonable size but ensure label tap area is large */
|
|
@@ -2580,7 +2580,7 @@ nav[data-dropdown] {
|
|
|
2580
2580
|
label:has(input[type="checkbox"]):not(fieldset.buttons label),
|
|
2581
2581
|
fieldset[role="radiogroup"]:not(.buttons) label,
|
|
2582
2582
|
fieldset[role="group"]:not(.buttons) label {
|
|
2583
|
-
min-height: ${
|
|
2583
|
+
min-height: ${a}px;
|
|
2584
2584
|
display: inline-flex;
|
|
2585
2585
|
align-items: center;
|
|
2586
2586
|
padding: var(--spacing-2) 0;
|
|
@@ -2644,23 +2644,23 @@ nav[data-dropdown] {
|
|
|
2644
2644
|
}
|
|
2645
2645
|
}
|
|
2646
2646
|
|
|
2647
|
-
`}#n(t){let e=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,
|
|
2647
|
+
`}#n(t){let e=parseInt(t.slice(1,3),16)/255,r=parseInt(t.slice(3,5),16)/255,a=parseInt(t.slice(5,7),16)/255,n=Math.max(e,r,a),i=Math.min(e,r,a),s,c,l=(n+i)/2;if(n===i)s=c=0;else{let d=n-i;switch(c=l>.5?d/(2-n-i):d/(n+i),n){case e:s=(r-a)/d+(r<a?6:0);break;case r:s=(a-e)/d+2;break;case a:s=(e-r)/d+4;break}s/=6}return{h:s*360,s:c*100,l:l*100}}#t(t,e,r){t=t/360,e=e/100,r=r/100;let a=(l,d,u)=>(u<0&&(u+=1),u>1&&(u-=1),u<1/6?l+(d-l)*6*u:u<1/2?d:u<2/3?l+(d-l)*(2/3-u)*6:l),n,i,s;if(e===0)n=i=s=r;else{let l=r<.5?r*(1+e):r+e-r*e,d=2*r-l;n=a(d,l,t+1/3),i=a(d,l,t),s=a(d,l,t-1/3)}let c=l=>{let d=Math.round(l*255).toString(16);return d.length===1?"0"+d:d};return`#${c(n)}${c(i)}${c(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#ke(){this.#e={tokens:this.#Se(),primitives:this.#$e(),components:this.#ze(),utilities:this.#Me()},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`})}#Se(){let{colors:t,spacing:e,radius:r,borderWidths:a,typography:n,shadows:i,darkShadows:s,layout:c,transitions:l,zIndex:d,icons:u}=this.tokens,p=[`@layer tokens {
|
|
2648
2648
|
:root {
|
|
2649
|
-
${this.#
|
|
2650
|
-
${this.#
|
|
2649
|
+
${this.#_(t)}
|
|
2650
|
+
${this.#G(e)}
|
|
2651
2651
|
${this.#V(r)}
|
|
2652
|
-
${this.#
|
|
2653
|
-
${this.#Y(
|
|
2652
|
+
${this.#J(a)}
|
|
2653
|
+
${this.#Y(n)}
|
|
2654
2654
|
${this.#u(i)}
|
|
2655
|
-
${this.#
|
|
2656
|
-
${this.#
|
|
2655
|
+
${this.#Q(c)}
|
|
2656
|
+
${this.#Z(l)}
|
|
2657
|
+
${this.#K(d)}
|
|
2657
2658
|
${this.#X(u)}
|
|
2658
|
-
${this.#K(l)}
|
|
2659
2659
|
}
|
|
2660
|
-
${this.#te(t,
|
|
2660
|
+
${this.#te(t,s)}
|
|
2661
2661
|
}`];return p.push(`
|
|
2662
2662
|
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2663
|
-
`),p.push(this.#ee(t,
|
|
2663
|
+
`),p.push(this.#ee(t,s)),p.join("")}#$e(){let{advanced:t={},a11y:e={},layout:r={}}=this.options.design,a=t.tabSize||g.TabSizes.standard,n=e.minTouchTarget||g.TouchTargetSizes.standard,i=r.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2664
2664
|
/* Base HTML reset */
|
|
2665
2665
|
*, *::before, *::after {
|
|
2666
2666
|
box-sizing: border-box;
|
|
@@ -2676,7 +2676,7 @@ nav[data-dropdown] {
|
|
|
2676
2676
|
-webkit-text-size-adjust: 100%;
|
|
2677
2677
|
-webkit-font-smoothing: antialiased;
|
|
2678
2678
|
-moz-osx-font-smoothing: grayscale;
|
|
2679
|
-
tab-size: ${
|
|
2679
|
+
tab-size: ${a};
|
|
2680
2680
|
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
2681
2681
|
}
|
|
2682
2682
|
|
|
@@ -2719,7 +2719,7 @@ nav[data-dropdown] {
|
|
|
2719
2719
|
gap: var(--spacing-2);
|
|
2720
2720
|
font-weight: var(--font-weight-medium);
|
|
2721
2721
|
line-height: 1.5;
|
|
2722
|
-
min-height: ${
|
|
2722
|
+
min-height: ${n}px;
|
|
2723
2723
|
touch-action: manipulation;
|
|
2724
2724
|
user-select: none;
|
|
2725
2725
|
}
|
|
@@ -3019,13 +3019,13 @@ ${this.#pe()}
|
|
|
3019
3019
|
|
|
3020
3020
|
${this.#ge()}
|
|
3021
3021
|
|
|
3022
|
-
${this.#
|
|
3022
|
+
${this.#me()}
|
|
3023
3023
|
|
|
3024
3024
|
${this.#ue()}
|
|
3025
3025
|
|
|
3026
3026
|
${this.#ye()}
|
|
3027
3027
|
|
|
3028
|
-
${this.#
|
|
3028
|
+
${this.#he()}
|
|
3029
3029
|
|
|
3030
3030
|
${this.#de()}
|
|
3031
3031
|
|
|
@@ -3071,7 +3071,7 @@ ${this.#de()}
|
|
|
3071
3071
|
|
|
3072
3072
|
${this.#fe()}
|
|
3073
3073
|
|
|
3074
|
-
${this.#
|
|
3074
|
+
${this.#ae()}
|
|
3075
3075
|
|
|
3076
3076
|
}
|
|
3077
3077
|
`}#Me(){return`@layer utilities {
|
|
@@ -3272,17 +3272,17 @@ ${this.#xe()}
|
|
|
3272
3272
|
${this.#we()}
|
|
3273
3273
|
|
|
3274
3274
|
}
|
|
3275
|
-
`}#
|
|
3275
|
+
`}#Ee(){this.#a={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#Fe()}#Fe(){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}
|
|
3276
3276
|
${this.#e.primitives}
|
|
3277
3277
|
${this.#e.components}
|
|
3278
|
-
${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
|
|
3278
|
+
${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 M<"u"?M:null,enums:typeof g<"u"?g: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[r,a]of Object.entries(e))typeof a=="object"&&a!==null&&t.push({name:r,scale:a});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 r=this.options.design||{};return JSON.stringify(r).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.#c("tokens",this.#e.tokens),"pds-primitives.css.js":this.#c("primitives",this.#e.primitives),"pds-components.css.js":this.#c("components",this.#e.components),"pds-utilities.css.js":this.#c("utilities",this.#e.utilities),"pds-styles.css.js":this.#c("styles",this.layeredCSS)}}#c(t,e){let r=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${t}
|
|
3279
3279
|
// Auto-generated - do not edit directly
|
|
3280
3280
|
|
|
3281
3281
|
export const ${t} = new CSSStyleSheet();
|
|
3282
3282
|
${t}.replaceSync(\`${r}\`);
|
|
3283
3283
|
|
|
3284
3284
|
export const ${t}CSS = \`${r}\`;
|
|
3285
|
-
`}};var X=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let r=new CSSStyleSheet;return r.replaceSync("/* Failed to load "+t+" */"),r}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},K=new X;function Ue(n){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(n),r._pds=!0;let o=(document.adoptedStyleSheets||[]).filter(a=>a._pds!==!0);document.adoptedStyleSheets=[...o,r];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(e):document.documentElement.appendChild(e)}e.textContent=n}catch(t){console.warn("installRuntimeStyles failed:",t)}}function V(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}Ue(e)}async function ge(n,t=[],e=null){try{let r=e?.primitivesStylesheet?e.primitivesStylesheet:await K.getStylesheet("primitives");n.adoptedStyleSheets=[r,...t]}catch(r){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,r),n.adoptedStyleSheets=t}}async function he(n,t=["primitives"],e=[],r=null){try{let a=(await Promise.all(t.map(async i=>{if(r)switch(i){case"tokens":return r.tokensStylesheet;case"primitives":return r.primitivesStylesheet;case"components":return r.componentsStylesheet;case"utilities":return r.utilitiesStylesheet;default:break}return K.getStylesheet(i)}))).filter(i=>i!==null);n.adoptedStyleSheets=[...a,...e]}catch(o){let a=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt layers:`,o),n.adoptedStyleSheets=e}}var He=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function qe(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 Ge(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let t=n.lastElementChild;if(!t)return;let e=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("role","menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"));let o=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let d=n.getBoundingClientRect(),u=Math.max(0,window.innerHeight-d.bottom);return Math.max(0,d.top)>u?"up":"down"},a=()=>{n.dataset.dropdownDirection=o(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},i=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},c=()=>{t.getAttribute("aria-hidden")==="false"?i():a()};e?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),c()}),document.addEventListener("click",s=>{n.contains(s.target)||i()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(i(),e?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&i()})}function _e(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let t=n.querySelector('input[type="checkbox"]');if(!t)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",t.checked?"true":"false");let e=document.createElement("span");e.className="toggle-switch",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true");let r=document.createElement("span");r.className="toggle-knob",e.appendChild(r),n.insertBefore(e,t.nextSibling);let o=()=>{n.setAttribute("aria-checked",t.checked?"true":"false")},a=()=>{t.disabled||(t.checked=!t.checked,o(),t.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),a()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),a())}),t.addEventListener("change",o)}function Ve(n){if(n.dataset.enhancedRange)return;let t=n.closest("label"),e=t?.classList.contains("range-output"),r=n.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${r}-output`;if(n.id=r,e){let a=t.querySelector("span");if(a&&!a.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 c=document.createElement("span");c.textContent=a.textContent,i.appendChild(c);let s=document.createElement("output");s.id=o,s.setAttribute("for",r),s.style.color="var(--surface-text-secondary, var(--color-text-secondary))",s.style.fontSize="0.875rem",s.textContent=n.value,i.appendChild(s),a.textContent="",a.appendChild(i);let d=()=>{s.textContent=n.value};n.addEventListener("input",d)}}else{let a=n.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",n.parentNode?.insertBefore(a,n),a.appendChild(n)),a.style.position="relative";let i=document.createElement("output");i.id=o,i.setAttribute("for",r),i.className="range-bubble",i.setAttribute("aria-live","polite"),a.appendChild(i);let c=()=>{let u=parseFloat(n.min)||0,l=parseFloat(n.max)||100,p=parseFloat(n.value),h=(p-u)/(l-u);i.style.left=`calc(${h*100}% )`,i.textContent=String(p)},s=()=>i.classList.add("visible"),d=()=>i.classList.remove("visible");n.addEventListener("input",c),n.addEventListener("pointerdown",s),n.addEventListener("pointerup",d),n.addEventListener("pointerleave",d),n.addEventListener("focus",s),n.addEventListener("blur",d),c()}n.dataset.enhancedRange="1"}function Qe(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let t=e=>{let r=e.closest("label");if(!r||r.querySelector(".required-asterisk"))return;let o=document.createElement("span");o.classList.add("required-asterisk"),o.textContent="*",o.style.marginLeft="4px",r.querySelector("span").appendChild(o);let a=e.closest("form");if(a&&!a.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",a.insertBefore(i,a.querySelector(".form-actions")||a.lastElementChild)}};n.querySelectorAll("[required]").forEach(e=>{t(e)})}function Ye(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let t=document.createElement("input");t.type="text",t.placeholder="Add item...",t.classList.add("input-text","input-sm"),t.style.width="auto";let e=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(t),t.addEventListener("keydown",r=>{if(r.key==="Enter"||r.key==="Tab"){let o=t.value.trim();if(o){r.preventDefault();let a=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,c=document.createElement("label"),s=document.createElement("span");s.setAttribute("data-label",""),s.textContent=o;let d=document.createElement("input");d.type=a,d.name=e.name||n.getAttribute("data-name")||"open-group",d.value=o,d.id=i,c.appendChild(s),c.appendChild(d),n.insertBefore(c,t),t.value=""}}else if(r.key==="Backspace"&&t.value===""){r.preventDefault();let o=n.querySelectorAll("label");o.length>0&&o[o.length-1].remove()}})}function Ze(n){if(n.dataset.enhancedClip)return;n.dataset.enhancedClip="true",n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.hasAttribute("role")||n.setAttribute("role","button");let t=()=>{let r=n.getAttribute("data-clip-open")==="true";n.setAttribute("aria-expanded",r?"true":"false")},e=()=>{let r=n.getAttribute("data-clip-open")==="true";n.setAttribute("data-clip-open",r?"false":"true"),t()};n.addEventListener("click",r=>{r.defaultPrevented||e()}),n.addEventListener("keydown",r=>{(r.key===" "||r.key==="Enter")&&(r.preventDefault(),e())}),t()}function Je(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(o=>{o.forEach(a=>{if(a.attributeName==="class"){let i=n.classList.contains("btn-working"),c=n.querySelector("pds-icon");if(i)if(c)t||(t=c.getAttribute("icon")),c.setAttribute("icon","circle-notch");else{let s=document.createElement("pds-icon");s.setAttribute("icon","circle-notch"),s.setAttribute("size","sm"),n.insertBefore(s,n.firstChild),e=!0}else a.oldValue?.includes("btn-working")&&c&&(e?(c.remove(),e=!1):t&&(c.setAttribute("icon",t),t=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Xe=new Map([[".accordion",qe],["nav[data-dropdown]",Ge],["label[data-toggle]",_e],['input[type="range"]',Ve],["form[data-required]",Qe],["fieldset[role=group][data-open]",Ye],["[data-clip]",Ze],["button, a[class*='btn-']",Je]]),me=He.map(n=>({...n,run:Xe.get(n.selector)||(()=>{})}));var fe=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3285
|
+
`}};var ne=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let r=new CSSStyleSheet;return r.replaceSync("/* Failed to load "+t+" */"),r}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},ie=new ne;function et(o){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(o),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(n=>n._pds!==!0);document.adoptedStyleSheets=[...a,r];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(e):document.documentElement.appendChild(e)}e.textContent=o}catch(t){console.warn("installRuntimeStyles failed:",t)}}function J(o){let t=o;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}et(e)}async function ze(o,t=[],e=null){try{let r=e?.primitivesStylesheet?e.primitivesStylesheet:await ie.getStylesheet("primitives");o.adoptedStyleSheets=[r,...t]}catch(r){let a=o.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,r),o.adoptedStyleSheets=t}}async function Me(o,t=["primitives"],e=[],r=null){try{let n=(await Promise.all(t.map(async i=>{if(r)switch(i){case"tokens":return r.tokensStylesheet;case"primitives":return r.primitivesStylesheet;case"components":return r.componentsStylesheet;case"utilities":return r.utilitiesStylesheet;default:break}return ie.getStylesheet(i)}))).filter(i=>i!==null);o.adoptedStyleSheets=[...n,...e]}catch(a){let n=o.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${n}> failed to adopt layers:`,a),o.adoptedStyleSheets=e}}var tt=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function rt(o){o.dataset.enhancedAccordion||(o.dataset.enhancedAccordion="true",o.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===o&&o.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function ot(o){if(o.dataset.enhancedDropdown)return;o.dataset.enhancedDropdown="true";let t=o.lastElementChild;if(!t)return;let e=o.querySelector("[data-dropdown-toggle]")||o.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("role","menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"));let a=()=>{let l=(o.getAttribute("data-direction")||o.getAttribute("data-dropdown-direction")||o.getAttribute("data-mode")||"auto").toLowerCase();if(l==="up"||l==="down")return l;let d=o.getBoundingClientRect(),u=t?.getBoundingClientRect?.()||{height:0},p=Math.max(t?.offsetHeight||0,t?.scrollHeight||0,u.height||0,200),m=Math.max(0,window.innerHeight-d.bottom),f=Math.max(0,d.top);return m>=p?"down":f>=p||f>m?"up":"down"},n=()=>{let l=(o.getAttribute("data-align")||o.getAttribute("data-dropdown-align")||"auto").toLowerCase();if(l==="left"||l==="right"||l==="start"||l==="end")return l==="start"?"left":l==="end"?"right":l;let d=o.getBoundingClientRect(),u=t?.getBoundingClientRect?.()||{width:0},p=Math.max(t?.offsetWidth||0,t?.scrollWidth||0,u.width||0,240),m=Math.max(0,window.innerWidth-d.left),f=Math.max(0,d.right);return m>=p?"left":f>=p||f>m?"right":"left"},i=()=>{o.dataset.dropdownDirection=a(),o.dataset.dropdownAlign=n(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},s=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},c=()=>{t.getAttribute("aria-hidden")==="false"?s():i()};e?.addEventListener("click",l=>{l.preventDefault(),l.stopPropagation(),c()}),document.addEventListener("click",l=>{o.contains(l.target)||s()}),o.addEventListener("keydown",l=>{l.key==="Escape"&&(s(),e?.focus())}),o.addEventListener("focusout",l=>{(!l.relatedTarget||!o.contains(l.relatedTarget))&&s()})}function at(o){if(o.dataset.enhancedToggle)return;o.dataset.enhancedToggle="true";let t=o.querySelector('input[type="checkbox"]');if(!t)return;o.hasAttribute("tabindex")||o.setAttribute("tabindex","0"),o.setAttribute("role","switch"),o.setAttribute("aria-checked",t.checked?"true":"false");let e=document.createElement("span");e.className="toggle-switch",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true");let r=document.createElement("span");r.className="toggle-knob",e.appendChild(r),o.insertBefore(e,t.nextSibling);let a=()=>{o.setAttribute("aria-checked",t.checked?"true":"false")},n=()=>{t.disabled||(t.checked=!t.checked,a(),t.dispatchEvent(new Event("change",{bubbles:!0})))};o.addEventListener("click",i=>{i.preventDefault(),n()}),o.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),n())}),t.addEventListener("change",a)}function nt(o){if(o.dataset.enhancedRange)return;let t=o.closest("label"),e=t?.classList.contains("range-output"),r=o.id||`range-${Math.random().toString(36).substring(2,11)}`,a=`${r}-output`;if(o.id=r,e){let n=t.querySelector("span");if(n&&!n.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=n.textContent,i.appendChild(s);let c=document.createElement("output");c.id=a,c.setAttribute("for",r),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=o.value,i.appendChild(c),n.textContent="",n.appendChild(i);let l=()=>{c.textContent=o.value};o.addEventListener("input",l)}}else{let n=o.closest(".range-container");n||(n=document.createElement("div"),n.className="range-container",o.parentNode?.insertBefore(n,o),n.appendChild(o)),n.style.position="relative";let i=document.createElement("output");i.id=a,i.setAttribute("for",r),i.className="range-bubble",i.setAttribute("aria-live","polite"),n.appendChild(i);let s=()=>{let d=parseFloat(o.min)||0,u=parseFloat(o.max)||100,p=parseFloat(o.value),m=(p-d)/(u-d);i.style.left=`calc(${m*100}% )`,i.textContent=String(p)},c=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");o.addEventListener("input",s),o.addEventListener("pointerdown",c),o.addEventListener("pointerup",l),o.addEventListener("pointerleave",l),o.addEventListener("focus",c),o.addEventListener("blur",l),s()}o.dataset.enhancedRange="1"}function it(o){if(o.dataset.enhancedRequired)return;o.dataset.enhancedRequired="true";let t=e=>{let r;if(e.closest("[role$=group]")?r=e.closest("[role$=group]").querySelector("legend"):r=e.closest("label"),!r||r.querySelector(".required-asterisk"))return;let a=document.createElement("span");a.classList.add("required-asterisk"),a.textContent="*",a.style.marginLeft="4px";let n=r.querySelector("span, [data-label]");if(n)n.appendChild(a);else{let s=r.querySelector("input, select, textarea");s?r.insertBefore(a,s):r.appendChild(a)}let i=e.closest("form");if(i&&!i.querySelector(".required-legend")){let s=document.createElement("small");s.classList.add("required-legend"),s.textContent="* Required fields",i.insertBefore(s,i.querySelector(".form-actions")||i.lastElementChild)}};o.querySelectorAll("[required]").forEach(e=>{t(e)})}function st(o){if(o.dataset.enhancedOpenGroup)return;o.dataset.enhancedOpenGroup="true",o.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=o.querySelector('input[type="radio"], input[type="checkbox"]');o.appendChild(t),t.addEventListener("keydown",r=>{if(r.key==="Enter"||r.key==="Tab"){let a=t.value.trim();if(a){r.preventDefault();let n=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=a;let l=document.createElement("input");l.type=n,l.name=e.name||o.getAttribute("data-name")||"open-group",l.value=a,l.id=i,s.appendChild(c),s.appendChild(l),o.insertBefore(s,t),t.value=""}}else if(r.key==="Backspace"&&t.value===""){r.preventDefault();let a=o.querySelectorAll("label");a.length>0&&a[a.length-1].remove()}})}function ct(o){if(o.dataset.enhancedClip)return;o.dataset.enhancedClip="true",o.hasAttribute("tabindex")||o.setAttribute("tabindex","0"),o.hasAttribute("role")||o.setAttribute("role","button");let t=()=>{let r=o.getAttribute("data-clip-open")==="true";o.setAttribute("aria-expanded",r?"true":"false")},e=()=>{let r=o.getAttribute("data-clip-open")==="true";o.setAttribute("data-clip-open",r?"false":"true"),t()};o.addEventListener("click",r=>{r.defaultPrevented||e()}),o.addEventListener("keydown",r=>{(r.key===" "||r.key==="Enter")&&(r.preventDefault(),e())}),t()}function lt(o){if(o.dataset.enhancedBtnWorking)return;o.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(a=>{a.forEach(n=>{if(n.attributeName==="class"){let i=o.classList.contains("btn-working"),s=o.querySelector("pds-icon");if(i)if(s)t||(t=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),o.insertBefore(c,o.firstChild),e=!0}else n.oldValue?.includes("btn-working")&&s&&(e?(s.remove(),e=!1):t&&(s.setAttribute("icon",t),t=null))}})}).observe(o,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var dt=new Map([[".accordion",rt],["nav[data-dropdown]",ot],["label[data-toggle]",at],['input[type="range"]',nt],["form[data-required]",it],["fieldset[role=group][data-open]",st],["[data-clip]",ct],["button, a[class*='btn-']",lt]]),Ee=tt.map(o=>({...o,run:dt.get(o.selector)||(()=>{})}));var Fe=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3286
3286
|
<div class="accordion">
|
|
3287
3287
|
<details>
|
|
3288
3288
|
<summary>Section 1</summary>
|
|
@@ -3345,10 +3345,10 @@ export const ${t}CSS = \`${r}\`;
|
|
|
3345
3345
|
<button class="btn-primary btn-working">
|
|
3346
3346
|
<span>Saving</span>
|
|
3347
3347
|
</button>
|
|
3348
|
-
`.trim()}];var
|
|
3349
|
-
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${
|
|
3350
|
-
`);if(w){let
|
|
3348
|
+
`.trim()}];var Te="pds",pt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,Ce=/^[a-z]:/i;function I(o=""){return o.endsWith("/")?o:`${o}/`}function ut(o="",t=Te){let e=o.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function gt(o){return o.replace(/^\.\/+/,"")}function mt(o){return Ce.test(o)?o.replace(Ce,"").replace(/^\/+/,""):o}function ht(o){return o.startsWith("public/")?o.substring(7):o}function Le(o,t={}){let e=t.segment||Te,r=t.defaultRoot||`/assets/${e}/`,a=o?.public&&o.public?.root||o?.static&&o.static?.root||null;if(!a||typeof a!="string")return I(r);let n=a.trim();return n?(n=n.replace(/\\/g,"/"),n=ut(n,e),n=I(n),pt.test(n)?n:(n=gt(n),n=mt(n),n.startsWith("/")||(n=ht(n),n.startsWith("/")||(n=`/${n}`),n=n.replace(/\/+/g,(i,s)=>s===0?i:"/")),I(n))):I(r)}function Ae(o){let t=o.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(t.toLowerCase()))return!0;let a=document.createElement("canvas").getContext("2d");if(!a)return!1;let n="mmmmmmmmmmlli",i="72px",s="monospace";a.font=`${i} ${s}`;let c=a.measureText(n).width;a.font=`${i} "${t}", ${s}`;let l=a.measureText(n).width;return c!==l}function ft(o){return o?o.split(",").map(r=>r.trim())[0].replace(/['"]/g,"").trim():null}async function bt(o,t={}){if(!o)return Promise.resolve();let{weights:e=[400,500,600,700],italic:r=!1}=t,a=ft(o);if(!a||Ae(a))return Promise.resolve();let n=encodeURIComponent(a);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${n}"]`)?(console.log(`Font "${a}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${a}" from Google Fonts...`),new Promise((s,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=r?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${n}:${d}&display=swap`,l.setAttribute("data-font-loader",a),l.onload=()=>{console.log(`Successfully loaded font "${a}"`),s()},l.onerror=()=>{console.warn(`Failed to load font "${a}" from Google Fonts`),c(new Error(`Failed to load font: ${a}`))},document.head.appendChild(l),setTimeout(()=>{Ae(a)||console.warn(`Font "${a}" did not load within timeout`),s()},5e3)}))}async function se(o){if(!o)return Promise.resolve();let t=new Set;o.fontFamilyHeadings&&t.add(o.fontFamilyHeadings),o.fontFamilyBody&&t.add(o.fontFamilyBody),o.fontFamilyMono&&t.add(o.fontFamilyMono);let e=Array.from(t).map(r=>bt(r).catch(a=>{console.warn(`Could not load font: ${r}`,a)}));await Promise.all(e)}var vt=/^[a-z][a-z0-9+\-.]*:\/\//i,H=(()=>{try{return import.meta.url}catch{return}})(),Y=o=>typeof o=="string"&&o.length&&!o.endsWith("/")?`${o}/`:o;function Q(o,t={}){if(!o||vt.test(o))return o;let{preferModule:e=!0}=t,r=()=>{if(!H)return null;try{return new URL(o,H).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(o,window.location.origin).href}catch{return null}};return(e?r()||a():a()||r())||o}var je=(()=>{if(H)try{let o=new URL(H);if(/\/public\/assets\/js\//.test(o.pathname))return new URL("../pds/",H).href}catch{return}})(),Be=!1;function Ne(o){Be||typeof document>"u"||(Be=!0,o.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&document.documentElement.classList.add(`pds-${e}`,"pds-ready")}))}function de(o={},t={}){if(!t||typeof t!="object")return o;let e=Array.isArray(o)?[...o]:{...o};for(let[r,a]of Object.entries(t))a&&typeof a=="object"&&!Array.isArray(a)?e[r]=de(e[r]&&typeof e[r]=="object"?e[r]:{},a):e[r]=a;return e}function le(o=""){return String(o).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function B(o){if(o==null)return o;if(typeof o=="function")return;if(typeof o!="object")return o;if(Array.isArray(o))return o.map(e=>B(e)).filter(e=>e!==void 0);let t={};for(let e in o)if(o.hasOwnProperty(e)){let r=o[e];if(typeof r!="function"){let a=B(r);a!==void 0&&(t[e]=a)}}return t}function pe(o={},t={},{presets:e,defaultLog:r}){let a=o&&typeof o.log=="function"?o.log:r,n=typeof o=="object"&&("colors"in o||"typography"in o||"spatialRhythm"in o||"shape"in o||"behavior"in o||"layout"in o||"advanced"in o||"a11y"in o||"components"in o||"icons"in o),i=o&&o.enhancers;i&&!Array.isArray(i)&&(i=Object.values(i));let s=i??t.enhancers??[],c=o&&o.preset,l=o&&o.design,d=o&&o.icons&&typeof o.icons=="object"?o.icons:null,u="preset"in(o||{})||"design"in(o||{})||"enhancers"in(o||{});o&&typeof o=="object"&&ke(o,{log:a,context:"PDS.start"});let p,m=null;if(u){l&&typeof l=="object"&&re(l,{log:a,context:"PDS.start"});let f=String(c||"default").toLowerCase(),b=e?.[f]||Object.values(e||{}).find(v=>le(v.name)===f||String(v.name||"").toLowerCase()===f);if(!b)throw new Error(`PDS preset not found: "${c||"default"}"`);m={id:b.id||le(b.name),name:b.name||b.id||String(f)};let h=structuredClone(b);if(l&&typeof l=="object"||d){let v=l?B(l):{},x=d?B(d):null,C=x?de(v,{icons:x}):v;h=de(h,structuredClone(C))}let{mode:w,autoDefine:z,applyGlobalStyles:S,manageTheme:L,themeStorageKey:R,preloadStyles:F,criticalLayers:A,managerURL:k,manager:$,preset:E,design:W,enhancers:K,log:q,...y}=o;p={...y,design:h,preset:m.name,log:q||r}}else if(n){re(o,{log:a,context:"PDS.start"});let{log:f,...b}=o;p={design:structuredClone(b),log:f||r}}else{let f=e?.default||Object.values(e||{}).find(b=>le(b.name)==="default");if(!f)throw new Error("PDS default preset not available");m={id:f.id||"default",name:f.name||"Default"},p={design:structuredClone(f),preset:m.name,log:r}}return{generatorConfig:p,enhancers:s,presetInfo:m}}function Oe({manageTheme:o,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:r}){let a="light",n=null;if(o&&typeof window<"u"){try{n=localStorage.getItem(t)||null}catch{n=null}try{e?.(n),r?.(n)}catch{}n?n==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=n:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:n}}function Pe(o,{resolvePublicAssetURL:t}){let e=!!(o?.public?.root||o?.static?.root),r=t(o);return!e&&je&&(r=je),Y(Q(r))}async function De(o,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:r=[],autoDefineMapper:a=null,enhancers:n=[],autoDefineOverrides:i=null,autoDefinePreferModule:s=!0}=o,c=(()=>{let d=new Map;return(t||[]).forEach(u=>d.set(u.selector,u)),(n||[]).forEach(u=>d.set(u.selector,u)),Array.from(d.values())})(),l=null;if(typeof window<"u"&&typeof document<"u"){let d=null;try{let h=await Promise.resolve().then(()=>(We(),Re));d=h?.AutoDefiner||h?.default?.AutoDefiner||h?.default||null}catch(h){console.warn("AutoDefiner not available:",h?.message||h)}let u=h=>{switch(h){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${h}.js`}},{mapper:p,...m}=i&&typeof i=="object"?i:{},b={baseURL:e&&Y(Q(e,{preferModule:s})),predefine:r,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:c,onError:(h,w)=>{if(typeof h=="string"&&h.startsWith("pds-")){let S=["pds-form","pds-drawer"].includes(h),L=w?.message?.includes("#pds/lit")||w?.message?.includes("Failed to resolve module specifier");S&&L?console.error(`\u274C PDS component <${h}> requires Lit but #pds/lit is not in import map.
|
|
3349
|
+
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${h}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${h}>:`,w)},...m,mapper:h=>{if(customElements.get(h))return null;if(typeof a=="function")try{let w=a(h);return w===void 0?u(h):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),u(h)}return u(h)}};d&&(l=new d(b),r.length>0&&typeof d.define=="function"&&await d.define(...r,{baseURL:e,mapper:b.mapper,onError:b.onError}))}return{autoDefiner:l,mergedEnhancers:c}}var ue=["light","dark"],ge=new Set(ue);function xt(o){let e=(Array.isArray(o?.themes)?o.themes.map(r=>String(r).toLowerCase()):ue).filter(r=>ge.has(r));return e.length?e:ue}function me(o,{preferDocument:t=!0}={}){let e=String(o||"").toLowerCase();if(ge.has(e))return e;if(t&&typeof document<"u"){let r=document.documentElement?.getAttribute("data-theme");if(ge.has(r))return r}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function he(o,t){let e=me(t);return xt(o).includes(e)}var _e=!1,_=null;function St(){if(typeof window>"u"||!window.localStorage)return null;try{let o=window.localStorage.getItem("pure-ds-config");if(!o)return null;let t=JSON.parse(o);if(t&&("preset"in t||"design"in t))return t}catch{return null}return null}function ve(o={},t={}){if(!t||typeof t!="object")return o;let e=Array.isArray(o)?[...o]:{...o};for(let[r,a]of Object.entries(t))a&&typeof a=="object"&&!Array.isArray(a)?e[r]=ve(e[r]&&typeof e[r]=="object"?e[r]:{},a):e[r]=a;return e}function $t(o){let t=St();if(!t||!o||typeof o!="object")return o;let e=t.preset,r=t.design&&typeof t.design=="object"?t.design:null;if(!e&&!r)return o;let a="preset"in o||"design"in o||"enhancers"in o,n={...o};if(e&&(n.preset=e),r)if(a){let i=o.design&&typeof o.design=="object"?o.design:{};n.design=ve(i,r)}else n=ve(o,r);return n}async function zt(o,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(_e)return;let[r,a,n,i]=await Promise.all([Promise.resolve().then(()=>(ae(),$e)),Promise.resolve().then(()=>(G(),xe)),Promise.resolve().then(()=>(ye(),be)),Promise.resolve().then(()=>(He(),Ie))]),s=r?.default||r?.ontology,c=r?.findComponentForElement,l=a?.enums;_=n?.PDSQuery||n?.default||null,o.ontology=s,o.findComponentForElement=c,o.enums=l,o.common=i||{},o.presets=P,o.configRelations=we,o.enhancerMetadata=Fe,o.applyStyles=function(d){return J(d||T.instance)},o.adoptLayers=function(d,u,p){return Me(d,u,p,T.instance)},o.adoptPrimitives=function(d,u){return ze(d,u,T.instance)},o.getGenerator=async function(){return T},o.query=async function(d){if(!_){let p=await Promise.resolve().then(()=>(ye(),be));_=p?.PDSQuery||p?.default||null}return _?await new _(o).search(d):[]},o.applyLivePreset=async function(d,u={}){if(!d)return!1;if(!o.registry?.isLive)return console.warn("PDS.applyLivePreset is only available in live mode."),!1;let p=o.currentConfig||{},{design:m,preset:f,...b}=p,h={...structuredClone(B(b)),preset:d},w=pe(h,{},{presets:P,defaultLog:oe}),z=me(o.theme);if(!he(w.generatorConfig.design,z)){let F=w.presetInfo?.name||w.generatorConfig?.design?.name||d;console.warn(`PDS theme "${z}" not supported by preset "${F}".`)}p.theme&&!w.generatorConfig.theme&&(w.generatorConfig.theme=p.theme);let S=new T(w.generatorConfig);if(w.generatorConfig.design?.typography)try{await se(w.generatorConfig.design.typography)}catch(F){w.generatorConfig?.log?.("warn","Failed to load some fonts from Google Fonts:",F)}await J(S);let L=w.presetInfo||{id:d,name:d};if(o.currentPreset=L,o.currentConfig=Object.freeze({...p,preset:w.generatorConfig.preset,design:structuredClone(w.generatorConfig.design),theme:w.generatorConfig.theme||p.theme}),u?.persist!==!1&&typeof window<"u"){let F="pure-ds-config";try{let A=localStorage.getItem(F),k=A?JSON.parse(A):null,$={...k&&typeof k=="object"?k:{},preset:L.id||d,design:structuredClone(w.generatorConfig.design||{})};localStorage.setItem(F,JSON.stringify($))}catch(A){w.generatorConfig?.log?.("warn","Failed to store preset:",A)}}return!0},Object.getOwnPropertyDescriptor(o,"compiled")||Object.defineProperty(o,"compiled",{get(){return o.registry?.isLive&&T.instance?T.instance.compiled:null},enumerable:!0,configurable:!1}),o.preloadCritical=function(d,u={}){if(typeof window>"u"||!document.head||!d)return;let{theme:p,layers:m=["tokens"]}=u;try{let f=p||"light";(p==="system"||!p)&&(f=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",f);let b=d.design?{...d,theme:f}:{design:d,theme:f},h=new T(b),w=m.map(z=>{try{return h.css?.[z]||""}catch{return""}}).filter(z=>z.trim()).join(`
|
|
3350
|
+
`);if(w){let z=document.head.querySelector("style[data-pds-preload]");z&&z.remove();let S=document.createElement("style");S.setAttribute("data-pds-preload",""),S.textContent=w,document.head.insertBefore(S,document.head.firstChild)}}catch(f){console.warn("PDS preload failed:",f)}},_e=!0}async function Mt(o,t,{emitReady:e,applyResolvedTheme:r,setupSystemListenerIfNeeded:a}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(t=$t(t),await zt(o,{applyResolvedTheme:r,setupSystemListenerIfNeeded:a}),Ne(o),typeof document<"u"&&document.adoptedStyleSheets){let u=`
|
|
3351
3351
|
html { opacity: 0; }
|
|
3352
3352
|
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3353
|
-
`;try{if(!document.adoptedStyleSheets.some(m=>m._pdsFouc)){let m=new CSSStyleSheet;m.replaceSync(
|
|
3354
|
-
`);if(k){let
|
|
3353
|
+
`;try{if(!document.adoptedStyleSheets.some(m=>m._pdsFouc)){let m=new CSSStyleSheet;m.replaceSync(u),m._pdsFouc=!0,document.adoptedStyleSheets=[m,...document.adoptedStyleSheets]}}catch(p){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",p),!document.head.querySelector("style[data-pds-fouc]")){let f=document.createElement("style");f.setAttribute("data-pds-fouc",""),f.textContent=u,document.head.insertBefore(f,document.head.firstChild)}}}let n=t.applyGlobalStyles??!0,i=t.manageTheme??!0,s=t.themeStorageKey??"pure-ds-theme",c=t.preloadStyles??!1,l=t.criticalLayers??["tokens","primitives"],d=t&&t.autoDefine||null;try{let{resolvedTheme:u}=Oe({manageTheme:i,themeStorageKey:s,applyResolvedTheme:r,setupSystemListenerIfNeeded:a}),p=pe(t,{},{presets:P,defaultLog:oe});if(i&&!he(p.generatorConfig.design,u)){let k=p.presetInfo?.name||p.generatorConfig?.design?.name||p.generatorConfig?.preset||"current preset";console.warn(`PDS theme "${u}" not supported by preset "${k}".`)}let m=p.enhancers,{log:f,...b}=p.generatorConfig,h=structuredClone(b);h.log=f,i&&(h.theme=u);let w=new T(h);if(h.design?.typography)try{await se(h.design.typography)}catch(k){h?.log?.("warn","Failed to load some fonts from Google Fonts:",k)}if(c&&typeof window<"u"&&document.head)try{let k=l.map($=>{try{return w.css?.[$]||""}catch(E){return h?.log?.("warn",`Failed to generate critical CSS for layer "${$}":`,E),""}}).filter($=>$.trim()).join(`
|
|
3354
|
+
`);if(k){let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let E=document.createElement("style");E.setAttribute("data-pds-critical",""),E.textContent=k;let W=document.head.querySelector('meta[charset], meta[name="viewport"]');W?W.parentNode.insertBefore(E,W.nextSibling):document.head.insertBefore(E,document.head.firstChild)}}catch(k){h?.log?.("warn","Failed to preload critical styles:",k)}o.registry.setLiveMode(),p.presetInfo?.name?h?.log?.("log",`PDS live with preset "${p.presetInfo.name}"`):h?.log?.("log","PDS live with custom config"),n&&(await J(T.instance),typeof window<"u"&&setTimeout(()=>{let k=document.head.querySelector("style[data-pds-critical]");k&&k.remove();let $=document.head.querySelector("style[data-pds-preload]");$&&$.remove();let E=document.getElementById("pds-runtime-stylesheet");E&&E.remove()},100));let z=Pe(t,{resolvePublicAssetURL:Le}),S;d&&d.baseURL?S=Y(Q(d.baseURL,{preferModule:!1})):S=`${z}components/`;let L=null,R=[];try{let k=await De({autoDefineBaseURL:S,autoDefinePreload:d&&Array.isArray(d.predefine)&&d.predefine||[],autoDefineMapper:d&&typeof d.mapper=="function"&&d.mapper||null,enhancers:m,autoDefineOverrides:d||null,autoDefinePreferModule:!(d&&d.baseURL)},{baseEnhancers:Ee});L=k.autoDefiner,R=k.mergedEnhancers||[]}catch(k){h?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",k)}let F=w?.options||h,A=B(t);if(o.currentConfig=Object.freeze({mode:"live",...structuredClone(A),design:structuredClone(p.generatorConfig.design),preset:p.generatorConfig.preset,theme:u,enhancers:R}),t?.liveEdit&&typeof document<"u")try{document.querySelector("pds-live-edit")||setTimeout(()=>{let k=document.createElement("pds-live-edit");document.body.appendChild(k)},1e3)}catch(k){h?.log?.("warn","Live editor failed to start:",k)}return e({mode:"live",generator:w,config:F,theme:u,autoDefiner:L}),{generator:w,config:F,theme:u,autoDefiner:L}}catch(u){throw o.dispatchEvent(new CustomEvent("pds:error",{detail:{error:u}})),u}}export{Mt as startLive};
|