@pure-ds/core 0.4.37 → 0.5.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/pds.d.ts +32 -11
- package/dist/types/public/assets/auto-definer-XWHRBQPU.d.ts +9 -0
- package/dist/types/public/assets/auto-definer-XWHRBQPU.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-746HIXIK.d.ts +52 -0
- package/dist/types/public/assets/chunk-746HIXIK.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-APJV5T3J.d.ts +106 -0
- package/dist/types/public/assets/chunk-APJV5T3J.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-BEPKFFM7.d.ts +398 -0
- package/dist/types/public/assets/chunk-BEPKFFM7.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-ISS7UH5H.d.ts +2424 -0
- package/dist/types/public/assets/chunk-ISS7UH5H.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-RUPLQUDG.d.ts +582 -0
- package/dist/types/public/assets/chunk-RUPLQUDG.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-USML4NYF.d.ts +18 -0
- package/dist/types/public/assets/chunk-USML4NYF.d.ts.map +1 -0
- package/dist/types/public/assets/chunk-Z47A3HLT.d.ts +3 -0
- package/dist/types/public/assets/chunk-Z47A3HLT.d.ts.map +1 -0
- package/dist/types/public/assets/js/auto-definer-HZLD2XF4.d.ts +9 -0
- package/dist/types/public/assets/js/auto-definer-HZLD2XF4.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-6A6DFAIG.d.ts +88 -0
- package/dist/types/public/assets/js/chunk-6A6DFAIG.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-746HIXIK.d.ts +52 -0
- package/dist/types/public/assets/js/chunk-746HIXIK.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-A3TZGIYX.d.ts +4 -0
- package/dist/types/public/assets/js/chunk-A3TZGIYX.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-BEPKFFM7.d.ts +398 -0
- package/dist/types/public/assets/js/chunk-BEPKFFM7.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-OTTRJ5MB.d.ts +1695 -0
- package/dist/types/public/assets/js/chunk-OTTRJ5MB.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-RBPKHG76.d.ts +747 -0
- package/dist/types/public/assets/js/chunk-RBPKHG76.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-RUPLQUDG.d.ts +582 -0
- package/dist/types/public/assets/js/chunk-RUPLQUDG.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-SMD2R3CX.d.ts +68 -0
- package/dist/types/public/assets/js/chunk-SMD2R3CX.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunk-Y73DA2D5.d.ts +15 -0
- package/dist/types/public/assets/js/chunk-Y73DA2D5.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/auto-definer-X7MSXKTU.d.ts +9 -0
- package/dist/types/public/assets/js/chunks/auto-definer-X7MSXKTU.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/chunk-7BDQH5CT.d.ts +485 -0
- package/dist/types/public/assets/js/chunks/chunk-7BDQH5CT.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/chunk-MWB3S7NG.d.ts +3 -0
- package/dist/types/public/assets/js/chunks/chunk-MWB3S7NG.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/chunk-WIMLORAU.d.ts +5 -0
- package/dist/types/public/assets/js/chunks/chunk-WIMLORAU.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/chunk-WN4Y2ELN.d.ts +833 -0
- package/dist/types/public/assets/js/chunks/chunk-WN4Y2ELN.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/chunk-XQOUIBLO.d.ts +1687 -0
- package/dist/types/public/assets/js/chunks/chunk-XQOUIBLO.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/font-loader-VN5SRNOD.d.ts +5 -0
- package/dist/types/public/assets/js/chunks/font-loader-VN5SRNOD.d.ts.map +1 -0
- package/dist/types/public/assets/js/chunks/pds-live-validation-BQPWN5JG.d.ts +38 -0
- package/dist/types/public/assets/js/chunks/pds-live-validation-BQPWN5JG.d.ts.map +1 -0
- package/dist/types/public/assets/js/common-WIAC4WAJ.d.ts +4 -0
- package/dist/types/public/assets/js/common-WIAC4WAJ.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-config-WEBAXXSM.d.ts +4 -0
- package/dist/types/public/assets/js/pds-config-WEBAXXSM.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-core/pds-generator.d.ts +700 -0
- package/dist/types/public/assets/js/pds-core/pds-generator.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-core/pds-utilities.d.ts +27 -0
- package/dist/types/public/assets/js/pds-core/pds-utilities.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-enums-DCBZHS64.d.ts +3 -0
- package/dist/types/public/assets/js/pds-enums-DCBZHS64.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-gen.d.ts +106 -0
- package/dist/types/public/assets/js/pds-gen.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-live.d.ts +11 -0
- package/dist/types/public/assets/js/pds-live.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-manager.d.ts +1328 -0
- package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-ontology-2DICJXHO.d.ts +9 -0
- package/dist/types/public/assets/js/pds-ontology-2DICJXHO.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds-query-B54LBKKR.d.ts +70 -0
- package/dist/types/public/assets/js/pds-query-B54LBKKR.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds.d.ts +2 -18
- package/dist/types/public/assets/js/pds.d.ts.map +1 -1
- package/dist/types/public/assets/pds-ontology-ZO6TJHO3.d.ts +9 -0
- package/dist/types/public/assets/pds-ontology-ZO6TJHO3.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-config.d.ts +757 -0
- package/dist/types/src/js/common/pds-core/pds-config.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-enhancers.d.ts +28 -0
- package/dist/types/src/js/common/pds-core/pds-enhancers.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-enums.d.ts +87 -0
- package/dist/types/src/js/common/pds-core/pds-enums.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-generator.d.ts +700 -0
- package/dist/types/src/js/common/pds-core/pds-generator.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-ontology.d.ts +380 -0
- package/dist/types/src/js/common/pds-core/pds-ontology.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-paths.d.ts +37 -0
- package/dist/types/src/js/common/pds-core/pds-paths.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-query.d.ts +102 -0
- package/dist/types/src/js/common/pds-core/pds-query.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-registry.d.ts +35 -0
- package/dist/types/src/js/common/pds-core/pds-registry.d.ts.map +1 -0
- package/dist/types/src/js/common/pds-core/pds-utilities.d.ts +27 -0
- package/dist/types/src/js/common/pds-core/pds-utilities.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-generator.d.ts +38 -46
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
- package/dist/types/src/js/pds-core/pds-live.d.ts +39 -0
- package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-runtime.d.ts +39 -0
- package/dist/types/src/js/pds-core/pds-runtime.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts +60 -0
- package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-utilities.d.ts +27 -0
- package/dist/types/src/js/pds-core/pds-utilities.d.ts.map +1 -0
- package/dist/types/src/js/pds-gen.d.ts +48 -0
- package/dist/types/src/js/pds-gen.d.ts.map +1 -0
- package/dist/types/src/js/pds-live-runtime.d.ts +7 -0
- package/dist/types/src/js/pds-live-runtime.d.ts.map +1 -0
- package/dist/types/src/js/pds-live-validation.d.ts +44 -0
- package/dist/types/src/js/pds-live-validation.d.ts.map +1 -0
- package/dist/types/src/js/pds-live.d.ts +11 -0
- package/dist/types/src/js/pds-live.d.ts.map +1 -0
- package/dist/types/src/js/pds-manager.d.ts +2 -0
- package/dist/types/src/js/pds-manager.d.ts.map +1 -0
- package/dist/types/src/js/pds.d.ts +6 -33
- package/dist/types/src/js/pds.d.ts.map +1 -1
- package/package.json +11 -12
- package/packages/pds-cli/bin/{generate-css-data.mjs → generate-css-data.js} +563 -563
- package/packages/pds-cli/bin/{generate-manifest.mjs → generate-manifest.js} +352 -352
- package/packages/pds-cli/bin/{pds-build-icons.mjs → pds-build-icons.js} +152 -152
- package/packages/pds-cli/bin/{pds-dx.mjs → pds-dx.js} +114 -114
- package/packages/pds-cli/bin/{pds-init-config.mjs → pds-init-config.js} +34 -34
- package/packages/pds-cli/bin/{pds-setup-copilot.mjs → pds-setup-copilot.js} +106 -106
- package/packages/pds-cli/bin/{pds-static.mjs → pds-static.js} +581 -581
- package/packages/pds-cli/bin/{pds.mjs → pds.js} +127 -127
- package/packages/pds-cli/bin/postinstall.mjs +522 -563
- package/packages/pds-cli/bin/{sync-assets.mjs → sync-assets.js} +251 -251
- package/packages/pds-cli/lib/{asset-roots.mjs → asset-roots.js} +47 -47
- package/packages/pds-cli/lib/{fs-writer.mjs → fs-writer.js} +75 -75
- package/public/assets/js/app.js +95 -118
- package/public/assets/js/pds-manager.js +3251 -0
- package/public/assets/js/pds.js +10 -3201
- package/readme.md +2014 -2016
- package/src/js/pds-core/pds-enhancers.js +518 -518
- package/src/js/pds-core/pds-enums.js +86 -86
- package/src/js/pds-core/pds-generator.js +255 -185
- package/src/js/pds-core/pds-live.js +434 -0
- package/src/js/pds-core/pds-paths.js +109 -109
- package/src/js/pds-core/pds-registry.js +79 -79
- package/src/js/pds-core/pds-runtime.js +184 -0
- package/src/js/pds-core/pds-start-helpers.js +404 -0
- package/src/js/pds.d.ts +32 -11
- package/src/js/pds.js +37 -1182
- package/getting-started.md +0 -626
- package/src/js/pds-core/pds.d.ts +0 -129
|
@@ -0,0 +1,3251 @@
|
|
|
1
|
+
var Te=Object.defineProperty;var D=(n,t)=>()=>(n&&(t=n(n=0)),t);var N=(n,t)=>{for(var e in t)Te(n,e,{get:t[e],enumerable:!0})};var ne={};N(ne,{enums:()=>u});var u,q=D(()=>{u={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"}}});var ce={};N(ce,{default:()=>je,findComponentForElement:()=>Le,getAllSelectors:()=>Re,getAllTags:()=>Be,getByCategory:()=>We,ontology:()=>z,searchOntology:()=>Ae});function A(n,t){if(!n||!t)return!1;try{return n.matches(t)}catch{return!1}}function se(n,t){if(!n||!t||!n.closest)return null;try{return n.closest(t)}catch{return null}}function Le(n,{maxDepth:t=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let e=n,a=0;for(;e&&a<t;){if(a++,e.tagName==="DS-SHOWCASE")return null;if(e.classList&&e.classList.contains("showcase-section")){e=e.parentElement;continue}for(let o of PDS.ontology.enhancements){let i=o.selector||o;if(A(e,i))return{element:e,componentType:"enhanced-component",displayName:o.description||i,id:o.id}}if(e.tagName==="FIELDSET"){let o=e.getAttribute("role");if(o==="group"||o==="radiogroup")return{element:e,componentType:"form-group",displayName:o==="radiogroup"?"radio group":"form group"}}if(e.tagName==="LABEL"&&e.querySelector&&e.querySelector("input,select,textarea"))return{element:e,componentType:"form-control",displayName:"label with input"};let r=e.closest?e.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let o of PDS.ontology.primitives){for(let i of o.selectors||[]){let 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(g=>g.startsWith(d)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let s=e.parentElement,p=0;for(;s&&p<t;){if(s.classList&&Array.from(s.classList).some(g=>g.startsWith(d))&&s.tagName!=="DS-SHOWCASE")return{element:s,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};s=s.parentElement,p++}continue}continue}if(A(e,c))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,c);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.classList){let i=Array.from(e.classList);for(let c of o.selectors||[])if(typeof c=="string"&&c.includes("*")&&c.startsWith(".")){let l=c.slice(1).replace(/\*/g,"");if(i.some(d=>d.startsWith(l)))return{element:e,componentType:"pds-primitive",displayName:o.name||o.id,id:o.id,tags:o.tags}}}}for(let o of PDS.ontology.layoutPatterns||[])for(let i of o.selectors||[]){let 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(s=>s.startsWith(d)))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}continue}if(A(e,c))return{element:e,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags};let l=se(e,c);if(l&&l.tagName!=="DS-SHOWCASE")return{element:l,componentType:"layout-pattern",displayName:o.name||o.id,id:o.id,tags:o.tags}}if(e.tagName&&e.tagName.includes("-")){let o=e.tagName.toLowerCase(),i=PDS.ontology.components.find(c=>c.selectors.includes(o));return{element:e,componentType:"web-component",displayName:i?.name||o,id:i?.id||o,tags:i?.tags}}if(e.tagName==="BUTTON"){let o=e.querySelector&&e.querySelector("pds-icon");return{element:e,componentType:"button",displayName:o?"button with icon":"button",id:"button"}}if(A(e,"pds-icon")||e.closest&&e.closest("pds-icon")){let o=A(e,"pds-icon")?e:e.closest("pds-icon");return{element:o,componentType:"icon",displayName:`pds-icon (${o.getAttribute&&o.getAttribute("icon")||"unknown"})`,id:"pds-icon"}}if(A(e,"nav[data-dropdown]")||e.closest&&e.closest("nav[data-dropdown]"))return{element:A(e,"nav[data-dropdown]")?e:e.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu",id:"dropdown"};e=e.parentElement}return null}function Re(){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 Ae(n,t={}){let e=n.toLowerCase(),a=[],r=(o,i)=>{for(let c of o)(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)))&&a.push({...c,type:i})};return(!t.type||t.type==="primitive")&&r(z.primitives,"primitive"),(!t.type||t.type==="component")&&r(z.components,"component"),(!t.type||t.type==="layout")&&r(z.layoutPatterns,"layout"),(!t.type||t.type==="enhancement")&&r(z.enhancements,"enhancement"),a}function We(n){let t=n.toLowerCase();return{primitives:z.primitives.filter(e=>e.category===t),components:z.components.filter(e=>e.category===t),layouts:z.layoutPatterns.filter(e=>e.category===t)}}function Be(){let n=new Set;return z.primitives.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.components.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.layoutPatterns.forEach(t=>t.tags?.forEach(e=>n.add(e))),z.enhancements.forEach(t=>t.tags?.forEach(e=>n.add(e))),Array.from(n).sort()}var z,je,Z=D(()=>{z={meta:{name:"Pure Design System Ontology",version:"1.0.0",description:"Complete metadata registry for PDS primitives, components, utilities, and tokens"},tokens:{colors:{semantic:["primary","secondary","accent","success","warning","danger","info"],neutral:["gray"],shades:[50,100,200,300,400,500,600,700,800,900,950],surface:["base","subtle","elevated","sunken","overlay","inverse","translucent"],text:["default","muted","subtle","inverse","primary","success","warning","danger","info"]},spacing:{scale:["1","2","3","4","5","6","8","10","12","16","20","24"],semantic:["xs","sm","md","lg","xl"]},typography:{families:["heading","body","mono"],sizes:["xs","sm","base","lg","xl","2xl","3xl","4xl","5xl"],weights:["light","normal","medium","semibold","bold"]},radius:{scale:["none","sm","base","md","lg","xl","2xl","full"]},shadows:{scale:["none","sm","base","md","lg","xl","inner"]},themes:["light","dark"],breakpoints:{sm:640,md:768,lg:1024,xl:1280}},primitives:[{id:"badge",name:"Badge / Pill",description:"Inline status indicators and labels",selectors:[".badge",".badge-primary",".badge-secondary",".badge-success",".badge-info",".badge-warning",".badge-danger",".badge-outline",".badge-sm",".badge-lg",".pill",".tag",".chip"],tags:["status","label","indicator","inline"],category:"feedback"},{id:"card",name:"Card",description:"Content container with padding, border-radius, and optional shadow",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"],tags:["container","content","grouping"],category:"container"},{id:"surface",name:"Surface",description:"Smart surface classes with automatic text/background color handling",selectors:[".surface-base",".surface-subtle",".surface-elevated",".surface-sunken",".surface-overlay",".surface-inverse",".surface-translucent",".surface-translucent-25",".surface-translucent-50",".surface-translucent-75",".surface-primary",".surface-secondary",".surface-success",".surface-warning",".surface-danger",".surface-info"],tags:["background","theming","color","container"],category:"theming"},{id:"alert",name:"Alert",description:"Contextual feedback messages",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger",".alert-error",".alert-dismissible",".semantic-message"],tags:["feedback","message","notification","status"],category:"feedback"},{id:"dialog",name:"Dialog",description:"Modal dialog element",selectors:["dialog",".dialog"],tags:["modal","overlay","popup","modal"],category:"overlay"},{id:"divider",name:"Divider",description:"Horizontal rule with optional label",selectors:["hr","hr[data-content]"],tags:["separator","line","content-divider"],category:"layout"},{id:"table",name:"Table",description:"Data tables with responsive and styling variants",selectors:["table",".table-responsive",".table-striped",".table-bordered",".table-compact",".data-table"],tags:["data","grid","tabular","responsive"],category:"data"},{id:"button",name:"Button",description:"Interactive button element with variants",selectors:["button",".btn-primary",".btn-secondary",".btn-outline",".btn-sm",".btn-xs",".btn-lg",".btn-working",".icon-only"],tags:["interactive","action","cta","form"],category:"action"},{id:"fieldset",name:"Fieldset Group",description:"Form field grouping for radio/checkbox groups",selectors:["fieldset[role='group']","fieldset[role='radiogroup']","fieldset.buttons"],tags:["form","grouping","radio","checkbox"],category:"form"},{id:"label-field",name:"Label+Input",description:"Semantic label wrapping form input",selectors:["label","label:has(input)","label:has(select)","label:has(textarea)"],tags:["form","input","accessibility"],category:"form"},{id:"accordion",name:"Accordion",description:"Collapsible content sections",selectors:[".accordion",".accordion-item","details","details > summary"],tags:["expandable","collapsible","disclosure"],category:"disclosure"},{id:"icon",name:"Icon",description:"SVG icon element with size and color variants",selectors:["pds-icon",".icon-xs",".icon-sm",".icon-md",".icon-lg",".icon-xl",".icon-primary",".icon-secondary",".icon-accent",".icon-success",".icon-warning",".icon-danger",".icon-info",".icon-muted",".icon-subtle",".icon-text",".icon-text-start",".icon-text-end"],tags:["graphic","symbol","visual"],category:"media"},{id:"figure",name:"Figure/Media",description:"Figure element for images with captions",selectors:["figure","figure.media","figcaption"],tags:["image","media","caption"],category:"media"},{id:"gallery",name:"Gallery",description:"Image gallery grid",selectors:[".gallery",".gallery-grid",".img-gallery"],tags:["images","grid","collection"],category:"media"},{id:"form",name:"Form Container",description:"Form styling and layout",selectors:["form",".form-container",".form-actions",".field-description"],tags:["form","input","submission"],category:"form"},{id:"navigation",name:"Navigation",description:"Navigation elements and menus",selectors:["nav","nav[data-dropdown]","menu","nav menu li"],tags:["menu","links","routing"],category:"navigation"}],components:[{id:"pds-tabstrip",name:"Tab Strip",description:"Tabbed interface component",selectors:["pds-tabstrip"],tags:["tabs","navigation","panels"],category:"navigation"},{id:"pds-drawer",name:"Drawer",description:"Slide-out panel overlay",selectors:["pds-drawer"],tags:["panel","overlay","sidebar"],category:"overlay"},{id:"pds-upload",name:"Upload",description:"File upload component with drag-and-drop",selectors:["pds-upload"],tags:["file","upload","drag-drop","form"],category:"form"},{id:"pds-icon",name:"Icon",description:"SVG icon web component",selectors:["pds-icon"],tags:["icon","graphic","svg"],category:"media"},{id:"pds-toaster",name:"Toaster",description:"Toast notification container",selectors:["pds-toaster"],tags:["notification","toast","feedback"],category:"feedback"},{id:"pds-form",name:"JSON Form",description:"Auto-generated form from JSON Schema",selectors:["pds-form"],tags:["form","schema","auto-generate"],category:"form"},{id:"pds-splitpanel",name:"Split Panel",description:"Resizable split pane layout",selectors:["pds-splitpanel"],tags:["layout","resize","panels"],category:"layout"},{id:"pds-scrollrow",name:"Scroll Row",description:"Horizontal scrolling row with snap points",selectors:["pds-scrollrow"],tags:["scroll","horizontal","carousel"],category:"layout"},{id:"pds-richtext",name:"Rich Text",description:"Rich text editor component",selectors:["pds-richtext"],tags:["editor","wysiwyg","text"],category:"form"},{id:"pds-calendar",name:"Calendar",description:"Date picker calendar component",selectors:["pds-calendar"],tags:["date","picker","calendar"],category:"form"}],layoutPatterns:[{id:"container",name:"Container",description:"Centered max-width wrapper with padding",selectors:[".container"],tags:["wrapper","centered","max-width","page"],category:"structure"},{id:"grid",name:"Grid",description:"CSS Grid layout container",selectors:[".grid"],tags:["layout","columns","css-grid"],category:"layout"},{id:"grid-cols",name:"Grid Columns",description:"Fixed column count grids",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],tags:["columns","fixed","grid"],category:"layout"},{id:"grid-auto",name:"Auto-fit Grid",description:"Responsive auto-fit grid with minimum widths",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],tags:["responsive","auto-fit","fluid"],category:"layout"},{id:"flex",name:"Flex Container",description:"Flexbox layout with direction and wrap modifiers",selectors:[".flex",".flex-wrap",".flex-col",".flex-row"],tags:["flexbox","layout","alignment"],category:"layout"},{id:"grow",name:"Flex Grow",description:"Fill remaining flex space",selectors:[".grow"],tags:["flex","expand","fill"],category:"layout"},{id:"stack",name:"Stack",description:"Vertical flex layout with predefined gaps",selectors:[".stack-sm",".stack-md",".stack-lg",".stack-xl"],tags:["vertical","spacing","column"],category:"layout"},{id:"gap",name:"Gap",description:"Spacing between flex/grid children",selectors:[".gap-0",".gap-xs",".gap-sm",".gap-md",".gap-lg",".gap-xl"],tags:["spacing","margin","gutters"],category:"spacing"},{id:"items",name:"Items Alignment",description:"Cross-axis alignment for flex/grid",selectors:[".items-start",".items-center",".items-end",".items-stretch",".items-baseline"],tags:["alignment","vertical","cross-axis"],category:"alignment"},{id:"justify",name:"Justify Content",description:"Main-axis alignment for flex/grid",selectors:[".justify-start",".justify-center",".justify-end",".justify-between",".justify-around",".justify-evenly"],tags:["alignment","horizontal","main-axis"],category:"alignment"},{id:"max-width",name:"Max-Width",description:"Content width constraints",selectors:[".max-w-sm",".max-w-md",".max-w-lg",".max-w-xl"],tags:["width","constraint","readable"],category:"sizing"},{id:"section",name:"Section Spacing",description:"Vertical padding for content sections",selectors:[".section",".section-lg"],tags:["spacing","vertical","padding"],category:"spacing"},{id:"mobile-stack",name:"Mobile Stack",description:"Stack on mobile, row on desktop",selectors:[".mobile-stack"],tags:["responsive","mobile","breakpoint"],category:"responsive"}],utilities:{text:{alignment:[".text-left",".text-center",".text-right"],color:[".text-muted"],overflow:[".truncate"]},backdrop:{base:[".backdrop"],variants:[".backdrop-light",".backdrop-dark"],blur:[".backdrop-blur-sm",".backdrop-blur-md",".backdrop-blur-lg"]},shadow:{scale:[".shadow-sm",".shadow-base",".shadow-md",".shadow-lg",".shadow-xl",".shadow-inner",".shadow-none"]},border:{gradient:[".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong"],glow:[".border-glow",".border-glow-sm",".border-glow-lg",".border-glow-primary",".border-glow-accent",".border-glow-success",".border-glow-warning",".border-glow-danger"],combined:[".border-gradient-glow"]},media:{image:[".img-gallery",".img-rounded-sm",".img-rounded-md",".img-rounded-lg",".img-rounded-xl",".img-rounded-full",".img-inline"],video:[".video-responsive"],figure:[".figure-responsive"]},effects:{glass:[".liquid-glass"]}},responsive:{prefixes:["sm","md","lg"],utilities:{grid:[":grid-cols-2",":grid-cols-3",":grid-cols-4"],flex:[":flex-row"],text:[":text-sm",":text-lg",":text-xl"],spacing:[":p-6",":p-8",":p-12",":gap-6",":gap-8",":gap-12"],width:[":w-1/2",":w-1/3",":w-1/4"],display:[":hidden",":block"]}},enhancements:[{id:"dropdown",selector:"nav[data-dropdown]",description:"Dropdown menu from nav element",tags:["menu","interactive","navigation"]},{id:"toggle",selector:"label[data-toggle]",description:"Toggle switch from checkbox",tags:["switch","boolean","form"]},{id:"range",selector:'input[type="range"]',description:"Enhanced range slider with output",tags:["slider","input","form"]},{id:"required",selector:"form [required]",description:"Required field asterisk indicator",tags:["validation","form","accessibility"]},{id:"open-group",selector:"fieldset[role=group][data-open]",description:"Editable checkbox/radio group",tags:["form","dynamic","editable"]},{id:"working-button",selector:"button.btn-working, a.btn-working",description:"Button with loading spinner",tags:["loading","async","feedback"]},{id:"labeled-divider",selector:"hr[data-content]",description:"Horizontal rule with centered label",tags:["divider","separator","text"]}],categories:{feedback:{description:"User feedback and status indicators",primitives:["alert","badge"],components:["pds-toaster"]},form:{description:"Form inputs and controls",primitives:["button","fieldset","label-field","form"],components:["pds-upload","pds-form","pds-richtext","pds-calendar"]},layout:{description:"Page structure and content arrangement",patterns:["container","grid","flex","stack","section"],components:["pds-splitpanel","pds-scrollrow"]},navigation:{description:"Navigation and routing",primitives:["navigation"],components:["pds-tabstrip","pds-drawer"]},media:{description:"Images, icons, and visual content",primitives:["icon","figure","gallery"],components:["pds-icon"]},overlay:{description:"Modal and overlay content",primitives:["dialog"],components:["pds-drawer"]},data:{description:"Data display and tables",primitives:["table"]},theming:{description:"Colors, surfaces, and visual theming",primitives:["surface"]}},styles:{typography:["headings","body","code","links"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active","disabled"],states:["success","warning","danger","info","muted"]},searchRelations:{text:["typography","truncate","text-muted","text-primary","text-left","text-center","text-right","pds-richtext","heading","font","label","paragraph","content","ellipsis","overflow","input"],font:["typography","text","heading","font-size","font-weight","font-family"],type:["typography","text","font"],typography:["text","font","heading","truncate","text-muted"],heading:["typography","text","font-size","h1","h2","h3"],truncate:["text","overflow","ellipsis","clamp","nowrap","typography"],ellipsis:["truncate","text","overflow","clamp"],overflow:["truncate","scroll","hidden","text"],paragraph:["text","typography","content","body"],content:["text","typography","body","article"],form:["input","field","label","button","fieldset","pds-form","pds-upload","pds-richtext","pds-calendar","required","validation","submit"],input:["form","field","text","label","required","validation"],field:["form","input","label","required"],button:["btn","interactive","action","submit","form","btn-primary","btn-secondary","btn-working"],btn:["button","interactive","action"],toggle:["switch","checkbox","boolean","form","interactive"],switch:["toggle","checkbox","boolean"],slider:["range","input","form"],range:["slider","input","form"],checkbox:["toggle","form","fieldset","boolean"],radio:["fieldset","form","group"],select:["dropdown","form","input","menu"],upload:["file","pds-upload","form","drag-drop"],file:["upload","pds-upload","form"],modal:["dialog","pds-ask","overlay","popup","backdrop","pds-drawer","alert","confirm","prompt","lightbox"],dialog:["modal","pds-ask","overlay","popup","backdrop","alert","confirm","prompt"],popup:["modal","dialog","dropdown","popover","overlay","tooltip"],popover:["popup","tooltip","overlay"],overlay:["modal","dialog","backdrop","drawer","popup"],drawer:["pds-drawer","sidebar","panel","overlay","modal"],backdrop:["overlay","modal","dialog","blur"],confirm:["pds-ask","dialog","modal"],prompt:["pds-ask","dialog","modal","input"],ask:["pds-ask","dialog","confirm","prompt","modal"],dropdown:["menu","nav-dropdown","select","popover"],menu:["dropdown","navigation","nav","list"],nav:["navigation","menu","dropdown","tabs","links"],navigation:["nav","menu","tabs","pds-tabstrip","links","routing"],tabs:["pds-tabstrip","navigation","panels"],tab:["tabs","pds-tabstrip","panel"],link:["navigation","anchor","href","routing"],alert:["notification","feedback","message","status","toast","modal","dialog","pds-ask","confirm","warning","error","info","success","danger"],notification:["alert","toast","pds-toaster","feedback","message","popup"],toast:["pds-toaster","notification","alert","feedback","popup","snackbar"],feedback:["alert","notification","toast","status","badge","validation","error","success"],message:["alert","notification","feedback","dialog","toast"],status:["badge","alert","indicator","feedback","state"],error:["alert","danger","validation","feedback","warning"],success:["alert","feedback","badge","status","check"],warning:["alert","caution","feedback","status"],info:["alert","information","feedback","status"],danger:["alert","error","feedback","destructive","delete"],badge:["status","pill","tag","chip","indicator","label"],pill:["badge","tag","chip"],tag:["badge","pill","chip","label"],chip:["badge","pill","tag"],layout:["grid","flex","stack","container","gap","spacing","pds-splitpanel","section"],grid:["layout","columns","css-grid","table","gallery"],flex:["layout","flexbox","alignment","row","column"],stack:["layout","vertical","spacing","column","gap"],container:["wrapper","layout","max-width","centered"],gap:["spacing","margin","padding","layout"],spacing:["gap","margin","padding","section"],section:["spacing","layout","container","page"],split:["pds-splitpanel","resizable","panels","layout"],panel:["pds-splitpanel","drawer","sidebar","section"],card:["surface","container","elevated","content"],surface:["card","background","elevated","theming","color"],box:["card","container","surface"],elevated:["surface","shadow","card"],color:["palette","theme","surface","primary","secondary","accent"],colours:["color","palette","theme"],palette:["color","theme","tokens"],theme:["color","palette","dark","light","surface"],primary:["color","button","badge","surface"],secondary:["color","button","badge","surface"],accent:["color","highlight","surface"],border:["border-gradient","border-glow","outline","radius"],effect:["border-gradient","border-glow","shadow","glass","animation"],gradient:["border-gradient","color","background"],glow:["border-glow","effect","shadow"],shadow:["elevated","effect","depth","card"],radius:["rounded","border","corner"],rounded:["radius","border","corner"],glass:["liquid-glass","backdrop","blur","effect"],icon:["pds-icon","graphic","symbol","svg","phosphor"],image:["img","figure","gallery","media","picture"],img:["image","figure","gallery","media"],figure:["image","media","caption"],gallery:["images","grid","collection","media"],media:["image","icon","figure","gallery","video"],table:["data","grid","tabular","rows","columns"],data:["table","json","form","display"],editor:["pds-richtext","wysiwyg","text","content"],wysiwyg:["editor","pds-richtext","richtext"],richtext:["pds-richtext","editor","wysiwyg","text"],calendar:["pds-calendar","date","picker","datepicker"],date:["calendar","pds-calendar","picker","input"],datepicker:["calendar","date","pds-calendar"],scroll:["pds-scrollrow","carousel","horizontal","overflow"],carousel:["scroll","pds-scrollrow","slider","gallery"],accordion:["details","collapsible","expandable","disclosure"],collapsible:["accordion","details","expandable"],expandable:["accordion","collapsible","disclosure"],details:["accordion","summary","disclosure"],divider:["hr","separator","line","rule"],separator:["divider","hr","line"],hr:["divider","separator","horizontal-rule"],interactive:["hover","focus","active","disabled","button","link"],hover:["interactive","effect","state"],focus:["interactive","accessibility","state","outline"],disabled:["interactive","state","muted"],loading:["btn-working","spinner","async","progress"],spinner:["loading","btn-working","progress"],accessibility:["a11y","aria","focus","label","required"],a11y:["accessibility","aria","semantic"],aria:["accessibility","a11y","role"],required:["form","validation","asterisk","input"],validation:["form","required","error","feedback"],start:["getting-started","intro","overview","whatispds"],intro:["getting-started","overview","start","docs"],getting:["getting-started","start","intro"],overview:["intro","start","summary","layout-overview"],docs:["documentation","reference","guide"],primitive:["primitives"],component:["components"],enhancement:["enhancements"],foundation:["foundations","color","icon","typography","spacing","tokens"],utility:["utilities","text","backdrop","shadow","border","helper"],pattern:["patterns","layout","responsive","mobile-stack"]}};je=z});var be={};N(be,{AutoDefiner:()=>K});async function et(...n){let t={};n.length&&typeof n[n.length-1]=="object"&&(t=n.pop()||{});let e=n,{baseURL:a,mapper:r=d=>`${d}.js`,onError:o=(d,s)=>console.error(`[defineWebComponents] ${d}:`,s)}=t,i=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,(s,p,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let s=r(d),g=await import(s instanceof URL?s.href:new URL(s,i).href),h=g?.default??g?.[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(s){throw o(d,s),s}};return Promise.all(e.map(l))}var K,ye=D(()=>{K=class{constructor(t={}){let{baseURL:e,mapper:a,onError:r,predicate:o=()=>!0,attributeModule:i="data-module",root:c=document,scanExisting:l=!0,debounceMs:d=16,observeShadows:s=!0,enhancers:p=[],patchAttachShadow:g=!0}=t,h=new Set,v=new Set,x=new Set,m=new Map,w=new WeakMap,E=new WeakMap,k=0,L=!1,R=null,W=f=>{if(!f||!p.length)return;let y=E.get(f);y||(y=new Set,E.set(f,y));for(let b of p)if(!(!b.selector||!b.run)&&!y.has(b.selector))try{f.matches&&f.matches(b.selector)&&(b.run(f),y.add(b.selector))}catch(T){console.warn(`[AutoDefiner] Error applying enhancer for selector "${b.selector}":`,T)}},B=(f,y)=>{if(!L&&!(!f||!f.includes("-"))&&!customElements.get(f)&&!v.has(f)&&!x.has(f)){if(y&&y.getAttribute){let b=y.getAttribute(i);b&&!m.has(f)&&m.set(f,b)}h.add(f),$()}},$=()=>{k||(k=setTimeout(C,d))},S=f=>{if(f){if(f.nodeType===1){let y=f,b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&B(b,y),W(y),s&&y.shadowRoot&&M(y.shadowRoot)}f.querySelectorAll&&f.querySelectorAll("*").forEach(y=>{let b=y.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&o(b,y)&&B(b,y),W(y),s&&y.shadowRoot&&M(y.shadowRoot)})}},M=f=>{if(!f||w.has(f))return;S(f);let y=new MutationObserver(b=>{for(let T of b)T.addedNodes?.forEach(j=>{S(j)}),T.type==="attributes"&&T.target&&S(T.target)});y.observe(f,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),w.set(f,y)};async function C(){if(clearTimeout(k),k=0,!h.size)return;let f=Array.from(h);h.clear(),f.forEach(y=>v.add(y));try{let y=b=>m.get(b)??(a?a(b):`${b}.js`);await et(...f,{baseURL:e,mapper:y,onError:(b,T)=>{x.add(b),r?.(b,T)}})}catch{}finally{f.forEach(y=>v.delete(y))}}let ae=c===document?document.documentElement:c,oe=new MutationObserver(f=>{for(let y of f)y.addedNodes?.forEach(b=>{S(b)}),y.type==="attributes"&&y.target&&S(y.target)});if(oe.observe(ae,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),s&&g&&Element.prototype.attachShadow){let f=Element.prototype.attachShadow;Element.prototype.attachShadow=function(b){let T=f.call(this,b);if(b&&b.mode==="open"){M(T);let j=this.tagName?.toLowerCase();j&&j.includes("-")&&!customElements.get(j)&&B(j,this)}return T},R=()=>Element.prototype.attachShadow=f}return l&&S(ae),{stop(){L=!0,oe.disconnect(),R&&R(),k&&(clearTimeout(k),k=0),w.forEach(f=>f.disconnect())},flush:C}}static async define(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let a=t,{baseURL:r,mapper:o=s=>`${s}.js`,onError:i=(s,p)=>console.error(`[defineWebComponents] ${s}:`,p)}=e,c=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),l=s=>s.toLowerCase().replace(/(^|-)([a-z])/g,(p,g,h)=>h.toUpperCase()),d=async s=>{try{if(customElements.get(s))return{tag:s,status:"already-defined"};let p=o(s),h=await import(p instanceof URL?p.href:new URL(p,c).href),v=h?.default??h?.[l(s)];if(!v){if(customElements.get(s))return{tag:s,status:"self-defined"};throw new Error(`No export found for ${s}. Expected default export or named export "${l(s)}".`)}return customElements.get(s)?{tag:s,status:"race-already-defined"}:(customElements.define(s,v),{tag:s,status:"defined"})}catch(p){throw i(s,p),p}};return Promise.all(a.map(d))}}});var te={};N(te,{PDSQuery:()=>ee});var ee,re=D(()=>{ee=class{constructor(t){this.pds=t,this.intents={color:["color","colours","shade","tint","hue","foreground","background","text","fill","bg","fg"],spacing:["spacing","space","gap","padding","margin","distance","rhythm"],typography:["font","text","type","typography","heading","body","size","weight","family"],border:["border","outline","stroke","edge","frame"],radius:["radius","rounded","corner","curve","round"],shadow:["shadow","elevation","depth","glow","drop-shadow"],component:["component","element","widget"],utility:["utility","class","helper","css"],layout:["layout","container","grid","flex","group","arrange","organize"],pattern:["pattern","example","template","structure"],interaction:["hover","focus","active","disabled","pressed","selected","checked"]},this.entities={button:["button","btn","cta"],input:["input","field","textbox","text-field","form-control"],card:["card","panel"],badge:["badge","pill","tag","chip"],surface:["surface","background","layer","container"],icon:["icon","svg","glyph","symbol"],link:["link","anchor","hyperlink"],nav:["nav","navigation","menu"],modal:["modal","dialog","popup","overlay"],drawer:["drawer","sidebar","panel"],tab:["tab","tabstrip"],toast:["toast","notification","alert","message"]},this.questionWords=["what","which","how","where","when","show","find","get","give","tell"]}async search(t){if(!t||t.length<2)return[];let e=t.toLowerCase().trim(),a=this.tokenize(e),r=this.analyzeQuery(a,e),o=[];r.intents.has("color")&&o.push(...this.queryColors(r,e)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||e.includes("class"))&&o.push(...this.queryUtilities(r,e)),(r.intents.has("component")||r.entities.size>0)&&o.push(...this.queryComponents(r,e)),(r.intents.has("layout")||r.intents.has("pattern"))&&o.push(...this.queryPatterns(r,e)),r.intents.has("typography")&&o.push(...this.queryTypography(r,e)),r.intents.has("spacing")&&o.push(...this.querySpacing(r,e));let i=new Map;for(let c of o){let l=c.value;(!i.has(l)||i.get(l).score<c.score)&&i.set(l,c)}return Array.from(i.values()).sort((c,l)=>l.score-c.score).slice(0,10)}tokenize(t){return t.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(e=>e.length>0)}analyzeQuery(t,e){let a={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:t,fullText:e};a.isQuestion=this.questionWords.some(r=>t.includes(r));for(let[r,o]of Object.entries(this.intents))o.some(i=>t.includes(i)||e.includes(i))&&a.intents.add(r);for(let[r,o]of Object.entries(this.entities))o.some(i=>t.includes(i)||e.includes(i))&&a.entities.add(r);return(t.includes("hover")||e.includes("hover"))&&a.modifiers.add("hover"),(t.includes("focus")||e.includes("focus"))&&a.modifiers.add("focus"),(t.includes("active")||e.includes("active"))&&a.modifiers.add("active"),(t.includes("disabled")||e.includes("disabled"))&&a.modifiers.add("disabled"),a}queryColors(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.colors)return a;let o=r.tokens.colors,i=Array.from(t.entities),c=Array.from(t.modifiers);if(c.includes("focus")&&t.intents.has("border")&&i.includes("input")&&a.push({text:"Focus border color: var(--color-primary-500)",value:"--color-primary-500",icon:"palette",category:"Color Token",score:100,cssVar:"var(--color-primary-500)",description:"Primary color used for focus states on form inputs"}),(e.includes("foreground")||e.includes("text"))&&(e.includes("surface")||t.entities.has("surface"))&&(a.push({text:"Text on surface: var(--surface-text)",value:"--surface-text",icon:"palette",category:"Surface Token",score:95,cssVar:"var(--surface-text)",description:"Default text color for current surface"}),a.push({text:"Secondary text: var(--surface-text-secondary)",value:"--surface-text-secondary",icon:"palette",category:"Surface Token",score:90,cssVar:"var(--surface-text-secondary)",description:"Secondary/muted text on surface"})),e.includes("primary")||e.includes("accent")||e.includes("secondary")){let l=e.includes("primary")?"primary":e.includes("accent")?"accent":"secondary";for(let d of[500,600,700]){let s=`--color-${l}-${d}`;a.push({text:`${l.charAt(0).toUpperCase()+l.slice(1)} ${d}: var(${s})`,value:s,icon:"palette",category:"Color Scale",score:80-(d-500)/100,cssVar:`var(${s})`,description:`${l} color scale shade ${d}`})}}if(i.includes("button")&&t.intents.has("color")){let l=c[0];l?a.push({text:`Button ${l} fill: var(--primary-fill-${l})`,value:`--primary-fill-${l}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${l} state`}):a.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return a}queryUtilities(t,e){let a=[],r=this.pds.ontology;if(!r?.utilities)return a;let o=r.utilities,i=[];for(let c of Object.values(o))if(typeof c=="object")for(let l of Object.values(c))Array.isArray(l)&&i.push(...l);return t.intents.has("border")&&i.filter(l=>l.includes("border")||l.includes("outline")).forEach(l=>{let d=80;e.includes("gradient")&&l.includes("gradient")&&(d=95),e.includes("glow")&&l.includes("glow")&&(d=95),a.push({text:`${l} - Border utility class`,value:l,icon:"code",category:"Utility Class",score:d,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),t.intents.has("layout")&&i.filter(l=>l.includes("flex")||l.includes("grid")||l.includes("items-")||l.includes("justify-")||l.includes("gap-")).forEach(l=>{a.push({text:`${l} - Layout utility`,value:l,icon:"layout",category:"Utility Class",score:85,code:`<div class="${l}">...</div>`,description:this.describeUtility(l)})}),e.includes("group")&&t.entities.has("button")&&a.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
2
|
+
<button class="btn-primary">One</button>
|
|
3
|
+
<button class="btn-primary">Two</button>
|
|
4
|
+
</div>`,description:"Container for grouped buttons with connected styling"}),a}queryComponents(t,e){let a=[],r=this.pds.ontology;return!r?.components&&!r?.primitives||(r.components&&r.components.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);i>50&&a.push({text:`<${o.id}> - ${o.name}`,value:o.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${o.id}></${o.id}>`,description:o.description||`${o.name} web component`})}),r.primitives&&r.primitives.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id);if(i>50){let c=o.selectors?.[0]||o.id;a.push({text:`${c} - ${o.name}`,value:o.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(o),description:o.description||`${o.name} primitive element`})}}),e.includes("icon")&&(e.includes("only")||e.includes("button"))&&a.push({text:'Icon-only button: <button class="btn-icon">',value:"btn-icon",icon:"star",category:"Pattern",score:95,code:`<button class="btn-icon btn-primary">
|
|
5
|
+
<pds-icon icon="heart"></pds-icon>
|
|
6
|
+
</button>`,description:"Button with only an icon, no text label"})),a}queryPatterns(t,e){let a=[],r=this.pds.ontology;return r?.layoutPatterns&&(r.layoutPatterns.forEach(o=>{let i=this.scoreMatch(e,o.name+" "+o.id+" "+(o.description||""));if(i>50){let c=o.selectors?.[0]||`.${o.id}`;a.push({text:`${o.name} - ${o.description||"Layout pattern"}`,value:o.id,icon:"layout",category:"Layout Pattern",score:i,code:`<div class="${c.replace(".","")}">
|
|
7
|
+
<!-- content -->
|
|
8
|
+
</div>`,description:o.description||o.name})}}),(e.includes("container")||e.includes("group"))&&(a.push({text:"Card - Container for grouping content",value:"card",icon:"layout",category:"Primitive",score:88,code:`<article class="card">
|
|
9
|
+
<header>
|
|
10
|
+
<h3>Title</h3>
|
|
11
|
+
</header>
|
|
12
|
+
<p>Content...</p>
|
|
13
|
+
</article>`,description:"Card container with optional header, body, and footer"}),a.push({text:"Section - Semantic container for grouping",value:"section",icon:"layout",category:"Pattern",score:85,code:`<section>
|
|
14
|
+
<h2>Section Title</h2>
|
|
15
|
+
<!-- content -->
|
|
16
|
+
</section>`,description:"Semantic section element for content grouping"}))),a}queryTypography(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.typography)return a;let o=r.tokens.typography;return(e.includes("heading")||e.includes("title"))&&a.push({text:"Heading font: var(--font-family-heading)",value:"--font-family-heading",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-heading)",description:"Font family for headings"}),(e.includes("body")||e.includes("text"))&&a.push({text:"Body font: var(--font-family-body)",value:"--font-family-body",icon:"text-aa",category:"Typography Token",score:85,cssVar:"var(--font-family-body)",description:"Font family for body text"}),a}querySpacing(t,e){let a=[],r=this.pds.compiled;if(!r?.tokens?.spacing)return a;let o=r.tokens.spacing;for(let[i,c]of Object.entries(o))["2","4","6","8"].includes(i)&&a.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${c}`});return a}scoreMatch(t,e){let a=t.toLowerCase(),r=e.toLowerCase(),o=0;if(a===r)return 100;r.includes(a)&&(o+=80);let i=this.tokenize(a),c=this.tokenize(r),l=i.filter(d=>c.includes(d)).length;return o+=l/i.length*40,r.startsWith(a)&&(o+=20),Math.min(100,o)}generatePrimitiveExample(t){let e=t.selectors?.[0]||t.id;return e.includes("button")||t.id==="button"?'<button class="btn-primary">Click me</button>':e.includes("card")||t.id==="card"?`<article class="card">
|
|
17
|
+
<h3>Title</h3>
|
|
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 Me={};N(Me,{deepMerge:()=>ze,isObject:()=>Q});function Q(n){return n&&typeof n=="object"&&!Array.isArray(n)}function ze(n,t){let e={...n};return Q(n)&&Q(t)&&Object.keys(t).forEach(a=>{Q(t[a])?a in n?e[a]=ze(n[a],t[a]):Object.assign(e,{[a]:t[a]}):Object.assign(e,{[a]:t[a]})}),e}var Fe=D(()=>{});q();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:u.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xlarge,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:u.RadiusSizes.xxlarge,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.slow,animationEasing:u.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0b0b0b",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:u.RadiusSizes.none,borderWidth:u.BorderWidths.thick},behavior:{transitionSpeed:u.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.medium},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:u.TouchTargetSizes.comfortable,focusStyle:u.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:u.TouchTargetSizes.standard,focusStyle:u.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:u.RadiusSizes.medium,borderWidth:u.BorderWidths.thin},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:u.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:u.RadiusSizes.small,borderWidth:u.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:u.TransitionSpeeds.fast,animationEasing:u.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};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:u.FontWeights.light,fontWeightNormal:u.FontWeights.normal,fontWeightMedium:u.FontWeights.medium,fontWeightSemibold:u.FontWeights.semibold,fontWeightBold:u.FontWeights.bold,lineHeightTight:u.LineHeights.tight,lineHeightNormal:u.LineHeights.normal,lineHeightRelaxed:u.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:u.RadiusSizes.large,borderWidth:u.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:u.TransitionSpeeds.normal,animationEasing:u.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:u.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:u.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:u.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:u.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};function ie(n="log",t,...e){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;e.length>0?r(t,...e):r(t)}}q();Z();var F=class n{static#d;static get instance(){return this.#d}#e;#a;constructor(t={}){this.options={debug:!1,...t},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),n.#d=this,this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#fe(),typeof CSSStyleSheet<"u"?this.#we():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let t=this.options.design||{};return{colors:this.#v(t.colors||{}),spacing:this.generateSpacingTokens(t.spatialRhythm||{}),radius:this.#T(t.shape||{}),borderWidths:this.#L(t.shape||{}),typography:this.generateTypographyTokens(t.typography||{}),shadows:this.#R(t.layers||{}),layout:this.#A(t.layout||{}),transitions:this.#W(t.behavior||{}),zIndex:this.#B(t.layers||{}),icons:this.#j(t.icons||{})}}#v(t){let{primary:e="#3b82f6",secondary:a="#64748b",accent:r="#ec4899",background:o="#ffffff",success:i=null,warning:c="#FFBF00",danger:l=null,info:d=null,darkMode:s={}}=t,p={primary:this.#r(e),secondary:this.#r(a),accent:this.#r(r),success:this.#r(i||this.#x(e)),warning:this.#r(c||r),danger:this.#r(l||this.#w(e)),info:this.#r(d||e),gray:this.#p(a),surface:this.#u(o)};return p.surface.fieldset=this.#k(p.surface),p.surfaceSmart=this.#b(p.surface),p.dark=this.#$(p,o,s),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#b(p.dark.surface)),p.interactive={light:{fill:this.#f(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#f(p.dark.primary,4.5),text:this.#E(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(t){let e=this.#o(t);return{50:this.#t(e.h,Math.max(e.s-10,10),Math.min(e.l+45,95)),100:this.#t(e.h,Math.max(e.s-5,15),Math.min(e.l+35,90)),200:this.#t(e.h,e.s,Math.min(e.l+25,85)),300:this.#t(e.h,e.s,Math.min(e.l+15,75)),400:this.#t(e.h,e.s,Math.min(e.l+5,65)),500:t,600:this.#t(e.h,e.s,Math.max(e.l-10,25)),700:this.#t(e.h,e.s,Math.max(e.l-20,20)),800:this.#t(e.h,e.s,Math.max(e.l-30,15)),900:this.#t(e.h,e.s,Math.max(e.l-40,10))}}#x(t){let e=this.#o(t);return this.#t(120,Math.max(e.s,60),45)}#w(t){let e=this.#o(t);return this.#t(0,Math.max(e.s,70),50)}#p(t){let e=this.#o(t),a=e.h,r=Math.min(e.s,10);return{50:this.#t(a,r,98),100:this.#t(a,r,95),200:this.#t(a,r,88),300:this.#t(a,r,78),400:this.#t(a,r,60),500:t,600:this.#t(a,Math.min(r+5,15),45),700:this.#t(a,Math.min(r+8,18),35),800:this.#t(a,Math.min(r+10,20),20),900:this.#t(a,Math.min(r+12,22),10)}}#u(t){let e=this.#o(t);return{base:t,subtle:this.#t(e.h,Math.max(e.s,2),Math.max(e.l-2,2)),elevated:this.#t(e.h,Math.max(e.s,3),Math.max(e.l-4,5)),sunken:this.#t(e.h,Math.max(e.s,4),Math.max(e.l-6,8)),overlay:this.#t(e.h,Math.max(e.s,2),Math.min(e.l+2,98)),inverse:this.#g(t),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#k(t){return{base:t.subtle,subtle:t.elevated,elevated:t.sunken,sunken:this.#S(t.sunken,.05),overlay:t.elevated}}#S(t,e=.05){let a=this.#o(t),r=Math.max(a.l-a.l*e,5);return this.#t(a.h,a.s,r)}#g(t){let e=this.#o(t);if(e.l>50){let a=Math.min(e.s+5,25),r=Math.max(12-(e.l-50)*.1,8);return this.#t(e.h,a,r)}else{let a=Math.max(e.s-10,5),r=Math.min(85+(50-e.l)*.3,95);return this.#t(e.h,a,r)}}#$(t,e="#ffffff",a={}){let r=a.background?a.background:this.#g(e),o=this.#u(r),i=a.primary?this.#r(a.primary):this.#n(t.primary);return{surface:{...o,fieldset:this.#F(o)},primary:i,secondary:a.secondary?this.#r(a.secondary):this.#n(t.secondary),accent:a.accent?this.#r(a.accent):this.#n(t.accent),gray:a.secondary?this.#p(a.secondary):t.gray,success:this.#n(t.success),info:this.#n(t.info),warning:this.#n(t.warning),danger:this.#n(t.danger)}}#s(t){let e=String(t||"").replace("#",""),a=e.length===3?e.split("").map(o=>o+o).join(""):e,r=parseInt(a,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(t){let{r:e,g:a,b:r}=this.#s(t),o=[e/255,a/255,r/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*o[0]+.7152*o[1]+.0722*o[2]}#c(t,e){let a=this.#l(t),r=this.#l(e),o=Math.max(a,r),i=Math.min(a,r);return(o+.05)/(i+.05)}#m(t,e=4.5){if(!t)return"#000000";let a="#ffffff",r="#000000",o=this.#c(t,a);if(o>=e)return a;let i=this.#c(t,r);return i>=e||i>o?r:a}#h(t,e=1){let{r:a,g:r,b:o}=this.#s(t);return`rgba(${a}, ${r}, ${o}, ${e})`}#z(t,e,a=.5){let r=this.#s(t),o=this.#s(e),i=Math.round(r.r+(o.r-r.r)*a),c=Math.round(r.g+(o.g-r.g)*a),l=Math.round(r.b+(o.b-r.b)*a);return this.#M(i,c,l)}#M(t,e,a){let r=o=>{let i=Math.max(0,Math.min(255,Math.round(o))).toString(16);return i.length===1?"0"+i:i};return`#${r(t)}${r(e)}${r(a)}`}#F(t){return{base:t.elevated,subtle:t.overlay,elevated:this.#y(t.elevated,.08),sunken:t.elevated,overlay:this.#y(t.overlay,.05)}}#E(t={},e="#000000",a=4.5){let r=["600","700","800","500","400","900","300","200"],o={shade:null,color:null,ratio:0};for(let i of r){let c=t?.[i];if(!c||typeof c!="string")continue;let l=this.#c(c,e);if(l>o.ratio&&(o={shade:i,color:c,ratio:l}),l>=a)return c}return o.color||t?.["600"]||t?.["500"]}#f(t={},e=4.5){let a=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let o of a){let i=t?.[o];if(!i||typeof i!="string")continue;let c=this.#c(i,"#ffffff");if(c>r.ratio&&(r={shade:o,color:i,ratio:c}),c>=e)return i}return r.color||t?.["600"]||t?.["500"]}#b(t){let e={};return Object.entries(t).forEach(([a,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let o=this.#l(r)<.5,i=this.#m(r,4.5),c=this.#m(r,3),l=this.#z(i,r,.4),d=i,s=l,p=o?"#ffffff":"#000000",g=o?.25:.1,h=this.#h(p,g),v=o?"#ffffff":"#000000",x=o?.15:.1,m=this.#h(v,x);e[a]={bg:r,text:i,textSecondary:c,textMuted:l,icon:d,iconSubtle:s,shadow:h,border:m,scheme:o?"dark":"light"}}),e}#y(t,e=.05){let a=this.#o(t),r=Math.min(a.l+(100-a.l)*e,95);return this.#t(a.h,a.s,r)}#n(t){let e={};return Object.entries({50:{source:"900",dimFactor:.8},100:{source:"800",dimFactor:.8},200:{source:"700",dimFactor:.8},300:{source:"600",dimFactor:.8},400:{source:"500",dimFactor:.85},500:{source:"400",dimFactor:.85},600:{source:"300",dimFactor:.85},700:{source:"200",dimFactor:.85},800:{source:"100",dimFactor:.95},900:{source:"50",dimFactor:.95}}).forEach(([r,o])=>{let i=t[o.source];e[r]=this.#C(i,o.dimFactor)}),e}#C(t,e=.8){let a=this.#o(t),r=Math.max(a.s*e,5),o=Math.max(a.l*e,5);return this.#t(a.h,r,o)}generateSpacingTokens(t){let{baseUnit:e=4,scaleRatio:a=1.25,maxSpacingSteps:r=12}=t,o=Number.isFinite(Number(e))?Number(e):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),c={0:"0"};for(let l=1;l<=i;l++)c[l]=`${o*l}px`;return c}#T(t){let{radiusSize:e="medium",customRadius:a=null}=t,r;a!=null?r=a:typeof e=="number"?r=e:typeof e=="string"?r=u.RadiusSizes[e]??u.RadiusSizes.medium:r=u.RadiusSizes.medium;let o=Number.isFinite(Number(r))?Number(r):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(o*.25)?Math.round(o*.25):0}px`,sm:`${Number.isFinite(o*.5)?Math.round(o*.5):0}px`,md:`${o}px`,lg:`${Number.isFinite(o*1.5)?Math.round(o*1.5):0}px`,xl:`${Number.isFinite(o*2)?Math.round(o*2):0}px`,full:"9999px"}}#L(t){let{borderWidth:e="medium"}=t,a;return typeof e=="number"?a=e:typeof e=="string"?a=u.BorderWidths[e]??u.BorderWidths.medium:a=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(t){let{fontFamilyHeadings:e="system-ui, -apple-system, sans-serif",fontFamilyBody:a="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:o=16,fontScale:i=1.25,fontWeightLight:c=u.FontWeights.light,fontWeightNormal:l=u.FontWeights.normal,fontWeightMedium:d=u.FontWeights.medium,fontWeightSemibold:s=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:g=u.LineHeights.tight,lineHeightNormal:h=u.LineHeights.normal,lineHeightRelaxed:v=u.LineHeights.relaxed}=t,x=Number.isFinite(Number(o))?Number(o):16,m=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:e,body:a,mono:r},fontSize:{xs:`${Math.round(x/Math.pow(m,2))}px`,sm:`${Math.round(x/m)}px`,base:`${x}px`,lg:`${Math.round(x*m)}px`,xl:`${Math.round(x*Math.pow(m,2))}px`,"2xl":`${Math.round(x*Math.pow(m,3))}px`,"3xl":`${Math.round(x*Math.pow(m,4))}px`,"4xl":`${Math.round(x*Math.pow(m,5))}px`},fontWeight:{light:c?.toString()||"300",normal:l?.toString()||"400",medium:d?.toString()||"500",semibold:s?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:g?.toString()||"1.25",normal:h?.toString()||"1.5",relaxed:v?.toString()||"1.75"}}}#R(t){let{baseShadowOpacity:e=.1,shadowBlurMultiplier:a=1,shadowOffsetMultiplier:r=1}=t,o=`rgba(0, 0, 0, ${e})`,i=`rgba(0, 0, 0, ${e*.5})`;return{sm:`0 ${1*r}px ${2*a}px 0 ${i}`,base:`0 ${1*r}px ${3*a}px 0 ${o}, 0 ${1*r}px ${2*a}px 0 ${i}`,md:`0 ${4*r}px ${6*a}px ${-1*r}px ${o}, 0 ${2*r}px ${4*a}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*a}px ${-3*r}px ${o}, 0 ${4*r}px ${6*a}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*a}px ${-5*r}px ${o}, 0 ${10*r}px ${10*a}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*a}px 0 ${i}`}}#A(t){let{maxWidth:e=1200,containerPadding:a=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=t;return{maxWidth:`${e}px`,minHeight:"100vh",containerPadding:`${a}px`,breakpoints:{sm:`${r.sm}px`,md:`${r.md}px`,lg:`${r.lg}px`,xl:`${r.xl}px`},pageMargin:"120px",sectionGap:"160px",containerGap:"200px",heroSpacing:"240px",footerSpacing:"160px"}}#W(t){let{transitionSpeed:e=u.TransitionSpeeds.normal,animationEasing:a=u.AnimationEasings["ease-out"]}=t,r;return typeof e=="number"?r=e:typeof e=="string"&&u.TransitionSpeeds[e]?r=u.TransitionSpeeds[e]:r=u.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#B(t){let{baseZIndex:e=1e3,zIndexStep:a=10}=t;return{dropdown:e.toString(),sticky:(e+a*2).toString(),fixed:(e+a*3).toString(),modal:(e+a*4).toString(),drawer:(e+a*5).toString(),popover:(e+a*6).toString(),tooltip:(e+a*7).toString(),notification:(e+a*8).toString()}}#j(t){let{set:e="phosphor",weight:a="regular",defaultSize:r=24,sizes:o={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg",externalPath:c="/assets/img/icons/"}=t;return{set:e,weight:a,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(o).map(([l,d])=>[l,`${d}px`])),spritePath:i,externalPath:c}}#D(t){let e=[];e.push(` /* Colors */
|
|
20
|
+
`);let a=(r,o="")=>{Object.entries(r).forEach(([i,c])=>{typeof c=="object"&&c!==null?a(c,`${o}${i}-`):typeof c=="string"&&e.push(` --color-${o}${i}: ${c};
|
|
21
|
+
`)})};return Object.entries(t).forEach(([r,o])=>{r!=="dark"&&r!=="surfaceSmart"&&r!=="interactive"&&typeof o=="object"&&o!==null&&a(o,`${r}-`)}),t.surfaceSmart&&(e.push(` /* Smart Surface Tokens (context-aware) */
|
|
22
|
+
`),Object.entries(t.surfaceSmart).forEach(([r,o])=>{e.push(` --surface-${r}-bg: ${o.bg};
|
|
23
|
+
`),e.push(` --surface-${r}-text: ${o.text};
|
|
24
|
+
`),e.push(` --surface-${r}-text-secondary: ${o.textSecondary};
|
|
25
|
+
`),e.push(` --surface-${r}-text-muted: ${o.textMuted};
|
|
26
|
+
`),e.push(` --surface-${r}-icon: ${o.icon};
|
|
27
|
+
`),e.push(` --surface-${r}-icon-subtle: ${o.iconSubtle};
|
|
28
|
+
`),e.push(` --surface-${r}-shadow: ${o.shadow};
|
|
29
|
+
`),e.push(` --surface-${r}-border: ${o.border};
|
|
30
|
+
`)}),e.push(`
|
|
31
|
+
`)),e.push(` /* Semantic Text Colors */
|
|
32
|
+
`),e.push(` --color-text-primary: var(--color-gray-900);
|
|
33
|
+
`),e.push(` --color-text-secondary: var(--color-gray-600);
|
|
34
|
+
`),e.push(` --color-text-muted: var(--color-gray-600);
|
|
35
|
+
`),e.push(` --color-border: var(--color-gray-300);
|
|
36
|
+
`),e.push(` --color-input-bg: var(--color-surface-base);
|
|
37
|
+
`),e.push(` --color-input-disabled-bg: var(--color-gray-50);
|
|
38
|
+
`),e.push(` --color-input-disabled-text: var(--color-gray-500);
|
|
39
|
+
`),e.push(` --color-code-bg: var(--color-gray-100);
|
|
40
|
+
`),t.interactive&&t.interactive.light&&(e.push(` /* Interactive Colors - optimized for specific use cases */
|
|
41
|
+
`),e.push(` --color-primary-fill: ${t.interactive.light.fill}; /* For button backgrounds with white text */
|
|
42
|
+
`),e.push(` --color-primary-text: ${t.interactive.light.text}; /* For links and outline buttons on light surfaces */
|
|
43
|
+
`)),e.push(` /* Translucent Surface Tokens */
|
|
44
|
+
`),e.push(` --color-surface-translucent-25: color-mix(in oklab, var(--color-surface-subtle) 25%, transparent 75%);
|
|
45
|
+
`),e.push(` --color-surface-translucent-50: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
|
|
46
|
+
`),e.push(` --color-surface-translucent-75: color-mix(in oklab, var(--color-surface-subtle) 75%, transparent 25%);
|
|
47
|
+
`),e.push(` /* Backdrop tokens - used for modal dialogs, drawers, overlays */
|
|
48
|
+
|
|
49
|
+
--backdrop-bg: linear-gradient(
|
|
50
|
+
135deg,
|
|
51
|
+
rgba(255, 255, 255, 0.2),
|
|
52
|
+
rgba(255, 255, 255, 0.1)
|
|
53
|
+
);
|
|
54
|
+
--backdrop-blur: 10px;
|
|
55
|
+
--backdrop-saturate: 150%;
|
|
56
|
+
--backdrop-brightness: 0.9;
|
|
57
|
+
--backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturate)) brightness(var(--backdrop-brightness));
|
|
58
|
+
--backdrop-opacity: 1;
|
|
59
|
+
|
|
60
|
+
/* Legacy alias for backwards compatibility */
|
|
61
|
+
--backdrop-background: var(--backdrop-bg);
|
|
62
|
+
`),e.push(this.#N(t)),`${e.join("")}
|
|
63
|
+
`}#N(t){let e=t.primary?.[500]||"#3b82f6",a=t.secondary?.[500]||"#8b5cf6",r=t.accent?.[500]||"#f59e0b";return`
|
|
64
|
+
/* Mesh Gradient Backgrounds */
|
|
65
|
+
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${e} 25%, transparent) 0px, transparent 50%),
|
|
66
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${a} 22%, transparent) 0px, transparent 50%),
|
|
67
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
68
|
+
radial-gradient(at 10% 29%, color-mix(in oklab, ${e} 15%, transparent) 0px, transparent 50%);
|
|
69
|
+
|
|
70
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${a} 24%, transparent) 0px, transparent 50%),
|
|
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, ${r} 17%, transparent) 0px, transparent 50%),
|
|
73
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${a} 15%, transparent) 0px, transparent 50%);
|
|
74
|
+
|
|
75
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${r} 21%, transparent) 0px, transparent 50%),
|
|
76
|
+
radial-gradient(at 85% 30%, color-mix(in oklab, ${e} 23%, transparent) 0px, transparent 50%),
|
|
77
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
78
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%);
|
|
79
|
+
|
|
80
|
+
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${e} 19%, transparent) 0px, transparent 50%),
|
|
81
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${a} 22%, transparent) 0px, transparent 50%),
|
|
82
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
83
|
+
radial-gradient(at 30% 40%, color-mix(in oklab, ${e} 16%, transparent) 0px, transparent 50%);
|
|
84
|
+
|
|
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, ${r} 20%, transparent) 0px, transparent 50%),
|
|
87
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${a} 18%, transparent) 0px, transparent 50%),
|
|
88
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${r} 15%, transparent) 0px, transparent 50%);
|
|
89
|
+
`}#P(t){let e=[` /* Spacing */
|
|
90
|
+
`];return Object.entries(t).forEach(([a,r])=>{a!=null&&a!=="NaN"&&r!==void 0&&!r.includes("NaN")&&e.push(` --spacing-${a}: ${r};
|
|
91
|
+
`)}),`${e.join("")}
|
|
92
|
+
`}#I(t){let e=[` /* Border Radius */
|
|
93
|
+
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --radius-${a}: ${r};
|
|
94
|
+
`)}),`${e.join("")}
|
|
95
|
+
`}#U(t){let e=[` /* Border Widths */
|
|
96
|
+
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --border-width-${a}: ${r};
|
|
97
|
+
`)}),`${e.join("")}
|
|
98
|
+
`}#O(t){let e=[` /* Typography */
|
|
99
|
+
`];return Object.entries(t).forEach(([a,r])=>{let o=a.replace(/^font/,"").replace(/^(.)/,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();Object.entries(r).forEach(([i,c])=>{let l=i.replace(/([A-Z])/g,"-$1").toLowerCase();e.push(` --font-${o}-${l}: ${c};
|
|
100
|
+
`)})}),`${e.join("")}
|
|
101
|
+
`}#H(t){let e=[` /* Shadows */
|
|
102
|
+
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --shadow-${a}: ${r};
|
|
103
|
+
`)}),`${e.join("")}
|
|
104
|
+
`}#q(t){let e=[` /* Layout */
|
|
105
|
+
`];return Object.entries(t).forEach(([a,r])=>{let o=a.replace(/([A-Z])/g,"-$1").toLowerCase();a!=="breakpoints"&&e.push(` --layout-${o}: ${r};
|
|
106
|
+
`)}),`${e.join("")}
|
|
107
|
+
`}#G(t){let e=[` /* Transitions */
|
|
108
|
+
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --transition-${a}: ${r};
|
|
109
|
+
`)}),`${e.join("")}
|
|
110
|
+
`}#_(t){let e=[` /* Z-Index */
|
|
111
|
+
`];return Object.entries(t).forEach(([a,r])=>{e.push(` --z-${a}: ${r};
|
|
112
|
+
`)}),`${e.join("")}
|
|
113
|
+
`}#V(t){let e=[` /* Icon System */
|
|
114
|
+
`];return e.push(` --icon-set: ${t.set};
|
|
115
|
+
`),e.push(` --icon-weight: ${t.weight};
|
|
116
|
+
`),e.push(` --icon-size: ${t.defaultSize};
|
|
117
|
+
`),Object.entries(t.sizes).forEach(([a,r])=>{e.push(` --icon-size-${a}: ${r};
|
|
118
|
+
`)}),`${e.join("")}
|
|
119
|
+
`}#Q(t){if(!t?.dark)return"";let e=[],a=(d,s="")=>{Object.entries(d).forEach(([p,g])=>{typeof g=="object"&&g!==null?a(g,`${s}${p}-`):typeof g=="string"&&e.push(` --color-${s}${p}: ${g};
|
|
120
|
+
`)})};Object.entries(t.dark).forEach(([d,s])=>{d!=="surfaceSmart"&&typeof s=="object"&&s!==null&&a(s,`${d}-`)});let r=[];t.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
121
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([d,s])=>{r.push(` --surface-${d}-bg: ${s.bg};
|
|
122
|
+
`),r.push(` --surface-${d}-text: ${s.text};
|
|
123
|
+
`),r.push(` --surface-${d}-text-secondary: ${s.textSecondary};
|
|
124
|
+
`),r.push(` --surface-${d}-text-muted: ${s.textMuted};
|
|
125
|
+
`),r.push(` --surface-${d}-icon: ${s.icon};
|
|
126
|
+
`),r.push(` --surface-${d}-icon-subtle: ${s.iconSubtle};
|
|
127
|
+
`),r.push(` --surface-${d}-shadow: ${s.shadow};
|
|
128
|
+
`),r.push(` --surface-${d}-border: ${s.border};
|
|
129
|
+
`)}),r.push(`
|
|
130
|
+
`));let o=` --color-text-primary: var(--color-gray-100);
|
|
131
|
+
--color-text-secondary: var(--color-gray-300);
|
|
132
|
+
--color-text-muted: var(--color-gray-400);
|
|
133
|
+
--color-border: var(--color-gray-700);
|
|
134
|
+
--color-input-bg: var(--color-gray-800);
|
|
135
|
+
--color-input-disabled-bg: var(--color-gray-900);
|
|
136
|
+
--color-input-disabled-text: var(--color-gray-600);
|
|
137
|
+
--color-code-bg: var(--color-gray-800);
|
|
138
|
+
`,i=` /* Backdrop tokens - dark mode */
|
|
139
|
+
--backdrop-bg: linear-gradient(
|
|
140
|
+
135deg,
|
|
141
|
+
rgba(0, 0, 0, 0.6),
|
|
142
|
+
rgba(0, 0, 0, 0.4)
|
|
143
|
+
);
|
|
144
|
+
--backdrop-blur: 10px;
|
|
145
|
+
--backdrop-saturate: 120%;
|
|
146
|
+
--backdrop-brightness: 0.7;
|
|
147
|
+
--backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturate)) brightness(var(--backdrop-brightness));
|
|
148
|
+
--backdrop-opacity: 1;
|
|
149
|
+
|
|
150
|
+
/* Legacy alias for backwards compatibility */
|
|
151
|
+
--backdrop-background: var(--backdrop-bg);
|
|
152
|
+
`,c=this.#Y(t);return`html[data-theme="dark"] {
|
|
153
|
+
${[...e,...r,o,i,c].join("")}}
|
|
154
|
+
`}#Z(t){if(!t?.dark)return"";let e=[],a=(s,p="")=>{Object.entries(s).forEach(([g,h])=>{typeof h=="object"&&h!==null?a(h,`${p}${g}-`):typeof h=="string"&&e.push(` --color-${p}${g}: ${h};
|
|
155
|
+
`)})};Object.entries(t.dark).forEach(([s,p])=>{s!=="surfaceSmart"&&typeof p=="object"&&p!==null&&a(p,`${s}-`)});let r=[];t.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
156
|
+
`),Object.entries(t.dark.surfaceSmart).forEach(([s,p])=>{r.push(` --surface-${s}-bg: ${p.bg};
|
|
157
|
+
`),r.push(` --surface-${s}-text: ${p.text};
|
|
158
|
+
`),r.push(` --surface-${s}-text-secondary: ${p.textSecondary};
|
|
159
|
+
`),r.push(` --surface-${s}-text-muted: ${p.textMuted};
|
|
160
|
+
`),r.push(` --surface-${s}-icon: ${p.icon};
|
|
161
|
+
`),r.push(` --surface-${s}-icon-subtle: ${p.iconSubtle};
|
|
162
|
+
`),r.push(` --surface-${s}-shadow: ${p.shadow};
|
|
163
|
+
`),r.push(` --surface-${s}-border: ${p.border};
|
|
164
|
+
`)}),r.push(`
|
|
165
|
+
`));let o=[];t.interactive&&t.interactive.dark&&(o.push(` /* Interactive Colors - optimized for specific use cases (dark mode) */
|
|
166
|
+
`),o.push(` --color-primary-fill: ${t.interactive.dark.fill}; /* For button backgrounds with white text */
|
|
167
|
+
`),o.push(` --color-primary-text: ${t.interactive.dark.text}; /* For links and outline buttons on dark surfaces */
|
|
168
|
+
`));let i=[` --color-text-primary: var(--color-gray-100);
|
|
169
|
+
`,` --color-text-secondary: var(--color-gray-300);
|
|
170
|
+
`,` --color-text-muted: var(--color-gray-400);
|
|
171
|
+
`,` --color-border: var(--color-gray-700);
|
|
172
|
+
`,` --color-input-bg: var(--color-gray-800);
|
|
173
|
+
`,` --color-input-disabled-bg: var(--color-gray-900);
|
|
174
|
+
`,` --color-input-disabled-text: var(--color-gray-600);
|
|
175
|
+
`,` --color-code-bg: var(--color-gray-800);
|
|
176
|
+
`,...o].join(""),c=` /* Backdrop tokens - dark mode */
|
|
177
|
+
--backdrop-bg: linear-gradient(
|
|
178
|
+
135deg,
|
|
179
|
+
rgba(0, 0, 0, 0.6),
|
|
180
|
+
rgba(0, 0, 0, 0.4)
|
|
181
|
+
);
|
|
182
|
+
--backdrop-blur: 10px;
|
|
183
|
+
--backdrop-saturate: 120%;
|
|
184
|
+
--backdrop-brightness: 0.7;
|
|
185
|
+
--backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturate)) brightness(var(--backdrop-brightness));
|
|
186
|
+
--backdrop-opacity: 1;
|
|
187
|
+
|
|
188
|
+
/* Legacy alias for backwards compatibility */
|
|
189
|
+
--backdrop-background: var(--backdrop-bg);
|
|
190
|
+
`,l=this.#J(t);return`
|
|
191
|
+
html[data-theme="dark"] {
|
|
192
|
+
${[...e,...r,i,c,l].join("")} }
|
|
193
|
+
`}#J(t){let e=t.dark||t,a=e.primary?.[400]||"#60a5fa",r=e.secondary?.[400]||"#a78bfa",o=e.accent?.[400]||"#fbbf24";return` /* Mesh Gradient Variables (Dark Mode) */
|
|
194
|
+
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${a} 20%, transparent) 0px, transparent 50%),
|
|
195
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
196
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${o} 13%, transparent) 0px, transparent 50%),
|
|
197
|
+
radial-gradient(at 10% 29%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
198
|
+
|
|
199
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
200
|
+
radial-gradient(at 80% 0%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
201
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${o} 12%, transparent) 0px, transparent 50%),
|
|
202
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
203
|
+
|
|
204
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${o} 15%, transparent) 0px, transparent 50%),
|
|
205
|
+
radial-gradient(at 85% 30%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
206
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
207
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${o} 11%, transparent) 0px, transparent 50%);
|
|
208
|
+
|
|
209
|
+
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
210
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
211
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${o} 12%, transparent) 0px, transparent 50%),
|
|
212
|
+
radial-gradient(at 30% 40%, color-mix(in oklab, ${a} 11%, transparent) 0px, transparent 50%);
|
|
213
|
+
|
|
214
|
+
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
215
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
216
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
217
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
218
|
+
`}#Y(t){let e=t.dark||t,a=e.primary?.[400]||"#60a5fa",r=e.secondary?.[400]||"#a78bfa",o=e.accent?.[400]||"#fbbf24";return`
|
|
219
|
+
/* Mesh Gradient Backgrounds (Dark Mode) */
|
|
220
|
+
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${a} 20%, transparent) 0px, transparent 50%),
|
|
221
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
222
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${o} 13%, transparent) 0px, transparent 50%),
|
|
223
|
+
radial-gradient(at 10% 29%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
224
|
+
|
|
225
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
226
|
+
radial-gradient(at 80% 0%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
227
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${o} 12%, transparent) 0px, transparent 50%),
|
|
228
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
229
|
+
|
|
230
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${o} 15%, transparent) 0px, transparent 50%),
|
|
231
|
+
radial-gradient(at 85% 30%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
232
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
233
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${o} 11%, transparent) 0px, transparent 50%);
|
|
234
|
+
|
|
235
|
+
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
236
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
237
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${o} 12%, transparent) 0px, transparent 50%),
|
|
238
|
+
radial-gradient(at 30% 40%, color-mix(in oklab, ${a} 11%, transparent) 0px, transparent 50%);
|
|
239
|
+
|
|
240
|
+
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${a} 17%, transparent) 0px, transparent 50%),
|
|
241
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
242
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
243
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
244
|
+
`}#K(){return`/* Alert dark mode adjustments */
|
|
245
|
+
html[data-theme="dark"] {
|
|
246
|
+
.alert-success { background-color: var(--color-success-50); border-color: var(--color-success-500); color: var(--color-success-900); }
|
|
247
|
+
.alert-info { background-color: var(--color-info-50); border-color: var(--color-info-500); color: var(--color-info-900); }
|
|
248
|
+
.alert-warning { background-color: var(--color-warning-50); border-color: var(--color-warning-500); color: var(--color-warning-900); }
|
|
249
|
+
.alert-danger, .alert-error { background-color: var(--color-danger-50); border-color: var(--color-danger-500); color: var(--color-danger-900); }
|
|
250
|
+
img, video { opacity: 0.8; transition: opacity var(--transition-normal); }
|
|
251
|
+
img:hover, video:hover { opacity: 1; }
|
|
252
|
+
}`}#X(){try{let t=this.options?.design?.options?.backgroundMesh;this.options.debug&&this.options.log?.("debug","backgroundMesh check:",t);let e=Number(t);return!Number.isFinite(e)||e===0?"":`/* Optional background mesh applied from config */
|
|
253
|
+
body {
|
|
254
|
+
background: var(--background-mesh-0${Math.max(1,Math.min(5,Math.floor(e)))});
|
|
255
|
+
background-attachment: fixed;
|
|
256
|
+
}`}catch(t){return this.options.debug&&this.options.log?.("error","Error in generateBodyBackgroundMeshRule:",t),""}}#ee(){try{return this.options?.design?.options?.liquidGlassEffects?`/* Liquid glass utility (opt-in via options.liquidGlassEffects) */
|
|
257
|
+
.liquid-glass {
|
|
258
|
+
border-radius: var(--radius-lg);
|
|
259
|
+
/* Subtle translucent fill blended with surface */
|
|
260
|
+
background: color-mix(in oklab, var(--color-surface-subtle) 45%, transparent);
|
|
261
|
+
|
|
262
|
+
background-image: linear-gradient(
|
|
263
|
+
135deg,
|
|
264
|
+
rgba(255,255,255,0.35),
|
|
265
|
+
rgba(255,255,255,0.12)
|
|
266
|
+
);
|
|
267
|
+
/* Frosted glass blur + saturation */
|
|
268
|
+
-webkit-backdrop-filter: blur(12px) saturate(140%);
|
|
269
|
+
backdrop-filter: blur(12px) saturate(140%);
|
|
270
|
+
/* Soft inner highlight and outer depth */
|
|
271
|
+
box-shadow:
|
|
272
|
+
inset 0 1px 0 rgba(255,255,255,0.6),
|
|
273
|
+
inset 0 -40px 80px rgba(255,255,255,0.12),
|
|
274
|
+
0 10px 30px rgba(0,0,0,0.10);
|
|
275
|
+
/* Glossy border with slight light and dark edges */
|
|
276
|
+
border: 1px solid color-mix(in oklab, var(--color-primary-500) 22%, transparent);
|
|
277
|
+
outline: 1px solid color-mix(in oklab, #ffffff 18%, transparent);
|
|
278
|
+
outline-offset: -1px;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
html[data-theme="dark"] .liquid-glass {
|
|
282
|
+
background: color-mix(in oklab, var(--color-surface-inverse) 45%, transparent);
|
|
283
|
+
background-image: linear-gradient(
|
|
284
|
+
135deg,
|
|
285
|
+
color-mix(in oklab, var(--color-primary-300) 40%, transparent),
|
|
286
|
+
color-mix(in oklab, var(--color-surface-overlay) 48%, transparent)
|
|
287
|
+
);
|
|
288
|
+
box-shadow:
|
|
289
|
+
inset 0 1px 0 rgba(255,255,255,0.12),
|
|
290
|
+
inset 0 -40px 80px rgba(0,0,0,0.55),
|
|
291
|
+
0 18px 38px rgba(0,0,0,0.65);
|
|
292
|
+
border: 1px solid color-mix(in oklab, var(--color-primary-300) 26%, transparent);
|
|
293
|
+
outline: 1px solid color-mix(in oklab, #ffffff 16%, transparent);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
/* Fallback when backdrop-filter isn't supported */
|
|
297
|
+
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
|
|
298
|
+
.liquid-glass {
|
|
299
|
+
/* Strengthen fill a bit to compensate for lack of blur */
|
|
300
|
+
background: color-mix(in oklab, var(--color-surface-subtle) 70%, rgba(255,255,255,0.4));
|
|
301
|
+
box-shadow:
|
|
302
|
+
inset 0 1px 0 rgba(255,255,255,0.6),
|
|
303
|
+
0 10px 24px rgba(0,0,0,0.08);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
html[data-theme="dark"] .liquid-glass {
|
|
307
|
+
background: color-mix(in oklab, var(--color-surface-inverse) 70%, transparent);
|
|
308
|
+
box-shadow:
|
|
309
|
+
inset 0 1px 0 rgba(255,255,255,0.1),
|
|
310
|
+
0 18px 32px rgba(0,0,0,0.58);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
`:""}catch{return""}}#te(){return`/* ============================================================================
|
|
314
|
+
Border Gradient Utilities
|
|
315
|
+
Card outlines with gradient borders and glow effects
|
|
316
|
+
============================================================================ */
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
/* Gradient border utility - premium/promo card style */
|
|
320
|
+
.border-gradient {
|
|
321
|
+
border: var(--border-width-medium) solid transparent;
|
|
322
|
+
background:
|
|
323
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
324
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
325
|
+
var(--color-primary-400),
|
|
326
|
+
var(--color-accent-400)
|
|
327
|
+
) border-box;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/* Gradient border variants - different color combinations */
|
|
331
|
+
.border-gradient-primary {
|
|
332
|
+
border: var(--border-width-medium) solid transparent;
|
|
333
|
+
background:
|
|
334
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
335
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
336
|
+
var(--color-primary-300),
|
|
337
|
+
var(--color-primary-600)
|
|
338
|
+
) border-box;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.border-gradient-accent {
|
|
342
|
+
border: var(--border-width-medium) solid transparent;
|
|
343
|
+
background:
|
|
344
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
345
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
346
|
+
var(--color-accent-300),
|
|
347
|
+
var(--color-accent-600)
|
|
348
|
+
) border-box;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.border-gradient-secondary {
|
|
352
|
+
border: var(--border-width-medium) solid transparent;
|
|
353
|
+
background:
|
|
354
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
355
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
356
|
+
var(--color-secondary-300),
|
|
357
|
+
var(--color-secondary-600)
|
|
358
|
+
) border-box;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
/* Gradient border with different strengths/thickness */
|
|
362
|
+
.border-gradient-soft {
|
|
363
|
+
border: 1px solid transparent;
|
|
364
|
+
background:
|
|
365
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
366
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
367
|
+
var(--color-primary-400),
|
|
368
|
+
var(--color-accent-400)
|
|
369
|
+
) border-box;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.border-gradient-medium {
|
|
373
|
+
border: 2px solid transparent;
|
|
374
|
+
background:
|
|
375
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
376
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
377
|
+
var(--color-primary-400),
|
|
378
|
+
var(--color-accent-400)
|
|
379
|
+
) border-box;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.border-gradient-strong {
|
|
383
|
+
border: 3px solid transparent;
|
|
384
|
+
background:
|
|
385
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
386
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
387
|
+
var(--color-primary-400),
|
|
388
|
+
var(--color-accent-400)
|
|
389
|
+
) border-box;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/* Glow effect utility - for callouts and active states */
|
|
393
|
+
.border-glow {
|
|
394
|
+
box-shadow: 0 0 12px var(--color-primary-500);
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
.border-glow-sm {
|
|
398
|
+
box-shadow: 0 0 6px var(--color-primary-500);
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
.border-glow-lg {
|
|
402
|
+
box-shadow: 0 0 20px var(--color-primary-500);
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
/* Combined gradient + glow for premium effects */
|
|
406
|
+
.border-gradient-glow {
|
|
407
|
+
border: var(--border-width-medium) solid transparent;
|
|
408
|
+
background:
|
|
409
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
410
|
+
linear-gradient(135deg,
|
|
411
|
+
var(--color-primary-400),
|
|
412
|
+
var(--color-accent-400)
|
|
413
|
+
) border-box;
|
|
414
|
+
box-shadow: 0 0 12px var(--color-primary-500);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/* Semantic glow variants */
|
|
418
|
+
.border-glow-primary {
|
|
419
|
+
box-shadow: 0 0 12px var(--color-primary-500);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
.border-glow-accent {
|
|
423
|
+
box-shadow: 0 0 12px var(--color-accent-500);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
.border-glow-success {
|
|
427
|
+
box-shadow: 0 0 12px var(--color-success-500);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.border-glow-warning {
|
|
431
|
+
box-shadow: 0 0 12px var(--color-warning-500);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.border-glow-danger {
|
|
435
|
+
box-shadow: 0 0 12px var(--color-danger-500);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
`}#re(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Semantic HTML Elements (low-specificity via :where()) */
|
|
439
|
+
|
|
440
|
+
:where(blockquote) {
|
|
441
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
442
|
+
padding: var(--spacing-6) var(--spacing-8);
|
|
443
|
+
border-left: 4px solid var(--color-primary-500);
|
|
444
|
+
background-color: var(--color-surface-elevated);
|
|
445
|
+
border-radius: var(--radius-none);
|
|
446
|
+
font-size: var(--font-size-lg);
|
|
447
|
+
line-height: var(--line-height-relaxed);
|
|
448
|
+
color: var(--color-text-primary);
|
|
449
|
+
|
|
450
|
+
:where(p):last-child {
|
|
451
|
+
margin-bottom: 0;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
:where(cite) {
|
|
455
|
+
display: block;
|
|
456
|
+
margin-top: var(--spacing-4);
|
|
457
|
+
font-size: var(--font-size-base);
|
|
458
|
+
font-style: normal;
|
|
459
|
+
color: var(--color-primary-500);
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
:where(hr) {
|
|
464
|
+
margin: var(--spacing-8) 0;
|
|
465
|
+
border: none;
|
|
466
|
+
border-top: 1px solid var(--color-border);
|
|
467
|
+
height: 0;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
/* Labeled horizontal rule: <hr data-content="OR"> */
|
|
471
|
+
:where(hr[data-content]) {
|
|
472
|
+
position: relative;
|
|
473
|
+
border: none;
|
|
474
|
+
text-align: center;
|
|
475
|
+
height: auto;
|
|
476
|
+
overflow: visible;
|
|
477
|
+
|
|
478
|
+
&::before {
|
|
479
|
+
content: "";
|
|
480
|
+
position: absolute;
|
|
481
|
+
left: 0;
|
|
482
|
+
top: 50%;
|
|
483
|
+
width: 100%;
|
|
484
|
+
height: 1px;
|
|
485
|
+
background: linear-gradient(to right, transparent, var(--color-border), transparent);
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
&::after {
|
|
489
|
+
content: attr(data-content);
|
|
490
|
+
position: relative;
|
|
491
|
+
display: inline-block;
|
|
492
|
+
padding: 0 var(--spacing-3);
|
|
493
|
+
background-color: var(--color-surface-base);
|
|
494
|
+
color: var(--color-text-muted);
|
|
495
|
+
font-size: var(--font-size-sm);
|
|
496
|
+
line-height: var(--font-line-height-normal);
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
:where(dl) {
|
|
501
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
:where(dt) {
|
|
505
|
+
font-weight: var(--font-weight-semibold);
|
|
506
|
+
color: var(--color-text-primary);
|
|
507
|
+
margin-top: var(--spacing-3);
|
|
508
|
+
|
|
509
|
+
&:first-child {
|
|
510
|
+
margin-top: 0;
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
|
|
514
|
+
:where(dd) {
|
|
515
|
+
margin: var(--spacing-1) 0 var(--spacing-3) var(--spacing-6);
|
|
516
|
+
color: var(--color-text-secondary);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
:where(nav), :where(header), :where(footer) {
|
|
520
|
+
display: block;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
:where(header), :where(footer) {
|
|
524
|
+
width: 100%;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
/* Headings within header elements have tight spacing for intro content */
|
|
528
|
+
:where(header) > :where(h1, h2, h3, h4, h5, h6) {
|
|
529
|
+
margin: 0;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
:where(article), :where(section), :where(aside) {
|
|
533
|
+
display: block;
|
|
534
|
+
margin-bottom: var(--spacing-6);
|
|
535
|
+
|
|
536
|
+
& > *:last-child {
|
|
537
|
+
margin-bottom: 0;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
:where(mark) {
|
|
542
|
+
background-color: var(--color-warning-200);
|
|
543
|
+
color: var(--color-warning-900);
|
|
544
|
+
padding: 0 var(--spacing-1);
|
|
545
|
+
border-radius: var(--radius-sm);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
:where(kbd) {
|
|
549
|
+
display: inline-block;
|
|
550
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
551
|
+
font-family: var(--font-family-mono);
|
|
552
|
+
font-size: var(--font-size-sm);
|
|
553
|
+
color: var(--color-text-primary);
|
|
554
|
+
background-color: var(--color-surface-elevated);
|
|
555
|
+
border: 1px solid var(--color-border);
|
|
556
|
+
border-radius: var(--radius-sm);
|
|
557
|
+
box-shadow: 0 2px 0 0 var(--color-border);
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
:where(abbr[title]) {
|
|
561
|
+
text-decoration: underline dotted;
|
|
562
|
+
cursor: help;
|
|
563
|
+
text-decoration-thickness: 1px;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
:where(time) {
|
|
567
|
+
font-variant-numeric: tabular-nums;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
:where(address) {
|
|
571
|
+
font-style: normal;
|
|
572
|
+
line-height: var(--font-line-height-relaxed);
|
|
573
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
:where(details):not(.accordion *) {
|
|
577
|
+
margin: 0 0 var(--spacing-2) 0;
|
|
578
|
+
border: 1px solid var(--color-border);
|
|
579
|
+
border-radius: var(--radius-md);
|
|
580
|
+
background-color: var(--color-surface-base);
|
|
581
|
+
|
|
582
|
+
&[open] :where(summary) {
|
|
583
|
+
border-bottom: 1px solid var(--color-border);
|
|
584
|
+
background-color: var(--color-surface-subtle);
|
|
585
|
+
|
|
586
|
+
&::after {
|
|
587
|
+
transform: rotate(270deg);
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
& > *:not(:where(summary)) {
|
|
592
|
+
padding: var(--spacing-4);
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
:where(summary) {
|
|
597
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
598
|
+
cursor: pointer;
|
|
599
|
+
border-radius: var(--radius-md);
|
|
600
|
+
font-weight: var(--font-weight-medium);
|
|
601
|
+
user-select: none;
|
|
602
|
+
list-style: none;
|
|
603
|
+
display: flex;
|
|
604
|
+
align-items: center;
|
|
605
|
+
justify-content: space-between;
|
|
606
|
+
transition: background-color var(--transition-fast);
|
|
607
|
+
|
|
608
|
+
&::-webkit-details-marker {
|
|
609
|
+
display: none;
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
&::after {
|
|
613
|
+
content: "\u203A";
|
|
614
|
+
display: inline-block;
|
|
615
|
+
transform: rotate(90deg);
|
|
616
|
+
transition: transform var(--transition-fast);
|
|
617
|
+
font-size: var(--font-size-xl);
|
|
618
|
+
font-weight: var(--font-weight-bold);
|
|
619
|
+
color: var(--color-text-secondary);
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
&:hover {
|
|
623
|
+
background-color: var(--color-surface-subtle);
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
/* Dialog styles moved to #generateDialogStyles() */
|
|
628
|
+
|
|
629
|
+
`}#ae(){let{gap:t,inputPadding:e,buttonPadding:a,focusRingWidth:r,focusRingOpacity:o,borderWidthThin:i,sectionSpacing:c,buttonMinHeight:l,inputMinHeight:d}=this.options.design,s=e||.75,p=a||1,g=r||3,h=i||1,v=t||1,x=c||2,m=l||44;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
630
|
+
form {
|
|
631
|
+
margin: 0;
|
|
632
|
+
width: 100%;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
fieldset {
|
|
636
|
+
margin: 0;
|
|
637
|
+
width: 100%;
|
|
638
|
+
|
|
639
|
+
/* Unified styling for radio groups and checkbox groups */
|
|
640
|
+
&[role="radiogroup"],
|
|
641
|
+
&[role="group"] {
|
|
642
|
+
display: flex;
|
|
643
|
+
flex-direction: column;
|
|
644
|
+
gap: var(--spacing-2);
|
|
645
|
+
padding: 0;
|
|
646
|
+
background-color: transparent;
|
|
647
|
+
|
|
648
|
+
label {
|
|
649
|
+
display: flex;
|
|
650
|
+
align-items: center;
|
|
651
|
+
gap: var(--spacing-3);
|
|
652
|
+
padding: var(--spacing-1) 0;
|
|
653
|
+
cursor: pointer;
|
|
654
|
+
min-height: auto;
|
|
655
|
+
border: none;
|
|
656
|
+
background: none;
|
|
657
|
+
font-weight: var(--font-weight-normal);
|
|
658
|
+
margin-bottom: 0;
|
|
659
|
+
|
|
660
|
+
&:hover {
|
|
661
|
+
color: var(--color-primary-700);
|
|
662
|
+
}
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
input[type="checkbox"]{
|
|
666
|
+
border-radius: var(--radius-xs);
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
input[type="radio"],
|
|
670
|
+
input[type="checkbox"] {
|
|
671
|
+
position: static;
|
|
672
|
+
opacity: 1;
|
|
673
|
+
width: var(--spacing-5);
|
|
674
|
+
height: var(--spacing-5);
|
|
675
|
+
min-height: var(--spacing-5);
|
|
676
|
+
padding: var(--spacing-2);
|
|
677
|
+
margin: 0;
|
|
678
|
+
cursor: pointer;
|
|
679
|
+
flex-shrink: 0;
|
|
680
|
+
accent-color: var(--color-primary-600);
|
|
681
|
+
|
|
682
|
+
&:focus-visible {
|
|
683
|
+
outline: none;
|
|
684
|
+
|
|
685
|
+
box-shadow:
|
|
686
|
+
0 0 0 2px var(--color-primary-500),
|
|
687
|
+
0 0 0 4px color-mix(in srgb,
|
|
688
|
+
var(--color-primary-500) 40%,
|
|
689
|
+
transparent
|
|
690
|
+
);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
&:checked {
|
|
694
|
+
background-color: var(--color-primary-600);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
/* Nested legend scaling: reduce font-size for deeper sub-forms */
|
|
705
|
+
fieldset > legend { font-size: var(--font-size-lg); }
|
|
706
|
+
fieldset fieldset > legend { font-size: var(--font-size-base); }
|
|
707
|
+
fieldset fieldset fieldset > legend { font-size: var(--font-size-sm); }
|
|
708
|
+
|
|
709
|
+
.form-container {
|
|
710
|
+
display: grid;
|
|
711
|
+
gap: var(--spacing-6);
|
|
712
|
+
width: 100%;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.fields {
|
|
716
|
+
display: grid;
|
|
717
|
+
gap: var(--spacing-4);
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
label {
|
|
721
|
+
display: block;
|
|
722
|
+
font-weight: var(--font-weight-medium);
|
|
723
|
+
color: var(--color-text-primary);
|
|
724
|
+
font-size: var(--font-size-sm);
|
|
725
|
+
line-height: var(--font-line-height-normal);
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
[data-label] {
|
|
729
|
+
display: block;
|
|
730
|
+
font-weight: var(--font-weight-medium);
|
|
731
|
+
color: var(--color-text-primary);
|
|
732
|
+
font-size: var(--font-size-sm);
|
|
733
|
+
margin-bottom: var(--spacing-2);
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
[data-open]{
|
|
737
|
+
[data-label]{
|
|
738
|
+
margin-bottom: 0;
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
.field-description {
|
|
743
|
+
font-size: var(--font-size-xs);
|
|
744
|
+
color: var(--color-text-secondary);
|
|
745
|
+
margin-top: var(--spacing-1);
|
|
746
|
+
line-height: var(--font-line-height-relaxed);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
input, textarea, select {
|
|
750
|
+
&:focus {
|
|
751
|
+
outline: none;
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
input, textarea, select {
|
|
756
|
+
width: 100%;
|
|
757
|
+
min-height: ${d||40}px;
|
|
758
|
+
padding: calc(var(--spacing-1) * ${s}) var(--spacing-4);
|
|
759
|
+
border: ${h}px solid var(--color-border);
|
|
760
|
+
border-radius: var(--radius-md);
|
|
761
|
+
font-family: var(--font-family-body);
|
|
762
|
+
font-size: var(--font-size-base);
|
|
763
|
+
line-height: var(--font-line-height-normal);
|
|
764
|
+
background-color: var(--color-input-bg);
|
|
765
|
+
color: var(--color-text-primary);
|
|
766
|
+
transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
|
|
767
|
+
touch-action: manipulation;
|
|
768
|
+
appearance: none;
|
|
769
|
+
-webkit-appearance: none;
|
|
770
|
+
|
|
771
|
+
&:focus {
|
|
772
|
+
border-color: var(--color-primary-500);
|
|
773
|
+
background-color: var(--color-surface-base);
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
&:disabled {
|
|
777
|
+
background-color: var(--color-input-disabled-bg);
|
|
778
|
+
color: var(--color-input-disabled-text);
|
|
779
|
+
border-color: var(--color-border);
|
|
780
|
+
cursor: not-allowed;
|
|
781
|
+
opacity: 0.6;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
&:invalid {
|
|
785
|
+
border-color: var(--color-danger-500);
|
|
786
|
+
|
|
787
|
+
&:focus {
|
|
788
|
+
box-shadow: 0 0 0 ${g}px color-mix(in oklab, var(--color-danger-500) ${Math.round((o||.3)*100)}%, transparent);
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
input[type="range"] {
|
|
794
|
+
padding: 0;
|
|
795
|
+
background: transparent;
|
|
796
|
+
min-height: auto;
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
/* Make range visually match other inputs */
|
|
800
|
+
input[type="range"] {
|
|
801
|
+
-webkit-appearance: none;
|
|
802
|
+
appearance: none;
|
|
803
|
+
height: var(--input-min-height, 40px); /* align control height with inputs */
|
|
804
|
+
width: 100%;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/* Track and thumb styling - using CSS nesting to reduce repetition */
|
|
808
|
+
input[type="range"] {
|
|
809
|
+
/* WebKit track */
|
|
810
|
+
&::-webkit-slider-runnable-track {
|
|
811
|
+
height: var(--range-track-height, 8px);
|
|
812
|
+
background: var(--color-input-bg);
|
|
813
|
+
border-radius: var(--radius-full);
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
/* WebKit thumb */
|
|
817
|
+
&::-webkit-slider-thumb {
|
|
818
|
+
-webkit-appearance: none;
|
|
819
|
+
appearance: none;
|
|
820
|
+
width: var(--range-thumb-size, 28px);
|
|
821
|
+
height: var(--range-thumb-size, 28px);
|
|
822
|
+
margin-top: calc((var(--range-track-height, 8px) - var(--range-thumb-size, 28px)) / 2);
|
|
823
|
+
background: color-mix(in srgb, var(--color-primary-500) 15%, var(--color-surface-base));
|
|
824
|
+
border-radius: 50%;
|
|
825
|
+
box-shadow: var(--shadow-sm);
|
|
826
|
+
cursor: grab;
|
|
827
|
+
border: 1px solid color-mix(in srgb, var(--color-primary-500) 30%, var(--color-border));
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
/* Mozilla track */
|
|
831
|
+
&::-moz-range-track {
|
|
832
|
+
height: var(--range-track-height, 8px);
|
|
833
|
+
background: var(--color-input-bg);
|
|
834
|
+
border-radius: var(--radius-full);
|
|
835
|
+
}
|
|
836
|
+
|
|
837
|
+
/* Mozilla thumb */
|
|
838
|
+
&::-moz-range-thumb {
|
|
839
|
+
width: var(--range-thumb-size, 28px);
|
|
840
|
+
height: var(--range-thumb-size, 28px);
|
|
841
|
+
background: color-mix(in srgb, var(--color-primary-500) 15%, var(--color-surface-base));
|
|
842
|
+
border-radius: 50%;
|
|
843
|
+
box-shadow: var(--shadow-sm);
|
|
844
|
+
border: 1px solid color-mix(in srgb, var(--color-primary-500) 30%, var(--color-border));
|
|
845
|
+
transform: translateY(calc((var(--range-track-height, 8px) - var(--range-thumb-size, 28px)) / 2));
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
/* Hover and focus states for WebKit */
|
|
849
|
+
&:hover::-webkit-slider-thumb,
|
|
850
|
+
&:focus-visible::-webkit-slider-thumb {
|
|
851
|
+
cursor: grabbing;
|
|
852
|
+
background: var(--color-primary-500);
|
|
853
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
|
854
|
+
border-color: var(--color-primary-600);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
/* Active state for WebKit */
|
|
858
|
+
&:active::-webkit-slider-thumb {
|
|
859
|
+
background: var(--color-primary-600);
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
/* Hover and focus states for Mozilla */
|
|
863
|
+
&:hover::-moz-range-thumb,
|
|
864
|
+
&:focus-visible::-moz-range-thumb {
|
|
865
|
+
background: var(--color-primary-500);
|
|
866
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
|
867
|
+
border-color: var(--color-primary-600);
|
|
868
|
+
cursor: grabbing;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
/* Active state for Mozilla */
|
|
872
|
+
&:active::-moz-range-thumb {
|
|
873
|
+
background: var(--color-primary-600);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
/* Focus style for container to match input focus */
|
|
878
|
+
.range-container:focus-within {
|
|
879
|
+
border-color: var(--color-primary-500);
|
|
880
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-500) 30%, transparent);
|
|
881
|
+
}
|
|
882
|
+
|
|
883
|
+
input[type="range"]:active::-moz-range-thumb {
|
|
884
|
+
background: var(--color-primary-600);
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
input[type="color"] {
|
|
888
|
+
-webkit-appearance: none;
|
|
889
|
+
padding: 0;
|
|
890
|
+
width: 3rem;
|
|
891
|
+
height: 3rem;
|
|
892
|
+
border-radius: 0.75rem; /* your radius */
|
|
893
|
+
overflow: hidden; /* important */
|
|
894
|
+
cursor: pointer;
|
|
895
|
+
|
|
896
|
+
/* The wrapper */
|
|
897
|
+
&::-webkit-color-swatch-wrapper {
|
|
898
|
+
padding: 0;
|
|
899
|
+
border-radius: inherit;
|
|
900
|
+
}
|
|
901
|
+
|
|
902
|
+
/* The swatch (the actual color box) */
|
|
903
|
+
&::-webkit-color-swatch {
|
|
904
|
+
border: none;
|
|
905
|
+
border-radius: inherit;
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
|
|
909
|
+
/* Button-style checkbox inputs outside of fieldsets */
|
|
910
|
+
.checkbox-container input[type="checkbox"] {
|
|
911
|
+
appearance: none;
|
|
912
|
+
-webkit-appearance: none;
|
|
913
|
+
-moz-appearance: none;
|
|
914
|
+
position: absolute;
|
|
915
|
+
opacity: 0;
|
|
916
|
+
width: 0;
|
|
917
|
+
height: 0;
|
|
918
|
+
margin: 0;
|
|
919
|
+
padding: 0;
|
|
920
|
+
pointer-events: none;
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
label:has(input[type="checkbox"]):not(fieldset label):not(label[data-toggle]),
|
|
924
|
+
input[type="checkbox"] + label:not(fieldset label):not(label[data-toggle]) {
|
|
925
|
+
display: inline-flex;
|
|
926
|
+
align-items: center;
|
|
927
|
+
justify-content: center;
|
|
928
|
+
min-height: calc(${m}px * 0.75);
|
|
929
|
+
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
930
|
+
border: ${h}px solid var(--color-border);
|
|
931
|
+
border-radius: var(--radius-md);
|
|
932
|
+
font-family: var(--font-family-body);
|
|
933
|
+
font-size: var(--font-size-sm);
|
|
934
|
+
font-weight: var(--font-weight-medium);
|
|
935
|
+
line-height: 1.2;
|
|
936
|
+
cursor: pointer;
|
|
937
|
+
transition: all var(--transition-fast);
|
|
938
|
+
text-decoration: none;
|
|
939
|
+
touch-action: manipulation;
|
|
940
|
+
user-select: none;
|
|
941
|
+
background-color: transparent;
|
|
942
|
+
color: var(--color-text-primary);
|
|
943
|
+
margin: 0;
|
|
944
|
+
flex: 0 1 auto;
|
|
945
|
+
white-space: nowrap;
|
|
946
|
+
|
|
947
|
+
&:hover {
|
|
948
|
+
background-color: var(--color-surface-subtle);
|
|
949
|
+
border-color: var(--color-primary-500);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
label:has(input[type="checkbox"]:checked):not(fieldset label):not(label[data-toggle]),
|
|
954
|
+
input[type="checkbox"]:checked + label:not(fieldset label):not(label[data-toggle]) {
|
|
955
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 8%, transparent);
|
|
956
|
+
color: var(--color-primary-700);
|
|
957
|
+
border-color: var(--color-primary-500);
|
|
958
|
+
border-width: 2px;
|
|
959
|
+
font-weight: var(--font-weight-semibold);
|
|
960
|
+
|
|
961
|
+
&:hover {
|
|
962
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 15%, transparent);
|
|
963
|
+
border-color: var(--color-primary-600);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
label:has(input[type="checkbox"]:focus):not(fieldset label):not(label[data-toggle]),
|
|
968
|
+
input[type="checkbox"]:focus + label:not(fieldset label):not(label[data-toggle]) {
|
|
969
|
+
outline: none;
|
|
970
|
+
box-shadow: 0 0 0 ${g}px color-mix(in oklab, var(--color-primary-500) ${Math.round((o||.3)*100)}%, transparent);
|
|
971
|
+
}
|
|
972
|
+
|
|
973
|
+
label:has(input[type="checkbox"]:disabled):not(fieldset label):not(label[data-toggle]),
|
|
974
|
+
input[type="checkbox"]:disabled + label:not(fieldset label):not(label[data-toggle]) {
|
|
975
|
+
background-color: var(--color-input-disabled-bg);
|
|
976
|
+
color: var(--color-input-disabled-text);
|
|
977
|
+
border-color: var(--color-border);
|
|
978
|
+
cursor: not-allowed;
|
|
979
|
+
opacity: 0.6;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
label:has(input[type="checkbox"]:checked:disabled):not(fieldset label):not(label[data-toggle]),
|
|
983
|
+
input[type="checkbox"]:checked:disabled + label:not(fieldset label):not(label[data-toggle]) {
|
|
984
|
+
background-color: var(--color-input-disabled-bg);
|
|
985
|
+
color: var(--color-input-disabled-text);
|
|
986
|
+
border-color: var(--color-border);
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/* Keep default checkbox/radio for inputs NOT in special containers */
|
|
990
|
+
input[type="checkbox"]:not(fieldset input[type="checkbox"]):not(.checkbox-container input[type="checkbox"]),
|
|
991
|
+
input[type="radio"]:not(fieldset input[type="radio"]) {
|
|
992
|
+
width: var(--spacing-5);
|
|
993
|
+
height: var(--spacing-5);
|
|
994
|
+
min-height: var(--spacing-5);
|
|
995
|
+
margin-right: var(--spacing-2);
|
|
996
|
+
cursor: pointer;
|
|
997
|
+
position: static;
|
|
998
|
+
opacity: 1;
|
|
999
|
+
appearance: auto;
|
|
1000
|
+
-webkit-appearance: auto;
|
|
1001
|
+
|
|
1002
|
+
&:disabled {
|
|
1003
|
+
cursor: not-allowed;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
/* Button-style radio and checkbox groups with .buttons class */
|
|
1008
|
+
fieldset[role="radiogroup"].buttons,
|
|
1009
|
+
fieldset[role="group"].buttons {
|
|
1010
|
+
flex-direction: row;
|
|
1011
|
+
flex-wrap: wrap;
|
|
1012
|
+
gap: var(--spacing-3);
|
|
1013
|
+
|
|
1014
|
+
input[type="radio"],
|
|
1015
|
+
input[type="checkbox"] {
|
|
1016
|
+
appearance: none;
|
|
1017
|
+
-webkit-appearance: none;
|
|
1018
|
+
-moz-appearance: none;
|
|
1019
|
+
position: absolute;
|
|
1020
|
+
opacity: 0;
|
|
1021
|
+
width: 0;
|
|
1022
|
+
height: 0;
|
|
1023
|
+
margin: 0;
|
|
1024
|
+
padding: 0;
|
|
1025
|
+
pointer-events: none;
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
label {
|
|
1029
|
+
display: inline-flex;
|
|
1030
|
+
align-items: center;
|
|
1031
|
+
justify-content: center;
|
|
1032
|
+
min-height: calc(${m}px * 0.75);
|
|
1033
|
+
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
1034
|
+
border: 2px solid var(--color-border);
|
|
1035
|
+
border-radius: var(--radius-md);
|
|
1036
|
+
font-family: var(--font-family-body);
|
|
1037
|
+
font-size: var(--font-size-sm);
|
|
1038
|
+
font-weight: var(--font-weight-medium);
|
|
1039
|
+
line-height: 1.2;
|
|
1040
|
+
cursor: pointer;
|
|
1041
|
+
transition: all var(--transition-fast);
|
|
1042
|
+
text-decoration: none;
|
|
1043
|
+
touch-action: manipulation;
|
|
1044
|
+
user-select: none;
|
|
1045
|
+
background-color: transparent;
|
|
1046
|
+
color: var(--color-text-primary);
|
|
1047
|
+
margin: 0;
|
|
1048
|
+
flex: 0 1 auto;
|
|
1049
|
+
white-space: nowrap;
|
|
1050
|
+
|
|
1051
|
+
&:hover {
|
|
1052
|
+
background-color: var(--color-surface-subtle);
|
|
1053
|
+
border-color: var(--color-primary-500);
|
|
1054
|
+
color: var(--color-text-primary);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
&:has([disabled]){
|
|
1058
|
+
pointer-events: none;
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
label:has(input[type="radio"]:checked),
|
|
1063
|
+
label:has(input[type="checkbox"]:checked) {
|
|
1064
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 8%, transparent);
|
|
1065
|
+
border-color: var(--color-primary-500);
|
|
1066
|
+
border-width: 2px;
|
|
1067
|
+
font-weight: var(--font-weight-semibold);
|
|
1068
|
+
|
|
1069
|
+
&:hover {
|
|
1070
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 15%, transparent);
|
|
1071
|
+
border-color: var(--color-primary-600);
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1075
|
+
label:has(input[type="radio"]:focus),
|
|
1076
|
+
label:has(input[type="checkbox"]:focus) {
|
|
1077
|
+
outline: none;
|
|
1078
|
+
box-shadow: 0 0 0 ${g}px color-mix(in oklab, var(--color-primary-500) ${Math.round((o||.3)*100)}%, transparent);
|
|
1079
|
+
}
|
|
1080
|
+
|
|
1081
|
+
label:has(input[type="radio"]:disabled),
|
|
1082
|
+
label:has(input[type="checkbox"]:disabled) {
|
|
1083
|
+
background-color: var(--color-input-disabled-bg);
|
|
1084
|
+
color: var(--color-input-disabled-text);
|
|
1085
|
+
border-color: var(--color-border);
|
|
1086
|
+
cursor: not-allowed;
|
|
1087
|
+
opacity: 0.6;
|
|
1088
|
+
}
|
|
1089
|
+
|
|
1090
|
+
label:has(input[type="radio"]:checked:disabled),
|
|
1091
|
+
label:has(input[type="checkbox"]:checked:disabled) {
|
|
1092
|
+
background-color: var(--color-input-disabled-bg);
|
|
1093
|
+
color: var(--color-input-disabled-text);
|
|
1094
|
+
border-color: var(--color-border);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
|
|
1098
|
+
/* Toggle switches - enhanced checkboxes with data-toggle attribute */
|
|
1099
|
+
label[data-toggle] {
|
|
1100
|
+
display: inline-flex;
|
|
1101
|
+
align-items: normal;
|
|
1102
|
+
gap: var(--spacing-3);
|
|
1103
|
+
cursor: pointer;
|
|
1104
|
+
user-select: none;
|
|
1105
|
+
padding: 0;
|
|
1106
|
+
background: transparent;
|
|
1107
|
+
border: none;
|
|
1108
|
+
min-height: auto;
|
|
1109
|
+
font-weight: var(--font-weight-normal);
|
|
1110
|
+
|
|
1111
|
+
/* Hide the original checkbox in toggle switches */
|
|
1112
|
+
input[type="checkbox"] {
|
|
1113
|
+
display: none;
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
/* Toggle switch container */
|
|
1117
|
+
.toggle-switch {
|
|
1118
|
+
position: relative;
|
|
1119
|
+
display: inline-block;
|
|
1120
|
+
width: 44px;
|
|
1121
|
+
height: 24px;
|
|
1122
|
+
background-color: var(--color-gray-300);
|
|
1123
|
+
border-radius: var(--radius-full);
|
|
1124
|
+
transition: background-color 200ms ease;
|
|
1125
|
+
cursor: pointer;
|
|
1126
|
+
flex-shrink: 0;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
/* Toggle switch knob */
|
|
1130
|
+
.toggle-knob {
|
|
1131
|
+
position: absolute;
|
|
1132
|
+
top: 2px;
|
|
1133
|
+
left: 2px;
|
|
1134
|
+
width: 20px;
|
|
1135
|
+
height: 20px;
|
|
1136
|
+
background-color: #ffffff;
|
|
1137
|
+
border-radius: 50%;
|
|
1138
|
+
transition: left 200ms ease;
|
|
1139
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
1140
|
+
}
|
|
1141
|
+
|
|
1142
|
+
/* Icons in toggle knob (opt-in via .with-icons class) */
|
|
1143
|
+
&.with-icons .toggle-knob::before {
|
|
1144
|
+
content: "\u2715";
|
|
1145
|
+
position: absolute;
|
|
1146
|
+
inset: 0;
|
|
1147
|
+
display: flex;
|
|
1148
|
+
align-items: center;
|
|
1149
|
+
justify-content: center;
|
|
1150
|
+
font-size: 12px;
|
|
1151
|
+
font-weight: bold;
|
|
1152
|
+
color: var(--color-gray-600);
|
|
1153
|
+
transition: opacity 200ms ease;
|
|
1154
|
+
}
|
|
1155
|
+
|
|
1156
|
+
&.with-icons:has(input[type="checkbox"]:checked) .toggle-knob::before {
|
|
1157
|
+
content: "\u2713";
|
|
1158
|
+
color: var(--color-primary-600);
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
/* Toggle switch when checked - using :has() selector */
|
|
1162
|
+
&:has(input[type="checkbox"]:checked) .toggle-switch {
|
|
1163
|
+
background-color: var(--color-primary-fill);
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
|
|
1167
|
+
/* Toggle knob when checked - always moves to the right */
|
|
1168
|
+
&:has(input[type="checkbox"]:checked) .toggle-knob {
|
|
1169
|
+
left: 22px;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
/* Focus state for toggle switch */
|
|
1173
|
+
&:has(input[type="checkbox"]:focus) .toggle-switch {
|
|
1174
|
+
outline: 2px solid var(--color-primary-500);
|
|
1175
|
+
outline-offset: 2px;
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
/* Focus visible state when label is focused via keyboard */
|
|
1179
|
+
&:focus-visible .toggle-switch {
|
|
1180
|
+
outline: 2px solid var(--color-primary-500);
|
|
1181
|
+
outline-offset: 2px;
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
/* Remove default outline on label itself */
|
|
1185
|
+
&:focus {
|
|
1186
|
+
outline: none;
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1189
|
+
/* Disabled state */
|
|
1190
|
+
&:has(input[type="checkbox"]:disabled) {
|
|
1191
|
+
cursor: not-allowed;
|
|
1192
|
+
opacity: 0.6;
|
|
1193
|
+
|
|
1194
|
+
.toggle-switch {
|
|
1195
|
+
opacity: 0.5;
|
|
1196
|
+
cursor: not-allowed;
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
input[type="file"] {
|
|
1202
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
1203
|
+
cursor: pointer;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
/* Textareas */
|
|
1207
|
+
textarea {
|
|
1208
|
+
min-height: calc(var(--spacing-4) * 5);
|
|
1209
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1210
|
+
resize: vertical;
|
|
1211
|
+
line-height: var(--font-line-height-relaxed);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
/* Select dropdowns */
|
|
1215
|
+
select {
|
|
1216
|
+
cursor: pointer;
|
|
1217
|
+
background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
|
|
1218
|
+
background-position: right var(--spacing-2) center;
|
|
1219
|
+
background-repeat: no-repeat;
|
|
1220
|
+
background-size: 1.5em 1.5em;
|
|
1221
|
+
padding-right: var(--spacing-8);
|
|
1222
|
+
}
|
|
1223
|
+
|
|
1224
|
+
/* Button styling */
|
|
1225
|
+
button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
1226
|
+
display: inline-flex;
|
|
1227
|
+
gap: var(--spacing-1);
|
|
1228
|
+
align-items: center;
|
|
1229
|
+
justify-content: center;
|
|
1230
|
+
min-height: ${m}px;
|
|
1231
|
+
padding: calc(var(--spacing-1) * ${p}) var(--spacing-6);
|
|
1232
|
+
border: ${h}px solid transparent;
|
|
1233
|
+
border-radius: var(--radius-md);
|
|
1234
|
+
font-family: var(--font-family-body);
|
|
1235
|
+
font-size: var(--font-size-base);
|
|
1236
|
+
font-weight: var(--font-weight-medium);
|
|
1237
|
+
line-height: 1;
|
|
1238
|
+
cursor: pointer;
|
|
1239
|
+
transition: all var(--transition-fast);
|
|
1240
|
+
text-decoration: none;
|
|
1241
|
+
touch-action: manipulation;
|
|
1242
|
+
user-select: none;
|
|
1243
|
+
background-color: var(--color-surface-base);
|
|
1244
|
+
color: var(--color-text-primary);
|
|
1245
|
+
border-color: var(--color-border);
|
|
1246
|
+
|
|
1247
|
+
/* Only apply generic hover to non-variant buttons */
|
|
1248
|
+
&:hover:not(.btn-primary):not(.btn-secondary):not(.btn-outline) {
|
|
1249
|
+
background-color: var(--color-surface-elevated);
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
&:focus {
|
|
1253
|
+
outline: none;
|
|
1254
|
+
box-shadow: 0 0 0 ${g}px color-mix(in oklab, var(--color-primary-500) ${Math.round((o||.3)*100)}%, transparent);
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
&:disabled {
|
|
1258
|
+
background-color: var(--color-input-disabled-bg);
|
|
1259
|
+
color: var(--color-input-disabled-text);
|
|
1260
|
+
border-color: var(--color-input-disabled-bg);
|
|
1261
|
+
cursor: not-allowed;
|
|
1262
|
+
opacity: 0.6;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
.btn-primary {
|
|
1267
|
+
background-color: var(--color-primary-fill);
|
|
1268
|
+
color: white;
|
|
1269
|
+
border-color: var(--color-primary-fill);
|
|
1270
|
+
|
|
1271
|
+
&:hover {
|
|
1272
|
+
background-color: color-mix(in oklab, var(--color-primary-fill) 90%, black 10%);
|
|
1273
|
+
border-color: color-mix(in oklab, var(--color-primary-fill) 90%, black 10%);
|
|
1274
|
+
color: white;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
&:active {
|
|
1278
|
+
background-color: color-mix(in oklab, var(--color-primary-fill) 80%, black 20%);
|
|
1279
|
+
border-color: color-mix(in oklab, var(--color-primary-fill) 80%, black 20%);
|
|
1280
|
+
color: white;
|
|
1281
|
+
}
|
|
1282
|
+
|
|
1283
|
+
&:focus {
|
|
1284
|
+
box-shadow: 0 0 0 ${g}px color-mix(in oklab, var(--color-primary-500) ${Math.round((o||.3)*100)}%, transparent);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
&:disabled {
|
|
1288
|
+
background-color: var(--color-input-disabled-bg);
|
|
1289
|
+
color: var(--color-input-disabled-text);
|
|
1290
|
+
border-color: var(--color-input-disabled-bg);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
.btn-secondary {
|
|
1295
|
+
background-color: var(--color-surface-base);
|
|
1296
|
+
color: var(--color-text-primary);
|
|
1297
|
+
border-color: var(--color-border);
|
|
1298
|
+
|
|
1299
|
+
&:hover {
|
|
1300
|
+
background-color: var(--color-surface-elevated);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
.btn-outline {
|
|
1305
|
+
background-color: transparent;
|
|
1306
|
+
color: var(--color-primary-500);
|
|
1307
|
+
border-color: var(--color-primary-500);
|
|
1308
|
+
|
|
1309
|
+
&:hover {
|
|
1310
|
+
background-color: var(--color-primary-500);
|
|
1311
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1312
|
+
border-color: var(--color-primary-500);
|
|
1313
|
+
|
|
1314
|
+
pds-icon {
|
|
1315
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
&:active {
|
|
1320
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 80%, black 20%);
|
|
1321
|
+
border-color: color-mix(in oklab, var(--color-primary-500) 80%, black 20%);
|
|
1322
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1323
|
+
|
|
1324
|
+
pds-icon {
|
|
1325
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
&:disabled {
|
|
1330
|
+
background-color: transparent;
|
|
1331
|
+
color: var(--color-input-disabled-text);
|
|
1332
|
+
border-color: var(--color-input-disabled-bg);
|
|
1333
|
+
}
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1336
|
+
.btn-sm {
|
|
1337
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
1338
|
+
font-size: var(--font-size-sm);
|
|
1339
|
+
min-height: calc(${m}px * 0.8);
|
|
1340
|
+
}
|
|
1341
|
+
|
|
1342
|
+
.btn-xs {
|
|
1343
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
1344
|
+
font-size: var(--font-size-xs);
|
|
1345
|
+
min-height: calc(${m}px * 0.6);
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
|
|
1349
|
+
.btn-lg {
|
|
1350
|
+
padding: var(--spacing-4) var(--spacing-8);
|
|
1351
|
+
font-size: var(--font-size-lg);
|
|
1352
|
+
min-height: calc(${m}px * 1.2);
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
/* Working/loading state for buttons */
|
|
1356
|
+
button.btn-working,
|
|
1357
|
+
a.btn-working {
|
|
1358
|
+
cursor: wait;
|
|
1359
|
+
pointer-events: none;
|
|
1360
|
+
opacity: 0.6;
|
|
1361
|
+
|
|
1362
|
+
pds-icon:first-child {
|
|
1363
|
+
animation: pds-spin 0.8s linear infinite;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
@keyframes pds-spin {
|
|
1368
|
+
to { transform: rotate(360deg); }
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/* Skeleton loading animation */
|
|
1372
|
+
.skeleton {
|
|
1373
|
+
background: linear-gradient(
|
|
1374
|
+
90deg,
|
|
1375
|
+
color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%) 0%,
|
|
1376
|
+
color-mix(in oklab, var(--color-surface-base) 85%, var(--color-text-primary) 15%) 50%,
|
|
1377
|
+
color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%) 100%
|
|
1378
|
+
);
|
|
1379
|
+
background-size: 200% 100%;
|
|
1380
|
+
animation: pds-skeleton 1.5s ease-in-out infinite;
|
|
1381
|
+
border-radius: var(--radius-sm);
|
|
1382
|
+
|
|
1383
|
+
&::before {
|
|
1384
|
+
content: '\\00a0';
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
@keyframes pds-skeleton {
|
|
1389
|
+
0% { background-position: 200% 0; }
|
|
1390
|
+
100% { background-position: -200% 0; }
|
|
1391
|
+
}
|
|
1392
|
+
|
|
1393
|
+
/* Form utility classes */
|
|
1394
|
+
.range-container {
|
|
1395
|
+
display: flex;
|
|
1396
|
+
align-items: center;
|
|
1397
|
+
gap: var(--spacing-3);
|
|
1398
|
+
width: 100%;
|
|
1399
|
+
background: var(--color-input-bg);
|
|
1400
|
+
border: 1px solid var(--color-border);
|
|
1401
|
+
border-radius: var(--radius-md);
|
|
1402
|
+
min-height: var(--input-min-height, 40px);
|
|
1403
|
+
position: relative;
|
|
1404
|
+
|
|
1405
|
+
input[type="range"] {
|
|
1406
|
+
border: none;
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
.range-bubble {
|
|
1411
|
+
position: absolute;
|
|
1412
|
+
top: calc(-1 * (var(--range-thumb-size, 28px) + var(--spacing-2)));
|
|
1413
|
+
transform: translateX(-50%);
|
|
1414
|
+
min-width: calc(var(--range-thumb-size, 28px) * 0.8);
|
|
1415
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
1416
|
+
border-radius: var(--radius-md);
|
|
1417
|
+
background: var(--color-surface-base);
|
|
1418
|
+
color: var(--color-text-primary);
|
|
1419
|
+
text-align: center;
|
|
1420
|
+
font-size: var(--font-size-sm);
|
|
1421
|
+
box-shadow: var(--shadow-md);
|
|
1422
|
+
opacity: 0;
|
|
1423
|
+
pointer-events: none;
|
|
1424
|
+
transition: opacity 150ms ease, transform 150ms ease;
|
|
1425
|
+
|
|
1426
|
+
&.visible {
|
|
1427
|
+
opacity: 1;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
/* Anchor bubble to the thumb position using left (set by enhancer)
|
|
1432
|
+
and center with translateX(-50%). */
|
|
1433
|
+
|
|
1434
|
+
/* Array field styling */
|
|
1435
|
+
.array-list {
|
|
1436
|
+
display: flex;
|
|
1437
|
+
flex-direction: column;
|
|
1438
|
+
gap: var(--spacing-4);
|
|
1439
|
+
margin-bottom: var(--spacing-4);
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
.array-item {
|
|
1443
|
+
position: relative;
|
|
1444
|
+
padding: var(--spacing-4);
|
|
1445
|
+
border: ${h}px solid var(--color-border);
|
|
1446
|
+
border-radius: var(--radius-md);
|
|
1447
|
+
background-color: var(--color-surface-base);
|
|
1448
|
+
|
|
1449
|
+
.array-controls {
|
|
1450
|
+
padding-top: var(--spacing-3);
|
|
1451
|
+
border-top: ${h}px solid var(--color-border);
|
|
1452
|
+
margin-top: var(--spacing-4);
|
|
1453
|
+
}
|
|
1454
|
+
}
|
|
1455
|
+
|
|
1456
|
+
.array-controls {
|
|
1457
|
+
display: flex;
|
|
1458
|
+
gap: var(--spacing-2);
|
|
1459
|
+
margin-top: var(--spacing-3);
|
|
1460
|
+
flex-wrap: wrap;
|
|
1461
|
+
|
|
1462
|
+
button {
|
|
1463
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
1464
|
+
font-size: var(--font-size-sm);
|
|
1465
|
+
min-height: auto;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
.range-value {
|
|
1470
|
+
min-width: var(--spacing-16);
|
|
1471
|
+
text-align: right;
|
|
1472
|
+
font-weight: var(--font-weight-medium);
|
|
1473
|
+
font-size: var(--font-size-sm);
|
|
1474
|
+
color: var(--color-text-primary);
|
|
1475
|
+
}
|
|
1476
|
+
|
|
1477
|
+
.checkbox-container {
|
|
1478
|
+
display: flex;
|
|
1479
|
+
flex-direction: row;
|
|
1480
|
+
align-items: center;
|
|
1481
|
+
gap: var(--spacing-2);
|
|
1482
|
+
flex-wrap: wrap;
|
|
1483
|
+
|
|
1484
|
+
input[type="checkbox"],
|
|
1485
|
+
input[type="radio"] {
|
|
1486
|
+
position: absolute;
|
|
1487
|
+
opacity: 0;
|
|
1488
|
+
}
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
`}#oe(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Table Styles - Mobile First */
|
|
1492
|
+
|
|
1493
|
+
table {
|
|
1494
|
+
width: 100%;
|
|
1495
|
+
border-collapse: collapse;
|
|
1496
|
+
margin: 0 0 var(--spacing-6) 0;
|
|
1497
|
+
background-color: var(--color-surface-base);
|
|
1498
|
+
border-radius: var(--radius-md);
|
|
1499
|
+
overflow: hidden;
|
|
1500
|
+
font-size: var(--font-size-sm);
|
|
1501
|
+
|
|
1502
|
+
@media (min-width: ${e.sm}px) {
|
|
1503
|
+
font-size: var(--font-size-base);
|
|
1504
|
+
}
|
|
1505
|
+
}
|
|
1506
|
+
|
|
1507
|
+
.table-responsive {
|
|
1508
|
+
@media (max-width: ${e.sm-1}px) {
|
|
1509
|
+
overflow-x: auto;
|
|
1510
|
+
-webkit-overflow-scrolling: touch;
|
|
1511
|
+
margin: 0 0 var(--spacing-6) 0;
|
|
1512
|
+
|
|
1513
|
+
table {
|
|
1514
|
+
min-width: 600px;
|
|
1515
|
+
margin: 0;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
thead {
|
|
1521
|
+
background-color: var(--color-surface-subtle);
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
th {
|
|
1525
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1526
|
+
text-align: left;
|
|
1527
|
+
font-weight: var(--font-weight-semibold);
|
|
1528
|
+
color: var(--color-text-primary);
|
|
1529
|
+
border-bottom: 2px solid var(--color-border);
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
td {
|
|
1533
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1534
|
+
color: var(--color-text-secondary);
|
|
1535
|
+
border-bottom: 1px solid var(--color-border);
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1538
|
+
tbody {
|
|
1539
|
+
tr {
|
|
1540
|
+
transition: background-color var(--transition-fast);
|
|
1541
|
+
|
|
1542
|
+
&:hover {
|
|
1543
|
+
background-color: var(--color-surface-subtle);
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
&:last-child td {
|
|
1547
|
+
border-bottom: none;
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
.table-striped {
|
|
1553
|
+
tbody tr:nth-child(even) {
|
|
1554
|
+
background-color: var(--color-surface-subtle);
|
|
1555
|
+
}
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1558
|
+
.table-bordered {
|
|
1559
|
+
border: 1px solid var(--color-border);
|
|
1560
|
+
|
|
1561
|
+
th, td {
|
|
1562
|
+
border: 1px solid var(--color-border);
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
.table-compact {
|
|
1567
|
+
th, td {
|
|
1568
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
`}#ne(){return`/* Alert/Notification Styles */
|
|
1573
|
+
|
|
1574
|
+
/* Alias: .semantic-message shares alert base styles */
|
|
1575
|
+
.alert, .semantic-message {
|
|
1576
|
+
padding: var(--spacing-4);
|
|
1577
|
+
border-radius: var(--radius-md);
|
|
1578
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
1579
|
+
border-left: 4px solid;
|
|
1580
|
+
display: flex;
|
|
1581
|
+
align-items: flex-start;
|
|
1582
|
+
gap: var(--spacing-3);
|
|
1583
|
+
font-size: var(--font-size-sm);
|
|
1584
|
+
line-height: var(--font-line-height-relaxed);
|
|
1585
|
+
|
|
1586
|
+
& > *:last-child {
|
|
1587
|
+
margin-bottom: 0;
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
/* Variants: success/info/warning/danger mapped to tokens */
|
|
1591
|
+
.alert-success, .semantic-message.success {
|
|
1592
|
+
background-color: var(--color-success-50);
|
|
1593
|
+
border-color: var(--color-success-600);
|
|
1594
|
+
color: var(--color-success-900);
|
|
1595
|
+
}
|
|
1596
|
+
.alert-info, .semantic-message.info {
|
|
1597
|
+
background-color: var(--color-info-50);
|
|
1598
|
+
border-color: var(--color-info-600);
|
|
1599
|
+
color: var(--color-info-900);
|
|
1600
|
+
}
|
|
1601
|
+
.alert-warning, .semantic-message.warning {
|
|
1602
|
+
background-color: var(--color-warning-50);
|
|
1603
|
+
border-color: var(--color-warning-600);
|
|
1604
|
+
color: var(--color-warning-900);
|
|
1605
|
+
}
|
|
1606
|
+
.alert-danger,
|
|
1607
|
+
.alert-error,
|
|
1608
|
+
.semantic-message.danger {
|
|
1609
|
+
background-color: var(--color-danger-50);
|
|
1610
|
+
border-color: var(--color-danger-600);
|
|
1611
|
+
color: var(--color-danger-900);
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
/* Semantic-message content defaults */
|
|
1615
|
+
.semantic-message strong { display: block; }
|
|
1616
|
+
.semantic-message p { margin: 0; font-size: var(--font-size-sm); }
|
|
1617
|
+
|
|
1618
|
+
.alert-title {
|
|
1619
|
+
font-weight: var(--font-weight-semibold);
|
|
1620
|
+
margin: 0 0 var(--spacing-2) 0;
|
|
1621
|
+
font-size: var(--font-size-base);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
.alert-icon {
|
|
1625
|
+
flex-shrink: 0;
|
|
1626
|
+
display: flex;
|
|
1627
|
+
align-items: center;
|
|
1628
|
+
justify-content: center;
|
|
1629
|
+
|
|
1630
|
+
pds-icon {
|
|
1631
|
+
flex-shrink: 0;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
.alert-dismissible {
|
|
1636
|
+
padding-right: var(--spacing-12);
|
|
1637
|
+
position: relative;
|
|
1638
|
+
}
|
|
1639
|
+
|
|
1640
|
+
.alert-close {
|
|
1641
|
+
position: absolute;
|
|
1642
|
+
top: var(--spacing-3);
|
|
1643
|
+
right: var(--spacing-3);
|
|
1644
|
+
background: none;
|
|
1645
|
+
border: none;
|
|
1646
|
+
font-size: var(--font-size-xl);
|
|
1647
|
+
line-height: 1;
|
|
1648
|
+
opacity: 0.6;
|
|
1649
|
+
cursor: pointer;
|
|
1650
|
+
padding: var(--spacing-1);
|
|
1651
|
+
transition: opacity var(--transition-fast);
|
|
1652
|
+
|
|
1653
|
+
&:hover {
|
|
1654
|
+
opacity: 1;
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
|
|
1658
|
+
`}#ie(){return`/* Accordion (details/summary) */
|
|
1659
|
+
|
|
1660
|
+
.accordion {
|
|
1661
|
+
--_acc-radius: var(--radius-md);
|
|
1662
|
+
--_acc-border: 1px solid var(--color-border);
|
|
1663
|
+
--_acc-bg: var(--color-surface-base);
|
|
1664
|
+
|
|
1665
|
+
details {
|
|
1666
|
+
border: var(--_acc-border);
|
|
1667
|
+
border-radius: var(--_acc-radius);
|
|
1668
|
+
background: var(--_acc-bg);
|
|
1669
|
+
margin: 0 0 var(--spacing-3) 0;
|
|
1670
|
+
|
|
1671
|
+
&[open] {
|
|
1672
|
+
& > summary::after {
|
|
1673
|
+
transform: rotate(45deg);
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
&::details-content {
|
|
1677
|
+
block-size: auto;
|
|
1678
|
+
}
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
/* Modern approach: animate block-size with ::details-content */
|
|
1682
|
+
&::details-content {
|
|
1683
|
+
block-size: 0;
|
|
1684
|
+
overflow: hidden;
|
|
1685
|
+
transition: block-size var(--transition-normal) ease, content-visibility var(--transition-normal);
|
|
1686
|
+
transition-behavior: allow-discrete;
|
|
1687
|
+
}
|
|
1688
|
+
|
|
1689
|
+
/* Content padding (works for both approaches) */
|
|
1690
|
+
& > :not(summary) > * {
|
|
1691
|
+
padding-inline: var(--spacing-4);
|
|
1692
|
+
padding-block: var(--spacing-3);
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
|
|
1696
|
+
summary {
|
|
1697
|
+
cursor: pointer;
|
|
1698
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1699
|
+
list-style: none;
|
|
1700
|
+
display: flex;
|
|
1701
|
+
align-items: center;
|
|
1702
|
+
gap: var(--spacing-2);
|
|
1703
|
+
border-radius: var(--radius-sm);
|
|
1704
|
+
transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
1705
|
+
|
|
1706
|
+
&::-webkit-details-marker {
|
|
1707
|
+
display: none;
|
|
1708
|
+
}
|
|
1709
|
+
|
|
1710
|
+
&:hover {
|
|
1711
|
+
background-color: var(--color-surface-subtle);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
&:focus {
|
|
1715
|
+
outline: none;
|
|
1716
|
+
}
|
|
1717
|
+
|
|
1718
|
+
&:focus-visible {
|
|
1719
|
+
box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-primary-500) 30%, transparent);
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
/* Chevron indicator */
|
|
1723
|
+
&::after {
|
|
1724
|
+
content: "";
|
|
1725
|
+
margin-inline-start: auto;
|
|
1726
|
+
inline-size: 0.7em;
|
|
1727
|
+
block-size: 0.7em;
|
|
1728
|
+
border-inline-end: 2px solid currentColor;
|
|
1729
|
+
border-block-end: 2px solid currentColor;
|
|
1730
|
+
transform: rotate(-45deg);
|
|
1731
|
+
transition: transform var(--transition-normal);
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
/* Fallback: grid trick for browsers without ::details-content support */
|
|
1737
|
+
@supports not selector(::details-content) {
|
|
1738
|
+
.accordion details {
|
|
1739
|
+
& > :not(summary) {
|
|
1740
|
+
display: grid;
|
|
1741
|
+
grid-template-rows: 0fr;
|
|
1742
|
+
transition: grid-template-rows var(--transition-normal) ease;
|
|
1743
|
+
overflow: hidden;
|
|
1744
|
+
|
|
1745
|
+
& > * {
|
|
1746
|
+
min-block-size: 0;
|
|
1747
|
+
}
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
&[open] > :not(summary) {
|
|
1751
|
+
grid-template-rows: 1fr;
|
|
1752
|
+
}
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
`}#se(){return`/* Badge/Pill Styles */
|
|
1756
|
+
|
|
1757
|
+
.badge {
|
|
1758
|
+
display: inline-flex;
|
|
1759
|
+
align-items: center;
|
|
1760
|
+
justify-content: center;
|
|
1761
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
1762
|
+
font-size: var(--font-size-xs);
|
|
1763
|
+
font-weight: var(--font-weight-semibold);
|
|
1764
|
+
line-height: 1;
|
|
1765
|
+
border-radius: var(--radius-full);
|
|
1766
|
+
white-space: nowrap;
|
|
1767
|
+
vertical-align: middle;
|
|
1768
|
+
background-color: var(--color-gray-200);
|
|
1769
|
+
color: var(--color-gray-800);
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
.badge-primary, .badge-secondary, .badge-success, .badge-info, .badge-warning, .badge-danger { color: white; }
|
|
1773
|
+
.badge-primary { background-color: var(--color-primary-600); }
|
|
1774
|
+
.badge-secondary { background-color: var(--color-secondary-600); }
|
|
1775
|
+
.badge-success { background-color: var(--color-success-600); }
|
|
1776
|
+
.badge-info { background-color: var(--color-info-600); }
|
|
1777
|
+
.badge-warning { background-color: var(--color-warning-600); }
|
|
1778
|
+
.badge-danger { background-color: var(--color-danger-600); }
|
|
1779
|
+
|
|
1780
|
+
.badge-outline {
|
|
1781
|
+
background-color: transparent;
|
|
1782
|
+
border: 1px solid currentColor;
|
|
1783
|
+
&.badge-primary { color: var(--color-text-primary); }
|
|
1784
|
+
&.badge-secondary { color: var(--color-secondary-600); }
|
|
1785
|
+
&.badge-success { color: var(--color-success-600); }
|
|
1786
|
+
&.badge-info { color: var(--color-info-600); }
|
|
1787
|
+
&.badge-warning { color: var(--color-warning-600); }
|
|
1788
|
+
&.badge-danger { color: var(--color-danger-600); }
|
|
1789
|
+
}
|
|
1790
|
+
|
|
1791
|
+
.badge-sm { padding: 2px var(--spacing-1); font-size: 10px; }
|
|
1792
|
+
.badge-lg { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
|
|
1793
|
+
.pill { padding: var(--spacing-1) var(--spacing-3); border-radius: var(--radius-full); }
|
|
1794
|
+
|
|
1795
|
+
`}#ce(){let{layout:t={},behavior:e={}}=this.options.design;return`/* ============================================================================
|
|
1796
|
+
Dialog Primitive
|
|
1797
|
+
Native <dialog> element with PDS integration
|
|
1798
|
+
============================================================================ */
|
|
1799
|
+
|
|
1800
|
+
/* Dialog base styles */
|
|
1801
|
+
dialog {
|
|
1802
|
+
position: fixed;
|
|
1803
|
+
inset: 0;
|
|
1804
|
+
max-width: min(600px, calc(100vw - var(--spacing-8)));
|
|
1805
|
+
max-height: calc(100vh - var(--spacing-8));
|
|
1806
|
+
margin: auto;
|
|
1807
|
+
padding: 0;
|
|
1808
|
+
border: none;
|
|
1809
|
+
border-radius: var(--radius-lg);
|
|
1810
|
+
|
|
1811
|
+
/* Surface styling - elevated overlay */
|
|
1812
|
+
background-color: var(--surface-overlay-bg);
|
|
1813
|
+
color: var(--surface-overlay-text);
|
|
1814
|
+
box-shadow: 0 8px 32px var(--surface-overlay-shadow);
|
|
1815
|
+
|
|
1816
|
+
/* Smooth transitions */
|
|
1817
|
+
opacity: 0;
|
|
1818
|
+
scale: 0.95;
|
|
1819
|
+
transition:
|
|
1820
|
+
opacity 0.2s ease,
|
|
1821
|
+
scale 0.2s ease,
|
|
1822
|
+
overlay 0.2s ease allow-discrete,
|
|
1823
|
+
display 0.2s ease allow-discrete;
|
|
1824
|
+
|
|
1825
|
+
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/* Open state */
|
|
1829
|
+
dialog[open] {
|
|
1830
|
+
opacity: 1;
|
|
1831
|
+
scale: 1;
|
|
1832
|
+
}
|
|
1833
|
+
|
|
1834
|
+
/* Starting style for smooth open animation */
|
|
1835
|
+
@starting-style {
|
|
1836
|
+
dialog[open] {
|
|
1837
|
+
opacity: 0;
|
|
1838
|
+
scale: 0.95;
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
|
|
1842
|
+
/* Backdrop styling */
|
|
1843
|
+
dialog::backdrop {
|
|
1844
|
+
background: var(--backdrop-bg);
|
|
1845
|
+
backdrop-filter: var(--backdrop-filter);
|
|
1846
|
+
opacity: 0;
|
|
1847
|
+
transition:
|
|
1848
|
+
opacity 0.2s ease,
|
|
1849
|
+
overlay 0.2s ease allow-discrete,
|
|
1850
|
+
display 0.2s ease allow-discrete;
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
dialog[open]::backdrop {
|
|
1854
|
+
opacity: var(--backdrop-opacity, 1);
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
@starting-style {
|
|
1858
|
+
dialog[open]::backdrop {
|
|
1859
|
+
opacity: 0;
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
/* Dialog - constrain max height to 90vh, support custom maxHeight via CSS variable */
|
|
1864
|
+
dialog {
|
|
1865
|
+
max-height: var(--dialog-max-height, 90vh);
|
|
1866
|
+
display: flex;
|
|
1867
|
+
flex-direction: column;
|
|
1868
|
+
overflow: hidden; /* Prevent dialog itself from scrolling - let .dialog-body handle it */
|
|
1869
|
+
}
|
|
1870
|
+
|
|
1871
|
+
/* Form structure - use flexbox instead of contents */
|
|
1872
|
+
dialog form {
|
|
1873
|
+
display: flex;
|
|
1874
|
+
flex-direction: column;
|
|
1875
|
+
flex: 1;
|
|
1876
|
+
min-height: 0; /* Allow flex child to shrink */
|
|
1877
|
+
margin: 0;
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
/* Dialog fields - to open pds-form subforms */
|
|
1881
|
+
.dialog-field {
|
|
1882
|
+
margin-top: var(--spacing-3);
|
|
1883
|
+
}
|
|
1884
|
+
|
|
1885
|
+
/* Dialog header */
|
|
1886
|
+
dialog {
|
|
1887
|
+
header,
|
|
1888
|
+
form > header {
|
|
1889
|
+
display: flex;
|
|
1890
|
+
align-items: center;
|
|
1891
|
+
justify-content: space-between;
|
|
1892
|
+
gap: var(--spacing-4);
|
|
1893
|
+
padding: var(--spacing-6);
|
|
1894
|
+
border-bottom: 1px solid var(--surface-overlay-border);
|
|
1895
|
+
flex-shrink: 0;
|
|
1896
|
+
|
|
1897
|
+
h2,
|
|
1898
|
+
h3 {
|
|
1899
|
+
margin: 0;
|
|
1900
|
+
font-size: var(--font-size-lg);
|
|
1901
|
+
font-weight: var(--font-weight-semibold);
|
|
1902
|
+
color: var(--surface-overlay-text);
|
|
1903
|
+
flex: 1;
|
|
1904
|
+
}
|
|
1905
|
+
|
|
1906
|
+
/* Close button in header */
|
|
1907
|
+
button[value="cancel"],
|
|
1908
|
+
.dialog-close {
|
|
1909
|
+
background: none;
|
|
1910
|
+
border: none;
|
|
1911
|
+
padding: var(--spacing-2);
|
|
1912
|
+
border-radius: var(--radius-sm);
|
|
1913
|
+
cursor: pointer;
|
|
1914
|
+
color: var(--surface-overlay-icon);
|
|
1915
|
+
transition: background-color var(--transition-fast);
|
|
1916
|
+
display: inline-flex;
|
|
1917
|
+
align-items: center;
|
|
1918
|
+
justify-content: center;
|
|
1919
|
+
|
|
1920
|
+
&:hover {
|
|
1921
|
+
background-color: var(--color-surface-subtle);
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
&:focus-visible {
|
|
1925
|
+
outline: 2px solid var(--color-focus-ring);
|
|
1926
|
+
outline-offset: 2px;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
/* Dialog body - scrollable content */
|
|
1932
|
+
article,
|
|
1933
|
+
form > article,
|
|
1934
|
+
.dialog-body {
|
|
1935
|
+
flex: 1 1 auto;
|
|
1936
|
+
min-height: 0; /* Critical: allow flex child to shrink and scroll */
|
|
1937
|
+
padding: var(--spacing-3) var(--spacing-6);
|
|
1938
|
+
overflow-y: auto;
|
|
1939
|
+
overflow-x: hidden;
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
/* Dialog footer - actions */
|
|
1943
|
+
footer,
|
|
1944
|
+
form > footer {
|
|
1945
|
+
display: flex;
|
|
1946
|
+
flex-direction: row;
|
|
1947
|
+
gap: var(--spacing-3);
|
|
1948
|
+
justify-content: flex-end;
|
|
1949
|
+
align-items: center;
|
|
1950
|
+
padding: var(--spacing-6);
|
|
1951
|
+
border-top: 1px solid var(--surface-overlay-border);
|
|
1952
|
+
flex-shrink: 0;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
|
|
1956
|
+
/* Dialog size modifiers */
|
|
1957
|
+
dialog.dialog-sm { max-width: min(400px, calc(100vw - var(--spacing-8))); }
|
|
1958
|
+
dialog.dialog-lg { max-width: min(800px, calc(100vw - var(--spacing-8))); }
|
|
1959
|
+
dialog.dialog-xl { max-width: min(1200px, calc(100vw - var(--spacing-8))); }
|
|
1960
|
+
dialog.dialog-full { max-width: calc(100vw - var(--spacing-8)); max-height: calc(100vh - var(--spacing-8)); }
|
|
1961
|
+
|
|
1962
|
+
/* Mobile responsiveness - maximize on mobile */
|
|
1963
|
+
@media (max-width: ${(t.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
|
|
1964
|
+
dialog {
|
|
1965
|
+
max-width: 100vw;
|
|
1966
|
+
max-height: 100vh;
|
|
1967
|
+
--dialog-max-height: 100vh; /* Override custom maxHeight on mobile */
|
|
1968
|
+
border-radius: 0;
|
|
1969
|
+
top: 50%;
|
|
1970
|
+
transform: translateY(-50%);
|
|
1971
|
+
margin: 0;
|
|
1972
|
+
}
|
|
1973
|
+
dialog header, dialog form > header, dialog article, dialog form > article, dialog footer, dialog form > footer { padding: var(--spacing-4); }
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
/* Reduced motion support */
|
|
1977
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1978
|
+
dialog, dialog::backdrop { transition-duration: 0.01s !important; }
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
`}#le(){let{layout:t={}}=this.options.design;return`/* Tab Strip Component */
|
|
1982
|
+
|
|
1983
|
+
/* Tab navigation */
|
|
1984
|
+
|
|
1985
|
+
pds-tabstrip {
|
|
1986
|
+
margin-top: var(--spacing-6);
|
|
1987
|
+
|
|
1988
|
+
& > nav {
|
|
1989
|
+
display: flex;
|
|
1990
|
+
gap: var(--spacing-1);
|
|
1991
|
+
border-bottom: 2px solid var(--color-border);
|
|
1992
|
+
margin-bottom: var(--spacing-6);
|
|
1993
|
+
position: relative;
|
|
1994
|
+
overflow-x: auto;
|
|
1995
|
+
overflow-y: hidden;
|
|
1996
|
+
scrollbar-width: none; /* Firefox */
|
|
1997
|
+
-ms-overflow-style: none; /* IE/Edge */
|
|
1998
|
+
|
|
1999
|
+
&::-webkit-scrollbar {
|
|
2000
|
+
display: none; /* Chrome/Safari */
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
/* Tab links */
|
|
2004
|
+
& > a {
|
|
2005
|
+
position: relative;
|
|
2006
|
+
display: inline-flex;
|
|
2007
|
+
align-items: center;
|
|
2008
|
+
gap: var(--spacing-2);
|
|
2009
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
2010
|
+
font-family: var(--font-family-body);
|
|
2011
|
+
font-size: var(--font-size-base);
|
|
2012
|
+
font-weight: var(--font-weight-medium);
|
|
2013
|
+
color: var(--color-text-secondary);
|
|
2014
|
+
text-decoration: none;
|
|
2015
|
+
white-space: nowrap;
|
|
2016
|
+
border: none;
|
|
2017
|
+
background: transparent;
|
|
2018
|
+
cursor: pointer;
|
|
2019
|
+
transition: color var(--transition-fast);
|
|
2020
|
+
border-bottom: 2px solid transparent;
|
|
2021
|
+
margin-bottom: -2px; /* Overlap the nav border */
|
|
2022
|
+
|
|
2023
|
+
&:hover {
|
|
2024
|
+
color: var(--color-text-primary);
|
|
2025
|
+
background-color: var(--color-surface-hover);
|
|
2026
|
+
}
|
|
2027
|
+
|
|
2028
|
+
&:focus-visible {
|
|
2029
|
+
outline: var(--focus-ring-width, 2px) solid var(--color-primary-500);
|
|
2030
|
+
outline-offset: -2px;
|
|
2031
|
+
border-radius: var(--radius-sm);
|
|
2032
|
+
z-index: 1;
|
|
2033
|
+
}
|
|
2034
|
+
|
|
2035
|
+
/* Active tab */
|
|
2036
|
+
&[aria-current="page"] {
|
|
2037
|
+
color: var(--color-primary-600);
|
|
2038
|
+
font-weight: var(--font-weight-semibold);
|
|
2039
|
+
border-bottom-color: var(--color-primary-600);
|
|
2040
|
+
|
|
2041
|
+
&:hover {
|
|
2042
|
+
color: var(--color-primary-700);
|
|
2043
|
+
border-bottom-color: var(--color-primary-700);
|
|
2044
|
+
background-color: var(--color-primary-50);
|
|
2045
|
+
}
|
|
2046
|
+
}
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
/* Tab panel */
|
|
2051
|
+
& > pds-tabpanel {
|
|
2052
|
+
display: block;
|
|
2053
|
+
margin-top: var(--spacing-4);
|
|
2054
|
+
|
|
2055
|
+
&[data-tabpanel] {
|
|
2056
|
+
animation: tabFadeIn var(--transition-normal) ease-out;
|
|
2057
|
+
padding: var(--spacing-4) 0;
|
|
2058
|
+
|
|
2059
|
+
&[hidden] {
|
|
2060
|
+
display: none;
|
|
2061
|
+
}
|
|
2062
|
+
}
|
|
2063
|
+
}
|
|
2064
|
+
}
|
|
2065
|
+
|
|
2066
|
+
@keyframes tabFadeIn {
|
|
2067
|
+
from { opacity: 0; transform: translateY(8px); }
|
|
2068
|
+
to { opacity: 1; transform: translateY(0); }
|
|
2069
|
+
}
|
|
2070
|
+
|
|
2071
|
+
/* Mobile responsive */
|
|
2072
|
+
@media (max-width: ${(t.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
|
|
2073
|
+
pds-tabstrip > nav { gap: var(--spacing-1); }
|
|
2074
|
+
pds-tabstrip > nav > a { padding: var(--spacing-2) var(--spacing-3); font-size: var(--font-size-sm); }
|
|
2075
|
+
pds-tabstrip > pds-tabpanel[data-tabpanel] { padding: var(--spacing-3) 0; }
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
`}#de(){return`/* Custom Scrollbars */
|
|
2079
|
+
::-webkit-scrollbar { width: 12px; height: 12px; }
|
|
2080
|
+
::-webkit-scrollbar-track { background: transparent; }
|
|
2081
|
+
::-webkit-scrollbar-thumb {
|
|
2082
|
+
background: var(--color-secondary-300);
|
|
2083
|
+
border-radius: var(--radius-full);
|
|
2084
|
+
border: 3px solid transparent;
|
|
2085
|
+
background-clip: padding-box;
|
|
2086
|
+
transition: background-color var(--transition-fast);
|
|
2087
|
+
&:hover { background: var(--color-secondary-400); border: 2px solid transparent; background-clip: padding-box; }
|
|
2088
|
+
&:active { background: var(--color-secondary-500); border: 2px solid transparent; background-clip: padding-box; }
|
|
2089
|
+
@media (prefers-color-scheme: dark) {
|
|
2090
|
+
background: var(--color-secondary-600);
|
|
2091
|
+
&:hover { background: var(--color-secondary-500); }
|
|
2092
|
+
&:active { background: var(--color-secondary-400); }
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
* {
|
|
2097
|
+
scrollbar-width: thin;
|
|
2098
|
+
scrollbar-color: var(--color-secondary-300) transparent;
|
|
2099
|
+
@media (prefers-color-scheme: dark) { scrollbar-color: var(--color-secondary-600) transparent; }
|
|
2100
|
+
}
|
|
2101
|
+
*:hover { scrollbar-color: var(--color-secondary-400) transparent; }
|
|
2102
|
+
@media (prefers-color-scheme: dark) { *:hover { scrollbar-color: var(--color-secondary-500) transparent; } }
|
|
2103
|
+
|
|
2104
|
+
`}#pe(){let{a11y:t={}}=this.options.design,e=t.minTouchTarget||u.TouchTargetSizes.standard;return`/* Icon System */
|
|
2105
|
+
|
|
2106
|
+
pds-icon {
|
|
2107
|
+
display: inline-flex;
|
|
2108
|
+
align-items: center;
|
|
2109
|
+
justify-content: center;
|
|
2110
|
+
flex-shrink: 0;
|
|
2111
|
+
vertical-align: middle;
|
|
2112
|
+
pointer-events: none;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
/* Icon size utilities */
|
|
2116
|
+
.icon-xs, pds-icon[size="xs"] { width: var(--icon-size-xs); height: var(--icon-size-xs); }
|
|
2117
|
+
.icon-sm, pds-icon[size="sm"] { width: var(--icon-size-sm); height: var(--icon-size-sm); }
|
|
2118
|
+
.icon-md, pds-icon[size="md"] { width: var(--icon-size-md); height: var(--icon-size-md); }
|
|
2119
|
+
.icon-lg, pds-icon[size="lg"] { width: var(--icon-size-lg); height: var(--icon-size-lg); }
|
|
2120
|
+
.icon-xl, pds-icon[size="xl"] { width: var(--icon-size-xl); height: var(--icon-size-xl); }
|
|
2121
|
+
.icon-2xl, pds-icon[size="2xl"] { width: var(--icon-size-2xl); height: var(--icon-size-2xl); }
|
|
2122
|
+
|
|
2123
|
+
/* Icon color utilities */
|
|
2124
|
+
.icon-primary, pds-icon.primary { color: var(--color-primary-600); }
|
|
2125
|
+
.icon-secondary, pds-icon.secondary { color: var(--color-secondary-600); }
|
|
2126
|
+
.icon-accent, pds-icon.accent { color: var(--color-accent-600); }
|
|
2127
|
+
.icon-success, pds-icon.success { color: var(--color-success-600); }
|
|
2128
|
+
.icon-warning, pds-icon.warning { color: var(--color-warning-600); }
|
|
2129
|
+
.icon-danger, pds-icon.danger { color: var(--color-danger-600); }
|
|
2130
|
+
.icon-info, pds-icon.info { color: var(--color-info-600); }
|
|
2131
|
+
.icon-muted, pds-icon.muted { color: var(--color-text-muted); }
|
|
2132
|
+
.icon-subtle, pds-icon.subtle { color: var(--color-text-subtle); }
|
|
2133
|
+
|
|
2134
|
+
/* Icon with text combinations */
|
|
2135
|
+
.icon-text { display: inline-flex; align-items: center; gap: var(--spacing-2); }
|
|
2136
|
+
.icon-text-start { flex-direction: row; }
|
|
2137
|
+
.icon-text-end { flex-direction: row-reverse; }
|
|
2138
|
+
|
|
2139
|
+
/* Button icon utilities */
|
|
2140
|
+
button, a {
|
|
2141
|
+
pds-icon {
|
|
2142
|
+
flex-shrink: 0;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
&.icon-only {
|
|
2146
|
+
padding: var(--spacing-2);
|
|
2147
|
+
min-width: ${e}px;
|
|
2148
|
+
width: ${e}px;
|
|
2149
|
+
height: ${e}px;
|
|
2150
|
+
display: inline-flex;
|
|
2151
|
+
align-items: center;
|
|
2152
|
+
justify-content: center;
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
/* Icon in inputs */
|
|
2157
|
+
.input-icon, .input-icon-end {
|
|
2158
|
+
position: relative;
|
|
2159
|
+
display: flex;
|
|
2160
|
+
align-items: center;
|
|
2161
|
+
pds-icon { position: absolute; color: var(--color-text-muted); pointer-events: none; width: var(--icon-size-md); height: var(--icon-size-md); }
|
|
2162
|
+
}
|
|
2163
|
+
.input-icon {
|
|
2164
|
+
pds-icon { left: var(--spacing-3); }
|
|
2165
|
+
input { padding-left: calc(var(--icon-size-md) + var(--spacing-6)); width: 100%; }
|
|
2166
|
+
}
|
|
2167
|
+
.input-icon-end {
|
|
2168
|
+
pds-icon { left: unset; right: var(--spacing-3); }
|
|
2169
|
+
input { padding-left: var(--spacing-4); padding-right: calc(var(--icon-size-md) + var(--spacing-6)); width: 100%; }
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
`}#ue(){return`/* Dropdown Component */
|
|
2173
|
+
|
|
2174
|
+
/* Basic dropdown host */
|
|
2175
|
+
nav[data-dropdown] {
|
|
2176
|
+
position: relative;
|
|
2177
|
+
display: inline-block;
|
|
2178
|
+
padding: 0;
|
|
2179
|
+
|
|
2180
|
+
menu {
|
|
2181
|
+
position: absolute;
|
|
2182
|
+
list-style: none;
|
|
2183
|
+
padding: var(--spacing-2);
|
|
2184
|
+
margin: 0;
|
|
2185
|
+
background: var(--color-surface-overlay);
|
|
2186
|
+
border: 1px solid var(--color-border);
|
|
2187
|
+
border-radius: var(--radius-md);
|
|
2188
|
+
box-shadow: var(--shadow-lg);
|
|
2189
|
+
top: 100%;
|
|
2190
|
+
bottom: auto;
|
|
2191
|
+
left: 0;
|
|
2192
|
+
right: auto;
|
|
2193
|
+
margin-top: var(--spacing-2);
|
|
2194
|
+
--dropdown-transition-duration: var(--transition-fast, 160ms);
|
|
2195
|
+
min-width: max(100%, var(--dropdown-min-width, 12rem));
|
|
2196
|
+
width: max-content;
|
|
2197
|
+
opacity: 0;
|
|
2198
|
+
scale: 0.95;
|
|
2199
|
+
visibility: hidden;
|
|
2200
|
+
display: none;
|
|
2201
|
+
pointer-events: none;
|
|
2202
|
+
transform-origin: top center;
|
|
2203
|
+
z-index: var(--z-dropdown, 1050);
|
|
2204
|
+
max-height: min(60vh, 24rem);
|
|
2205
|
+
overflow-y: auto;
|
|
2206
|
+
transition:
|
|
2207
|
+
opacity var(--dropdown-transition-duration) ease,
|
|
2208
|
+
scale var(--dropdown-transition-duration) ease,
|
|
2209
|
+
visibility 0s linear var(--dropdown-transition-duration),
|
|
2210
|
+
display 0s linear var(--dropdown-transition-duration);
|
|
2211
|
+
transition-behavior: allow-discrete;
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
menu[aria-hidden="false"] {
|
|
2215
|
+
display: block;
|
|
2216
|
+
opacity: 1;
|
|
2217
|
+
scale: 1;
|
|
2218
|
+
visibility: visible;
|
|
2219
|
+
pointer-events: auto;
|
|
2220
|
+
transition:
|
|
2221
|
+
opacity var(--dropdown-transition-duration) ease,
|
|
2222
|
+
scale var(--dropdown-transition-duration) ease,
|
|
2223
|
+
visibility 0s linear 0s,
|
|
2224
|
+
display 0s linear 0s;
|
|
2225
|
+
}
|
|
2226
|
+
|
|
2227
|
+
li {
|
|
2228
|
+
padding: var(--spacing-1) 0;
|
|
2229
|
+
|
|
2230
|
+
& + li {
|
|
2231
|
+
border-top: 1px solid var(--color-border);
|
|
2232
|
+
margin-top: var(--spacing-2);
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
&:has(> hr) {
|
|
2236
|
+
border-top: none;
|
|
2237
|
+
margin-top: 0;
|
|
2238
|
+
padding: 0;
|
|
2239
|
+
|
|
2240
|
+
& + li {
|
|
2241
|
+
border-top: none;
|
|
2242
|
+
margin-top: 0;
|
|
2243
|
+
}
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
& > hr {
|
|
2247
|
+
border: none;
|
|
2248
|
+
border-top: 3px solid var(--color-border);
|
|
2249
|
+
margin: var(--spacing-2) 0;
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
|
|
2253
|
+
a {
|
|
2254
|
+
display: flex;
|
|
2255
|
+
color: var(--color-text-primary);
|
|
2256
|
+
text-decoration: none;
|
|
2257
|
+
align-items: center;
|
|
2258
|
+
gap: var(--spacing-2);
|
|
2259
|
+
|
|
2260
|
+
&.danger {
|
|
2261
|
+
color: var(--color-danger-600);
|
|
2262
|
+
}
|
|
2263
|
+
}
|
|
2264
|
+
|
|
2265
|
+
&.align-right,
|
|
2266
|
+
&[data-align="right"],
|
|
2267
|
+
&[data-align="end"],
|
|
2268
|
+
&[data-dropdown-align="right"],
|
|
2269
|
+
&[data-dropdown-align="end"] {
|
|
2270
|
+
menu {
|
|
2271
|
+
left: auto;
|
|
2272
|
+
right: 0;
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
|
|
2276
|
+
&[data-mode="up"],
|
|
2277
|
+
&[data-dropdown-direction="up"] {
|
|
2278
|
+
menu {
|
|
2279
|
+
top: auto;
|
|
2280
|
+
bottom: 100%;
|
|
2281
|
+
margin-top: 0;
|
|
2282
|
+
margin-bottom: var(--spacing-2);
|
|
2283
|
+
transform-origin: bottom center;
|
|
2284
|
+
}
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2287
|
+
&[data-mode="down"],
|
|
2288
|
+
&[data-dropdown-direction="down"] {
|
|
2289
|
+
menu {
|
|
2290
|
+
top: 100%;
|
|
2291
|
+
bottom: auto;
|
|
2292
|
+
margin-top: var(--spacing-2);
|
|
2293
|
+
margin-bottom: 0;
|
|
2294
|
+
transform-origin: top center;
|
|
2295
|
+
}
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
&[data-mode="auto"] menu {
|
|
2299
|
+
top: 100%;
|
|
2300
|
+
bottom: auto;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2304
|
+
menu {
|
|
2305
|
+
transition-duration: 0.01s !important;
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
}
|
|
2309
|
+
|
|
2310
|
+
@starting-style {
|
|
2311
|
+
nav[data-dropdown] menu[aria-hidden="false"] {
|
|
2312
|
+
opacity: 0;
|
|
2313
|
+
scale: 0.95;
|
|
2314
|
+
}
|
|
2315
|
+
}
|
|
2316
|
+
`}#ge(){let{layout:t={}}=this.options.design,e=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},a=t.gridSystem||{},r=a.columns||[1,2,3,4,6],o=a.autoFitBreakpoints||{sm:"150px",md:"250px",lg:"350px",xl:"450px"},i=[`
|
|
2317
|
+
/* ============================================================================
|
|
2318
|
+
Layout Utilities
|
|
2319
|
+
Modern grid and flex system for building responsive layouts
|
|
2320
|
+
============================================================================ */
|
|
2321
|
+
|
|
2322
|
+
/* Container */
|
|
2323
|
+
.container {
|
|
2324
|
+
display: block;
|
|
2325
|
+
width: 100%;
|
|
2326
|
+
max-width: ${t.containerMaxWidth||"1400px"};
|
|
2327
|
+
margin: 0 auto;
|
|
2328
|
+
padding: ${t.containerPadding||"var(--spacing-6)"};
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
/* Grid System */
|
|
2332
|
+
.grid {
|
|
2333
|
+
display: grid;
|
|
2334
|
+
gap: var(--spacing-4);
|
|
2335
|
+
}
|
|
2336
|
+
|
|
2337
|
+
`];for(let c of r)i.push(`.grid-cols-${c} { grid-template-columns: repeat(${c}, 1fr); }
|
|
2338
|
+
`);i.push(`
|
|
2339
|
+
/* Auto-fit grids (responsive) */
|
|
2340
|
+
`);for(let[c,l]of Object.entries(o))i.push(`.grid-auto-${c} { grid-template-columns: repeat(auto-fit, minmax(${l}, 1fr)); }
|
|
2341
|
+
`);return i.push(`
|
|
2342
|
+
/* Gap utilities */
|
|
2343
|
+
.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); }
|
|
2344
|
+
|
|
2345
|
+
`),i.push(`
|
|
2346
|
+
/* Flexbox System */
|
|
2347
|
+
.flex { display: flex; }
|
|
2348
|
+
.flex-wrap { flex-wrap: wrap; }
|
|
2349
|
+
.flex-col { flex-direction: column; }
|
|
2350
|
+
.flex-row { flex-direction: row; }
|
|
2351
|
+
.grow { flex: 1 1 0%; }
|
|
2352
|
+
|
|
2353
|
+
/* Alignment utilities */
|
|
2354
|
+
.items-start { align-items: flex-start; } .items-center { align-items: center; } .items-end { align-items: flex-end; } .items-stretch { align-items: stretch; } .items-baseline { align-items: baseline; }
|
|
2355
|
+
.justify-start { justify-content: flex-start; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; } .justify-between { justify-content: space-between; } .justify-around { justify-content: space-around; } .justify-evenly { justify-content: space-evenly; }
|
|
2356
|
+
.text-left { text-align: left; } .text-center { text-align: center; } .text-right { text-align: right; }
|
|
2357
|
+
|
|
2358
|
+
/* Text overflow utility */
|
|
2359
|
+
.truncate {
|
|
2360
|
+
overflow: hidden;
|
|
2361
|
+
text-overflow: ellipsis;
|
|
2362
|
+
white-space: nowrap;
|
|
2363
|
+
}
|
|
2364
|
+
|
|
2365
|
+
/* Required Legend Utility */
|
|
2366
|
+
:where(.required-legend) {
|
|
2367
|
+
display: block;
|
|
2368
|
+
margin: var(--spacing-3) 0;
|
|
2369
|
+
color: var(--color-text-muted);
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2372
|
+
/* Max-width utilities */
|
|
2373
|
+
.max-w-sm { max-width: 400px; } .max-w-md { max-width: 600px; } .max-w-lg { max-width: 800px; } .max-w-xl { max-width: 1200px; }
|
|
2374
|
+
|
|
2375
|
+
/* Stack utilities - vertical rhythm for stacked elements */
|
|
2376
|
+
[class^="stack-"], [class*=" stack-"] {
|
|
2377
|
+
display: flex;
|
|
2378
|
+
flex-direction: column;
|
|
2379
|
+
}
|
|
2380
|
+
.stack-xs { gap: var(--spacing-1); }
|
|
2381
|
+
.stack-sm { gap: var(--spacing-2); }
|
|
2382
|
+
.stack-md { gap: var(--spacing-4); }
|
|
2383
|
+
.stack-lg { gap: var(--spacing-6); }
|
|
2384
|
+
.stack-xl { gap: var(--spacing-8); }
|
|
2385
|
+
|
|
2386
|
+
/* Section spacing - for major content blocks */
|
|
2387
|
+
.section { padding-block: var(--spacing-8); }
|
|
2388
|
+
.section-lg { padding-block: var(--spacing-12); }
|
|
2389
|
+
|
|
2390
|
+
/* Responsive helpers */
|
|
2391
|
+
@media (max-width: ${e.md-1}px) {
|
|
2392
|
+
.mobile-stack { flex-direction: column; }
|
|
2393
|
+
.mobile-stack > * { width: 100%; }
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
/* ============================================================================
|
|
2397
|
+
Backdrop Utilities
|
|
2398
|
+
Reusable backdrop layer for modal components (dialogs, drawers, overlays)
|
|
2399
|
+
============================================================================ */
|
|
2400
|
+
|
|
2401
|
+
/* Base backdrop class for modal overlays */
|
|
2402
|
+
.backdrop {
|
|
2403
|
+
position: fixed;
|
|
2404
|
+
inset: 0;
|
|
2405
|
+
background: var(--backdrop-bg);
|
|
2406
|
+
backdrop-filter: var(--backdrop-filter);
|
|
2407
|
+
opacity: 0;
|
|
2408
|
+
pointer-events: none;
|
|
2409
|
+
transition: opacity 0.2s ease;
|
|
2410
|
+
z-index: var(--z-modal, 1040);
|
|
2411
|
+
|
|
2412
|
+
&.active {
|
|
2413
|
+
opacity: var(--backdrop-opacity, 1);
|
|
2414
|
+
pointer-events: auto;
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
/* Backdrop variants */
|
|
2419
|
+
.backdrop-light { --backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2)); --backdrop-brightness: 1.1; }
|
|
2420
|
+
.backdrop-dark { --backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5)); --backdrop-brightness: 0.6; }
|
|
2421
|
+
.backdrop-blur-sm { --backdrop-blur: 5px; } .backdrop-blur-md { --backdrop-blur: 10px; } .backdrop-blur-lg { --backdrop-blur: 20px; }
|
|
2422
|
+
`),i.join("")}#me(){return`/* Media Element Utilities */
|
|
2423
|
+
|
|
2424
|
+
/* Gallery images */
|
|
2425
|
+
.img-gallery {
|
|
2426
|
+
width: 100%;
|
|
2427
|
+
height: auto;
|
|
2428
|
+
aspect-ratio: 1;
|
|
2429
|
+
object-fit: cover;
|
|
2430
|
+
border-radius: var(--radius-sm);
|
|
2431
|
+
}
|
|
2432
|
+
|
|
2433
|
+
/* Responsive images with different radius sizes */
|
|
2434
|
+
.img-rounded-sm { border-radius: var(--radius-sm); } .img-rounded-md { border-radius: var(--radius-md); } .img-rounded-lg { border-radius: var(--radius-lg); } .img-rounded-xl { border-radius: var(--radius-xl); } .img-rounded-full { border-radius: var(--radius-full); }
|
|
2435
|
+
|
|
2436
|
+
/* Inline images */
|
|
2437
|
+
.img-inline {
|
|
2438
|
+
display: inline;
|
|
2439
|
+
vertical-align: middle;
|
|
2440
|
+
border-radius: var(--radius-xs);
|
|
2441
|
+
margin: 0 var(--spacing-1);
|
|
2442
|
+
max-width: 60px;
|
|
2443
|
+
height: auto;
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
/* Video specific utilities */
|
|
2447
|
+
.video-responsive {
|
|
2448
|
+
width: 100%;
|
|
2449
|
+
max-width: 600px;
|
|
2450
|
+
height: auto;
|
|
2451
|
+
border-radius: var(--radius-md);
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
/* Figure utilities */
|
|
2455
|
+
.figure-responsive {
|
|
2456
|
+
width: 100%;
|
|
2457
|
+
height: auto;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
`}#he(){let{layout:t={},a11y:e={}}=this.options.design,a=t.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=e.minTouchTarget||u.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2461
|
+
|
|
2462
|
+
/* Small devices (${a.sm}px and up) */
|
|
2463
|
+
@media (min-width: ${a.sm}px) {
|
|
2464
|
+
.sm\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } .sm\\:flex-row { flex-direction: row; } .sm\\:text-sm { font-size: var(--font-size-sm); } .sm\\:p-6 { padding: var(--spacing-6); } .sm\\:gap-6 { gap: var(--spacing-6); } .sm\\:hidden { display: none; } .sm\\:block { display: block; }
|
|
2465
|
+
}
|
|
2466
|
+
|
|
2467
|
+
/* Medium devices (${a.md}px and up) */
|
|
2468
|
+
@media (min-width: ${a.md}px) {
|
|
2469
|
+
.md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } .md\\:text-lg { font-size: var(--font-size-lg); } .md\\:p-8 { padding: var(--spacing-8); } .md\\:gap-8 { gap: var(--spacing-8); } .md\\:flex-row { flex-direction: row; } .md\\:w-1\\/2 { width: 50%; } .md\\:w-1\\/3 { width: 33.333333%; } .md\\:hidden { display: none; } .md\\:block { display: block; }
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
/* Large devices (${a.lg}px and up) */
|
|
2473
|
+
@media (min-width: ${a.lg}px) {
|
|
2474
|
+
.lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); } .lg\\:text-xl { font-size: var(--font-size-xl); } .lg\\:p-12 { padding: var(--spacing-12); } .lg\\:gap-12 { gap: var(--spacing-12); } .lg\\:w-1\\/4 { width: 25%; } .lg\\:hidden { display: none; } .lg\\:block { display: block; }
|
|
2475
|
+
}
|
|
2476
|
+
|
|
2477
|
+
/* Touch device optimizations */
|
|
2478
|
+
@media (hover: none) and (pointer: coarse) {
|
|
2479
|
+
/* Touch devices - larger touch targets for interactive elements */
|
|
2480
|
+
button, a, select, textarea,
|
|
2481
|
+
input:not([type="radio"]):not([type="checkbox"]) {
|
|
2482
|
+
min-height: ${r}px;
|
|
2483
|
+
min-width: ${r}px;
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
/* Radio and checkbox inputs: keep reasonable size but ensure label tap area is large */
|
|
2487
|
+
input[type="radio"],
|
|
2488
|
+
input[type="checkbox"] {
|
|
2489
|
+
/* Keep native size - labels provide the touch target */
|
|
2490
|
+
min-height: unset;
|
|
2491
|
+
min-width: unset;
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
/* Ensure labels with radio/checkbox have adequate touch targets */
|
|
2495
|
+
/* Exclude button-style fieldsets which already have proper sizing */
|
|
2496
|
+
label:has(input[type="radio"]):not(fieldset.buttons label),
|
|
2497
|
+
label:has(input[type="checkbox"]):not(fieldset.buttons label),
|
|
2498
|
+
fieldset[role="radiogroup"]:not(.buttons) label,
|
|
2499
|
+
fieldset[role="group"]:not(.buttons) label {
|
|
2500
|
+
min-height: ${r}px;
|
|
2501
|
+
display: inline-flex;
|
|
2502
|
+
align-items: center;
|
|
2503
|
+
padding: var(--spacing-2) 0;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
/* Disable hover effects
|
|
2507
|
+
on touch devices */
|
|
2508
|
+
.card {
|
|
2509
|
+
&:hover {
|
|
2510
|
+
box-shadow: var(--shadow-base);
|
|
2511
|
+
}
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
a {
|
|
2515
|
+
&:hover {
|
|
2516
|
+
color: var(--color-primary-600);
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2521
|
+
/* Reduced motion */
|
|
2522
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2523
|
+
*, *::before, *::after {
|
|
2524
|
+
animation-duration: 0.01ms !important;
|
|
2525
|
+
animation-iteration-count: 1 !important;
|
|
2526
|
+
transition-duration: 0.01ms !important;
|
|
2527
|
+
scroll-behavior: auto !important;
|
|
2528
|
+
}
|
|
2529
|
+
}
|
|
2530
|
+
|
|
2531
|
+
/* High contrast mode */
|
|
2532
|
+
@media (prefers-contrast: high) {
|
|
2533
|
+
:root {
|
|
2534
|
+
--color-primary-600: #0000ff;
|
|
2535
|
+
--color-primary-700: #0000cc;
|
|
2536
|
+
}
|
|
2537
|
+
|
|
2538
|
+
button, input, textarea, select {
|
|
2539
|
+
border-width: 2px;
|
|
2540
|
+
}
|
|
2541
|
+
}
|
|
2542
|
+
|
|
2543
|
+
/* Print styles */
|
|
2544
|
+
@media print {
|
|
2545
|
+
*, *::before, *::after {
|
|
2546
|
+
background: transparent !important;
|
|
2547
|
+
color: black !important;
|
|
2548
|
+
box-shadow: none !important;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
a, a:visited {
|
|
2552
|
+
text-decoration: underline;
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
button {
|
|
2556
|
+
display: none;
|
|
2557
|
+
}
|
|
2558
|
+
|
|
2559
|
+
.mobile-hidden, .desktop-hidden {
|
|
2560
|
+
display: block !important;
|
|
2561
|
+
}
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
`}#o(t){let e=parseInt(t.slice(1,3),16)/255,a=parseInt(t.slice(3,5),16)/255,r=parseInt(t.slice(5,7),16)/255,o=Math.max(e,a,r),i=Math.min(e,a,r),c,l,d=(o+i)/2;if(o===i)c=l=0;else{let s=o-i;switch(l=d>.5?s/(2-o-i):s/(o+i),o){case e:c=(a-r)/s+(a<r?6:0);break;case a:c=(r-e)/s+2;break;case r:c=(e-a)/s+4;break}c/=6}return{h:c*360,s:l*100,l:d*100}}#t(t,e,a){t=t/360,e=e/100,a=a/100;let r=(d,s,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<1/6?d+(s-d)*6*p:p<1/2?s:p<2/3?d+(s-d)*(2/3-p)*6:d),o,i,c;if(e===0)o=i=c=a;else{let d=a<.5?a*(1+e):a+e-a*e,s=2*a-d;o=r(s,d,t+1/3),i=r(s,d,t),c=r(s,d,t-1/3)}let l=d=>{let s=Math.round(d*255).toString(16);return s.length===1?"0"+s:s};return`#${l(o)}${l(i)}${l(c)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#fe(){this.#e={tokens:this.#be(),primitives:this.#ye(),components:this.#ve(),utilities:this.#xe()},this.options.debug&&this.options.log?.("debug","[Generator] Layer sizes:",{tokens:`${(this.#e.tokens.length/1024).toFixed(2)} KB`,primitives:`${(this.#e.primitives.length/1024).toFixed(2)} KB`,components:`${(this.#e.components.length/1024).toFixed(2)} KB`,utilities:`${(this.#e.utilities.length/1024).toFixed(2)} KB`})}#be(){let{colors:t,spacing:e,radius:a,borderWidths:r,typography:o,shadows:i,layout:c,transitions:l,zIndex:d,icons:s}=this.tokens,p=[`@layer tokens {
|
|
2565
|
+
:root {
|
|
2566
|
+
${this.#D(t)}
|
|
2567
|
+
${this.#P(e)}
|
|
2568
|
+
${this.#I(a)}
|
|
2569
|
+
${this.#U(r)}
|
|
2570
|
+
${this.#O(o)}
|
|
2571
|
+
${this.#H(i)}
|
|
2572
|
+
${this.#q(c)}
|
|
2573
|
+
${this.#G(l)}
|
|
2574
|
+
${this.#_(d)}
|
|
2575
|
+
${this.#V(s)}
|
|
2576
|
+
}
|
|
2577
|
+
${this.#Z(t)}
|
|
2578
|
+
}`];return p.push(`
|
|
2579
|
+
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2580
|
+
`),p.push(this.#Q(t)),p.join("")}#ye(){let{advanced:t={},a11y:e={},layout:a={}}=this.options.design,r=t.tabSize||u.TabSizes.standard,o=e.minTouchTarget||u.TouchTargetSizes.standard,i=a.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2581
|
+
/* Base HTML reset */
|
|
2582
|
+
*, *::before, *::after {
|
|
2583
|
+
box-sizing: border-box;
|
|
2584
|
+
}
|
|
2585
|
+
|
|
2586
|
+
:where(html) {
|
|
2587
|
+
interpolate-size: allow-keywords;
|
|
2588
|
+
font-family: var(--font-family-body);
|
|
2589
|
+
font-size: var(--font-size-base);
|
|
2590
|
+
line-height: var(--font-line-height-normal);
|
|
2591
|
+
color: var(--color-text-primary);
|
|
2592
|
+
background-color: var(--color-surface-base);
|
|
2593
|
+
-webkit-text-size-adjust: 100%;
|
|
2594
|
+
-webkit-font-smoothing: antialiased;
|
|
2595
|
+
-moz-osx-font-smoothing: grayscale;
|
|
2596
|
+
tab-size: ${r};
|
|
2597
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
:where(dialog){
|
|
2601
|
+
background-color: transparent;
|
|
2602
|
+
min-width: 320px;
|
|
2603
|
+
border: none;
|
|
2604
|
+
}
|
|
2605
|
+
|
|
2606
|
+
:where(body) {
|
|
2607
|
+
margin: 0;
|
|
2608
|
+
padding: 0;
|
|
2609
|
+
scroll-behavior: smooth;
|
|
2610
|
+
min-height: 100vh;
|
|
2611
|
+
min-height: var(--layout-min-height, 100vh);
|
|
2612
|
+
overflow-x: hidden;
|
|
2613
|
+
-webkit-overflow-scrolling: touch;
|
|
2614
|
+
}
|
|
2615
|
+
|
|
2616
|
+
:where(body.drawer-open) {
|
|
2617
|
+
/* overflow: hidden; */
|
|
2618
|
+
/* scrollbar-gutter: stable; */
|
|
2619
|
+
}
|
|
2620
|
+
|
|
2621
|
+
/* Button primitives */
|
|
2622
|
+
:where(button) {
|
|
2623
|
+
all: unset;
|
|
2624
|
+
box-sizing: border-box;
|
|
2625
|
+
font: inherit;
|
|
2626
|
+
color: var(--color-primary-contrast, white);
|
|
2627
|
+
background: var(--color-primary-600);
|
|
2628
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
2629
|
+
border: 0;
|
|
2630
|
+
border-radius: var(--radius-md);
|
|
2631
|
+
cursor: pointer;
|
|
2632
|
+
transition: opacity var(--transition-fast), background-color var(--transition-fast);
|
|
2633
|
+
display: inline-flex;
|
|
2634
|
+
align-items: center;
|
|
2635
|
+
justify-content: center;
|
|
2636
|
+
gap: var(--spacing-2);
|
|
2637
|
+
font-weight: var(--font-weight-medium);
|
|
2638
|
+
line-height: 1.5;
|
|
2639
|
+
min-height: ${o}px;
|
|
2640
|
+
touch-action: manipulation;
|
|
2641
|
+
user-select: none;
|
|
2642
|
+
}
|
|
2643
|
+
|
|
2644
|
+
:where(button):hover:not(:disabled) {
|
|
2645
|
+
opacity: 0.9;
|
|
2646
|
+
background-color: var(--color-primary-700);
|
|
2647
|
+
}
|
|
2648
|
+
|
|
2649
|
+
:where(button):focus-visible {
|
|
2650
|
+
outline: 2px solid var(--color-primary-500);
|
|
2651
|
+
outline-offset: 2px;
|
|
2652
|
+
}
|
|
2653
|
+
|
|
2654
|
+
:where(button):disabled {
|
|
2655
|
+
opacity: 0.5;
|
|
2656
|
+
cursor: not-allowed;
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
:where(button):active:not(:disabled) {
|
|
2660
|
+
transform: scale(0.98);
|
|
2661
|
+
}
|
|
2662
|
+
|
|
2663
|
+
/* Input primitives */
|
|
2664
|
+
:where(input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="color"])),
|
|
2665
|
+
:where(select),
|
|
2666
|
+
:where(textarea) {
|
|
2667
|
+
font: inherit;
|
|
2668
|
+
color: var(--color-text-primary);
|
|
2669
|
+
background: var(--color-input-bg);
|
|
2670
|
+
border: 1px solid var(--color-border);
|
|
2671
|
+
border-radius: var(--radius-md);
|
|
2672
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
2673
|
+
min-height: 40px;
|
|
2674
|
+
width: 100%;
|
|
2675
|
+
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
2676
|
+
appearance: none;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
:where(input):focus-visible,
|
|
2680
|
+
:where(select):focus-visible,
|
|
2681
|
+
:where(textarea):focus-visible {
|
|
2682
|
+
outline: none;
|
|
2683
|
+
border-color: var(--color-primary-500);
|
|
2684
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-500) 30%, transparent);
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
:where(input):disabled,
|
|
2688
|
+
:where(select):disabled,
|
|
2689
|
+
:where(textarea):disabled {
|
|
2690
|
+
opacity: 0.6;
|
|
2691
|
+
cursor: not-allowed;
|
|
2692
|
+
background-color: var(--color-input-disabled-bg);
|
|
2693
|
+
}
|
|
2694
|
+
|
|
2695
|
+
/* Harmonized placeholder styling */
|
|
2696
|
+
:where(input)::placeholder,
|
|
2697
|
+
:where(textarea)::placeholder,
|
|
2698
|
+
:where(pds-richtext)::placeholder {
|
|
2699
|
+
color: var(--color-text-muted);
|
|
2700
|
+
opacity: 1;
|
|
2701
|
+
font-weight: var(--font-weight-normal);
|
|
2702
|
+
}
|
|
2703
|
+
|
|
2704
|
+
:where(textarea) {
|
|
2705
|
+
min-height: 80px;
|
|
2706
|
+
resize: vertical;
|
|
2707
|
+
}
|
|
2708
|
+
|
|
2709
|
+
/* Link primitives */
|
|
2710
|
+
:where(a) {
|
|
2711
|
+
color: var(--color-primary-600);
|
|
2712
|
+
text-decoration: underline;
|
|
2713
|
+
text-underline-offset: 0.2em;
|
|
2714
|
+
transition: opacity var(--transition-fast);
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
:where(a):hover {
|
|
2718
|
+
opacity: 0.8;
|
|
2719
|
+
}
|
|
2720
|
+
|
|
2721
|
+
:where(a):focus-visible {
|
|
2722
|
+
outline: 2px solid var(--color-primary-500);
|
|
2723
|
+
outline-offset: 2px;
|
|
2724
|
+
border-radius: var(--radius-sm);
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
/* Form primitives */
|
|
2728
|
+
:where(label) {
|
|
2729
|
+
display: block;
|
|
2730
|
+
font-weight: var(--font-weight-medium);
|
|
2731
|
+
margin-bottom: var(--spacing-2);
|
|
2732
|
+
color: var(--color-text-primary);
|
|
2733
|
+
font-size: var(--font-size-sm);
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/* Checkbox enhancement - visually hide native input but keep accessible
|
|
2737
|
+
Excludes button-style checkboxes in fieldsets and special containers */
|
|
2738
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]) input[type="checkbox"]) {
|
|
2739
|
+
position: absolute;
|
|
2740
|
+
opacity: 0;
|
|
2741
|
+
width: 1px;
|
|
2742
|
+
height: 1px;
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
/* Style label container for checkbox */
|
|
2746
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"])) {
|
|
2747
|
+
display: inline-flex;
|
|
2748
|
+
align-items: center;
|
|
2749
|
+
gap: var(--spacing-2);
|
|
2750
|
+
cursor: pointer;
|
|
2751
|
+
user-select: none;
|
|
2752
|
+
position: relative;
|
|
2753
|
+
padding-left: calc(var(--spacing-5) + var(--spacing-3));
|
|
2754
|
+
}
|
|
2755
|
+
|
|
2756
|
+
/* Custom checkbox box using PDS tokens - works with or without span wrapper */
|
|
2757
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"])::before) {
|
|
2758
|
+
content: "";
|
|
2759
|
+
position: absolute;
|
|
2760
|
+
left: 0;
|
|
2761
|
+
top: 50%;
|
|
2762
|
+
transform: translateY(-50%);
|
|
2763
|
+
width: var(--spacing-5);
|
|
2764
|
+
height: var(--spacing-5);
|
|
2765
|
+
border: var(--border-width-md) solid var(--color-border);
|
|
2766
|
+
border-radius: var(--radius-sm);
|
|
2767
|
+
background: var(--color-surface-base);
|
|
2768
|
+
transition: all var(--transition-fast);
|
|
2769
|
+
flex-shrink: 0;
|
|
2770
|
+
}
|
|
2771
|
+
|
|
2772
|
+
/* Checkmark */
|
|
2773
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:checked)::after) {
|
|
2774
|
+
content: "";
|
|
2775
|
+
position: absolute;
|
|
2776
|
+
left: var(--spacing-2);
|
|
2777
|
+
top: 50%;
|
|
2778
|
+
transform: translateY(-60%) rotate(45deg);
|
|
2779
|
+
width: var(--spacing-1-5);
|
|
2780
|
+
height: var(--spacing-3);
|
|
2781
|
+
border: solid var(--color-primary-contrast, white);
|
|
2782
|
+
border-width: 0 2px 2px 0;
|
|
2783
|
+
}
|
|
2784
|
+
|
|
2785
|
+
/* Checked state */
|
|
2786
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:checked)::before) {
|
|
2787
|
+
background: var(--color-primary-600);
|
|
2788
|
+
border-color: var(--color-primary-600);
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2791
|
+
/* Focus styles for accessibility */
|
|
2792
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:focus)::before) {
|
|
2793
|
+
outline: 2px solid var(--color-primary-500);
|
|
2794
|
+
outline-offset: 2px;
|
|
2795
|
+
}
|
|
2796
|
+
|
|
2797
|
+
/* Hover effects */
|
|
2798
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:not(:disabled)):hover::before) {
|
|
2799
|
+
border-color: var(--color-primary-600);
|
|
2800
|
+
background: var(--color-surface-subtle);
|
|
2801
|
+
}
|
|
2802
|
+
|
|
2803
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:checked:not(:disabled)):hover::before) {
|
|
2804
|
+
background: var(--color-primary-700);
|
|
2805
|
+
border-color: var(--color-primary-700);
|
|
2806
|
+
}
|
|
2807
|
+
|
|
2808
|
+
/* Disabled state */
|
|
2809
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:disabled)) {
|
|
2810
|
+
opacity: 0.5;
|
|
2811
|
+
cursor: not-allowed;
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
:where(fieldset) {
|
|
2815
|
+
border: none;
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
:where(legend) {
|
|
2819
|
+
display: block;
|
|
2820
|
+
font-weight: var(--font-weight-semibold);
|
|
2821
|
+
padding: 0;
|
|
2822
|
+
color: var(--color-text-primary);
|
|
2823
|
+
font-weight: var(--font-weight-semibold);
|
|
2824
|
+
color: var(--color-text-primary);
|
|
2825
|
+
margin: 0 0 var(--spacing-3) 0;
|
|
2826
|
+
border: none;
|
|
2827
|
+
line-height: var(--font-line-height-tight);
|
|
2828
|
+
font-size: var(--font-size-lg);
|
|
2829
|
+
background: transparent; /* avoid browser default notch behavior */
|
|
2830
|
+
width: auto;
|
|
2831
|
+
box-sizing: border-box;
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
|
|
2835
|
+
/* List primitives */
|
|
2836
|
+
:where(ul, ol) {
|
|
2837
|
+
padding-left: var(--spacing-6);
|
|
2838
|
+
margin: var(--spacing-3) 0;
|
|
2839
|
+
}
|
|
2840
|
+
|
|
2841
|
+
:where(li) {
|
|
2842
|
+
margin: var(--spacing-1) 0;
|
|
2843
|
+
}
|
|
2844
|
+
|
|
2845
|
+
/* Typography primitives */
|
|
2846
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
2847
|
+
font-family: var(--font-family-headings);
|
|
2848
|
+
font-weight: var(--font-weight-bold);
|
|
2849
|
+
line-height: var(--font-line-height-tight);
|
|
2850
|
+
margin: var(--spacing-4) 0 var(--spacing-3) 0;
|
|
2851
|
+
color: var(--color-text-primary);
|
|
2852
|
+
word-wrap: break-word;
|
|
2853
|
+
hyphens: auto;
|
|
2854
|
+
overflow-wrap: break-word;
|
|
2855
|
+
}
|
|
2856
|
+
|
|
2857
|
+
/* Mobile-first heading sizes */
|
|
2858
|
+
:where(h1) { font-size: var(--font-size-2xl); }
|
|
2859
|
+
:where(h2) { font-size: var(--font-size-xl); }
|
|
2860
|
+
:where(h3) { font-size: var(--font-size-lg); }
|
|
2861
|
+
:where(h4) { font-size: var(--font-size-base); }
|
|
2862
|
+
:where(h5) { font-size: var(--font-size-sm); }
|
|
2863
|
+
:where(h6) { font-size: var(--font-size-xs); }
|
|
2864
|
+
|
|
2865
|
+
/* Scale up on larger screens */
|
|
2866
|
+
@media (min-width: ${i.sm}px) {
|
|
2867
|
+
:where(h1) { font-size: var(--font-size-3xl); }
|
|
2868
|
+
:where(h2) { font-size: var(--font-size-2xl); }
|
|
2869
|
+
:where(h3) { font-size: var(--font-size-xl); }
|
|
2870
|
+
:where(h4) { font-size: var(--font-size-lg); }
|
|
2871
|
+
:where(h5) { font-size: var(--font-size-base); }
|
|
2872
|
+
:where(h6) { font-size: var(--font-size-sm); }
|
|
2873
|
+
}
|
|
2874
|
+
|
|
2875
|
+
:where(p) {
|
|
2876
|
+
margin: var(--spacing-3) 0;
|
|
2877
|
+
line-height: var(--font-line-height-relaxed);
|
|
2878
|
+
color: var(--color-text-primary);
|
|
2879
|
+
}
|
|
2880
|
+
|
|
2881
|
+
/* Code primitives */
|
|
2882
|
+
:where(code) {
|
|
2883
|
+
font-family: var(--font-family-mono, monospace);
|
|
2884
|
+
font-size: 0.9em;
|
|
2885
|
+
background: var(--color-surface-muted);
|
|
2886
|
+
padding: 0.2em 0.4em;
|
|
2887
|
+
border-radius: var(--radius-sm);
|
|
2888
|
+
color: var(--color-text-primary);
|
|
2889
|
+
}
|
|
2890
|
+
|
|
2891
|
+
:where(pre) {
|
|
2892
|
+
font-family: var(--font-family-mono, monospace);
|
|
2893
|
+
background: var(--color-surface-muted);
|
|
2894
|
+
padding: var(--spacing-4);
|
|
2895
|
+
border-radius: var(--radius-md);
|
|
2896
|
+
overflow-x: auto;
|
|
2897
|
+
margin: var(--spacing-4) 0;
|
|
2898
|
+
}
|
|
2899
|
+
|
|
2900
|
+
:where(pre code) {
|
|
2901
|
+
background: none;
|
|
2902
|
+
padding: 0;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
/* Media primitives */
|
|
2906
|
+
:where(img, video) {
|
|
2907
|
+
max-width: 100%;
|
|
2908
|
+
height: auto;
|
|
2909
|
+
border-radius: var(--radius-sm);
|
|
2910
|
+
}
|
|
2911
|
+
|
|
2912
|
+
:where(figure) {
|
|
2913
|
+
margin: 0 0 var(--spacing-6) 0;
|
|
2914
|
+
}
|
|
2915
|
+
|
|
2916
|
+
:where(figcaption) {
|
|
2917
|
+
margin-top: var(--spacing-3);
|
|
2918
|
+
font-size: var(--font-size-sm);
|
|
2919
|
+
color: var(--color-text-secondary);
|
|
2920
|
+
line-height: var(--font-line-height-relaxed);
|
|
2921
|
+
}
|
|
2922
|
+
|
|
2923
|
+
|
|
2924
|
+
:where([hidden]) {
|
|
2925
|
+
display: none !important;
|
|
2926
|
+
}
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
`}#ve(){return`@layer components {
|
|
2930
|
+
|
|
2931
|
+
${this.#re()}
|
|
2932
|
+
|
|
2933
|
+
${this.#ae()}
|
|
2934
|
+
|
|
2935
|
+
${this.#ne()}
|
|
2936
|
+
|
|
2937
|
+
${this.#se()}
|
|
2938
|
+
|
|
2939
|
+
${this.#ce()}
|
|
2940
|
+
|
|
2941
|
+
${this.#ie()}
|
|
2942
|
+
|
|
2943
|
+
${this.#ue()}
|
|
2944
|
+
|
|
2945
|
+
${this.#le()}
|
|
2946
|
+
|
|
2947
|
+
${this.#oe()}
|
|
2948
|
+
|
|
2949
|
+
/* Card component */
|
|
2950
|
+
|
|
2951
|
+
.card {
|
|
2952
|
+
background: var(--color-surface-base);
|
|
2953
|
+
border-radius: var(--radius-md);
|
|
2954
|
+
padding: var(--spacing-4);
|
|
2955
|
+
}
|
|
2956
|
+
|
|
2957
|
+
.card-elevated {
|
|
2958
|
+
background: var(--color-surface-elevated);
|
|
2959
|
+
box-shadow: var(--shadow-md);
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2962
|
+
.card-outlined,
|
|
2963
|
+
.card-basic {
|
|
2964
|
+
background: var(--color-surface-base);
|
|
2965
|
+
border: 1px solid var(--color-border);
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
.card-interactive:hover {
|
|
2969
|
+
transform: translateY(-2px);
|
|
2970
|
+
box-shadow: var(--shadow-lg);
|
|
2971
|
+
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
|
2972
|
+
}
|
|
2973
|
+
|
|
2974
|
+
${this.#de()}
|
|
2975
|
+
|
|
2976
|
+
${this.#K()}
|
|
2977
|
+
|
|
2978
|
+
}
|
|
2979
|
+
`}#xe(){return`@layer utilities {
|
|
2980
|
+
|
|
2981
|
+
${this.#pe()}
|
|
2982
|
+
|
|
2983
|
+
${this.#ge()}
|
|
2984
|
+
|
|
2985
|
+
/* Optional utilities/features controlled by config options */
|
|
2986
|
+
/* - Body background mesh rule (applies one of the generated mesh vars) */
|
|
2987
|
+
/* - Liquid glass utility class */
|
|
2988
|
+
${this.#X()}
|
|
2989
|
+
${this.#ee()}
|
|
2990
|
+
|
|
2991
|
+
${this.#te()}
|
|
2992
|
+
|
|
2993
|
+
/* Surface utilities */
|
|
2994
|
+
|
|
2995
|
+
.surface {
|
|
2996
|
+
background-color: var(--color-surface-base);
|
|
2997
|
+
}
|
|
2998
|
+
|
|
2999
|
+
.surface-subtle {
|
|
3000
|
+
background-color: var(--color-surface-subtle);
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
.surface-elevated {
|
|
3004
|
+
background-color: var(--color-surface-elevated);
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
.surface-sunken {
|
|
3008
|
+
background-color: var(--color-surface-sunken);
|
|
3009
|
+
}
|
|
3010
|
+
|
|
3011
|
+
.surface-overlay {
|
|
3012
|
+
background-color: var(--color-surface-overlay);
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
/* Translucent semantic variants */
|
|
3016
|
+
.surface-translucent {
|
|
3017
|
+
background-color: var(--color-surface-translucent-50);
|
|
3018
|
+
}
|
|
3019
|
+
|
|
3020
|
+
.surface-translucent-25 {
|
|
3021
|
+
background-color: var(--color-surface-translucent-25);
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
.surface-translucent-50 {
|
|
3025
|
+
background-color: var(--color-surface-translucent-50);
|
|
3026
|
+
}
|
|
3027
|
+
|
|
3028
|
+
.surface-translucent-75 {
|
|
3029
|
+
background-color: var(--color-surface-translucent-75);
|
|
3030
|
+
}
|
|
3031
|
+
|
|
3032
|
+
/* Legacy utility retained for backwards compatibility (opinionated overlay) */
|
|
3033
|
+
.surface-overlay {
|
|
3034
|
+
padding: var(--spacing-4);
|
|
3035
|
+
background-color: var(--color-surface-overlay);
|
|
3036
|
+
box-shadow: var(--shadow-lg);
|
|
3037
|
+
border-radius: var(--radius-md);
|
|
3038
|
+
}
|
|
3039
|
+
|
|
3040
|
+
|
|
3041
|
+
/*
|
|
3042
|
+
* SURFACE-INVERSE: Local Theme Context Flip
|
|
3043
|
+
*
|
|
3044
|
+
* We can't simply add .surface-inverse to the dark mode selector because that would
|
|
3045
|
+
* also apply the dark color PALETTE (grays, surfaces, etc.), which would override
|
|
3046
|
+
* --color-surface-inverse itself. Instead, we duplicate only the SEMANTIC tokens.
|
|
3047
|
+
*
|
|
3048
|
+
* Light theme .surface-inverse \u2192 dark semantic tokens
|
|
3049
|
+
* Dark theme .surface-inverse \u2192 light semantic tokens (flip back)
|
|
3050
|
+
*/
|
|
3051
|
+
|
|
3052
|
+
/* Surface-inverse visual properties (shared, uses smart surface tokens) */
|
|
3053
|
+
.surface-inverse {
|
|
3054
|
+
background-color: var(--color-surface-inverse);
|
|
3055
|
+
color: var(--surface-inverse-text);
|
|
3056
|
+
|
|
3057
|
+
pds-icon {
|
|
3058
|
+
color: var(--surface-inverse-icon);
|
|
3059
|
+
}
|
|
3060
|
+
|
|
3061
|
+
/* btn-primary stays vibrant in any context */
|
|
3062
|
+
& .btn-primary {
|
|
3063
|
+
background-color: var(--color-primary-500);
|
|
3064
|
+
border-color: var(--color-primary-500);
|
|
3065
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
3066
|
+
|
|
3067
|
+
&:hover {
|
|
3068
|
+
background-color: var(--color-primary-400);
|
|
3069
|
+
border-color: var(--color-primary-400);
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
}
|
|
3073
|
+
|
|
3074
|
+
/* Light-mode inverse: apply dark semantic tokens */
|
|
3075
|
+
html:not([data-theme="dark"]) .surface-inverse {
|
|
3076
|
+
--color-text-primary: var(--color-gray-100);
|
|
3077
|
+
--color-text-secondary: var(--color-gray-300);
|
|
3078
|
+
--color-text-muted: var(--color-gray-400);
|
|
3079
|
+
--color-border: var(--color-gray-700);
|
|
3080
|
+
--color-input-bg: var(--color-gray-800);
|
|
3081
|
+
--color-input-disabled-bg: var(--color-gray-900);
|
|
3082
|
+
--color-input-disabled-text: var(--color-gray-600);
|
|
3083
|
+
--color-code-bg: var(--color-gray-800);
|
|
3084
|
+
--color-surface-muted: rgba(255, 255, 255, 0.08);
|
|
3085
|
+
|
|
3086
|
+
& button:not(.btn-primary):not(.btn-outline):not(.btn-danger):not(.btn-success):not(.btn-warning),
|
|
3087
|
+
& .btn-secondary {
|
|
3088
|
+
background-color: rgba(255, 255, 255, 0.12);
|
|
3089
|
+
color: var(--surface-inverse-text);
|
|
3090
|
+
border-color: rgba(255, 255, 255, 0.25);
|
|
3091
|
+
|
|
3092
|
+
&:hover { background-color: rgba(255, 255, 255, 0.2); }
|
|
3093
|
+
&:active { background-color: rgba(255, 255, 255, 0.28); }
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
& select {
|
|
3097
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
3098
|
+
color: var(--surface-inverse-text);
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
& a:not([class*="btn"]) {
|
|
3102
|
+
color: var(--color-primary-300, #7dd3fc);
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
/* Dark-mode inverse: flip back to light semantic tokens */
|
|
3107
|
+
html[data-theme="dark"] .surface-inverse {
|
|
3108
|
+
--color-text-primary: var(--color-gray-900);
|
|
3109
|
+
--color-text-secondary: var(--color-gray-600);
|
|
3110
|
+
--color-text-muted: var(--color-gray-600);
|
|
3111
|
+
--color-border: var(--color-gray-300);
|
|
3112
|
+
--color-input-bg: var(--color-surface-base);
|
|
3113
|
+
--color-input-disabled-bg: var(--color-gray-50);
|
|
3114
|
+
--color-input-disabled-text: var(--color-gray-500);
|
|
3115
|
+
--color-code-bg: var(--color-gray-100);
|
|
3116
|
+
--color-surface-muted: var(--color-gray-100);
|
|
3117
|
+
|
|
3118
|
+
& button:not(.btn-primary):not(.btn-outline):not(.btn-danger):not(.btn-success):not(.btn-warning),
|
|
3119
|
+
& .btn-secondary {
|
|
3120
|
+
background-color: rgba(0, 0, 0, 0.06);
|
|
3121
|
+
color: var(--surface-inverse-text);
|
|
3122
|
+
border-color: rgba(0, 0, 0, 0.15);
|
|
3123
|
+
|
|
3124
|
+
&:hover { background-color: rgba(0, 0, 0, 0.1); }
|
|
3125
|
+
&:active { background-color: rgba(0, 0, 0, 0.15); }
|
|
3126
|
+
}
|
|
3127
|
+
|
|
3128
|
+
& select {
|
|
3129
|
+
background-color: #ffffff;
|
|
3130
|
+
color: var(--surface-inverse-text);
|
|
3131
|
+
}
|
|
3132
|
+
|
|
3133
|
+
& a:not([class*="btn"]) {
|
|
3134
|
+
color: var(--color-primary-600, #0284c7);
|
|
3135
|
+
}
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3138
|
+
/* Shadow utilities */
|
|
3139
|
+
.shadow-sm {
|
|
3140
|
+
box-shadow: var(--shadow-sm);
|
|
3141
|
+
}
|
|
3142
|
+
|
|
3143
|
+
.shadow-base, .shadow {
|
|
3144
|
+
box-shadow: var(--shadow-base);
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
.shadow-md {
|
|
3148
|
+
box-shadow: var(--shadow-md);
|
|
3149
|
+
}
|
|
3150
|
+
|
|
3151
|
+
.shadow-lg {
|
|
3152
|
+
box-shadow: var(--shadow-lg);
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
.shadow-xl {
|
|
3156
|
+
box-shadow: var(--shadow-xl);
|
|
3157
|
+
}
|
|
3158
|
+
|
|
3159
|
+
.shadow-inner {
|
|
3160
|
+
box-shadow: var(--shadow-inner);
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
.shadow-none {
|
|
3164
|
+
box-shadow: none;
|
|
3165
|
+
}
|
|
3166
|
+
|
|
3167
|
+
.text-muted {
|
|
3168
|
+
color: var(--color-text-muted);
|
|
3169
|
+
}
|
|
3170
|
+
|
|
3171
|
+
|
|
3172
|
+
${this.#me()}
|
|
3173
|
+
|
|
3174
|
+
${this.#he()}
|
|
3175
|
+
|
|
3176
|
+
}
|
|
3177
|
+
`}#we(){this.#a={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#ke()}#ke(){this.#a.tokens.replaceSync(this.#e.tokens),this.#a.primitives.replaceSync(this.#e.primitives),this.#a.components.replaceSync(this.#e.components),this.#a.utilities.replaceSync(this.#e.utilities)}get tokensCSS(){return this.#e?.tokens||""}get primitivesCSS(){return this.#e?.primitives||""}get componentsCSS(){return this.#e?.components||""}get utilitiesCSS(){return this.#e?.utilities||""}get layeredCSS(){return this.#e?`${this.#e.tokens}
|
|
3178
|
+
${this.#e.primitives}
|
|
3179
|
+
${this.#e.components}
|
|
3180
|
+
${this.#e.utilities}`:""}get compiled(){return{tokens:{colors:this.tokens.colors,spacing:this.tokens.spacing,radius:this.tokens.radius,borderWidths:this.tokens.borderWidths,typography:this.tokens.typography,shadows:this.tokens.shadows,layout:this.tokens.layout,transitions:this.tokens.transitions,zIndex:this.tokens.zIndex,icons:this.tokens.icons},layers:{tokens:{css:this.#e?.tokens||"",size:this.#e?.tokens?.length||0,sizeKB:((this.#e?.tokens?.length||0)/1024).toFixed(2)},primitives:{css:this.#e?.primitives||"",size:this.#e?.primitives?.length||0,sizeKB:((this.#e?.primitives?.length||0)/1024).toFixed(2)},components:{css:this.#e?.components||"",size:this.#e?.components?.length||0,sizeKB:((this.#e?.components?.length||0)/1024).toFixed(2)},utilities:{css:this.#e?.utilities||"",size:this.#e?.utilities?.length||0,sizeKB:((this.#e?.utilities?.length||0)/1024).toFixed(2)},combined:{css:this.layeredCSS,size:this.layeredCSS?.length||0,sizeKB:((this.layeredCSS?.length||0)/1024).toFixed(2)}},config:{design:this.options.design||{},preset:this.options.preset||null,debug:this.options.debug||!1},capabilities:{constructableStylesheets:typeof CSSStyleSheet<"u",blobURLs:typeof Blob<"u"&&typeof URL<"u",shadowDOM:typeof ShadowRoot<"u"},references:{ontology:typeof z<"u"?z:null,enums:typeof u<"u"?u:null},meta:{generatedAt:new Date().toISOString(),totalSize:(this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0),totalSizeKB:(((this.#e?.tokens?.length||0)+(this.#e?.primitives?.length||0)+(this.#e?.components?.length||0)+(this.#e?.utilities?.length||0))/1024).toFixed(2),layerCount:4,tokenGroups:Object.keys(this.tokens).length},helpers:{getColorScales:()=>{let t=[],e=this.tokens.colors;for(let[a,r]of Object.entries(e))typeof r=="object"&&r!==null&&t.push({name:a,scale:r});return t},getColorScale:t=>this.tokens.colors[t]||null,getSpacingValues:()=>Object.entries(this.tokens.spacing).map(([t,e])=>({key:t,value:e})),getTypography:()=>this.tokens.typography,getLayerCSS:t=>{let e=["tokens","primitives","components","utilities"];if(!e.includes(t))throw new Error(`Invalid layer: ${t}. Must be one of ${e.join(", ")}`);return this.#e?.[t]||""},usesEnumValue:(t,e)=>{let a=this.options.design||{};return JSON.stringify(a).includes(e)}}}}get tokensStylesheet(){return this.#a?.tokens}get primitivesStylesheet(){return this.#a?.primitives}get componentsStylesheet(){return this.#a?.components}get utilitiesStylesheet(){return this.#a?.utilities}getCSSModules(){return{"pds-tokens.css.js":this.#i("tokens",this.#e.tokens),"pds-primitives.css.js":this.#i("primitives",this.#e.primitives),"pds-components.css.js":this.#i("components",this.#e.components),"pds-utilities.css.js":this.#i("utilities",this.#e.utilities),"pds-styles.css.js":this.#i("styles",this.layeredCSS)}}#i(t,e){let a=e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${t}
|
|
3181
|
+
// Auto-generated - do not edit directly
|
|
3182
|
+
|
|
3183
|
+
export const ${t} = new CSSStyleSheet();
|
|
3184
|
+
${t}.replaceSync(\`${a}\`);
|
|
3185
|
+
|
|
3186
|
+
export const ${t}CSS = \`${a}\`;
|
|
3187
|
+
`}};var J=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(e){console.error(`[PDS Registry] Failed to load static ${t}:`,e),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:export' and configured PDS.start() with the correct static.root path");let a=new CSSStyleSheet;return a.replaceSync("/* Failed to load "+t+" */"),a}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},Y=new J;function De(n){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let a=new CSSStyleSheet;a.replaceSync(n),a._pds=!0;let r=(document.adoptedStyleSheets||[]).filter(o=>o._pds!==!0);document.adoptedStyleSheets=[...r,a];return}let t="pds-runtime-stylesheet",e=document.getElementById(t);if(!e){e=document.createElement("style"),e.id=t,e.type="text/css";let a=document.head||document.getElementsByTagName("head")[0];a?a.appendChild(e):document.documentElement.appendChild(e)}e.textContent=n}catch(t){console.warn("installRuntimeStyles failed:",t)}}function G(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}De(e)}async function le(n,t=[],e=null){try{let a=e?.primitivesStylesheet?e.primitivesStylesheet:await Y.getStylesheet("primitives");n.adoptedStyleSheets=[a,...t]}catch(a){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt primitives:`,a),n.adoptedStyleSheets=t}}async function de(n,t=["primitives"],e=[],a=null){try{let o=(await Promise.all(t.map(async i=>{if(a)switch(i){case"tokens":return a.tokensStylesheet;case"primitives":return a.primitivesStylesheet;case"components":return a.componentsStylesheet;case"utilities":return a.utilitiesStylesheet;default:break}return Y.getStylesheet(i)}))).filter(i=>i!==null);n.adoptedStyleSheets=[...o,...e]}catch(r){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,r),n.adoptedStyleSheets=e}}var Ne=[{selector:".accordion",description:"Ensures only one <details> element can be open at a time within the accordion.",demoHtml:`
|
|
3188
|
+
<div class="accordion">
|
|
3189
|
+
<details>
|
|
3190
|
+
<summary>Section 1</summary>
|
|
3191
|
+
<p>Content for section 1</p>
|
|
3192
|
+
</details>
|
|
3193
|
+
<details>
|
|
3194
|
+
<summary>Section 2</summary>
|
|
3195
|
+
<p>Content for section 2</p>
|
|
3196
|
+
</details>
|
|
3197
|
+
<details>
|
|
3198
|
+
<summary>Section 3</summary>
|
|
3199
|
+
<p>Content for section 3</p>
|
|
3200
|
+
</details>
|
|
3201
|
+
</div>
|
|
3202
|
+
`.trim()},{selector:"nav[data-dropdown]",description:"Enhances a nav element with data-dropdown to function as a dropdown menu.",demoHtml:`
|
|
3203
|
+
<nav data-dropdown>
|
|
3204
|
+
<button class="btn-primary">Menu</button>
|
|
3205
|
+
<menu>
|
|
3206
|
+
<li><a href="#">Item 1</a></li>
|
|
3207
|
+
<li><a href="#">Item 2</a></li>
|
|
3208
|
+
</menu>
|
|
3209
|
+
</nav>
|
|
3210
|
+
`.trim()},{selector:"label[data-toggle]",description:"Creates a toggle switch element from a checkbox.",demoHtml:`
|
|
3211
|
+
<label data-toggle>
|
|
3212
|
+
<input type="checkbox">
|
|
3213
|
+
<span data-label>Enable notifications</span>
|
|
3214
|
+
</label>
|
|
3215
|
+
`.trim()},{selector:'input[type="range"]',description:"Enhances range inputs with an attached <output>.",demoHtml:`
|
|
3216
|
+
<label class="range-output">
|
|
3217
|
+
<span data-label>Volume</span>
|
|
3218
|
+
<input type="range" min="0" max="100" value="40">
|
|
3219
|
+
</label>
|
|
3220
|
+
`.trim()},{selector:"form[data-required]",description:"Enhances required form fields using an asterisk in the label.",demoHtml:`
|
|
3221
|
+
<form data-required action="#" method="post">
|
|
3222
|
+
<label>
|
|
3223
|
+
<span>Field Label</span>
|
|
3224
|
+
<input type="text" required>
|
|
3225
|
+
</label>
|
|
3226
|
+
<nav class="form-actions">
|
|
3227
|
+
<button type="submit" class="btn-primary">Submit</button>
|
|
3228
|
+
</nav>
|
|
3229
|
+
</form>
|
|
3230
|
+
`.trim()},{selector:"fieldset[role=group][data-open]",description:"Enhances a checkbox/radio group to be open (have a way to add and remove items).",demoHtml:`
|
|
3231
|
+
<fieldset role="group" data-open>
|
|
3232
|
+
<label>
|
|
3233
|
+
<span data-label>Test</span>
|
|
3234
|
+
<input value="lala" name="test1" type="radio" />
|
|
3235
|
+
</label>
|
|
3236
|
+
</fieldset>
|
|
3237
|
+
`.trim()},{selector:"button, a[class*='btn-']",description:"Automatically manages spinner icon for buttons with .btn-working class",demoHtml:`
|
|
3238
|
+
<button class="btn-primary btn-working">
|
|
3239
|
+
<span>Saving</span>
|
|
3240
|
+
</button>
|
|
3241
|
+
`.trim()}];function Pe(n){n.dataset.enhancedAccordion||(n.dataset.enhancedAccordion="true",n.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===n&&n.querySelectorAll(":scope > details[open]").forEach(e=>{e!==t.target&&(e.open=!1)})},!0))}function Ie(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let t=n.querySelector("menu");if(!t)return;let e=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");e&&!e.hasAttribute("type")&&e.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.setAttribute("role",t.getAttribute("role")||"menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),e&&(e.setAttribute("aria-haspopup","true"),e.setAttribute("aria-controls",t.id),e.setAttribute("aria-expanded","false"));let a=()=>{let c=(n.getAttribute("data-mode")||"auto").toLowerCase();if(c==="up"||c==="down")return c;let l=n.getBoundingClientRect(),d=Math.max(0,window.innerHeight-l.bottom);return Math.max(0,l.top)>d?"up":"down"},r=()=>{n.dataset.dropdownDirection=a(),t.setAttribute("aria-hidden","false"),e?.setAttribute("aria-expanded","true")},o=()=>{t.setAttribute("aria-hidden","true"),e?.setAttribute("aria-expanded","false")},i=()=>{t.getAttribute("aria-hidden")==="false"?o():r()};e?.addEventListener("click",c=>{c.preventDefault(),c.stopPropagation(),i()}),document.addEventListener("click",c=>{n.contains(c.target)||o()}),n.addEventListener("keydown",c=>{c.key==="Escape"&&(o(),e?.focus())}),n.addEventListener("focusout",c=>{(!c.relatedTarget||!n.contains(c.relatedTarget))&&o()})}function Ue(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let t=n.querySelector('input[type="checkbox"]');if(!t)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",t.checked?"true":"false");let e=document.createElement("span");e.className="toggle-switch",e.setAttribute("role","presentation"),e.setAttribute("aria-hidden","true");let a=document.createElement("span");a.className="toggle-knob",e.appendChild(a),n.insertBefore(e,t.nextSibling);let r=()=>{n.setAttribute("aria-checked",t.checked?"true":"false")},o=()=>{t.disabled||(t.checked=!t.checked,r(),t.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),o()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),o())}),t.addEventListener("change",r)}function Oe(n){if(n.dataset.enhancedRange)return;let t=n.closest("label"),e=t?.classList.contains("range-output"),a=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${a}-output`;if(n.id=a,e){let o=t.querySelector("span");if(o&&!o.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let c=document.createElement("span");c.textContent=o.textContent,i.appendChild(c);let l=document.createElement("output");l.id=r,l.setAttribute("for",a),l.style.color="var(--surface-text-secondary, var(--color-text-secondary))",l.style.fontSize="0.875rem",l.textContent=n.value,i.appendChild(l),o.textContent="",o.appendChild(i);let d=()=>{l.textContent=n.value};n.addEventListener("input",d)}}else{let o=n.closest(".range-container");o||(o=document.createElement("div"),o.className="range-container",n.parentNode?.insertBefore(o,n),o.appendChild(n)),o.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",a),i.className="range-bubble",i.setAttribute("aria-live","polite"),o.appendChild(i);let c=()=>{let s=parseFloat(n.min)||0,p=parseFloat(n.max)||100,g=parseFloat(n.value),h=(g-s)/(p-s);i.style.left=`calc(${h*100}% )`,i.textContent=String(g)},l=()=>i.classList.add("visible"),d=()=>i.classList.remove("visible");n.addEventListener("input",c),n.addEventListener("pointerdown",l),n.addEventListener("pointerup",d),n.addEventListener("pointerleave",d),n.addEventListener("focus",l),n.addEventListener("blur",d),c()}n.dataset.enhancedRange="1"}function He(n){if(n.dataset.enhancedRequired)return;n.dataset.enhancedRequired="true";let t=e=>{let a=e.closest("label");if(!a||a.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px",a.querySelector("span").appendChild(r);let o=e.closest("form");if(o&&!o.querySelector(".required-legend")){let i=document.createElement("small");i.classList.add("required-legend"),i.textContent="* Required fields",o.insertBefore(i,o.querySelector(".form-actions")||o.lastElementChild)}};n.querySelectorAll("[required]").forEach(e=>{t(e)})}function qe(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let t=document.createElement("input");t.type="text",t.placeholder="Add item...",t.classList.add("input-text","input-sm"),t.style.width="auto";let e=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(t),t.addEventListener("keydown",a=>{if(a.key==="Enter"||a.key==="Tab"){let r=t.value.trim();if(r){a.preventDefault();let o=e.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,c=document.createElement("label"),l=document.createElement("span");l.setAttribute("data-label",""),l.textContent=r;let d=document.createElement("input");d.type=o,d.name=e.name||n.getAttribute("data-name")||"open-group",d.value=r,d.id=i,c.appendChild(l),c.appendChild(d),n.insertBefore(c,t),t.value=""}}else if(a.key==="Backspace"&&t.value===""){a.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Ge(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let t=null,e=!1;new MutationObserver(r=>{r.forEach(o=>{if(o.attributeName==="class"){let i=n.classList.contains("btn-working"),c=n.querySelector("pds-icon");if(i)if(c)t||(t=c.getAttribute("icon")),c.setAttribute("icon","circle-notch");else{let l=document.createElement("pds-icon");l.setAttribute("icon","circle-notch"),l.setAttribute("size","sm"),n.insertBefore(l,n.firstChild),e=!0}else o.oldValue?.includes("btn-working")&&c&&(e?(c.remove(),e=!1):t&&(c.setAttribute("icon",t),t=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var _e=new Map([[".accordion",Pe],["nav[data-dropdown]",Ie],["label[data-toggle]",Ue],['input[type="range"]',Oe],["form[data-required]",He],["fieldset[role=group][data-open]",qe],["button, a[class*='btn-']",Ge]]),pe=Ne.map(n=>({...n,run:_e.get(n.selector)||(()=>{})}));var ge="pds",Ve=/^([a-z][a-z0-9+\-.]*:)?\/\//i,ue=/^[a-z]:/i;function I(n=""){return n.endsWith("/")?n:`${n}/`}function Qe(n="",t=ge){let e=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(e)?e:`${e}/${t}`}function Ze(n){return n.replace(/^\.\/+/,"")}function Je(n){return ue.test(n)?n.replace(ue,"").replace(/^\/+/,""):n}function Ye(n){return n.startsWith("public/")?n.substring(7):n}function me(n,t={}){let e=t.segment||ge,a=t.defaultRoot||`/assets/${e}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return I(a);let o=r.trim();return o?(o=o.replace(/\\/g,"/"),o=Qe(o,e),o=I(o),Ve.test(o)?o:(o=Ze(o),o=Je(o),o.startsWith("/")||(o=Ye(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(i,c)=>c===0?i:"/")),I(o))):I(a)}function he(n){let t=n.replace(/['"]/g,"").trim();if(["system-ui","-apple-system","sans-serif","serif","monospace","cursive","fantasy","ui-sans-serif","ui-serif","ui-monospace","ui-rounded"].includes(t.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let o="mmmmmmmmmmlli",i="72px",c="monospace";r.font=`${i} ${c}`;let l=r.measureText(o).width;r.font=`${i} "${t}", ${c}`;let d=r.measureText(o).width;return l!==d}function Ke(n){return n?n.split(",").map(a=>a.trim())[0].replace(/['"]/g,"").trim():null}async function Xe(n,t={}){if(!n)return Promise.resolve();let{weights:e=[400,500,600,700],italic:a=!1}=t,r=Ke(n);if(!r||he(r))return Promise.resolve();let o=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${o}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((c,l)=>{let d=document.createElement("link");d.rel="stylesheet";let s=a?`ital,wght@0,${e.join(";0,")};1,${e.join(";1,")}`:`wght@${e.join(";")}`;d.href=`https://fonts.googleapis.com/css2?family=${o}:${s}&display=swap`,d.setAttribute("data-font-loader",r),d.onload=()=>{console.log(`Successfully loaded font "${r}"`),c()},d.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),l(new Error(`Failed to load font: ${r}`))},document.head.appendChild(d),setTimeout(()=>{he(r)||console.warn(`Font "${r}" did not load within timeout`),c()},5e3)}))}async function fe(n){if(!n)return Promise.resolve();let t=new Set;n.fontFamilyHeadings&&t.add(n.fontFamilyHeadings),n.fontFamilyBody&&t.add(n.fontFamilyBody),n.fontFamilyMono&&t.add(n.fontFamilyMono);let e=Array.from(t).map(a=>Xe(a).catch(r=>{console.warn(`Could not load font: ${a}`,r)}));await Promise.all(e)}var tt=/^[a-z][a-z0-9+\-.]*:\/\//i,U=(()=>{try{return import.meta.url}catch{return}})(),_=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n;function V(n,t={}){if(!n||tt.test(n))return n;let{preferModule:e=!0}=t,a=()=>{if(!U)return null;try{return new URL(n,U).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(n,window.location.origin).href}catch{return null}};return(e?a()||r():r()||a())||n}var ve=(()=>{if(U)try{let n=new URL(U);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",U).href}catch{return}})();function xe(n={},t={}){if(!t||typeof t!="object")return n;let e=Array.isArray(n)?[...n]:{...n};for(let[a,r]of Object.entries(t))r&&typeof r=="object"&&!Array.isArray(r)?e[a]=xe(e[a]&&typeof e[a]=="object"?e[a]:{},r):e[a]=r;return e}function X(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function O(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(e=>O(e)).filter(e=>e!==void 0);let t={};for(let e in n)if(n.hasOwnProperty(e)){let a=n[e];if(typeof a!="function"){let r=O(a);r!==void 0&&(t[e]=r)}}return t}function we(n={},t={},{presets:e,defaultLog:a}){let r=typeof n=="object"&&("colors"in n||"typography"in n||"spatialRhythm"in n||"shape"in n||"behavior"in n||"layout"in n||"advanced"in n||"a11y"in n||"components"in n||"icons"in n),o=n&&n.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let i=o??t.enhancers??[],c=n&&n.preset,l=n&&n.design,d="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),s,p=null;if(d){let g=String(c||"default").toLowerCase(),h=e?.[g]||Object.values(e||{}).find(C=>X(C.name)===g||String(C.name||"").toLowerCase()===g);if(!h)throw new Error(`PDS preset not found: "${c||"default"}"`);p={id:h.id||X(h.name),name:h.name||h.id||String(g)};let v=structuredClone(h);if(l&&typeof l=="object"){let C=O(l);v=xe(v,structuredClone(C))}let{mode:x,autoDefine:m,applyGlobalStyles:w,manageTheme:E,themeStorageKey:k,preloadStyles:L,criticalLayers:R,preset:W,design:B,enhancers:$,log:S,...M}=n;s={...M,design:v,preset:p.name,log:S||a}}else if(r){let{log:g,...h}=n;s={design:structuredClone(h),log:g||a}}else{let g=e?.default||Object.values(e||{}).find(h=>X(h.name)==="default");if(!g)throw new Error("PDS default preset not available");p={id:g.id||"default",name:g.name||"Default"},s={design:structuredClone(g),preset:p.name,log:a}}return{generatorConfig:s,enhancers:i,presetInfo:p}}function ke({manageTheme:n,themeStorageKey:t,applyResolvedTheme:e,setupSystemListenerIfNeeded:a}){let r="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(t)||null}catch{o=null}try{e?.(o),a?.(o)}catch{}o?o==="system"?r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":r=o:r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:r,storedTheme:o}}function Se(n,{resolvePublicAssetURL:t}){let e=!!(n?.public?.root||n?.static?.root),a=t(n);return!e&&ve&&(a=ve),_(V(a))}async function $e(n,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:a=[],autoDefineMapper:r=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:c=!0}=n,l=(()=>{let s=new Map;return(t||[]).forEach(p=>s.set(p.selector,p)),(o||[]).forEach(p=>s.set(p.selector,p)),Array.from(s.values())})(),d=null;if(typeof window<"u"&&typeof document<"u"){let s=null;try{let m=await Promise.resolve().then(()=>(ye(),be));s=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let p=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:g,...h}=i&&typeof i=="object"?i:{},x={baseURL:e&&_(V(e,{preferModule:c})),predefine:a,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:l,onError:(m,w)=>{if(typeof m=="string"&&m.startsWith("pds-")){let k=["pds-form","pds-drawer"].includes(m),L=w?.message?.includes("#pds/lit")||w?.message?.includes("Failed to resolve module specifier");k&&L?console.error(`\u274C PDS component <${m}> requires Lit but #pds/lit is not in import map.
|
|
3242
|
+
Add this to your HTML <head>:
|
|
3243
|
+
<script type="importmap">
|
|
3244
|
+
{ "imports": { "#pds/lit": "./path/to/lit.js" } }
|
|
3245
|
+
<\/script>
|
|
3246
|
+
See: https://github.com/pure-ds/core#lit-components`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,w)},...h,mapper:m=>{if(customElements.get(m))return null;if(typeof r=="function")try{let w=r(m);return w===void 0?p(m):w}catch(w){return console.warn("Custom autoDefine.mapper error; falling back to default:",w?.message||w),p(m)}return p(m)}};s&&(d=new s(x),a.length>0&&typeof s.define=="function"&&await s.define(...a,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:d,mergedEnhancers:l}}var Ee=!1,H=null,Ce=!1;async function rt(n,{applyResolvedTheme:t,setupSystemListenerIfNeeded:e}){if(Ee)return;let[a,r,o,i]=await Promise.all([Promise.resolve().then(()=>(Z(),ce)),Promise.resolve().then(()=>(q(),ne)),Promise.resolve().then(()=>(re(),te)),Promise.resolve().then(()=>(Fe(),Me))]),c=a?.default||a?.ontology,l=a?.findComponentForElement,d=r?.enums;H=o?.PDSQuery||o?.default||null,n.ontology=c,n.findComponentForElement=l,n.enums=d,n.common=i||{},n.presets=P,n.applyStyles=function(s){return G(s||F.instance)},n.adoptLayers=function(s,p,g){return de(s,p,g,F.instance)},n.adoptPrimitives=function(s,p){return le(s,p,F.instance)},n.getGenerator=async function(){return F},n.query=async function(s){if(!H){let g=await Promise.resolve().then(()=>(re(),te));H=g?.PDSQuery||g?.default||null}return H?await new H(n).search(s):[]},n._applyResolvedTheme=t,n._setupSystemListenerIfNeeded=e,Object.getOwnPropertyDescriptor(n,"compiled")||Object.defineProperty(n,"compiled",{get(){return n.registry?.isLive&&F.instance?F.instance.compiled:null},enumerable:!0,configurable:!1}),n.setTheme=async function(s,p={}){let{storageKey:g="pure-ds-theme",persist:h=!0}=p;if(!["light","dark","system"].includes(s))throw new Error(`Invalid theme "${s}". Must be "light", "dark", or "system".`);if(typeof window>"u")return s==="system"?"light":s;let v=s;if(s==="system"&&(v=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",v),h&&localStorage.setItem(g,s),n.registry.isLive&&F.instance)try{let x=F.instance;if(x&&x.configure){let m={...x.config,theme:v};x.configure(m),await G(F.instance)}}catch(x){console.warn("Failed to update styles for new theme:",x)}return n.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:v,requested:s,source:"programmatic"}})),v},n.preloadCritical=function(s,p={}){if(typeof window>"u"||!document.head||!s)return;let{theme:g,layers:h=["tokens"]}=p;try{let v=g||"light";(g==="system"||!g)&&(v=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",v);let x=s.design?{...s,theme:v}:{design:s,theme:v},m=new F(x),w=h.map(E=>{try{return m.css?.[E]||""}catch{return""}}).filter(E=>E.trim()).join(`
|
|
3247
|
+
`);if(w){let E=document.head.querySelector("style[data-pds-preload]");E&&E.remove();let k=document.createElement("style");k.setAttribute("data-pds-preload",""),k.textContent=w,document.head.insertBefore(k,document.head.firstChild)}}catch(v){console.warn("PDS preload failed:",v)}},Ee=!0}function at(n){Ce||typeof document>"u"||(Ce=!0,n.addEventListener("pds:ready",t=>{let e=t.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))}))}async function ot(n,t,{emitReady:e,applyResolvedTheme:a,setupSystemListenerIfNeeded:r}){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(await rt(n,{applyResolvedTheme:a,setupSystemListenerIfNeeded:r}),at(n),typeof document<"u"&&document.adoptedStyleSheets){let p=`
|
|
3248
|
+
html { opacity: 0; }
|
|
3249
|
+
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3250
|
+
`;try{if(!document.adoptedStyleSheets.some(h=>h._pdsFouc)){let h=new CSSStyleSheet;h.replaceSync(p),h._pdsFouc=!0,document.adoptedStyleSheets=[h,...document.adoptedStyleSheets]}}catch(g){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",g),!document.head.querySelector("style[data-pds-fouc]")){let v=document.createElement("style");v.setAttribute("data-pds-fouc",""),v.textContent=p,document.head.insertBefore(v,document.head.firstChild)}}}let o=t.applyGlobalStyles??!0,i=t.manageTheme??!0,c=t.themeStorageKey??"pure-ds-theme",l=t.preloadStyles??!1,d=t.criticalLayers??["tokens","primitives"],s=t&&t.autoDefine||null;try{let{resolvedTheme:p}=ke({manageTheme:i,themeStorageKey:c,applyResolvedTheme:a,setupSystemListenerIfNeeded:r}),g=we(t,{},{presets:P,defaultLog:ie}),h=g.enhancers,{log:v,...x}=g.generatorConfig,m=structuredClone(x);m.log=v,i&&(m.theme=p);let w=new F(m);if(m.design?.typography)try{await fe(m.design.typography)}catch($){m?.log?.("warn","Failed to load some fonts from Google Fonts:",$)}if(l&&typeof window<"u"&&document.head)try{let $=d.map(S=>{try{return w.css?.[S]||""}catch(M){return m?.log?.("warn",`Failed to generate critical CSS for layer "${S}":`,M),""}}).filter(S=>S.trim()).join(`
|
|
3251
|
+
`);if($){let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let M=document.createElement("style");M.setAttribute("data-pds-critical",""),M.textContent=$;let C=document.head.querySelector('meta[charset], meta[name="viewport"]');C?C.parentNode.insertBefore(M,C.nextSibling):document.head.insertBefore(M,document.head.firstChild)}}catch($){m?.log?.("warn","Failed to preload critical styles:",$)}n.registry.setLiveMode(),g.presetInfo?.name?m?.log?.("log",`PDS live with preset "${g.presetInfo.name}"`):m?.log?.("log","PDS live with custom config"),o&&(await G(F.instance),typeof window<"u"&&setTimeout(()=>{let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let S=document.head.querySelector("style[data-pds-preload]");S&&S.remove();let M=document.getElementById("pds-runtime-stylesheet");M&&M.remove()},100));let E=Se(t,{resolvePublicAssetURL:me}),k;s&&s.baseURL?k=_(V(s.baseURL,{preferModule:!1})):k=`${E}components/`;let L=null,R=[];try{let $=await $e({autoDefineBaseURL:k,autoDefinePreload:s&&Array.isArray(s.predefine)&&s.predefine||[],autoDefineMapper:s&&typeof s.mapper=="function"&&s.mapper||null,enhancers:h,autoDefineOverrides:s||null,autoDefinePreferModule:!(s&&s.baseURL)},{baseEnhancers:pe});L=$.autoDefiner,R=$.mergedEnhancers||[]}catch($){m?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",$)}let W=w?.options||m,B=O(t);return n.currentConfig=Object.freeze({mode:"live",...structuredClone(B),design:structuredClone(g.generatorConfig.design),preset:g.generatorConfig.preset,theme:p,enhancers:R}),e({mode:"live",generator:w,config:W,theme:p,autoDefiner:L}),{generator:w,config:W,theme:p,autoDefiner:L}}catch(p){throw n.dispatchEvent(new CustomEvent("pds:error",{detail:{error:p}})),p}}export{ot as startLive};
|