@pure-ds/core 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CSS-INTELLISENSE-LIMITATION.md +98 -0
- package/CSS-INTELLISENSE-QUICK-REF.md +238 -0
- package/INTELLISENSE.md +384 -0
- package/LICENSE +15 -0
- package/custom-elements-manifest.config.js +30 -0
- package/custom-elements.json +2003 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/packages/pds-configurator/src/figma-export.d.ts +13 -0
- package/dist/types/packages/pds-configurator/src/figma-export.d.ts.map +1 -0
- package/dist/types/packages/pds-configurator/src/pds-config-form.d.ts +2 -0
- package/dist/types/packages/pds-configurator/src/pds-config-form.d.ts.map +1 -0
- package/dist/types/packages/pds-configurator/src/pds-configurator.d.ts +2 -0
- package/dist/types/packages/pds-configurator/src/pds-configurator.d.ts.map +1 -0
- package/dist/types/packages/pds-configurator/src/pds-demo.d.ts +2 -0
- package/dist/types/packages/pds-configurator/src/pds-demo.d.ts.map +1 -0
- package/dist/types/pds.config.d.ts +13 -0
- package/dist/types/pds.config.d.ts.map +1 -0
- package/dist/types/pds.d.ts +408 -0
- package/dist/types/public/assets/js/app.d.ts +2 -0
- package/dist/types/public/assets/js/app.d.ts.map +1 -0
- package/dist/types/public/assets/js/pds.d.ts +23 -0
- package/dist/types/public/assets/js/pds.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-calendar.d.ts +23 -0
- package/dist/types/public/assets/pds/components/pds-calendar.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-drawer.d.ts +2 -0
- package/dist/types/public/assets/pds/components/pds-drawer.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-icon.d.ts +53 -0
- package/dist/types/public/assets/pds/components/pds-icon.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-jsonform.d.ts +104 -0
- package/dist/types/public/assets/pds/components/pds-jsonform.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-richtext.d.ts +121 -0
- package/dist/types/public/assets/pds/components/pds-richtext.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts +61 -0
- package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-splitpanel.d.ts +1 -0
- package/dist/types/public/assets/pds/components/pds-splitpanel.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-tabstrip.d.ts +39 -0
- package/dist/types/public/assets/pds/components/pds-tabstrip.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-toaster.d.ts +111 -0
- package/dist/types/public/assets/pds/components/pds-toaster.d.ts.map +1 -0
- package/dist/types/public/assets/pds/components/pds-upload.d.ts +83 -0
- package/dist/types/public/assets/pds/components/pds-upload.d.ts.map +1 -0
- package/dist/types/src/js/app.d.ts +2 -0
- package/dist/types/src/js/app.d.ts.map +1 -0
- package/dist/types/src/js/common/ask.d.ts +22 -0
- package/dist/types/src/js/common/ask.d.ts.map +1 -0
- package/dist/types/src/js/common/common.d.ts +3 -0
- package/dist/types/src/js/common/common.d.ts.map +1 -0
- package/dist/types/src/js/common/font-loader.d.ts +24 -0
- package/dist/types/src/js/common/font-loader.d.ts.map +1 -0
- package/dist/types/src/js/common/msg.d.ts +3 -0
- package/dist/types/src/js/common/msg.d.ts.map +1 -0
- package/dist/types/src/js/lit.d.ts +25 -0
- package/dist/types/src/js/lit.d.ts.map +1 -0
- package/dist/types/src/js/pds-configurator/figma-export.d.ts +13 -0
- package/dist/types/src/js/pds-configurator/figma-export.d.ts.map +1 -0
- package/dist/types/src/js/pds-configurator/pds-config-form.d.ts +2 -0
- package/dist/types/src/js/pds-configurator/pds-config-form.d.ts.map +1 -0
- package/dist/types/src/js/pds-configurator/pds-configurator.d.ts +2 -0
- package/dist/types/src/js/pds-configurator/pds-configurator.d.ts.map +1 -0
- package/dist/types/src/js/pds-configurator/pds-demo.d.ts +2 -0
- package/dist/types/src/js/pds-configurator/pds-demo.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-config.d.ts +758 -0
- package/dist/types/src/js/pds-core/pds-config.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-enhancer-metadata.d.ts +6 -0
- package/dist/types/src/js/pds-core/pds-enhancer-metadata.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-enhancers.d.ts +14 -0
- package/dist/types/src/js/pds-core/pds-enhancers.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-enums.d.ts +87 -0
- package/dist/types/src/js/pds-core/pds-enums.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-generator.d.ts +741 -0
- package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-ontology.d.ts +48 -0
- package/dist/types/src/js/pds-core/pds-ontology.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-paths.d.ts +37 -0
- package/dist/types/src/js/pds-core/pds-paths.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-query.d.ts +102 -0
- package/dist/types/src/js/pds-core/pds-query.d.ts.map +1 -0
- package/dist/types/src/js/pds-core/pds-registry.d.ts +40 -0
- package/dist/types/src/js/pds-core/pds-registry.d.ts.map +1 -0
- package/dist/types/src/js/pds.d.ts +109 -0
- package/dist/types/src/js/pds.d.ts.map +1 -0
- package/dist/types/src/pds-core/pds-api.d.ts +31 -0
- package/dist/types/src/pds-core/pds-api.d.ts.map +1 -0
- package/package.json +104 -0
- package/packages/pds-cli/README.md +15 -0
- package/packages/pds-cli/bin/generate-css-data.js +565 -0
- package/packages/pds-cli/bin/generate-manifest.js +352 -0
- package/packages/pds-cli/bin/pds-build-icons.js +152 -0
- package/packages/pds-cli/bin/pds-dx.js +114 -0
- package/packages/pds-cli/bin/pds-static.js +556 -0
- package/packages/pds-cli/bin/pds.js +127 -0
- package/packages/pds-cli/bin/postinstall.js +380 -0
- package/packages/pds-cli/bin/sync-assets.js +252 -0
- package/packages/pds-cli/lib/asset-roots.js +47 -0
- package/packages/pds-cli/lib/fs-writer.js +75 -0
- package/pds.css-data.json +5 -0
- package/pds.html-data.json +5 -0
- package/public/assets/js/app.js +5719 -0
- package/public/assets/js/lit.js +131 -0
- package/public/assets/js/pds.js +3423 -0
- package/public/assets/pds/components/pds-calendar.js +837 -0
- package/public/assets/pds/components/pds-drawer.js +857 -0
- package/public/assets/pds/components/pds-icon.js +338 -0
- package/public/assets/pds/components/pds-jsonform.js +1775 -0
- package/public/assets/pds/components/pds-richtext.js +1035 -0
- package/public/assets/pds/components/pds-scrollrow.js +331 -0
- package/public/assets/pds/components/pds-splitpanel.js +401 -0
- package/public/assets/pds/components/pds-tabstrip.js +251 -0
- package/public/assets/pds/components/pds-toaster.js +446 -0
- package/public/assets/pds/components/pds-upload.js +657 -0
- package/public/assets/pds/custom-elements.json +2003 -0
- package/public/assets/pds/icons/pds-icons.svg +498 -0
- package/public/assets/pds/pds-css-complete.json +1861 -0
- package/public/assets/pds/pds.css-data.json +2152 -0
- package/public/assets/pds/vscode-custom-data.json +824 -0
- package/readme.md +1870 -0
- package/src/js/pds-core/pds-config.js +1162 -0
- package/src/js/pds-core/pds-enhancer-metadata.js +75 -0
- package/src/js/pds-core/pds-enhancers.js +357 -0
- package/src/js/pds-core/pds-enums.js +86 -0
- package/src/js/pds-core/pds-generator.js +5317 -0
- package/src/js/pds-core/pds-ontology.js +256 -0
- package/src/js/pds-core/pds-paths.js +109 -0
- package/src/js/pds-core/pds-query.js +571 -0
- package/src/js/pds-core/pds-registry.js +129 -0
- package/src/js/pds-core/pds.d.ts +129 -0
- package/src/js/pds.d.ts +408 -0
- package/src/js/pds.js +1579 -0
|
@@ -0,0 +1,3423 @@
|
|
|
1
|
+
var Tt=Object.defineProperty;var Lt=(n,e)=>()=>(n&&(e=n(n=0)),e);var We=(n,e)=>{for(var t in e)Tt(n,t,{get:e[t],enumerable:!0})};var xt={};We(xt,{AutoDefiner:()=>Te});async function ir(...n){let e={};n.length&&typeof n[n.length-1]=="object"&&(e=n.pop()||{});let t=n,{baseURL:o,mapper:r=l=>`${l}.js`,onError:a=(l,d)=>console.error(`[defineWebComponents] ${l}:`,d)}=e,i=o?new URL(o,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),s=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(d,p,h)=>h.toUpperCase()),c=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let d=r(l),h=await import(d instanceof URL?d.href:new URL(d,i).href),g=h?.default??h?.[s(l)];if(!g){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${s(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,g),{tag:l,status:"defined"})}catch(d){throw a(l,d),d}};return Promise.all(t.map(c))}var Te,wt=Lt(()=>{Te=class{constructor(e={}){let{baseURL:t,mapper:o,onError:r,predicate:a=()=>!0,attributeModule:i="data-module",root:s=document,scanExisting:c=!0,debounceMs:l=16,observeShadows:d=!0,enhancers:p=[],patchAttachShadow:h=!0}=e,g=new Set,x=new Set,f=new Set,b=new Map,E=new WeakMap,F=new WeakMap,_=0,S=!1,$=null,z=y=>{if(!y||!p.length)return;let w=F.get(y);w||(w=new Set,F.set(y,w));for(let v of p)if(!(!v.selector||!v.run)&&!w.has(v.selector))try{y.matches&&y.matches(v.selector)&&(v.run(y),w.add(v.selector))}catch(A){console.warn(`[AutoDefiner] Error applying enhancer for selector "${v.selector}":`,A)}},T=(y,w)=>{if(!S&&!(!y||!y.includes("-"))&&!customElements.get(y)&&!x.has(y)&&!f.has(y)){if(w&&w.getAttribute){let v=w.getAttribute(i);v&&!b.has(y)&&b.set(y,v)}g.add(y),me()}},me=()=>{_||(_=setTimeout(Pe,l))},M=y=>{if(y){if(y.nodeType===1){let w=y,v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,w)&&T(v,w),z(w),d&&w.shadowRoot&&fe(w.shadowRoot)}y.querySelectorAll&&y.querySelectorAll("*").forEach(w=>{let v=w.tagName?.toLowerCase();v&&v.includes("-")&&!customElements.get(v)&&a(v,w)&&T(v,w),z(w),d&&w.shadowRoot&&fe(w.shadowRoot)})}},fe=y=>{if(!y||E.has(y))return;M(y);let w=new MutationObserver(v=>{for(let A of v)A.addedNodes?.forEach(O=>{M(O)}),A.type==="attributes"&&A.target&&M(A.target)});w.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(v=>v.selector).filter(v=>v.startsWith("data-"))]}),E.set(y,w)};async function Pe(){if(clearTimeout(_),_=0,!g.size)return;let y=Array.from(g);g.clear(),y.forEach(w=>x.add(w));try{let w=v=>b.get(v)??(o?o(v):`${v}.js`);await ir(...y,{baseURL:t,mapper:w,onError:(v,A)=>{f.add(v),r?.(v,A)}})}catch{}finally{y.forEach(w=>x.delete(w))}}let De=s===document?document.documentElement:s,Be=new MutationObserver(y=>{for(let w of y)w.addedNodes?.forEach(v=>{M(v)}),w.type==="attributes"&&w.target&&M(w.target)});if(Be.observe(De,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...p.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),d&&h&&Element.prototype.attachShadow){let y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(v){let A=y.call(this,v);if(v&&v.mode==="open"){fe(A);let O=this.tagName?.toLowerCase();O&&O.includes("-")&&!customElements.get(O)&&T(O,this)}return A},$=()=>Element.prototype.attachShadow=y}return c&&M(De),{stop(){S=!0,Be.disconnect(),$&&$(),_&&(clearTimeout(_),_=0),E.forEach(y=>y.disconnect())},flush:Pe}}static async define(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let o=e,{baseURL:r,mapper:a=d=>`${d}.js`,onError:i=(d,p)=>console.error(`[defineWebComponents] ${d}:`,p)}=t,s=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(p,h,g)=>g.toUpperCase()),l=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let p=a(d),g=await import(p instanceof URL?p.href:new URL(p,s).href),x=g?.default??g?.[c(d)];if(!x){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,x),{tag:d,status:"defined"})}catch(p){throw i(d,p),p}};return Promise.all(o.map(l))}}});var 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 oe={meta:{name:"Pure Design System Ontology",version:"0.1"},tokens:{colors:["primary","secondary","accent","success","warning","danger","info"],spacing:["xs","sm","md","lg","xl"],typography:["heading","body","mono"],themes:["light","dark"]},primitives:[{id:"badge",name:"Badge / Pill",selectors:[".badge",".pill",".tag",".chip"]},{id:"card",name:"Card",selectors:[".card",".card-basic",".card-elevated",".card-outlined",".card-interactive"]},{id:"surface",name:"Surface",selectors:[".surface",".surface-base",".surface-raised",".surface-overlay",".surface-subtle",".surface-elevated",".surface-sunken"]},{id:"alert",name:"Alert",selectors:[".alert",".alert-info",".alert-success",".alert-warning",".alert-danger"]},{id:"dialog",name:"Dialog",selectors:["dialog",".dialog"]},{id:"table",name:"Table",selectors:["table",".table-responsive",".data-table"]},{id:"button",name:"Button",selectors:["button","[class^='btn-']",".icon-only"]},{id:"fieldset",name:"Fieldset Group",selectors:["fieldset[role='group']","fieldset[role='radiogroup']"]},{id:"label-field",name:"Label+Input",selectors:["label"]},{id:"accordion",name:"Accordion",selectors:[".accordion",".accordion-item","details"]},{id:"icon",name:"Icon",selectors:["pds-icon",".icon",".icon-*"]},{id:"figure",name:"Figure/Media",selectors:["figure","figure.media"]},{id:"gallery",name:"Gallery",selectors:[".gallery",".gallery-grid"]}],components:[{id:"pds-tabstrip",name:"Tab Strip",selectors:["pds-tabstrip"]},{id:"pds-drawer",name:"Drawer",selectors:["pds-drawer"]},{id:"pds-upload",name:"Upload",selectors:["pds-upload"]}],layoutPatterns:[{id:"grid",name:"Grid Container",selectors:[".grid",".demo-grid"],description:"CSS Grid layout container"},{id:"grid-auto",name:"Auto-fit Grid",selectors:[".grid-auto-sm",".grid-auto-md",".grid-auto-lg",".grid-auto-xl"],description:"Responsive auto-fit grid"},{id:"grid-cols",name:"Grid Columns",selectors:[".grid-cols-1",".grid-cols-2",".grid-cols-3",".grid-cols-4",".grid-cols-6"],description:"Fixed column grid"},{id:"flex",name:"Flex Container",selectors:[".flex",".flex-wrap"],description:"Flexbox layout container"},{id:"container",name:"Container",selectors:[".container"],description:"Centered max-width container"},{id:"media-grid",name:"Media Grid",selectors:[".media-grid"],description:"Grid for media elements"}],utilities:[".btn-group",".demo-grid",".color-scale",".gap-*",".items-*",".justify-*",".border-gradient",".border-gradient-primary",".border-gradient-accent",".border-gradient-secondary",".border-gradient-soft",".border-gradient-medium",".border-gradient-strong",".border-glow",".border-glow-sm",".border-glow-lg",".border-gradient-glow",".border-glow-*"],styles:{typography:["headings","body","code"],icons:{source:"svg",sets:["core","brand"]},interactive:["focus","hover","active"]}};function P(n,e){if(!n||!e)return!1;try{return n.matches(e)}catch{return!1}}function Ue(n,e){if(!n||!e||!n.closest)return null;try{return n.closest(e)}catch{return null}}function je(n,{maxDepth:e=5}={}){if(!n||n.closest&&n.closest(".showcase-toc"))return null;let t=n,o=0;for(;t&&o<e;){if(o++,t.tagName==="DS-SHOWCASE")return null;if(t.classList&&t.classList.contains("showcase-section")){t=t.parentElement;continue}for(let a of PDS.ontology.enhancements)if(P(t,a))return{element:t,componentType:"enhanced-component",displayName:a};if(t.tagName==="FIELDSET"){let a=t.getAttribute("role");if(a==="group"||a==="radiogroup")return{element:t,componentType:"form-group",displayName:a==="radiogroup"?"radio group":"form group"}}if(t.tagName==="LABEL"&&t.querySelector&&t.querySelector("input,select,textarea"))return{element:t,componentType:"form-control",displayName:"label with input"};let r=t.closest?t.closest("label"):null;if(r&&r.querySelector&&r.querySelector("input,select,textarea"))return{element:r,componentType:"form-control",displayName:"label with input"};for(let a of PDS.ontology.primitives){for(let i of a.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(h=>h.startsWith(l)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id};let d=t.parentElement,p=0;for(;d&&p<e;){if(d.classList&&Array.from(d.classList).some(h=>h.startsWith(l))&&d.tagName!=="DS-SHOWCASE")return{element:d,componentType:"pds-primitive",displayName:a.name||a.id};d=d.parentElement,p++}continue}continue}if(P(t,s))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id};let c=Ue(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"pds-primitive",displayName:a.name||a.id}}if(t.classList){let i=Array.from(t.classList);for(let s of a.selectors||[])if(typeof s=="string"&&s.includes("*")&&s.startsWith(".")){let c=s.slice(1).replace(/\*/g,"");if(i.some(l=>l.startsWith(c)))return{element:t,componentType:"pds-primitive",displayName:a.name||a.id}}}}for(let a of PDS.ontology.layoutPatterns||[])for(let i of a.selectors||[]){let s=String(i||"").trim();if(s.includes("*")){if(s.startsWith(".")){let l=s.slice(1).replace(/\*/g,"");if(t.classList&&Array.from(t.classList).some(d=>d.startsWith(l)))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id}}continue}if(P(t,s))return{element:t,componentType:"layout-pattern",displayName:a.name||a.id};let c=Ue(t,s);if(c&&c.tagName!=="DS-SHOWCASE")return{element:c,componentType:"layout-pattern",displayName:a.name||a.id}}if(t.tagName&&t.tagName.includes("-"))return{element:t,componentType:"web-component",displayName:t.tagName.toLowerCase()};if(t.tagName==="BUTTON"){let a=t.querySelector&&t.querySelector("pds-icon");return{element:t,componentType:"button",displayName:a?"button with icon":"button"}}if(P(t,"pds-icon")||t.closest&&t.closest("pds-icon")){let a=P(t,"pds-icon")?t:t.closest("pds-icon");return{element:a,componentType:"icon",displayName:`pds-icon (${a.getAttribute&&a.getAttribute("icon")||"unknown"})`}}if(P(t,"nav[data-dropdown]")||t.closest&&t.closest("nav[data-dropdown]"))return{element:P(t,"nav[data-dropdown]")?t:t.closest("nav[data-dropdown]"),componentType:"navigation",displayName:"dropdown menu"};t=t.parentElement}return null}var Ne=oe;var ae=class n{#e;#o;constructor(e={}){this.options={debug:!1,...e},this.options.design||(this.options.design={}),this.options.debug&&this.options.log?.("debug","Generator options:",this.options),this.tokens=this.generateTokens(),this.options.debug&&this.options.log?.("debug","Generated tokens:",this.tokens),this.#me(),typeof CSSStyleSheet<"u"?this.#xe():this.options.debug&&this.options.log?.("debug","[Generator] Skipping browser features (CSSStyleSheet not available)")}generateTokens(){let e=this.options.design||{};return{colors:this.#y(e.colors||{}),spacing:this.generateSpacingTokens(e.spatialRhythm||{}),radius:this.#C(e.shape||{}),borderWidths:this.#_(e.shape||{}),typography:this.generateTypographyTokens(e.typography||{}),shadows:this.#T(e.layers||{}),layout:this.#L(e.layout||{}),transitions:this.#F(e.behavior||{}),zIndex:this.#R(e.layers||{}),icons:this.#P(e.icons||{})}}#y(e){let{primary:t="#3b82f6",secondary:o="#64748b",accent:r="#ec4899",background:a="#ffffff",success:i=null,warning:s="#FFBF00",danger:c=null,info:l=null,darkMode:d={}}=e,p={primary:this.#r(t),secondary:this.#r(o),accent:this.#r(r),success:this.#r(i||this.#v(t)),warning:this.#r(s||r),danger:this.#r(c||this.#x(t)),info:this.#r(l||t),gray:this.#d(o),surface:this.#p(a)};return p.surface.fieldset=this.#w(p.surface),p.surfaceSmart=this.#f(p.surface),p.dark=this.#S(p,a,d),p.dark&&p.dark.surface&&(p.dark.surfaceSmart=this.#f(p.dark.surface)),p.interactive={light:{fill:this.#m(p.primary,4.5),text:p.primary[600]},dark:{fill:this.#m(p.dark.primary,4.5),text:this.#M(p.dark.primary,p.dark.surface.base,4.5)}},p}#r(e){let t=this.#a(e);return{50:this.#t(t.h,Math.max(t.s-10,10),Math.min(t.l+45,95)),100:this.#t(t.h,Math.max(t.s-5,15),Math.min(t.l+35,90)),200:this.#t(t.h,t.s,Math.min(t.l+25,85)),300:this.#t(t.h,t.s,Math.min(t.l+15,75)),400:this.#t(t.h,t.s,Math.min(t.l+5,65)),500:e,600:this.#t(t.h,t.s,Math.max(t.l-10,25)),700:this.#t(t.h,t.s,Math.max(t.l-20,20)),800:this.#t(t.h,t.s,Math.max(t.l-30,15)),900:this.#t(t.h,t.s,Math.max(t.l-40,10))}}#v(e){let t=this.#a(e);return this.#t(120,Math.max(t.s,60),45)}#x(e){let t=this.#a(e);return this.#t(0,Math.max(t.s,70),50)}#d(e){let t=this.#a(e),o=t.h,r=Math.min(t.s,10);return{50:this.#t(o,r,98),100:this.#t(o,r,95),200:this.#t(o,r,88),300:this.#t(o,r,78),400:this.#t(o,r,60),500:e,600:this.#t(o,Math.min(r+5,15),45),700:this.#t(o,Math.min(r+8,18),35),800:this.#t(o,Math.min(r+10,20),20),900:this.#t(o,Math.min(r+12,22),10)}}#p(e){let t=this.#a(e);return{base:e,subtle:this.#t(t.h,Math.max(t.s,2),Math.max(t.l-2,2)),elevated:this.#t(t.h,Math.max(t.s,3),Math.max(t.l-4,5)),sunken:this.#t(t.h,Math.max(t.s,4),Math.max(t.l-6,8)),overlay:this.#t(t.h,Math.max(t.s,2),Math.min(t.l+2,98)),inverse:this.#u(e),hover:"color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%);"}}#w(e){return{base:e.subtle,subtle:e.elevated,elevated:e.sunken,sunken:this.#k(e.sunken,.05),overlay:e.elevated}}#k(e,t=.05){let o=this.#a(e),r=Math.max(o.l-o.l*t,5);return this.#t(o.h,o.s,r)}#u(e){let t=this.#a(e);if(t.l>50){let o=Math.min(t.s+5,25),r=Math.max(12-(t.l-50)*.1,8);return this.#t(t.h,o,r)}else{let o=Math.max(t.s-10,5),r=Math.min(85+(50-t.l)*.3,95);return this.#t(t.h,o,r)}}#S(e,t="#ffffff",o={}){let r=o.background?o.background:this.#u(t),a=this.#p(r),i=o.primary?this.#r(o.primary):this.#n(e.primary);return{surface:{...a,fieldset:this.#E(a)},primary:i,secondary:o.secondary?this.#r(o.secondary):this.#n(e.secondary),accent:o.accent?this.#r(o.accent):this.#n(e.accent),gray:o.secondary?this.#d(o.secondary):e.gray,success:this.#n(e.success),info:this.#n(e.info),warning:this.#n(e.warning),danger:this.#n(e.danger)}}#s(e){let t=String(e||"").replace("#",""),o=t.length===3?t.split("").map(a=>a+a).join(""):t,r=parseInt(o,16);return{r:r>>16&255,g:r>>8&255,b:r&255}}#l(e){let{r:t,g:o,b:r}=this.#s(e),a=[t/255,o/255,r/255].map(i=>i<=.03928?i/12.92:Math.pow((i+.055)/1.055,2.4));return .2126*a[0]+.7152*a[1]+.0722*a[2]}#c(e,t){let o=this.#l(e),r=this.#l(t),a=Math.max(o,r),i=Math.min(o,r);return(a+.05)/(i+.05)}#h(e,t=4.5){if(!e)return"#000000";let o="#ffffff",r="#000000",a=this.#c(e,o);if(a>=t)return o;let i=this.#c(e,r);return i>=t||i>a?r:o}#g(e,t=1){let{r:o,g:r,b:a}=this.#s(e);return`rgba(${o}, ${r}, ${a}, ${t})`}#$(e,t,o=.5){let r=this.#s(e),a=this.#s(t),i=Math.round(r.r+(a.r-r.r)*o),s=Math.round(r.g+(a.g-r.g)*o),c=Math.round(r.b+(a.b-r.b)*o);return this.#z(i,s,c)}#z(e,t,o){let r=a=>{let i=Math.max(0,Math.min(255,Math.round(a))).toString(16);return i.length===1?"0"+i:i};return`#${r(e)}${r(t)}${r(o)}`}#E(e){return{base:e.elevated,subtle:e.overlay,elevated:this.#b(e.elevated,.08),sunken:e.elevated,overlay:this.#b(e.overlay,.05)}}#M(e={},t="#000000",o=4.5){let r=["600","700","800","500","400","900","300","200"],a={shade:null,color:null,ratio:0};for(let i of r){let s=e?.[i];if(!s||typeof s!="string")continue;let c=this.#c(s,t);if(c>a.ratio&&(a={shade:i,color:s,ratio:c}),c>=o)return s}return a.color||e?.["600"]||e?.["500"]}#m(e={},t=4.5){let o=["600","700","800","500","400","900"],r={shade:null,color:null,ratio:0};for(let a of o){let i=e?.[a];if(!i||typeof i!="string")continue;let s=this.#c(i,"#ffffff");if(s>r.ratio&&(r={shade:a,color:i,ratio:s}),s>=t)return i}return r.color||e?.["600"]||e?.["500"]}#f(e){let t={};return Object.entries(e).forEach(([o,r])=>{if(!r||typeof r!="string"||!r.startsWith("#"))return;let a=this.#l(r)<.5,i=this.#h(r,4.5),s=this.#h(r,3),c=this.#$(i,r,.4),l=i,d=c,p=a?"#ffffff":"#000000",h=a?.25:.1,g=this.#g(p,h),x=a?"#ffffff":"#000000",f=a?.15:.1,b=this.#g(x,f);t[o]={bg:r,text:i,textSecondary:s,textMuted:c,icon:l,iconSubtle:d,shadow:g,border:b,scheme:a?"dark":"light"}}),t}#b(e,t=.05){let o=this.#a(e),r=Math.min(o.l+(100-o.l)*t,95);return this.#t(o.h,o.s,r)}#n(e){let t={};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,a])=>{let i=e[a.source];t[r]=this.#A(i,a.dimFactor)}),t}#A(e,t=.8){let o=this.#a(e),r=Math.max(o.s*t,5),a=Math.max(o.l*t,5);return this.#t(o.h,r,a)}generateSpacingTokens(e){let{baseUnit:t=4,scaleRatio:o=1.25,maxSpacingSteps:r=12}=e,a=Number.isFinite(Number(t))?Number(t):4,i=Math.min(Number.isFinite(Number(r))?Number(r):12,12),s={0:"0"};for(let c=1;c<=i;c++)s[c]=`${a*c}px`;return s}#C(e){let{radiusSize:t="medium",customRadius:o=null}=e,r;o!=null?r=o:typeof t=="number"?r=t:typeof t=="string"?r=u.RadiusSizes[t]??u.RadiusSizes.medium:r=u.RadiusSizes.medium;let a=Number.isFinite(Number(r))?Number(r):u.RadiusSizes.medium;return{none:"0",xs:`${Number.isFinite(a*.25)?Math.round(a*.25):0}px`,sm:`${Number.isFinite(a*.5)?Math.round(a*.5):0}px`,md:`${a}px`,lg:`${Number.isFinite(a*1.5)?Math.round(a*1.5):0}px`,xl:`${Number.isFinite(a*2)?Math.round(a*2):0}px`,full:"9999px"}}#_(e){let{borderWidth:t="medium"}=e,o;return typeof t=="number"?o=t:typeof t=="string"?o=u.BorderWidths[t]??u.BorderWidths.medium:o=u.BorderWidths.medium,{hairline:`${u.BorderWidths.hairline}px`,thin:`${u.BorderWidths.thin}px`,medium:`${u.BorderWidths.medium}px`,thick:`${u.BorderWidths.thick}px`}}generateTypographyTokens(e){let{fontFamilyHeadings:t="system-ui, -apple-system, sans-serif",fontFamilyBody:o="system-ui, -apple-system, sans-serif",fontFamilyMono:r='ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',baseFontSize:a=16,fontScale:i=1.25,fontWeightLight:s=u.FontWeights.light,fontWeightNormal:c=u.FontWeights.normal,fontWeightMedium:l=u.FontWeights.medium,fontWeightSemibold:d=u.FontWeights.semibold,fontWeightBold:p=u.FontWeights.bold,lineHeightTight:h=u.LineHeights.tight,lineHeightNormal:g=u.LineHeights.normal,lineHeightRelaxed:x=u.LineHeights.relaxed}=e,f=Number.isFinite(Number(a))?Number(a):16,b=Number.isFinite(Number(i))?Number(i):1.25;return{fontFamily:{headings:t,body:o,mono:r},fontSize:{xs:`${Math.round(f/Math.pow(b,2))}px`,sm:`${Math.round(f/b)}px`,base:`${f}px`,lg:`${Math.round(f*b)}px`,xl:`${Math.round(f*Math.pow(b,2))}px`,"2xl":`${Math.round(f*Math.pow(b,3))}px`,"3xl":`${Math.round(f*Math.pow(b,4))}px`,"4xl":`${Math.round(f*Math.pow(b,5))}px`},fontWeight:{light:s?.toString()||"300",normal:c?.toString()||"400",medium:l?.toString()||"500",semibold:d?.toString()||"600",bold:p?.toString()||"700"},lineHeight:{tight:h?.toString()||"1.25",normal:g?.toString()||"1.5",relaxed:x?.toString()||"1.75"}}}#T(e){let{baseShadowOpacity:t=.1,shadowBlurMultiplier:o=1,shadowOffsetMultiplier:r=1}=e,a=`rgba(0, 0, 0, ${t})`,i=`rgba(0, 0, 0, ${t*.5})`;return{sm:`0 ${1*r}px ${2*o}px 0 ${i}`,base:`0 ${1*r}px ${3*o}px 0 ${a}, 0 ${1*r}px ${2*o}px 0 ${i}`,md:`0 ${4*r}px ${6*o}px ${-1*r}px ${a}, 0 ${2*r}px ${4*o}px ${-1*r}px ${i}`,lg:`0 ${10*r}px ${15*o}px ${-3*r}px ${a}, 0 ${4*r}px ${6*o}px ${-2*r}px ${i}`,xl:`0 ${20*r}px ${25*o}px ${-5*r}px ${a}, 0 ${10*r}px ${10*o}px ${-5*r}px ${i}`,inner:`inset 0 ${2*r}px ${4*o}px 0 ${i}`}}#L(e){let{maxWidth:t=1200,containerPadding:o=16,breakpoints:r={sm:640,md:768,lg:1024,xl:1280}}=e;return{maxWidth:`${t}px`,minHeight:"100vh",containerPadding:`${o}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"}}#F(e){let{transitionSpeed:t=u.TransitionSpeeds.normal,animationEasing:o=u.AnimationEasings["ease-out"]}=e,r;return typeof t=="number"?r=t:typeof t=="string"&&u.TransitionSpeeds[t]?r=u.TransitionSpeeds[t]:r=u.TransitionSpeeds.normal,{fast:`${Math.round(r*.6)}ms`,normal:`${r}ms`,slow:`${Math.round(r*1.4)}ms`}}#R(e){let{baseZIndex:t=1e3,zIndexStep:o=10}=e;return{dropdown:t.toString(),sticky:(t+o*2).toString(),fixed:(t+o*3).toString(),modal:(t+o*4).toString(),drawer:(t+o*5).toString(),popover:(t+o*6).toString(),tooltip:(t+o*7).toString(),notification:(t+o*8).toString()}}#P(e){let{set:t="phosphor",weight:o="regular",defaultSize:r=24,sizes:a={xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64},spritePath:i="/assets/pds/icons/pds-icons.svg"}=e;return{set:t,weight:o,defaultSize:`${r}px`,sizes:Object.fromEntries(Object.entries(a).map(([s,c])=>[s,`${c}px`])),spritePath:i}}#D(e){let t=[];t.push(` /* Colors */
|
|
2
|
+
`);let o=(r,a="")=>{Object.entries(r).forEach(([i,s])=>{typeof s=="object"&&s!==null?o(s,`${a}${i}-`):typeof s=="string"&&t.push(` --color-${a}${i}: ${s};
|
|
3
|
+
`)})};return Object.entries(e).forEach(([r,a])=>{r!=="dark"&&r!=="surfaceSmart"&&r!=="interactive"&&typeof a=="object"&&a!==null&&o(a,`${r}-`)}),e.surfaceSmart&&(t.push(` /* Smart Surface Tokens (context-aware) */
|
|
4
|
+
`),Object.entries(e.surfaceSmart).forEach(([r,a])=>{t.push(` --surface-${r}-bg: ${a.bg};
|
|
5
|
+
`),t.push(` --surface-${r}-text: ${a.text};
|
|
6
|
+
`),t.push(` --surface-${r}-text-secondary: ${a.textSecondary};
|
|
7
|
+
`),t.push(` --surface-${r}-text-muted: ${a.textMuted};
|
|
8
|
+
`),t.push(` --surface-${r}-icon: ${a.icon};
|
|
9
|
+
`),t.push(` --surface-${r}-icon-subtle: ${a.iconSubtle};
|
|
10
|
+
`),t.push(` --surface-${r}-shadow: ${a.shadow};
|
|
11
|
+
`),t.push(` --surface-${r}-border: ${a.border};
|
|
12
|
+
`)}),t.push(`
|
|
13
|
+
`)),t.push(` /* Semantic Text Colors */
|
|
14
|
+
`),t.push(` --color-text-primary: var(--color-gray-900);
|
|
15
|
+
`),t.push(` --color-text-secondary: var(--color-gray-600);
|
|
16
|
+
`),t.push(` --color-text-muted: var(--color-gray-600);
|
|
17
|
+
`),t.push(` --color-border: var(--color-gray-300);
|
|
18
|
+
`),t.push(` --color-input-bg: var(--color-surface-base);
|
|
19
|
+
`),t.push(` --color-input-disabled-bg: var(--color-gray-50);
|
|
20
|
+
`),t.push(` --color-input-disabled-text: var(--color-gray-500);
|
|
21
|
+
`),t.push(` --color-code-bg: var(--color-gray-100);
|
|
22
|
+
`),e.interactive&&e.interactive.light&&(t.push(` /* Interactive Colors - optimized for specific use cases */
|
|
23
|
+
`),t.push(` --color-primary-fill: ${e.interactive.light.fill}; /* For button backgrounds with white text */
|
|
24
|
+
`),t.push(` --color-primary-text: ${e.interactive.light.text}; /* For links and outline buttons on light surfaces */
|
|
25
|
+
`)),t.push(` /* Translucent Surface Tokens */
|
|
26
|
+
`),t.push(` --color-surface-translucent-25: color-mix(in oklab, var(--color-surface-subtle) 25%, transparent 75%);
|
|
27
|
+
`),t.push(` --color-surface-translucent-50: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
|
|
28
|
+
`),t.push(` --color-surface-translucent-75: color-mix(in oklab, var(--color-surface-subtle) 75%, transparent 25%);
|
|
29
|
+
`),t.push(` /* Backdrop tokens - used for modal dialogs, drawers, overlays */
|
|
30
|
+
|
|
31
|
+
--backdrop-bg: linear-gradient(
|
|
32
|
+
135deg,
|
|
33
|
+
rgba(255, 255, 255, 0.2),
|
|
34
|
+
rgba(255, 255, 255, 0.1)
|
|
35
|
+
);
|
|
36
|
+
--backdrop-blur: 10px;
|
|
37
|
+
--backdrop-saturate: 150%;
|
|
38
|
+
--backdrop-brightness: 0.9;
|
|
39
|
+
--backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturate)) brightness(var(--backdrop-brightness));
|
|
40
|
+
--backdrop-opacity: 1;
|
|
41
|
+
|
|
42
|
+
/* Legacy alias for backwards compatibility */
|
|
43
|
+
--backdrop-background: var(--backdrop-bg);
|
|
44
|
+
`),t.push(this.#B(e)),`${t.join("")}
|
|
45
|
+
`}#B(e){let t=e.primary?.[500]||"#3b82f6",o=e.secondary?.[500]||"#8b5cf6",r=e.accent?.[500]||"#f59e0b";return`
|
|
46
|
+
/* Mesh Gradient Backgrounds */
|
|
47
|
+
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${t} 25%, transparent) 0px, transparent 50%),
|
|
48
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${o} 22%, transparent) 0px, transparent 50%),
|
|
49
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
50
|
+
radial-gradient(at 10% 29%, color-mix(in oklab, ${t} 15%, transparent) 0px, transparent 50%);
|
|
51
|
+
|
|
52
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${o} 24%, transparent) 0px, transparent 50%),
|
|
53
|
+
radial-gradient(at 80% 0%, color-mix(in oklab, ${t} 20%, transparent) 0px, transparent 50%),
|
|
54
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
55
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${o} 15%, transparent) 0px, transparent 50%);
|
|
56
|
+
|
|
57
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${r} 21%, transparent) 0px, transparent 50%),
|
|
58
|
+
radial-gradient(at 85% 30%, color-mix(in oklab, ${t} 23%, transparent) 0px, transparent 50%),
|
|
59
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${o} 18%, transparent) 0px, transparent 50%),
|
|
60
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%);
|
|
61
|
+
|
|
62
|
+
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${t} 19%, transparent) 0px, transparent 50%),
|
|
63
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${o} 22%, transparent) 0px, transparent 50%),
|
|
64
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${r} 17%, transparent) 0px, transparent 50%),
|
|
65
|
+
radial-gradient(at 30% 40%, color-mix(in oklab, ${t} 16%, transparent) 0px, transparent 50%);
|
|
66
|
+
|
|
67
|
+
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${t} 23%, transparent) 0px, transparent 50%),
|
|
68
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${r} 20%, transparent) 0px, transparent 50%),
|
|
69
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${o} 18%, transparent) 0px, transparent 50%),
|
|
70
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${r} 15%, transparent) 0px, transparent 50%);
|
|
71
|
+
`}#W(e){let t=[` /* Spacing */
|
|
72
|
+
`];return Object.entries(e).forEach(([o,r])=>{o!=null&&o!=="NaN"&&r!==void 0&&!r.includes("NaN")&&t.push(` --spacing-${o}: ${r};
|
|
73
|
+
`)}),`${t.join("")}
|
|
74
|
+
`}#U(e){let t=[` /* Border Radius */
|
|
75
|
+
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --radius-${o}: ${r};
|
|
76
|
+
`)}),`${t.join("")}
|
|
77
|
+
`}#j(e){let t=[` /* Border Widths */
|
|
78
|
+
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --border-width-${o}: ${r};
|
|
79
|
+
`)}),`${t.join("")}
|
|
80
|
+
`}#N(e){let t=[` /* Typography */
|
|
81
|
+
`];return Object.entries(e).forEach(([o,r])=>{let a=o.replace(/^font/,"").replace(/^(.)/,i=>i.toLowerCase()).replace(/([A-Z])/g,"-$1").toLowerCase();Object.entries(r).forEach(([i,s])=>{let c=i.replace(/([A-Z])/g,"-$1").toLowerCase();t.push(` --font-${a}-${c}: ${s};
|
|
82
|
+
`)})}),`${t.join("")}
|
|
83
|
+
`}#O(e){let t=[` /* Shadows */
|
|
84
|
+
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --shadow-${o}: ${r};
|
|
85
|
+
`)}),`${t.join("")}
|
|
86
|
+
`}#I(e){let t=[` /* Layout */
|
|
87
|
+
`];return Object.entries(e).forEach(([o,r])=>{let a=o.replace(/([A-Z])/g,"-$1").toLowerCase();o!=="breakpoints"&&t.push(` --layout-${a}: ${r};
|
|
88
|
+
`)}),`${t.join("")}
|
|
89
|
+
`}#H(e){let t=[` /* Transitions */
|
|
90
|
+
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --transition-${o}: ${r};
|
|
91
|
+
`)}),`${t.join("")}
|
|
92
|
+
`}#G(e){let t=[` /* Z-Index */
|
|
93
|
+
`];return Object.entries(e).forEach(([o,r])=>{t.push(` --z-${o}: ${r};
|
|
94
|
+
`)}),`${t.join("")}
|
|
95
|
+
`}#q(e){let t=[` /* Icon System */
|
|
96
|
+
`];return t.push(` --icon-set: ${e.set};
|
|
97
|
+
`),t.push(` --icon-weight: ${e.weight};
|
|
98
|
+
`),t.push(` --icon-size: ${e.defaultSize};
|
|
99
|
+
`),Object.entries(e.sizes).forEach(([o,r])=>{t.push(` --icon-size-${o}: ${r};
|
|
100
|
+
`)}),`${t.join("")}
|
|
101
|
+
`}#V(e){if(!e?.dark)return"";let t=[],o=(l,d="")=>{Object.entries(l).forEach(([p,h])=>{typeof h=="object"&&h!==null?o(h,`${d}${p}-`):typeof h=="string"&&t.push(` --color-${d}${p}: ${h};
|
|
102
|
+
`)})};Object.entries(e.dark).forEach(([l,d])=>{l!=="surfaceSmart"&&typeof d=="object"&&d!==null&&o(d,`${l}-`)});let r=[];e.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
103
|
+
`),Object.entries(e.dark.surfaceSmart).forEach(([l,d])=>{r.push(` --surface-${l}-bg: ${d.bg};
|
|
104
|
+
`),r.push(` --surface-${l}-text: ${d.text};
|
|
105
|
+
`),r.push(` --surface-${l}-text-secondary: ${d.textSecondary};
|
|
106
|
+
`),r.push(` --surface-${l}-text-muted: ${d.textMuted};
|
|
107
|
+
`),r.push(` --surface-${l}-icon: ${d.icon};
|
|
108
|
+
`),r.push(` --surface-${l}-icon-subtle: ${d.iconSubtle};
|
|
109
|
+
`),r.push(` --surface-${l}-shadow: ${d.shadow};
|
|
110
|
+
`),r.push(` --surface-${l}-border: ${d.border};
|
|
111
|
+
`)}),r.push(`
|
|
112
|
+
`));let a=` --color-text-primary: var(--color-gray-100);
|
|
113
|
+
--color-text-secondary: var(--color-gray-300);
|
|
114
|
+
--color-text-muted: var(--color-gray-400);
|
|
115
|
+
--color-border: var(--color-gray-700);
|
|
116
|
+
--color-input-bg: var(--color-gray-800);
|
|
117
|
+
--color-input-disabled-bg: var(--color-gray-900);
|
|
118
|
+
--color-input-disabled-text: var(--color-gray-600);
|
|
119
|
+
--color-code-bg: var(--color-gray-800);
|
|
120
|
+
`,i=` /* Backdrop tokens - dark mode */
|
|
121
|
+
--backdrop-bg: linear-gradient(
|
|
122
|
+
135deg,
|
|
123
|
+
rgba(0, 0, 0, 0.6),
|
|
124
|
+
rgba(0, 0, 0, 0.4)
|
|
125
|
+
);
|
|
126
|
+
--backdrop-blur: 10px;
|
|
127
|
+
--backdrop-saturate: 120%;
|
|
128
|
+
--backdrop-brightness: 0.7;
|
|
129
|
+
--backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturate)) brightness(var(--backdrop-brightness));
|
|
130
|
+
--backdrop-opacity: 1;
|
|
131
|
+
|
|
132
|
+
/* Legacy alias for backwards compatibility */
|
|
133
|
+
--backdrop-background: var(--backdrop-bg);
|
|
134
|
+
`,s=this.#Q(e);return`html[data-theme="dark"] {
|
|
135
|
+
${[...t,...r,a,i,s].join("")}}
|
|
136
|
+
`}#K(e){if(!e?.dark)return"";let t=[],o=(d,p="")=>{Object.entries(d).forEach(([h,g])=>{typeof g=="object"&&g!==null?o(g,`${p}${h}-`):typeof g=="string"&&t.push(` --color-${p}${h}: ${g};
|
|
137
|
+
`)})};Object.entries(e.dark).forEach(([d,p])=>{d!=="surfaceSmart"&&typeof p=="object"&&p!==null&&o(p,`${d}-`)});let r=[];e.dark.surfaceSmart&&(r.push(` /* Smart Surface Tokens (dark mode, context-aware) */
|
|
138
|
+
`),Object.entries(e.dark.surfaceSmart).forEach(([d,p])=>{r.push(` --surface-${d}-bg: ${p.bg};
|
|
139
|
+
`),r.push(` --surface-${d}-text: ${p.text};
|
|
140
|
+
`),r.push(` --surface-${d}-text-secondary: ${p.textSecondary};
|
|
141
|
+
`),r.push(` --surface-${d}-text-muted: ${p.textMuted};
|
|
142
|
+
`),r.push(` --surface-${d}-icon: ${p.icon};
|
|
143
|
+
`),r.push(` --surface-${d}-icon-subtle: ${p.iconSubtle};
|
|
144
|
+
`),r.push(` --surface-${d}-shadow: ${p.shadow};
|
|
145
|
+
`),r.push(` --surface-${d}-border: ${p.border};
|
|
146
|
+
`)}),r.push(`
|
|
147
|
+
`));let a=[];e.interactive&&e.interactive.dark&&(a.push(` /* Interactive Colors - optimized for specific use cases (dark mode) */
|
|
148
|
+
`),a.push(` --color-primary-fill: ${e.interactive.dark.fill}; /* For button backgrounds with white text */
|
|
149
|
+
`),a.push(` --color-primary-text: ${e.interactive.dark.text}; /* For links and outline buttons on dark surfaces */
|
|
150
|
+
`));let i=[` --color-text-primary: var(--color-gray-100);
|
|
151
|
+
`,` --color-text-secondary: var(--color-gray-300);
|
|
152
|
+
`,` --color-text-muted: var(--color-gray-400);
|
|
153
|
+
`,` --color-border: var(--color-gray-700);
|
|
154
|
+
`,` --color-input-bg: var(--color-gray-800);
|
|
155
|
+
`,` --color-input-disabled-bg: var(--color-gray-900);
|
|
156
|
+
`,` --color-input-disabled-text: var(--color-gray-600);
|
|
157
|
+
`,` --color-code-bg: var(--color-gray-800);
|
|
158
|
+
`,...a].join(""),s=` /* Backdrop tokens - dark mode */
|
|
159
|
+
--backdrop-bg: linear-gradient(
|
|
160
|
+
135deg,
|
|
161
|
+
rgba(0, 0, 0, 0.6),
|
|
162
|
+
rgba(0, 0, 0, 0.4)
|
|
163
|
+
);
|
|
164
|
+
--backdrop-blur: 10px;
|
|
165
|
+
--backdrop-saturate: 120%;
|
|
166
|
+
--backdrop-brightness: 0.7;
|
|
167
|
+
--backdrop-filter: blur(var(--backdrop-blur)) saturate(var(--backdrop-saturate)) brightness(var(--backdrop-brightness));
|
|
168
|
+
--backdrop-opacity: 1;
|
|
169
|
+
|
|
170
|
+
/* Legacy alias for backwards compatibility */
|
|
171
|
+
--backdrop-background: var(--backdrop-bg);
|
|
172
|
+
`,c=this.#Z(e);return`
|
|
173
|
+
html[data-theme="dark"] {
|
|
174
|
+
${[...t,...r,i,s,c].join("")} }
|
|
175
|
+
`}#Z(e){let t=e.dark||e,o=t.primary?.[400]||"#60a5fa",r=t.secondary?.[400]||"#a78bfa",a=t.accent?.[400]||"#fbbf24";return` /* Mesh Gradient Variables (Dark Mode) */
|
|
176
|
+
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${o} 20%, transparent) 0px, transparent 50%),
|
|
177
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
178
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
179
|
+
radial-gradient(at 10% 29%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
180
|
+
|
|
181
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
182
|
+
radial-gradient(at 80% 0%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
183
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${a} 12%, transparent) 0px, transparent 50%),
|
|
184
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
185
|
+
|
|
186
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${a} 15%, transparent) 0px, transparent 50%),
|
|
187
|
+
radial-gradient(at 85% 30%, color-mix(in oklab, ${o} 17%, transparent) 0px, transparent 50%),
|
|
188
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
189
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${a} 11%, transparent) 0px, transparent 50%);
|
|
190
|
+
|
|
191
|
+
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
192
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
193
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${a} 12%, transparent) 0px, transparent 50%),
|
|
194
|
+
radial-gradient(at 30% 40%, color-mix(in oklab, ${o} 11%, transparent) 0px, transparent 50%);
|
|
195
|
+
|
|
196
|
+
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${o} 17%, transparent) 0px, transparent 50%),
|
|
197
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
198
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
199
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
200
|
+
`}#Q(e){let t=e.dark||e,o=t.primary?.[400]||"#60a5fa",r=t.secondary?.[400]||"#a78bfa",a=t.accent?.[400]||"#fbbf24";return`
|
|
201
|
+
/* Mesh Gradient Backgrounds (Dark Mode) */
|
|
202
|
+
--background-mesh-01: radial-gradient(at 27% 37%, color-mix(in oklab, ${o} 20%, transparent) 0px, transparent 50%),
|
|
203
|
+
radial-gradient(at 97% 21%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
204
|
+
radial-gradient(at 52% 99%, color-mix(in oklab, ${a} 13%, transparent) 0px, transparent 50%),
|
|
205
|
+
radial-gradient(at 10% 29%, color-mix(in oklab, ${o} 10%, transparent) 0px, transparent 50%);
|
|
206
|
+
|
|
207
|
+
--background-mesh-02: radial-gradient(at 40% 20%, color-mix(in oklab, ${r} 18%, transparent) 0px, transparent 50%),
|
|
208
|
+
radial-gradient(at 80% 0%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
209
|
+
radial-gradient(at 0% 50%, color-mix(in oklab, ${a} 12%, transparent) 0px, transparent 50%),
|
|
210
|
+
radial-gradient(at 80% 100%, color-mix(in oklab, ${r} 10%, transparent) 0px, transparent 50%);
|
|
211
|
+
|
|
212
|
+
--background-mesh-03: radial-gradient(at 15% 50%, color-mix(in oklab, ${a} 15%, transparent) 0px, transparent 50%),
|
|
213
|
+
radial-gradient(at 85% 30%, color-mix(in oklab, ${o} 17%, transparent) 0px, transparent 50%),
|
|
214
|
+
radial-gradient(at 50% 80%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
215
|
+
radial-gradient(at 90% 90%, color-mix(in oklab, ${a} 11%, transparent) 0px, transparent 50%);
|
|
216
|
+
|
|
217
|
+
--background-mesh-04: radial-gradient(at 70% 15%, color-mix(in oklab, ${o} 14%, transparent) 0px, transparent 50%),
|
|
218
|
+
radial-gradient(at 20% 80%, color-mix(in oklab, ${r} 16%, transparent) 0px, transparent 50%),
|
|
219
|
+
radial-gradient(at 90% 60%, color-mix(in oklab, ${a} 12%, transparent) 0px, transparent 50%),
|
|
220
|
+
radial-gradient(at 30% 40%, color-mix(in oklab, ${o} 11%, transparent) 0px, transparent 50%);
|
|
221
|
+
|
|
222
|
+
--background-mesh-05: radial-gradient(at 50% 50%, color-mix(in oklab, ${o} 17%, transparent) 0px, transparent 50%),
|
|
223
|
+
radial-gradient(at 10% 10%, color-mix(in oklab, ${a} 14%, transparent) 0px, transparent 50%),
|
|
224
|
+
radial-gradient(at 90% 10%, color-mix(in oklab, ${r} 13%, transparent) 0px, transparent 50%),
|
|
225
|
+
radial-gradient(at 50% 90%, color-mix(in oklab, ${a} 10%, transparent) 0px, transparent 50%);
|
|
226
|
+
`}#Y(){return`/* Alert dark mode adjustments */
|
|
227
|
+
html[data-theme="dark"] .alert-success {
|
|
228
|
+
background-color: var(--color-success-50);
|
|
229
|
+
border-color: var(--color-success-500);
|
|
230
|
+
color: var(--color-success-900);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
html[data-theme="dark"] .alert-info {
|
|
234
|
+
background-color: var(--color-info-50);
|
|
235
|
+
border-color: var(--color-info-500);
|
|
236
|
+
color: var(--color-info-900);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
html[data-theme="dark"] .alert-warning {
|
|
240
|
+
background-color: var(--color-warning-50);
|
|
241
|
+
border-color: var(--color-warning-500);
|
|
242
|
+
color: var(--color-warning-900);
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
html[data-theme="dark"] .alert-danger,
|
|
246
|
+
html[data-theme="dark"] .alert-error {
|
|
247
|
+
background-color: var(--color-danger-50);
|
|
248
|
+
border-color: var(--color-danger-500);
|
|
249
|
+
color: var(--color-danger-900);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
/* Dim images in dark mode */
|
|
253
|
+
html[data-theme="dark"] img,
|
|
254
|
+
html[data-theme="dark"] video {
|
|
255
|
+
opacity: 0.8;
|
|
256
|
+
transition: opacity var(--transition-normal);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
html[data-theme="dark"] img:hover,
|
|
260
|
+
html[data-theme="dark"] video:hover {
|
|
261
|
+
opacity: 1;
|
|
262
|
+
}`}#J(){try{let e=this.options?.design?.options?.backgroundMesh;this.options.debug&&this.options.log?.("debug","backgroundMesh check:",e);let t=Number(e);return!Number.isFinite(t)||t===0?"":`/* Optional background mesh applied from config */
|
|
263
|
+
body {
|
|
264
|
+
background: var(--background-mesh-0${Math.max(1,Math.min(5,Math.floor(t)))});
|
|
265
|
+
background-attachment: fixed;
|
|
266
|
+
}`}catch(e){return this.options.debug&&this.options.log?.("error","Error in generateBodyBackgroundMeshRule:",e),""}}#X(){try{return this.options?.design?.options?.liquidGlassEffects?`/* Liquid glass utility (opt-in via options.liquidGlassEffects) */
|
|
267
|
+
.liquid-glass {
|
|
268
|
+
border-radius: var(--radius-lg);
|
|
269
|
+
/* Subtle translucent fill blended with surface */
|
|
270
|
+
background: color-mix(in oklab, var(--color-surface-subtle) 45%, transparent);
|
|
271
|
+
|
|
272
|
+
background-image: linear-gradient(
|
|
273
|
+
135deg,
|
|
274
|
+
rgba(255,255,255,0.35),
|
|
275
|
+
rgba(255,255,255,0.12)
|
|
276
|
+
);
|
|
277
|
+
/* Frosted glass blur + saturation */
|
|
278
|
+
-webkit-backdrop-filter: blur(12px) saturate(140%);
|
|
279
|
+
backdrop-filter: blur(12px) saturate(140%);
|
|
280
|
+
/* Soft inner highlight and outer depth */
|
|
281
|
+
box-shadow:
|
|
282
|
+
inset 0 1px 0 rgba(255,255,255,0.6),
|
|
283
|
+
inset 0 -40px 80px rgba(255,255,255,0.12),
|
|
284
|
+
0 10px 30px rgba(0,0,0,0.10);
|
|
285
|
+
/* Glossy border with slight light and dark edges */
|
|
286
|
+
border: 1px solid color-mix(in oklab, var(--color-primary-500) 22%, transparent);
|
|
287
|
+
outline: 1px solid color-mix(in oklab, #ffffff 18%, transparent);
|
|
288
|
+
outline-offset: -1px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
html[data-theme="dark"] .liquid-glass {
|
|
292
|
+
background: color-mix(in oklab, var(--color-surface-inverse) 45%, transparent);
|
|
293
|
+
background-image: linear-gradient(
|
|
294
|
+
135deg,
|
|
295
|
+
color-mix(in oklab, var(--color-primary-300) 40%, transparent),
|
|
296
|
+
color-mix(in oklab, var(--color-surface-overlay) 48%, transparent)
|
|
297
|
+
);
|
|
298
|
+
box-shadow:
|
|
299
|
+
inset 0 1px 0 rgba(255,255,255,0.12),
|
|
300
|
+
inset 0 -40px 80px rgba(0,0,0,0.55),
|
|
301
|
+
0 18px 38px rgba(0,0,0,0.65);
|
|
302
|
+
border: 1px solid color-mix(in oklab, var(--color-primary-300) 26%, transparent);
|
|
303
|
+
outline: 1px solid color-mix(in oklab, #ffffff 16%, transparent);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/* Fallback when backdrop-filter isn't supported */
|
|
307
|
+
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
|
|
308
|
+
.liquid-glass {
|
|
309
|
+
/* Strengthen fill a bit to compensate for lack of blur */
|
|
310
|
+
background: color-mix(in oklab, var(--color-surface-subtle) 70%, rgba(255,255,255,0.4));
|
|
311
|
+
box-shadow:
|
|
312
|
+
inset 0 1px 0 rgba(255,255,255,0.6),
|
|
313
|
+
0 10px 24px rgba(0,0,0,0.08);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
html[data-theme="dark"] .liquid-glass {
|
|
317
|
+
background: color-mix(in oklab, var(--color-surface-inverse) 70%, transparent);
|
|
318
|
+
box-shadow:
|
|
319
|
+
inset 0 1px 0 rgba(255,255,255,0.1),
|
|
320
|
+
0 18px 32px rgba(0,0,0,0.58);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
`:""}catch{return""}}#ee(){return`/* ============================================================================
|
|
324
|
+
Border Gradient Utilities
|
|
325
|
+
Card outlines with gradient borders and glow effects
|
|
326
|
+
============================================================================ */
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
/* Gradient border utility - premium/promo card style */
|
|
330
|
+
.border-gradient {
|
|
331
|
+
border: var(--border-width-medium) solid transparent;
|
|
332
|
+
background:
|
|
333
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
334
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
335
|
+
var(--color-primary-400),
|
|
336
|
+
var(--color-accent-400)
|
|
337
|
+
) border-box;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* Gradient border variants - different color combinations */
|
|
341
|
+
.border-gradient-primary {
|
|
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-primary-300),
|
|
347
|
+
var(--color-primary-600)
|
|
348
|
+
) border-box;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.border-gradient-accent {
|
|
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-accent-300),
|
|
357
|
+
var(--color-accent-600)
|
|
358
|
+
) border-box;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.border-gradient-secondary {
|
|
362
|
+
border: var(--border-width-medium) solid transparent;
|
|
363
|
+
background:
|
|
364
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
365
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
366
|
+
var(--color-secondary-300),
|
|
367
|
+
var(--color-secondary-600)
|
|
368
|
+
) border-box;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
/* Gradient border with different strengths/thickness */
|
|
372
|
+
.border-gradient-soft {
|
|
373
|
+
border: 1px 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-medium {
|
|
383
|
+
border: 2px 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
|
+
.border-gradient-strong {
|
|
393
|
+
border: 3px solid transparent;
|
|
394
|
+
background:
|
|
395
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
396
|
+
linear-gradient(var(--gradient-angle, 135deg),
|
|
397
|
+
var(--color-primary-400),
|
|
398
|
+
var(--color-accent-400)
|
|
399
|
+
) border-box;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
/* Glow effect utility - for callouts and active states */
|
|
403
|
+
.border-glow {
|
|
404
|
+
box-shadow: 0 0 12px var(--color-primary-500);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.border-glow-sm {
|
|
408
|
+
box-shadow: 0 0 6px var(--color-primary-500);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.border-glow-lg {
|
|
412
|
+
box-shadow: 0 0 20px var(--color-primary-500);
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
/* Combined gradient + glow for premium effects */
|
|
416
|
+
.border-gradient-glow {
|
|
417
|
+
border: var(--border-width-medium) solid transparent;
|
|
418
|
+
background:
|
|
419
|
+
linear-gradient(var(--color-surface-base), var(--color-surface-base)) padding-box,
|
|
420
|
+
linear-gradient(135deg,
|
|
421
|
+
var(--color-primary-400),
|
|
422
|
+
var(--color-accent-400)
|
|
423
|
+
) border-box;
|
|
424
|
+
box-shadow: 0 0 12px var(--color-primary-500);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
/* Semantic glow variants */
|
|
428
|
+
.border-glow-primary {
|
|
429
|
+
box-shadow: 0 0 12px var(--color-primary-500);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
.border-glow-accent {
|
|
433
|
+
box-shadow: 0 0 12px var(--color-accent-500);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
.border-glow-success {
|
|
437
|
+
box-shadow: 0 0 12px var(--color-success-500);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.border-glow-warning {
|
|
441
|
+
box-shadow: 0 0 12px var(--color-warning-500);
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.border-glow-danger {
|
|
445
|
+
box-shadow: 0 0 12px var(--color-danger-500);
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
`}#te(){let{layout:e={}}=this.options.design,t=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Semantic HTML Elements (low-specificity via :where()) */
|
|
449
|
+
|
|
450
|
+
:where(blockquote) {
|
|
451
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
452
|
+
padding: var(--spacing-4) var(--spacing-6);
|
|
453
|
+
border-left: 4px solid var(--color-primary-500);
|
|
454
|
+
background-color: var(--color-surface-subtle);
|
|
455
|
+
border-radius: var(--radius-md);
|
|
456
|
+
font-style: italic;
|
|
457
|
+
color: var(--color-text-secondary);
|
|
458
|
+
|
|
459
|
+
:where(p):last-child {
|
|
460
|
+
margin-bottom: 0;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
:where(cite) {
|
|
464
|
+
display: block;
|
|
465
|
+
margin-top: var(--spacing-2);
|
|
466
|
+
font-size: var(--font-size-sm);
|
|
467
|
+
font-style: normal;
|
|
468
|
+
color: var(--color-text-tertiary);
|
|
469
|
+
|
|
470
|
+
&::before {
|
|
471
|
+
content: "\u2014 ";
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
:where(hr) {
|
|
477
|
+
margin: var(--spacing-8) 0;
|
|
478
|
+
border: none;
|
|
479
|
+
border-top: 1px solid var(--color-border);
|
|
480
|
+
height: 0;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
:where(dl) {
|
|
484
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
:where(dt) {
|
|
488
|
+
font-weight: var(--font-weight-semibold);
|
|
489
|
+
color: var(--color-text-primary);
|
|
490
|
+
margin-top: var(--spacing-3);
|
|
491
|
+
|
|
492
|
+
&:first-child {
|
|
493
|
+
margin-top: 0;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
:where(dd) {
|
|
498
|
+
margin: var(--spacing-1) 0 var(--spacing-3) var(--spacing-6);
|
|
499
|
+
color: var(--color-text-secondary);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
:where(nav), :where(header), :where(footer) {
|
|
503
|
+
display: block;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
:where(header), :where(footer) {
|
|
507
|
+
width: 100%;
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
:where(article), :where(section), :where(aside) {
|
|
511
|
+
display: block;
|
|
512
|
+
margin-bottom: var(--spacing-6);
|
|
513
|
+
|
|
514
|
+
& > *:last-child {
|
|
515
|
+
margin-bottom: 0;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
:where(mark) {
|
|
520
|
+
background-color: var(--color-warning-200);
|
|
521
|
+
color: var(--color-warning-900);
|
|
522
|
+
padding: 0 var(--spacing-1);
|
|
523
|
+
border-radius: var(--radius-sm);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
:where(kbd) {
|
|
527
|
+
display: inline-block;
|
|
528
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
529
|
+
font-family: var(--font-family-mono);
|
|
530
|
+
font-size: var(--font-size-sm);
|
|
531
|
+
color: var(--color-text-primary);
|
|
532
|
+
background-color: var(--color-surface-elevated);
|
|
533
|
+
border: 1px solid var(--color-border);
|
|
534
|
+
border-radius: var(--radius-sm);
|
|
535
|
+
box-shadow: 0 2px 0 0 var(--color-border);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
:where(abbr[title]) {
|
|
539
|
+
text-decoration: underline dotted;
|
|
540
|
+
cursor: help;
|
|
541
|
+
text-decoration-thickness: 1px;
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
:where(time) {
|
|
545
|
+
font-variant-numeric: tabular-nums;
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
:where(address) {
|
|
549
|
+
font-style: normal;
|
|
550
|
+
line-height: var(--font-line-height-relaxed);
|
|
551
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
:where(details):not(.accordion *) {
|
|
555
|
+
margin: 0 0 var(--spacing-2) 0;
|
|
556
|
+
border: 1px solid var(--color-border);
|
|
557
|
+
border-radius: var(--radius-md);
|
|
558
|
+
background-color: var(--color-surface-base);
|
|
559
|
+
|
|
560
|
+
&[open] :where(summary) {
|
|
561
|
+
border-bottom: 1px solid var(--color-border);
|
|
562
|
+
background-color: var(--color-surface-subtle);
|
|
563
|
+
|
|
564
|
+
&::after {
|
|
565
|
+
transform: rotate(270deg);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
& > *:not(:where(summary)) {
|
|
570
|
+
padding: var(--spacing-4);
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
:where(summary) {
|
|
575
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
576
|
+
cursor: pointer;
|
|
577
|
+
border-radius: var(--radius-md);
|
|
578
|
+
font-weight: var(--font-weight-medium);
|
|
579
|
+
user-select: none;
|
|
580
|
+
list-style: none;
|
|
581
|
+
display: flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
justify-content: space-between;
|
|
584
|
+
transition: background-color var(--transition-fast);
|
|
585
|
+
|
|
586
|
+
&::-webkit-details-marker {
|
|
587
|
+
display: none;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
&::after {
|
|
591
|
+
content: "\u203A";
|
|
592
|
+
display: inline-block;
|
|
593
|
+
transform: rotate(90deg);
|
|
594
|
+
transition: transform var(--transition-fast);
|
|
595
|
+
font-size: var(--font-size-xl);
|
|
596
|
+
font-weight: var(--font-weight-bold);
|
|
597
|
+
color: var(--color-text-secondary);
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
&:hover {
|
|
601
|
+
background-color: var(--color-surface-subtle);
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
/* Dialog styles moved to #generateDialogStyles() */
|
|
606
|
+
|
|
607
|
+
`}#re(){let{gap:e,inputPadding:t,buttonPadding:o,focusRingWidth:r,focusRingOpacity:a,borderWidthThin:i,sectionSpacing:s,buttonMinHeight:c,inputMinHeight:l}=this.options.design,d=t||.75,p=o||1,h=r||3,g=i||1,x=e||1,f=s||2,b=c||44,E=l||40;return`/* Mobile-First Form Styles - Generated from Design Config */
|
|
608
|
+
form {
|
|
609
|
+
margin: 0;
|
|
610
|
+
width: 100%;
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
fieldset {
|
|
614
|
+
margin: 0 0 var(--spacing-${Number.isFinite(Math.round(x*f/4))?Math.round(x*f/4):1}) 0;
|
|
615
|
+
padding: var(--spacing-5);
|
|
616
|
+
width: 100%;
|
|
617
|
+
background-color: color-mix(in oklab, var(--color-surface-subtle) 50%, transparent 50%);
|
|
618
|
+
|
|
619
|
+
/* Unified styling for radio groups and checkbox groups */
|
|
620
|
+
&[role="radiogroup"],
|
|
621
|
+
&[role="group"] {
|
|
622
|
+
display: flex;
|
|
623
|
+
flex-direction: column;
|
|
624
|
+
gap: var(--spacing-2);
|
|
625
|
+
padding: 0;
|
|
626
|
+
background-color: transparent;
|
|
627
|
+
|
|
628
|
+
label {
|
|
629
|
+
display: flex;
|
|
630
|
+
align-items: center;
|
|
631
|
+
gap: var(--spacing-3);
|
|
632
|
+
padding: var(--spacing-1) 0;
|
|
633
|
+
cursor: pointer;
|
|
634
|
+
min-height: auto;
|
|
635
|
+
border: none;
|
|
636
|
+
background: none;
|
|
637
|
+
font-weight: var(--font-weight-normal);
|
|
638
|
+
margin-bottom: 0;
|
|
639
|
+
|
|
640
|
+
&:hover {
|
|
641
|
+
color: var(--color-primary-700);
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
input[type="radio"],
|
|
646
|
+
input[type="checkbox"] {
|
|
647
|
+
position: static;
|
|
648
|
+
opacity: 1;
|
|
649
|
+
width: var(--spacing-5);
|
|
650
|
+
height: var(--spacing-5);
|
|
651
|
+
min-height: var(--spacing-5);
|
|
652
|
+
margin: 0;
|
|
653
|
+
cursor: pointer;
|
|
654
|
+
flex-shrink: 0;
|
|
655
|
+
accent-color: var(--color-primary-600);
|
|
656
|
+
appearance: auto;
|
|
657
|
+
-webkit-appearance: auto;
|
|
658
|
+
-moz-appearance: auto;
|
|
659
|
+
|
|
660
|
+
&:focus {
|
|
661
|
+
outline: 2px solid var(--color-primary-500);
|
|
662
|
+
outline-offset: 2px;
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
}
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
/* Nested legend scaling: reduce font-size for deeper sub-forms */
|
|
672
|
+
fieldset > legend { font-size: var(--font-size-lg); }
|
|
673
|
+
fieldset fieldset > legend { font-size: var(--font-size-base); }
|
|
674
|
+
fieldset fieldset fieldset > legend { font-size: var(--font-size-sm); }
|
|
675
|
+
|
|
676
|
+
.form-container {
|
|
677
|
+
display: grid;
|
|
678
|
+
gap: var(--spacing-6);
|
|
679
|
+
width: 100%;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
.fields {
|
|
683
|
+
display: grid;
|
|
684
|
+
gap: var(--spacing-4);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
label {
|
|
688
|
+
display: block;
|
|
689
|
+
margin-bottom: var(--spacing-3);
|
|
690
|
+
font-weight: var(--font-weight-medium);
|
|
691
|
+
color: var(--color-text-primary);
|
|
692
|
+
font-size: var(--font-size-sm);
|
|
693
|
+
line-height: var(--font-line-height-normal);
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
[data-label] {
|
|
697
|
+
display: block;
|
|
698
|
+
font-weight: var(--font-weight-medium);
|
|
699
|
+
color: var(--color-text-primary);
|
|
700
|
+
font-size: var(--font-size-sm);
|
|
701
|
+
margin-bottom: var(--spacing-2);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
[data-open]{
|
|
705
|
+
[data-label]{
|
|
706
|
+
margin-bottom: 0;
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.field-description {
|
|
711
|
+
font-size: var(--font-size-xs);
|
|
712
|
+
color: var(--color-text-secondary);
|
|
713
|
+
margin-top: var(--spacing-1);
|
|
714
|
+
line-height: var(--font-line-height-relaxed);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
input, textarea, select {
|
|
718
|
+
width: 100%;
|
|
719
|
+
min-height: ${E}px;
|
|
720
|
+
padding: calc(var(--spacing-1) * ${d}) var(--spacing-4);
|
|
721
|
+
border: ${g}px solid var(--color-border);
|
|
722
|
+
border-radius: var(--radius-md);
|
|
723
|
+
font-family: var(--font-family-body);
|
|
724
|
+
font-size: var(--font-size-base);
|
|
725
|
+
line-height: var(--font-line-height-normal);
|
|
726
|
+
background-color: var(--color-input-bg);
|
|
727
|
+
color: var(--color-text-primary);
|
|
728
|
+
transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background-color var(--transition-fast);
|
|
729
|
+
touch-action: manipulation;
|
|
730
|
+
appearance: none;
|
|
731
|
+
-webkit-appearance: none;
|
|
732
|
+
|
|
733
|
+
&:focus {
|
|
734
|
+
outline: none;
|
|
735
|
+
border-color: var(--color-primary-500);
|
|
736
|
+
box-shadow: 0 0 0 ${h}px color-mix(in oklab, var(--color-primary-500) ${Math.round((a||.3)*100)}%, transparent);
|
|
737
|
+
background-color: var(--color-surface-base);
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
&:disabled {
|
|
741
|
+
background-color: var(--color-input-disabled-bg);
|
|
742
|
+
color: var(--color-input-disabled-text);
|
|
743
|
+
border-color: var(--color-border);
|
|
744
|
+
cursor: not-allowed;
|
|
745
|
+
opacity: 0.6;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
&:invalid {
|
|
749
|
+
border-color: var(--color-danger-500);
|
|
750
|
+
|
|
751
|
+
&:focus {
|
|
752
|
+
box-shadow: 0 0 0 ${h}px color-mix(in oklab, var(--color-danger-500) ${Math.round((a||.3)*100)}%, transparent);
|
|
753
|
+
}
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
input[type="range"] {
|
|
758
|
+
padding: 0;
|
|
759
|
+
background: transparent;
|
|
760
|
+
min-height: auto;
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
/* Make range visually match other inputs */
|
|
764
|
+
input[type="range"] {
|
|
765
|
+
-webkit-appearance: none;
|
|
766
|
+
appearance: none;
|
|
767
|
+
height: var(--input-min-height, 40px); /* align control height with inputs */
|
|
768
|
+
width: 100%;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
/* Track and thumb styling - using CSS nesting to reduce repetition */
|
|
772
|
+
input[type="range"] {
|
|
773
|
+
/* WebKit track */
|
|
774
|
+
&::-webkit-slider-runnable-track {
|
|
775
|
+
height: var(--range-track-height, 8px);
|
|
776
|
+
background: var(--color-input-bg);
|
|
777
|
+
border-radius: var(--radius-full);
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
/* WebKit thumb */
|
|
781
|
+
&::-webkit-slider-thumb {
|
|
782
|
+
-webkit-appearance: none;
|
|
783
|
+
appearance: none;
|
|
784
|
+
width: var(--range-thumb-size, 28px);
|
|
785
|
+
height: var(--range-thumb-size, 28px);
|
|
786
|
+
margin-top: calc((var(--range-track-height, 8px) - var(--range-thumb-size, 28px)) / 2);
|
|
787
|
+
background: color-mix(in srgb, var(--color-primary-500) 15%, var(--color-surface-base));
|
|
788
|
+
border-radius: 50%;
|
|
789
|
+
box-shadow: var(--shadow-sm);
|
|
790
|
+
cursor: grab;
|
|
791
|
+
border: 1px solid color-mix(in srgb, var(--color-primary-500) 30%, var(--color-border));
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
/* Mozilla track */
|
|
795
|
+
&::-moz-range-track {
|
|
796
|
+
height: var(--range-track-height, 8px);
|
|
797
|
+
background: var(--color-input-bg);
|
|
798
|
+
border-radius: var(--radius-full);
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/* Mozilla thumb */
|
|
802
|
+
&::-moz-range-thumb {
|
|
803
|
+
width: var(--range-thumb-size, 28px);
|
|
804
|
+
height: var(--range-thumb-size, 28px);
|
|
805
|
+
background: color-mix(in srgb, var(--color-primary-500) 15%, var(--color-surface-base));
|
|
806
|
+
border-radius: 50%;
|
|
807
|
+
box-shadow: var(--shadow-sm);
|
|
808
|
+
border: 1px solid color-mix(in srgb, var(--color-primary-500) 30%, var(--color-border));
|
|
809
|
+
transform: translateY(calc((var(--range-track-height, 8px) - var(--range-thumb-size, 28px)) / 2));
|
|
810
|
+
}
|
|
811
|
+
|
|
812
|
+
/* Hover and focus states for WebKit */
|
|
813
|
+
&:hover::-webkit-slider-thumb,
|
|
814
|
+
&:focus-visible::-webkit-slider-thumb {
|
|
815
|
+
cursor: grabbing;
|
|
816
|
+
background: var(--color-primary-500);
|
|
817
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
|
818
|
+
border-color: var(--color-primary-600);
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/* Active state for WebKit */
|
|
822
|
+
&:active::-webkit-slider-thumb {
|
|
823
|
+
background: var(--color-primary-600);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/* Hover and focus states for Mozilla */
|
|
827
|
+
&:hover::-moz-range-thumb,
|
|
828
|
+
&:focus-visible::-moz-range-thumb {
|
|
829
|
+
background: var(--color-primary-500);
|
|
830
|
+
box-shadow: 0 4px 12px rgba(0,0,0,0.2);
|
|
831
|
+
border-color: var(--color-primary-600);
|
|
832
|
+
cursor: grabbing;
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/* Active state for Mozilla */
|
|
836
|
+
&:active::-moz-range-thumb {
|
|
837
|
+
background: var(--color-primary-600);
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
/* Focus style for container to match input focus */
|
|
842
|
+
.range-container:focus-within {
|
|
843
|
+
border-color: var(--color-primary-500);
|
|
844
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-500) 30%, transparent);
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
input[type="range"]:active::-moz-range-thumb {
|
|
848
|
+
background: var(--color-primary-600);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
input[type="color"] {
|
|
852
|
+
-webkit-appearance: none;
|
|
853
|
+
padding: 0;
|
|
854
|
+
width: 3rem;
|
|
855
|
+
height: 3rem;
|
|
856
|
+
border-radius: 0.75rem; /* your radius */
|
|
857
|
+
overflow: hidden; /* important */
|
|
858
|
+
cursor: pointer;
|
|
859
|
+
|
|
860
|
+
/* The wrapper */
|
|
861
|
+
&::-webkit-color-swatch-wrapper {
|
|
862
|
+
padding: 0;
|
|
863
|
+
border-radius: inherit;
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
/* The swatch (the actual color box) */
|
|
867
|
+
&::-webkit-color-swatch {
|
|
868
|
+
border: none;
|
|
869
|
+
border-radius: inherit;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
/* Button-style checkbox inputs outside of fieldsets */
|
|
874
|
+
.checkbox-container input[type="checkbox"] {
|
|
875
|
+
appearance: none;
|
|
876
|
+
-webkit-appearance: none;
|
|
877
|
+
-moz-appearance: none;
|
|
878
|
+
position: absolute;
|
|
879
|
+
opacity: 0;
|
|
880
|
+
width: 0;
|
|
881
|
+
height: 0;
|
|
882
|
+
margin: 0;
|
|
883
|
+
padding: 0;
|
|
884
|
+
pointer-events: none;
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
label:has(input[type="checkbox"]):not(fieldset label):not(label[data-toggle]),
|
|
888
|
+
input[type="checkbox"] + label:not(fieldset label):not(label[data-toggle]) {
|
|
889
|
+
display: inline-flex;
|
|
890
|
+
align-items: center;
|
|
891
|
+
justify-content: center;
|
|
892
|
+
min-height: calc(${b}px * 0.75);
|
|
893
|
+
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
894
|
+
border: ${g}px solid var(--color-border);
|
|
895
|
+
border-radius: var(--radius-md);
|
|
896
|
+
font-family: var(--font-family-body);
|
|
897
|
+
font-size: var(--font-size-sm);
|
|
898
|
+
font-weight: var(--font-weight-medium);
|
|
899
|
+
line-height: 1.2;
|
|
900
|
+
cursor: pointer;
|
|
901
|
+
transition: all var(--transition-fast);
|
|
902
|
+
text-decoration: none;
|
|
903
|
+
touch-action: manipulation;
|
|
904
|
+
user-select: none;
|
|
905
|
+
background-color: transparent;
|
|
906
|
+
color: var(--color-text-primary);
|
|
907
|
+
margin: 0;
|
|
908
|
+
flex: 0 1 auto;
|
|
909
|
+
white-space: nowrap;
|
|
910
|
+
|
|
911
|
+
&:hover {
|
|
912
|
+
background-color: var(--color-surface-subtle);
|
|
913
|
+
border-color: var(--color-primary-500);
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
label:has(input[type="checkbox"]:checked):not(fieldset label):not(label[data-toggle]),
|
|
918
|
+
input[type="checkbox"]:checked + label:not(fieldset label):not(label[data-toggle]) {
|
|
919
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 8%, transparent);
|
|
920
|
+
color: var(--color-primary-700);
|
|
921
|
+
border-color: var(--color-primary-500);
|
|
922
|
+
border-width: 2px;
|
|
923
|
+
font-weight: var(--font-weight-semibold);
|
|
924
|
+
|
|
925
|
+
&:hover {
|
|
926
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 15%, transparent);
|
|
927
|
+
border-color: var(--color-primary-600);
|
|
928
|
+
}
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
label:has(input[type="checkbox"]:focus):not(fieldset label):not(label[data-toggle]),
|
|
932
|
+
input[type="checkbox"]:focus + label:not(fieldset label):not(label[data-toggle]) {
|
|
933
|
+
outline: none;
|
|
934
|
+
box-shadow: 0 0 0 ${h}px color-mix(in oklab, var(--color-primary-500) ${Math.round((a||.3)*100)}%, transparent);
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
label:has(input[type="checkbox"]:disabled):not(fieldset label):not(label[data-toggle]),
|
|
938
|
+
input[type="checkbox"]:disabled + label:not(fieldset label):not(label[data-toggle]) {
|
|
939
|
+
background-color: var(--color-input-disabled-bg);
|
|
940
|
+
color: var(--color-input-disabled-text);
|
|
941
|
+
border-color: var(--color-border);
|
|
942
|
+
cursor: not-allowed;
|
|
943
|
+
opacity: 0.6;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
label:has(input[type="checkbox"]:checked:disabled):not(fieldset label):not(label[data-toggle]),
|
|
947
|
+
input[type="checkbox"]:checked:disabled + label:not(fieldset label):not(label[data-toggle]) {
|
|
948
|
+
background-color: var(--color-input-disabled-bg);
|
|
949
|
+
color: var(--color-input-disabled-text);
|
|
950
|
+
border-color: var(--color-border);
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/* Keep default checkbox/radio for inputs NOT in special containers */
|
|
954
|
+
input[type="checkbox"]:not(fieldset input[type="checkbox"]):not(.checkbox-container input[type="checkbox"]),
|
|
955
|
+
input[type="radio"]:not(fieldset input[type="radio"]) {
|
|
956
|
+
width: var(--spacing-5);
|
|
957
|
+
height: var(--spacing-5);
|
|
958
|
+
min-height: var(--spacing-5);
|
|
959
|
+
margin-right: var(--spacing-2);
|
|
960
|
+
cursor: pointer;
|
|
961
|
+
position: static;
|
|
962
|
+
opacity: 1;
|
|
963
|
+
appearance: auto;
|
|
964
|
+
-webkit-appearance: auto;
|
|
965
|
+
|
|
966
|
+
&:disabled {
|
|
967
|
+
cursor: not-allowed;
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
/* Button-style radio and checkbox groups with .buttons class */
|
|
972
|
+
fieldset[role="radiogroup"].buttons,
|
|
973
|
+
fieldset[role="group"].buttons {
|
|
974
|
+
flex-direction: row;
|
|
975
|
+
flex-wrap: wrap;
|
|
976
|
+
gap: var(--spacing-3);
|
|
977
|
+
|
|
978
|
+
input[type="radio"],
|
|
979
|
+
input[type="checkbox"] {
|
|
980
|
+
appearance: none;
|
|
981
|
+
-webkit-appearance: none;
|
|
982
|
+
-moz-appearance: none;
|
|
983
|
+
position: absolute;
|
|
984
|
+
opacity: 0;
|
|
985
|
+
width: 0;
|
|
986
|
+
height: 0;
|
|
987
|
+
margin: 0;
|
|
988
|
+
padding: 0;
|
|
989
|
+
pointer-events: none;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
label {
|
|
993
|
+
display: inline-flex;
|
|
994
|
+
align-items: center;
|
|
995
|
+
justify-content: center;
|
|
996
|
+
min-height: calc(${b}px * 0.75);
|
|
997
|
+
padding: calc(var(--spacing-1) * ${p*.6}) calc(var(--spacing-4) * 0.85);
|
|
998
|
+
border: ${g}px solid var(--color-border);
|
|
999
|
+
border-radius: var(--radius-md);
|
|
1000
|
+
font-family: var(--font-family-body);
|
|
1001
|
+
font-size: var(--font-size-sm);
|
|
1002
|
+
font-weight: var(--font-weight-medium);
|
|
1003
|
+
line-height: 1.2;
|
|
1004
|
+
cursor: pointer;
|
|
1005
|
+
transition: all var(--transition-fast);
|
|
1006
|
+
text-decoration: none;
|
|
1007
|
+
touch-action: manipulation;
|
|
1008
|
+
user-select: none;
|
|
1009
|
+
background-color: transparent;
|
|
1010
|
+
color: var(--color-text-primary);
|
|
1011
|
+
margin: 0;
|
|
1012
|
+
flex: 0 1 auto;
|
|
1013
|
+
white-space: nowrap;
|
|
1014
|
+
|
|
1015
|
+
&:hover {
|
|
1016
|
+
background-color: var(--color-surface-subtle);
|
|
1017
|
+
border-color: var(--color-primary-500);
|
|
1018
|
+
color: var(--color-text-primary);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
&:has([disabled]){
|
|
1022
|
+
pointer-events: none;
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
label:has(input[type="radio"]:checked),
|
|
1027
|
+
label:has(input[type="checkbox"]:checked) {
|
|
1028
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 8%, transparent);
|
|
1029
|
+
border-color: var(--color-primary-500);
|
|
1030
|
+
border-width: 2px;
|
|
1031
|
+
font-weight: var(--font-weight-semibold);
|
|
1032
|
+
|
|
1033
|
+
&:hover {
|
|
1034
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 15%, transparent);
|
|
1035
|
+
border-color: var(--color-primary-600);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
label:has(input[type="radio"]:focus),
|
|
1040
|
+
label:has(input[type="checkbox"]:focus) {
|
|
1041
|
+
outline: none;
|
|
1042
|
+
box-shadow: 0 0 0 ${h}px color-mix(in oklab, var(--color-primary-500) ${Math.round((a||.3)*100)}%, transparent);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
label:has(input[type="radio"]:disabled),
|
|
1046
|
+
label:has(input[type="checkbox"]:disabled) {
|
|
1047
|
+
background-color: var(--color-input-disabled-bg);
|
|
1048
|
+
color: var(--color-input-disabled-text);
|
|
1049
|
+
border-color: var(--color-border);
|
|
1050
|
+
cursor: not-allowed;
|
|
1051
|
+
opacity: 0.6;
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
label:has(input[type="radio"]:checked:disabled),
|
|
1055
|
+
label:has(input[type="checkbox"]:checked:disabled) {
|
|
1056
|
+
background-color: var(--color-input-disabled-bg);
|
|
1057
|
+
color: var(--color-input-disabled-text);
|
|
1058
|
+
border-color: var(--color-border);
|
|
1059
|
+
}
|
|
1060
|
+
}
|
|
1061
|
+
|
|
1062
|
+
/* Toggle switches - enhanced checkboxes with data-toggle attribute */
|
|
1063
|
+
label[data-toggle] {
|
|
1064
|
+
display: inline-flex;
|
|
1065
|
+
align-items: normal;
|
|
1066
|
+
gap: var(--spacing-3);
|
|
1067
|
+
cursor: pointer;
|
|
1068
|
+
user-select: none;
|
|
1069
|
+
padding: 0;
|
|
1070
|
+
background: transparent;
|
|
1071
|
+
border: none;
|
|
1072
|
+
min-height: auto;
|
|
1073
|
+
font-weight: var(--font-weight-normal);
|
|
1074
|
+
|
|
1075
|
+
/* Hide the original checkbox in toggle switches */
|
|
1076
|
+
input[type="checkbox"] {
|
|
1077
|
+
display: none;
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
/* Toggle switch container */
|
|
1081
|
+
.toggle-switch {
|
|
1082
|
+
position: relative;
|
|
1083
|
+
display: inline-block;
|
|
1084
|
+
width: 44px;
|
|
1085
|
+
height: 24px;
|
|
1086
|
+
background-color: var(--color-gray-300);
|
|
1087
|
+
border-radius: var(--radius-full);
|
|
1088
|
+
transition: background-color 200ms ease;
|
|
1089
|
+
cursor: pointer;
|
|
1090
|
+
flex-shrink: 0;
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1093
|
+
/* Toggle switch knob */
|
|
1094
|
+
.toggle-knob {
|
|
1095
|
+
position: absolute;
|
|
1096
|
+
top: 2px;
|
|
1097
|
+
left: 2px;
|
|
1098
|
+
width: 20px;
|
|
1099
|
+
height: 20px;
|
|
1100
|
+
background-color: #ffffff;
|
|
1101
|
+
border-radius: 50%;
|
|
1102
|
+
transition: left 200ms ease;
|
|
1103
|
+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/* Toggle switch when checked - using :has() selector */
|
|
1107
|
+
&:has(input[type="checkbox"]:checked) .toggle-switch {
|
|
1108
|
+
background-color: var(--color-primary-fill);
|
|
1109
|
+
}
|
|
1110
|
+
|
|
1111
|
+
|
|
1112
|
+
/* Toggle knob when checked - always moves to the right */
|
|
1113
|
+
&:has(input[type="checkbox"]:checked) .toggle-knob {
|
|
1114
|
+
left: 22px;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/* Focus state for toggle switch */
|
|
1118
|
+
&:has(input[type="checkbox"]:focus) .toggle-switch {
|
|
1119
|
+
outline: 2px solid var(--color-primary-500);
|
|
1120
|
+
outline-offset: 2px;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
/* Focus visible state when label is focused via keyboard */
|
|
1124
|
+
&:focus-visible .toggle-switch {
|
|
1125
|
+
outline: 2px solid var(--color-primary-500);
|
|
1126
|
+
outline-offset: 2px;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
/* Remove default outline on label itself */
|
|
1130
|
+
&:focus {
|
|
1131
|
+
outline: none;
|
|
1132
|
+
}
|
|
1133
|
+
|
|
1134
|
+
/* Disabled state */
|
|
1135
|
+
&:has(input[type="checkbox"]:disabled) {
|
|
1136
|
+
cursor: not-allowed;
|
|
1137
|
+
opacity: 0.6;
|
|
1138
|
+
|
|
1139
|
+
.toggle-switch {
|
|
1140
|
+
opacity: 0.5;
|
|
1141
|
+
cursor: not-allowed;
|
|
1142
|
+
}
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
input[type="file"] {
|
|
1147
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
1148
|
+
cursor: pointer;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
/* Textareas */
|
|
1152
|
+
textarea {
|
|
1153
|
+
min-height: calc(var(--spacing-4) * 5);
|
|
1154
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1155
|
+
resize: vertical;
|
|
1156
|
+
line-height: var(--font-line-height-relaxed);
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
/* Select dropdowns */
|
|
1160
|
+
select {
|
|
1161
|
+
cursor: pointer;
|
|
1162
|
+
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");
|
|
1163
|
+
background-position: right var(--spacing-2) center;
|
|
1164
|
+
background-repeat: no-repeat;
|
|
1165
|
+
background-size: 1.5em 1.5em;
|
|
1166
|
+
padding-right: var(--spacing-8);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
/* Button styling */
|
|
1170
|
+
button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
1171
|
+
display: inline-flex;
|
|
1172
|
+
gap: var(--spacing-1);
|
|
1173
|
+
align-items: center;
|
|
1174
|
+
justify-content: center;
|
|
1175
|
+
min-height: ${b}px;
|
|
1176
|
+
padding: calc(var(--spacing-1) * ${p}) var(--spacing-6);
|
|
1177
|
+
border: ${g}px solid transparent;
|
|
1178
|
+
border-radius: var(--radius-md);
|
|
1179
|
+
font-family: var(--font-family-body);
|
|
1180
|
+
font-size: var(--font-size-base);
|
|
1181
|
+
font-weight: var(--font-weight-medium);
|
|
1182
|
+
line-height: 1;
|
|
1183
|
+
cursor: pointer;
|
|
1184
|
+
transition: all var(--transition-fast);
|
|
1185
|
+
text-decoration: none;
|
|
1186
|
+
touch-action: manipulation;
|
|
1187
|
+
user-select: none;
|
|
1188
|
+
background-color: var(--color-surface-base);
|
|
1189
|
+
color: var(--color-text-primary);
|
|
1190
|
+
border-color: var(--color-border);
|
|
1191
|
+
|
|
1192
|
+
/* Only apply generic hover to non-variant buttons */
|
|
1193
|
+
&:hover:not(.btn-primary):not(.btn-secondary):not(.btn-outline) {
|
|
1194
|
+
background-color: var(--color-surface-elevated);
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
&:focus {
|
|
1198
|
+
outline: none;
|
|
1199
|
+
box-shadow: 0 0 0 ${h}px color-mix(in oklab, var(--color-primary-500) ${Math.round((a||.3)*100)}%, transparent);
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
&:disabled {
|
|
1203
|
+
background-color: var(--color-input-disabled-bg);
|
|
1204
|
+
color: var(--color-input-disabled-text);
|
|
1205
|
+
border-color: var(--color-input-disabled-bg);
|
|
1206
|
+
cursor: not-allowed;
|
|
1207
|
+
opacity: 0.6;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
.btn-primary {
|
|
1212
|
+
background-color: var(--color-primary-fill);
|
|
1213
|
+
color: white;
|
|
1214
|
+
border-color: var(--color-primary-fill);
|
|
1215
|
+
|
|
1216
|
+
&:hover {
|
|
1217
|
+
background-color: color-mix(in oklab, var(--color-primary-fill) 90%, black 10%);
|
|
1218
|
+
border-color: color-mix(in oklab, var(--color-primary-fill) 90%, black 10%);
|
|
1219
|
+
color: white;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
&:active {
|
|
1223
|
+
background-color: color-mix(in oklab, var(--color-primary-fill) 80%, black 20%);
|
|
1224
|
+
border-color: color-mix(in oklab, var(--color-primary-fill) 80%, black 20%);
|
|
1225
|
+
color: white;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
&:focus {
|
|
1229
|
+
box-shadow: 0 0 0 ${h}px color-mix(in oklab, var(--color-primary-500) ${Math.round((a||.3)*100)}%, transparent);
|
|
1230
|
+
}
|
|
1231
|
+
|
|
1232
|
+
&:disabled {
|
|
1233
|
+
background-color: var(--color-input-disabled-bg);
|
|
1234
|
+
color: var(--color-input-disabled-text);
|
|
1235
|
+
border-color: var(--color-input-disabled-bg);
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
.btn-secondary {
|
|
1240
|
+
background-color: var(--color-surface-base);
|
|
1241
|
+
color: var(--color-text-primary);
|
|
1242
|
+
border-color: var(--color-border);
|
|
1243
|
+
|
|
1244
|
+
&:hover {
|
|
1245
|
+
background-color: var(--color-surface-elevated);
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
.btn-outline {
|
|
1250
|
+
background-color: transparent;
|
|
1251
|
+
color: var(--color-primary-500);
|
|
1252
|
+
border-color: var(--color-primary-500);
|
|
1253
|
+
|
|
1254
|
+
&:hover {
|
|
1255
|
+
background-color: var(--color-primary-500);
|
|
1256
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1257
|
+
border-color: var(--color-primary-500);
|
|
1258
|
+
|
|
1259
|
+
pds-icon {
|
|
1260
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
&:active {
|
|
1265
|
+
background-color: color-mix(in oklab, var(--color-primary-500) 80%, black 20%);
|
|
1266
|
+
border-color: color-mix(in oklab, var(--color-primary-500) 80%, black 20%);
|
|
1267
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1268
|
+
|
|
1269
|
+
pds-icon {
|
|
1270
|
+
color: var(--color-primary-contrast, #ffffff);
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
|
|
1274
|
+
&:disabled {
|
|
1275
|
+
background-color: transparent;
|
|
1276
|
+
color: var(--color-input-disabled-text);
|
|
1277
|
+
border-color: var(--color-input-disabled-bg);
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
.btn-sm {
|
|
1282
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
1283
|
+
font-size: var(--font-size-sm);
|
|
1284
|
+
min-height: calc(${b}px * 0.8);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
.btn-xs {
|
|
1288
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
1289
|
+
font-size: var(--font-size-xs);
|
|
1290
|
+
min-height: calc(${b}px * 0.6);
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1293
|
+
|
|
1294
|
+
.btn-lg {
|
|
1295
|
+
padding: var(--spacing-4) var(--spacing-8);
|
|
1296
|
+
font-size: var(--font-size-lg);
|
|
1297
|
+
min-height: calc(${b}px * 1.2);
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/* Working/loading state for buttons */
|
|
1301
|
+
button.btn-working,
|
|
1302
|
+
a.btn-working {
|
|
1303
|
+
cursor: wait;
|
|
1304
|
+
pointer-events: none;
|
|
1305
|
+
opacity: 0.6;
|
|
1306
|
+
|
|
1307
|
+
pds-icon:first-child {
|
|
1308
|
+
animation: pds-spin 0.8s linear infinite;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
@keyframes pds-spin {
|
|
1313
|
+
to { transform: rotate(360deg); }
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
/* Skeleton loading animation */
|
|
1317
|
+
.skeleton {
|
|
1318
|
+
background: linear-gradient(
|
|
1319
|
+
90deg,
|
|
1320
|
+
color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%) 0%,
|
|
1321
|
+
color-mix(in oklab, var(--color-surface-base) 85%, var(--color-text-primary) 15%) 50%,
|
|
1322
|
+
color-mix(in oklab, var(--color-surface-base) 92%, var(--color-text-primary) 8%) 100%
|
|
1323
|
+
);
|
|
1324
|
+
background-size: 200% 100%;
|
|
1325
|
+
animation: pds-skeleton 1.5s ease-in-out infinite;
|
|
1326
|
+
border-radius: var(--radius-sm);
|
|
1327
|
+
|
|
1328
|
+
&::before {
|
|
1329
|
+
content: '\\00a0';
|
|
1330
|
+
}
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
@keyframes pds-skeleton {
|
|
1334
|
+
0% { background-position: 200% 0; }
|
|
1335
|
+
100% { background-position: -200% 0; }
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
/* Form utility classes */
|
|
1339
|
+
.range-container {
|
|
1340
|
+
display: flex;
|
|
1341
|
+
align-items: center;
|
|
1342
|
+
gap: var(--spacing-3);
|
|
1343
|
+
width: 100%;
|
|
1344
|
+
background: var(--color-input-bg);
|
|
1345
|
+
border: 1px solid var(--color-border);
|
|
1346
|
+
border-radius: var(--radius-md);
|
|
1347
|
+
min-height: var(--input-min-height, 40px);
|
|
1348
|
+
position: relative;
|
|
1349
|
+
|
|
1350
|
+
input[type="range"] {
|
|
1351
|
+
border: none;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
.range-bubble {
|
|
1356
|
+
position: absolute;
|
|
1357
|
+
top: calc(-1 * (var(--range-thumb-size, 28px) + var(--spacing-2)));
|
|
1358
|
+
transform: translateX(-50%);
|
|
1359
|
+
min-width: calc(var(--range-thumb-size, 28px) * 0.8);
|
|
1360
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
1361
|
+
border-radius: var(--radius-md);
|
|
1362
|
+
background: var(--color-surface-base);
|
|
1363
|
+
color: var(--color-text-primary);
|
|
1364
|
+
text-align: center;
|
|
1365
|
+
font-size: var(--font-size-sm);
|
|
1366
|
+
box-shadow: var(--shadow-md);
|
|
1367
|
+
opacity: 0;
|
|
1368
|
+
pointer-events: none;
|
|
1369
|
+
transition: opacity 150ms ease, transform 150ms ease;
|
|
1370
|
+
|
|
1371
|
+
&.visible {
|
|
1372
|
+
opacity: 1;
|
|
1373
|
+
}
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
/* Anchor bubble to the thumb position using left (set by enhancer)
|
|
1377
|
+
and center with translateX(-50%). */
|
|
1378
|
+
|
|
1379
|
+
/* Array field styling */
|
|
1380
|
+
.array-list {
|
|
1381
|
+
display: flex;
|
|
1382
|
+
flex-direction: column;
|
|
1383
|
+
gap: var(--spacing-4);
|
|
1384
|
+
margin-bottom: var(--spacing-4);
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
.array-item {
|
|
1388
|
+
position: relative;
|
|
1389
|
+
padding: var(--spacing-4);
|
|
1390
|
+
border: ${g}px solid var(--color-border);
|
|
1391
|
+
border-radius: var(--radius-md);
|
|
1392
|
+
background-color: var(--color-surface-base);
|
|
1393
|
+
|
|
1394
|
+
fieldset {
|
|
1395
|
+
background-color: transparent;
|
|
1396
|
+
margin-bottom: var(--spacing-3);
|
|
1397
|
+
|
|
1398
|
+
&:last-of-type {
|
|
1399
|
+
margin-bottom: 0;
|
|
1400
|
+
}
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
.array-controls {
|
|
1404
|
+
padding-top: var(--spacing-3);
|
|
1405
|
+
border-top: ${g}px solid var(--color-border);
|
|
1406
|
+
margin-top: var(--spacing-4);
|
|
1407
|
+
}
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
.array-controls {
|
|
1411
|
+
display: flex;
|
|
1412
|
+
gap: var(--spacing-2);
|
|
1413
|
+
margin-top: var(--spacing-3);
|
|
1414
|
+
flex-wrap: wrap;
|
|
1415
|
+
|
|
1416
|
+
button {
|
|
1417
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
1418
|
+
font-size: var(--font-size-sm);
|
|
1419
|
+
min-height: auto;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
.range-value {
|
|
1424
|
+
min-width: var(--spacing-16);
|
|
1425
|
+
text-align: right;
|
|
1426
|
+
font-weight: var(--font-weight-medium);
|
|
1427
|
+
font-size: var(--font-size-sm);
|
|
1428
|
+
color: var(--color-text-primary);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
.checkbox-container {
|
|
1432
|
+
display: flex;
|
|
1433
|
+
flex-direction: row;
|
|
1434
|
+
align-items: center;
|
|
1435
|
+
gap: var(--spacing-2);
|
|
1436
|
+
flex-wrap: wrap;
|
|
1437
|
+
|
|
1438
|
+
input[type="checkbox"],
|
|
1439
|
+
input[type="radio"] {
|
|
1440
|
+
position: absolute;
|
|
1441
|
+
opacity: 0;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1445
|
+
`}#oe(){let{layout:e={}}=this.options.design,t=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`/* Table Styles - Mobile First */
|
|
1446
|
+
|
|
1447
|
+
table {
|
|
1448
|
+
width: 100%;
|
|
1449
|
+
border-collapse: collapse;
|
|
1450
|
+
margin: 0 0 var(--spacing-6) 0;
|
|
1451
|
+
background-color: var(--color-surface-base);
|
|
1452
|
+
border-radius: var(--radius-md);
|
|
1453
|
+
overflow: hidden;
|
|
1454
|
+
font-size: var(--font-size-sm);
|
|
1455
|
+
|
|
1456
|
+
@media (min-width: ${t.sm}px) {
|
|
1457
|
+
font-size: var(--font-size-base);
|
|
1458
|
+
}
|
|
1459
|
+
}
|
|
1460
|
+
|
|
1461
|
+
.table-responsive {
|
|
1462
|
+
@media (max-width: ${t.sm-1}px) {
|
|
1463
|
+
overflow-x: auto;
|
|
1464
|
+
-webkit-overflow-scrolling: touch;
|
|
1465
|
+
margin: 0 0 var(--spacing-6) 0;
|
|
1466
|
+
|
|
1467
|
+
table {
|
|
1468
|
+
min-width: 600px;
|
|
1469
|
+
margin: 0;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1474
|
+
thead {
|
|
1475
|
+
background-color: var(--color-surface-subtle);
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
th {
|
|
1479
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1480
|
+
text-align: left;
|
|
1481
|
+
font-weight: var(--font-weight-semibold);
|
|
1482
|
+
color: var(--color-text-primary);
|
|
1483
|
+
border-bottom: 2px solid var(--color-border);
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
td {
|
|
1487
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1488
|
+
color: var(--color-text-secondary);
|
|
1489
|
+
border-bottom: 1px solid var(--color-border);
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
tbody {
|
|
1493
|
+
tr {
|
|
1494
|
+
transition: background-color var(--transition-fast);
|
|
1495
|
+
|
|
1496
|
+
&:hover {
|
|
1497
|
+
background-color: var(--color-surface-subtle);
|
|
1498
|
+
}
|
|
1499
|
+
|
|
1500
|
+
&:last-child td {
|
|
1501
|
+
border-bottom: none;
|
|
1502
|
+
}
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
.table-striped {
|
|
1507
|
+
tbody tr:nth-child(even) {
|
|
1508
|
+
background-color: var(--color-surface-subtle);
|
|
1509
|
+
}
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
.table-bordered {
|
|
1513
|
+
border: 1px solid var(--color-border);
|
|
1514
|
+
|
|
1515
|
+
th, td {
|
|
1516
|
+
border: 1px solid var(--color-border);
|
|
1517
|
+
}
|
|
1518
|
+
}
|
|
1519
|
+
|
|
1520
|
+
.table-compact {
|
|
1521
|
+
th, td {
|
|
1522
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
1523
|
+
}
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
`}#ae(){return`/* Alert/Notification Styles */
|
|
1527
|
+
|
|
1528
|
+
/* Alias: .semantic-message shares alert base styles */
|
|
1529
|
+
.alert, .semantic-message {
|
|
1530
|
+
padding: var(--spacing-4);
|
|
1531
|
+
border-radius: var(--radius-md);
|
|
1532
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
1533
|
+
border-left: 4px solid;
|
|
1534
|
+
display: flex;
|
|
1535
|
+
align-items: flex-start;
|
|
1536
|
+
gap: var(--spacing-3);
|
|
1537
|
+
font-size: var(--font-size-sm);
|
|
1538
|
+
line-height: var(--font-line-height-relaxed);
|
|
1539
|
+
|
|
1540
|
+
& > *:last-child {
|
|
1541
|
+
margin-bottom: 0;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
/* Variants: success/info/warning/danger mapped to tokens */
|
|
1545
|
+
.alert-success, .semantic-message.success {
|
|
1546
|
+
background-color: var(--color-success-50);
|
|
1547
|
+
border-color: var(--color-success-600);
|
|
1548
|
+
color: var(--color-success-900);
|
|
1549
|
+
}
|
|
1550
|
+
.alert-info, .semantic-message.info {
|
|
1551
|
+
background-color: var(--color-info-50);
|
|
1552
|
+
border-color: var(--color-info-600);
|
|
1553
|
+
color: var(--color-info-900);
|
|
1554
|
+
}
|
|
1555
|
+
.alert-warning, .semantic-message.warning {
|
|
1556
|
+
background-color: var(--color-warning-50);
|
|
1557
|
+
border-color: var(--color-warning-600);
|
|
1558
|
+
color: var(--color-warning-900);
|
|
1559
|
+
}
|
|
1560
|
+
.alert-danger,
|
|
1561
|
+
.alert-error,
|
|
1562
|
+
.semantic-message.danger {
|
|
1563
|
+
background-color: var(--color-danger-50);
|
|
1564
|
+
border-color: var(--color-danger-600);
|
|
1565
|
+
color: var(--color-danger-900);
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
/* Semantic-message content defaults */
|
|
1569
|
+
.semantic-message strong { display: block; }
|
|
1570
|
+
.semantic-message p { margin: 0; font-size: var(--font-size-sm); }
|
|
1571
|
+
|
|
1572
|
+
.alert-title {
|
|
1573
|
+
font-weight: var(--font-weight-semibold);
|
|
1574
|
+
margin: 0 0 var(--spacing-2) 0;
|
|
1575
|
+
font-size: var(--font-size-base);
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
.alert-icon {
|
|
1579
|
+
flex-shrink: 0;
|
|
1580
|
+
display: flex;
|
|
1581
|
+
align-items: center;
|
|
1582
|
+
justify-content: center;
|
|
1583
|
+
|
|
1584
|
+
pds-icon {
|
|
1585
|
+
flex-shrink: 0;
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
.alert-dismissible {
|
|
1590
|
+
padding-right: var(--spacing-12);
|
|
1591
|
+
position: relative;
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
.alert-close {
|
|
1595
|
+
position: absolute;
|
|
1596
|
+
top: var(--spacing-3);
|
|
1597
|
+
right: var(--spacing-3);
|
|
1598
|
+
background: none;
|
|
1599
|
+
border: none;
|
|
1600
|
+
font-size: var(--font-size-xl);
|
|
1601
|
+
line-height: 1;
|
|
1602
|
+
opacity: 0.6;
|
|
1603
|
+
cursor: pointer;
|
|
1604
|
+
padding: var(--spacing-1);
|
|
1605
|
+
transition: opacity var(--transition-fast);
|
|
1606
|
+
|
|
1607
|
+
&:hover {
|
|
1608
|
+
opacity: 1;
|
|
1609
|
+
}
|
|
1610
|
+
}
|
|
1611
|
+
|
|
1612
|
+
`}#ne(){return`/* Accordion (details/summary) */
|
|
1613
|
+
|
|
1614
|
+
.accordion {
|
|
1615
|
+
--_acc-radius: var(--radius-md);
|
|
1616
|
+
--_acc-border: 1px solid var(--color-border);
|
|
1617
|
+
--_acc-bg: var(--color-surface-base);
|
|
1618
|
+
|
|
1619
|
+
details {
|
|
1620
|
+
border: var(--_acc-border);
|
|
1621
|
+
border-radius: var(--_acc-radius);
|
|
1622
|
+
background: var(--_acc-bg);
|
|
1623
|
+
margin: 0 0 var(--spacing-3) 0;
|
|
1624
|
+
|
|
1625
|
+
&[open] {
|
|
1626
|
+
& > summary::after {
|
|
1627
|
+
transform: rotate(45deg);
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
&::details-content {
|
|
1631
|
+
block-size: auto;
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
|
|
1635
|
+
/* Modern approach: animate block-size with ::details-content */
|
|
1636
|
+
&::details-content {
|
|
1637
|
+
block-size: 0;
|
|
1638
|
+
overflow: hidden;
|
|
1639
|
+
transition: block-size var(--transition-normal) ease, content-visibility var(--transition-normal);
|
|
1640
|
+
transition-behavior: allow-discrete;
|
|
1641
|
+
}
|
|
1642
|
+
|
|
1643
|
+
/* Content padding (works for both approaches) */
|
|
1644
|
+
& > :not(summary) > * {
|
|
1645
|
+
padding-inline: var(--spacing-4);
|
|
1646
|
+
padding-block: var(--spacing-3);
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
summary {
|
|
1651
|
+
cursor: pointer;
|
|
1652
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
1653
|
+
list-style: none;
|
|
1654
|
+
outline: none;
|
|
1655
|
+
display: flex;
|
|
1656
|
+
align-items: center;
|
|
1657
|
+
gap: var(--spacing-2);
|
|
1658
|
+
|
|
1659
|
+
&::-webkit-details-marker {
|
|
1660
|
+
display: none;
|
|
1661
|
+
}
|
|
1662
|
+
|
|
1663
|
+
/* Chevron indicator */
|
|
1664
|
+
&::after {
|
|
1665
|
+
content: "";
|
|
1666
|
+
margin-inline-start: auto;
|
|
1667
|
+
inline-size: 0.7em;
|
|
1668
|
+
block-size: 0.7em;
|
|
1669
|
+
border-inline-end: 2px solid currentColor;
|
|
1670
|
+
border-block-end: 2px solid currentColor;
|
|
1671
|
+
transform: rotate(-45deg);
|
|
1672
|
+
transition: transform var(--transition-normal);
|
|
1673
|
+
}
|
|
1674
|
+
}
|
|
1675
|
+
}
|
|
1676
|
+
|
|
1677
|
+
/* Fallback: grid trick for browsers without ::details-content support */
|
|
1678
|
+
@supports not selector(::details-content) {
|
|
1679
|
+
.accordion details {
|
|
1680
|
+
& > :not(summary) {
|
|
1681
|
+
display: grid;
|
|
1682
|
+
grid-template-rows: 0fr;
|
|
1683
|
+
transition: grid-template-rows var(--transition-normal) ease;
|
|
1684
|
+
overflow: hidden;
|
|
1685
|
+
|
|
1686
|
+
& > * {
|
|
1687
|
+
min-block-size: 0;
|
|
1688
|
+
}
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
&[open] > :not(summary) {
|
|
1692
|
+
grid-template-rows: 1fr;
|
|
1693
|
+
}
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1696
|
+
`}#ie(){return`/* Badge/Pill Styles */
|
|
1697
|
+
|
|
1698
|
+
.badge {
|
|
1699
|
+
display: inline-flex;
|
|
1700
|
+
align-items: center;
|
|
1701
|
+
justify-content: center;
|
|
1702
|
+
padding: var(--spacing-1) var(--spacing-2);
|
|
1703
|
+
font-size: var(--font-size-xs);
|
|
1704
|
+
font-weight: var(--font-weight-semibold);
|
|
1705
|
+
line-height: 1;
|
|
1706
|
+
border-radius: var(--radius-full);
|
|
1707
|
+
white-space: nowrap;
|
|
1708
|
+
vertical-align: middle;
|
|
1709
|
+
background-color: var(--color-gray-200);
|
|
1710
|
+
color: var(--color-gray-800);
|
|
1711
|
+
border-radius: var(--radius-full);
|
|
1712
|
+
}
|
|
1713
|
+
|
|
1714
|
+
.badge-primary {
|
|
1715
|
+
background-color: var(--color-primary-600);
|
|
1716
|
+
color: white;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
.badge-secondary {
|
|
1720
|
+
background-color: var(--color-secondary-600);
|
|
1721
|
+
color: white;
|
|
1722
|
+
}
|
|
1723
|
+
|
|
1724
|
+
.badge-success {
|
|
1725
|
+
background-color: var(--color-success-600);
|
|
1726
|
+
color: white;
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
.badge-info {
|
|
1730
|
+
background-color: var(--color-info-600);
|
|
1731
|
+
color: white;
|
|
1732
|
+
}
|
|
1733
|
+
|
|
1734
|
+
.badge-warning {
|
|
1735
|
+
background-color: var(--color-warning-600);
|
|
1736
|
+
color: white;
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
.badge-danger {
|
|
1740
|
+
background-color: var(--color-danger-600);
|
|
1741
|
+
color: white;
|
|
1742
|
+
}
|
|
1743
|
+
|
|
1744
|
+
.badge-outline {
|
|
1745
|
+
background-color: transparent;
|
|
1746
|
+
border: 1px solid currentColor;
|
|
1747
|
+
|
|
1748
|
+
&.badge-primary {
|
|
1749
|
+
color: var(--color-text-primary);
|
|
1750
|
+
}
|
|
1751
|
+
|
|
1752
|
+
&.badge-secondary {
|
|
1753
|
+
color: var(--color-secondary-600);
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
&.badge-success {
|
|
1757
|
+
color: var(--color-success-600);
|
|
1758
|
+
}
|
|
1759
|
+
|
|
1760
|
+
&.badge-info {
|
|
1761
|
+
color: var(--color-info-600);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
&.badge-warning {
|
|
1765
|
+
color: var(--color-warning-600);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
&.badge-danger {
|
|
1769
|
+
color: var(--color-danger-600);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
.badge-sm {
|
|
1774
|
+
padding: 2px var(--spacing-1);
|
|
1775
|
+
font-size: 10px;
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
.badge-lg {
|
|
1779
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
1780
|
+
font-size: var(--font-size-sm);
|
|
1781
|
+
}
|
|
1782
|
+
|
|
1783
|
+
.pill {
|
|
1784
|
+
padding: var(--spacing-1) var(--spacing-3);
|
|
1785
|
+
border-radius: var(--radius-full);
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
`}#se(){let{layout:e={},behavior:t={}}=this.options.design;return`/* ============================================================================
|
|
1789
|
+
Dialog Primitive
|
|
1790
|
+
Native <dialog> element with PDS integration
|
|
1791
|
+
============================================================================ */
|
|
1792
|
+
|
|
1793
|
+
/* Dialog base styles */
|
|
1794
|
+
dialog {
|
|
1795
|
+
position: fixed;
|
|
1796
|
+
inset: 0;
|
|
1797
|
+
max-width: min(600px, calc(100vw - var(--spacing-8)));
|
|
1798
|
+
max-height: calc(100vh - var(--spacing-8));
|
|
1799
|
+
margin: auto;
|
|
1800
|
+
padding: 0;
|
|
1801
|
+
border: none;
|
|
1802
|
+
border-radius: var(--radius-lg);
|
|
1803
|
+
|
|
1804
|
+
/* Surface styling - elevated overlay */
|
|
1805
|
+
background-color: var(--surface-overlay-bg);
|
|
1806
|
+
color: var(--surface-overlay-text);
|
|
1807
|
+
box-shadow: 0 8px 32px var(--surface-overlay-shadow);
|
|
1808
|
+
|
|
1809
|
+
/* Smooth transitions */
|
|
1810
|
+
opacity: 0;
|
|
1811
|
+
scale: 0.95;
|
|
1812
|
+
transition:
|
|
1813
|
+
opacity 0.2s ease,
|
|
1814
|
+
scale 0.2s ease,
|
|
1815
|
+
overlay 0.2s ease allow-discrete,
|
|
1816
|
+
display 0.2s ease allow-discrete;
|
|
1817
|
+
|
|
1818
|
+
/* Overflow handling */
|
|
1819
|
+
overflow: hidden;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
/* Open state */
|
|
1823
|
+
dialog[open] {
|
|
1824
|
+
opacity: 1;
|
|
1825
|
+
scale: 1;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
/* Starting style for smooth open animation */
|
|
1829
|
+
@starting-style {
|
|
1830
|
+
dialog[open] {
|
|
1831
|
+
opacity: 0;
|
|
1832
|
+
scale: 0.95;
|
|
1833
|
+
}
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
/* Backdrop styling */
|
|
1837
|
+
dialog::backdrop {
|
|
1838
|
+
background: var(--backdrop-bg);
|
|
1839
|
+
backdrop-filter: var(--backdrop-filter);
|
|
1840
|
+
opacity: 0;
|
|
1841
|
+
transition:
|
|
1842
|
+
opacity 0.2s ease,
|
|
1843
|
+
overlay 0.2s ease allow-discrete,
|
|
1844
|
+
display 0.2s ease allow-discrete;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
dialog[open]::backdrop {
|
|
1848
|
+
opacity: var(--backdrop-opacity, 1);
|
|
1849
|
+
}
|
|
1850
|
+
|
|
1851
|
+
@starting-style {
|
|
1852
|
+
dialog[open]::backdrop {
|
|
1853
|
+
opacity: 0;
|
|
1854
|
+
}
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
/* Form structure - use flexbox instead of contents */
|
|
1858
|
+
dialog form {
|
|
1859
|
+
display: flex;
|
|
1860
|
+
flex-direction: column;
|
|
1861
|
+
height: 100%;
|
|
1862
|
+
margin: 0;
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
/* Dialog fields - to open pds-jsonform subforms */
|
|
1866
|
+
.dialog-field {
|
|
1867
|
+
margin-top: var(--spacing-3);
|
|
1868
|
+
}
|
|
1869
|
+
|
|
1870
|
+
/* Dialog header */
|
|
1871
|
+
dialog {
|
|
1872
|
+
header,
|
|
1873
|
+
form > header {
|
|
1874
|
+
display: flex;
|
|
1875
|
+
align-items: center;
|
|
1876
|
+
justify-content: space-between;
|
|
1877
|
+
gap: var(--spacing-4);
|
|
1878
|
+
padding: var(--spacing-6);
|
|
1879
|
+
border-bottom: 1px solid var(--surface-overlay-border);
|
|
1880
|
+
flex-shrink: 0;
|
|
1881
|
+
|
|
1882
|
+
h2,
|
|
1883
|
+
h3 {
|
|
1884
|
+
margin: 0;
|
|
1885
|
+
font-size: var(--font-size-lg);
|
|
1886
|
+
font-weight: var(--font-weight-semibold);
|
|
1887
|
+
color: var(--surface-overlay-text);
|
|
1888
|
+
flex: 1;
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
/* Close button in header */
|
|
1892
|
+
button[value="cancel"],
|
|
1893
|
+
.dialog-close {
|
|
1894
|
+
background: none;
|
|
1895
|
+
border: none;
|
|
1896
|
+
padding: var(--spacing-2);
|
|
1897
|
+
border-radius: var(--radius-sm);
|
|
1898
|
+
cursor: pointer;
|
|
1899
|
+
color: var(--surface-overlay-icon);
|
|
1900
|
+
transition: background-color var(--transition-fast);
|
|
1901
|
+
display: inline-flex;
|
|
1902
|
+
align-items: center;
|
|
1903
|
+
justify-content: center;
|
|
1904
|
+
|
|
1905
|
+
&:hover {
|
|
1906
|
+
background-color: var(--color-surface-subtle);
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
&:focus-visible {
|
|
1910
|
+
outline: 2px solid var(--color-focus-ring);
|
|
1911
|
+
outline-offset: 2px;
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
/* Dialog body - scrollable content */
|
|
1917
|
+
article,
|
|
1918
|
+
form > article,
|
|
1919
|
+
.dialog-body {
|
|
1920
|
+
flex: 1;
|
|
1921
|
+
padding: var(--spacing-6);
|
|
1922
|
+
overflow-y: auto;
|
|
1923
|
+
overflow-x: hidden;
|
|
1924
|
+
}
|
|
1925
|
+
|
|
1926
|
+
/* Dialog footer - actions */
|
|
1927
|
+
footer,
|
|
1928
|
+
form > footer {
|
|
1929
|
+
display: flex;
|
|
1930
|
+
flex-direction: row;
|
|
1931
|
+
gap: var(--spacing-3);
|
|
1932
|
+
justify-content: flex-end;
|
|
1933
|
+
align-items: center;
|
|
1934
|
+
padding: var(--spacing-6);
|
|
1935
|
+
border-top: 1px solid var(--surface-overlay-border);
|
|
1936
|
+
flex-shrink: 0;
|
|
1937
|
+
}
|
|
1938
|
+
}
|
|
1939
|
+
|
|
1940
|
+
/* Dialog size modifiers */
|
|
1941
|
+
dialog.dialog-sm {
|
|
1942
|
+
max-width: min(400px, calc(100vw - var(--spacing-8)));
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
dialog.dialog-lg {
|
|
1946
|
+
max-width: min(800px, calc(100vw - var(--spacing-8)));
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
dialog.dialog-xl {
|
|
1950
|
+
max-width: min(1200px, calc(100vw - var(--spacing-8)));
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
dialog.dialog-full {
|
|
1954
|
+
max-width: calc(100vw - var(--spacing-8));
|
|
1955
|
+
max-height: calc(100vh - var(--spacing-8));
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
/* Mobile responsiveness */
|
|
1959
|
+
@media (max-width: ${(e.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
|
|
1960
|
+
dialog {
|
|
1961
|
+
max-width: 100vw;
|
|
1962
|
+
max-height: 100vh;
|
|
1963
|
+
border-radius: 0;
|
|
1964
|
+
top: 50%;
|
|
1965
|
+
transform: translateY(-50%);
|
|
1966
|
+
margin: 0;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
dialog header,
|
|
1970
|
+
dialog form > header,
|
|
1971
|
+
dialog article,
|
|
1972
|
+
dialog form > article,
|
|
1973
|
+
dialog footer,
|
|
1974
|
+
dialog form > footer {
|
|
1975
|
+
padding: var(--spacing-4);
|
|
1976
|
+
}
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
/* Reduced motion support */
|
|
1980
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1981
|
+
dialog,
|
|
1982
|
+
dialog::backdrop {
|
|
1983
|
+
transition-duration: 0.01s !important;
|
|
1984
|
+
}
|
|
1985
|
+
}
|
|
1986
|
+
|
|
1987
|
+
`}#ce(){let{layout:e={}}=this.options.design;return`/* Tab Strip Component */
|
|
1988
|
+
|
|
1989
|
+
/* Tab navigation */
|
|
1990
|
+
|
|
1991
|
+
pds-tabstrip {
|
|
1992
|
+
margin-top: var(--spacing-6);
|
|
1993
|
+
|
|
1994
|
+
& > nav {
|
|
1995
|
+
display: flex;
|
|
1996
|
+
gap: var(--spacing-1);
|
|
1997
|
+
border-bottom: 2px solid var(--color-border);
|
|
1998
|
+
margin-bottom: var(--spacing-6);
|
|
1999
|
+
position: relative;
|
|
2000
|
+
overflow-x: auto;
|
|
2001
|
+
overflow-y: hidden;
|
|
2002
|
+
scrollbar-width: none; /* Firefox */
|
|
2003
|
+
-ms-overflow-style: none; /* IE/Edge */
|
|
2004
|
+
|
|
2005
|
+
&::-webkit-scrollbar {
|
|
2006
|
+
display: none; /* Chrome/Safari */
|
|
2007
|
+
}
|
|
2008
|
+
|
|
2009
|
+
/* Tab links */
|
|
2010
|
+
& > a {
|
|
2011
|
+
position: relative;
|
|
2012
|
+
display: inline-flex;
|
|
2013
|
+
align-items: center;
|
|
2014
|
+
gap: var(--spacing-2);
|
|
2015
|
+
padding: var(--spacing-3) var(--spacing-4);
|
|
2016
|
+
font-family: var(--font-family-body);
|
|
2017
|
+
font-size: var(--font-size-base);
|
|
2018
|
+
font-weight: var(--font-weight-medium);
|
|
2019
|
+
color: var(--color-text-secondary);
|
|
2020
|
+
text-decoration: none;
|
|
2021
|
+
white-space: nowrap;
|
|
2022
|
+
border: none;
|
|
2023
|
+
background: transparent;
|
|
2024
|
+
cursor: pointer;
|
|
2025
|
+
transition: color var(--transition-fast);
|
|
2026
|
+
border-bottom: 2px solid transparent;
|
|
2027
|
+
margin-bottom: -2px; /* Overlap the nav border */
|
|
2028
|
+
|
|
2029
|
+
&:hover {
|
|
2030
|
+
color: var(--color-text-primary);
|
|
2031
|
+
background-color: var(--color-surface-hover);
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
&:focus-visible {
|
|
2035
|
+
outline: var(--focus-ring-width, 2px) solid var(--color-primary-500);
|
|
2036
|
+
outline-offset: -2px;
|
|
2037
|
+
border-radius: var(--radius-sm);
|
|
2038
|
+
z-index: 1;
|
|
2039
|
+
}
|
|
2040
|
+
|
|
2041
|
+
/* Active tab */
|
|
2042
|
+
&[aria-current="page"] {
|
|
2043
|
+
color: var(--color-primary-600);
|
|
2044
|
+
font-weight: var(--font-weight-semibold);
|
|
2045
|
+
border-bottom-color: var(--color-primary-600);
|
|
2046
|
+
|
|
2047
|
+
&:hover {
|
|
2048
|
+
color: var(--color-primary-700);
|
|
2049
|
+
border-bottom-color: var(--color-primary-700);
|
|
2050
|
+
background-color: var(--color-primary-50);
|
|
2051
|
+
}
|
|
2052
|
+
}
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
/* Tab panel */
|
|
2057
|
+
& > pds-tabpanel {
|
|
2058
|
+
display: block;
|
|
2059
|
+
margin-top: var(--spacing-4);
|
|
2060
|
+
|
|
2061
|
+
&[data-tabpanel] {
|
|
2062
|
+
animation: tabFadeIn var(--transition-normal) ease-out;
|
|
2063
|
+
padding: var(--spacing-4) 0;
|
|
2064
|
+
|
|
2065
|
+
&[hidden] {
|
|
2066
|
+
display: none;
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
@keyframes tabFadeIn {
|
|
2073
|
+
from {
|
|
2074
|
+
opacity: 0;
|
|
2075
|
+
transform: translateY(8px);
|
|
2076
|
+
}
|
|
2077
|
+
to {
|
|
2078
|
+
opacity: 1;
|
|
2079
|
+
transform: translateY(0);
|
|
2080
|
+
}
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
/* Mobile responsive */
|
|
2084
|
+
@media (max-width: ${(e.breakpoints||{sm:640,md:768,lg:1024,xl:1280}).sm-1}px) {
|
|
2085
|
+
pds-tabstrip > nav {
|
|
2086
|
+
gap: var(--spacing-1);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
pds-tabstrip > nav > a {
|
|
2090
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
2091
|
+
font-size: var(--font-size-sm);
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
pds-tabstrip > pds-tabpanel[data-tabpanel] {
|
|
2095
|
+
padding: var(--spacing-3) 0;
|
|
2096
|
+
}
|
|
2097
|
+
}
|
|
2098
|
+
|
|
2099
|
+
`}#le(){return`/* Custom Scrollbars */
|
|
2100
|
+
|
|
2101
|
+
::-webkit-scrollbar {
|
|
2102
|
+
width: 12px;
|
|
2103
|
+
height: 12px;
|
|
2104
|
+
|
|
2105
|
+
&-track {
|
|
2106
|
+
background: transparent;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
&-thumb {
|
|
2110
|
+
background: var(--color-secondary-300);
|
|
2111
|
+
border-radius: var(--radius-full);
|
|
2112
|
+
border: 3px solid transparent;
|
|
2113
|
+
background-clip: padding-box;
|
|
2114
|
+
transition: background-color var(--transition-fast);
|
|
2115
|
+
|
|
2116
|
+
&:hover {
|
|
2117
|
+
background: var(--color-secondary-400);
|
|
2118
|
+
border: 2px solid transparent;
|
|
2119
|
+
background-clip: padding-box;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
&:active {
|
|
2123
|
+
background: var(--color-secondary-500);
|
|
2124
|
+
border: 2px solid transparent;
|
|
2125
|
+
background-clip: padding-box;
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
@media (prefers-color-scheme: dark) {
|
|
2129
|
+
background: var(--color-secondary-600);
|
|
2130
|
+
|
|
2131
|
+
&:hover {
|
|
2132
|
+
background: var(--color-secondary-500);
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
&:active {
|
|
2136
|
+
background: var(--color-secondary-400);
|
|
2137
|
+
}
|
|
2138
|
+
}
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
|
|
2142
|
+
* {
|
|
2143
|
+
scrollbar-width: thin;
|
|
2144
|
+
scrollbar-color: var(--color-secondary-300) transparent;
|
|
2145
|
+
|
|
2146
|
+
@media (prefers-color-scheme: dark) {
|
|
2147
|
+
scrollbar-color: var(--color-secondary-600) transparent;
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
/* Hover effect for scrollable containers */
|
|
2152
|
+
*:hover {
|
|
2153
|
+
scrollbar-color: var(--color-secondary-400) transparent;
|
|
2154
|
+
}
|
|
2155
|
+
|
|
2156
|
+
@media (prefers-color-scheme: dark) {
|
|
2157
|
+
*:hover {
|
|
2158
|
+
scrollbar-color: var(--color-secondary-500) transparent;
|
|
2159
|
+
}
|
|
2160
|
+
}
|
|
2161
|
+
|
|
2162
|
+
`}#de(){let{a11y:e={}}=this.options.design,t=e.minTouchTarget||u.TouchTargetSizes.standard;return`/* Icon System */
|
|
2163
|
+
|
|
2164
|
+
pds-icon {
|
|
2165
|
+
display: inline-flex;
|
|
2166
|
+
align-items: center;
|
|
2167
|
+
justify-content: center;
|
|
2168
|
+
flex-shrink: 0;
|
|
2169
|
+
vertical-align: middle;
|
|
2170
|
+
pointer-events: none;
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
/* Icon size utilities */
|
|
2174
|
+
.icon-xs,
|
|
2175
|
+
pds-icon[size="xs"] {
|
|
2176
|
+
width: var(--icon-size-xs);
|
|
2177
|
+
height: var(--icon-size-xs);
|
|
2178
|
+
}
|
|
2179
|
+
|
|
2180
|
+
.icon-sm,
|
|
2181
|
+
pds-icon[size="sm"] {
|
|
2182
|
+
width: var(--icon-size-sm);
|
|
2183
|
+
height: var(--icon-size-sm);
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
.icon-md,
|
|
2187
|
+
pds-icon[size="md"] {
|
|
2188
|
+
width: var(--icon-size-md);
|
|
2189
|
+
height: var(--icon-size-md);
|
|
2190
|
+
}
|
|
2191
|
+
|
|
2192
|
+
.icon-lg,
|
|
2193
|
+
pds-icon[size="lg"] {
|
|
2194
|
+
width: var(--icon-size-lg);
|
|
2195
|
+
height: var(--icon-size-lg);
|
|
2196
|
+
}
|
|
2197
|
+
|
|
2198
|
+
.icon-xl,
|
|
2199
|
+
pds-icon[size="xl"] {
|
|
2200
|
+
width: var(--icon-size-xl);
|
|
2201
|
+
height: var(--icon-size-xl);
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
.icon-2xl,
|
|
2205
|
+
pds-icon[size="2xl"] {
|
|
2206
|
+
width: var(--icon-size-2xl);
|
|
2207
|
+
height: var(--icon-size-2xl);
|
|
2208
|
+
}
|
|
2209
|
+
|
|
2210
|
+
/* Icon color utilities */
|
|
2211
|
+
.icon-primary,
|
|
2212
|
+
pds-icon.primary {
|
|
2213
|
+
color: var(--color-primary-600);
|
|
2214
|
+
}
|
|
2215
|
+
|
|
2216
|
+
.icon-secondary,
|
|
2217
|
+
pds-icon.secondary {
|
|
2218
|
+
color: var(--color-secondary-600);
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
.icon-accent,
|
|
2222
|
+
pds-icon.accent {
|
|
2223
|
+
color: var(--color-accent-600);
|
|
2224
|
+
}
|
|
2225
|
+
|
|
2226
|
+
.icon-success,
|
|
2227
|
+
pds-icon.success {
|
|
2228
|
+
color: var(--color-success-600);
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
.icon-warning,
|
|
2232
|
+
pds-icon.warning {
|
|
2233
|
+
color: var(--color-warning-600);
|
|
2234
|
+
}
|
|
2235
|
+
|
|
2236
|
+
.icon-danger,
|
|
2237
|
+
pds-icon.danger {
|
|
2238
|
+
color: var(--color-danger-600);
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
.icon-info,
|
|
2242
|
+
pds-icon.info {
|
|
2243
|
+
color: var(--color-info-600);
|
|
2244
|
+
}
|
|
2245
|
+
|
|
2246
|
+
.icon-muted,
|
|
2247
|
+
pds-icon.muted {
|
|
2248
|
+
color: var(--color-text-muted);
|
|
2249
|
+
}
|
|
2250
|
+
|
|
2251
|
+
.icon-subtle,
|
|
2252
|
+
pds-icon.subtle {
|
|
2253
|
+
color: var(--color-text-subtle);
|
|
2254
|
+
}
|
|
2255
|
+
|
|
2256
|
+
/* Icon with text combinations */
|
|
2257
|
+
.icon-text {
|
|
2258
|
+
display: inline-flex;
|
|
2259
|
+
align-items: center;
|
|
2260
|
+
gap: var(--spacing-2);
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
.icon-text-start {
|
|
2264
|
+
flex-direction: row;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
.icon-text-end {
|
|
2268
|
+
flex-direction: row-reverse;
|
|
2269
|
+
}
|
|
2270
|
+
|
|
2271
|
+
/* Button icon utilities */
|
|
2272
|
+
button, a {
|
|
2273
|
+
pds-icon {
|
|
2274
|
+
flex-shrink: 0;
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
&.icon-only {
|
|
2278
|
+
padding: var(--spacing-2);
|
|
2279
|
+
min-width: ${t}px;
|
|
2280
|
+
width: ${t}px;
|
|
2281
|
+
height: ${t}px;
|
|
2282
|
+
display: inline-flex;
|
|
2283
|
+
align-items: center;
|
|
2284
|
+
justify-content: center;
|
|
2285
|
+
}
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
/* Icon in inputs */
|
|
2289
|
+
.input-icon {
|
|
2290
|
+
position: relative;
|
|
2291
|
+
display: flex;
|
|
2292
|
+
align-items: center;
|
|
2293
|
+
|
|
2294
|
+
pds-icon {
|
|
2295
|
+
position: absolute;
|
|
2296
|
+
left: var(--spacing-3);
|
|
2297
|
+
color: var(--color-text-muted);
|
|
2298
|
+
pointer-events: none;
|
|
2299
|
+
width: var(--icon-size-md);
|
|
2300
|
+
height: var(--icon-size-md);
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
input {
|
|
2304
|
+
padding-left: calc(var(--icon-size-md) + var(--spacing-6));
|
|
2305
|
+
width: 100%;
|
|
2306
|
+
}
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
.input-icon-end {
|
|
2310
|
+
position: relative;
|
|
2311
|
+
display: flex;
|
|
2312
|
+
align-items: center;
|
|
2313
|
+
|
|
2314
|
+
pds-icon {
|
|
2315
|
+
position: absolute;
|
|
2316
|
+
left: unset;
|
|
2317
|
+
right: var(--spacing-3);
|
|
2318
|
+
color: var(--color-text-muted);
|
|
2319
|
+
pointer-events: none;
|
|
2320
|
+
width: var(--icon-size-md);
|
|
2321
|
+
height: var(--icon-size-md);
|
|
2322
|
+
}
|
|
2323
|
+
|
|
2324
|
+
input {
|
|
2325
|
+
padding-left: var(--spacing-4);
|
|
2326
|
+
padding-right: calc(var(--icon-size-md) + var(--spacing-6));
|
|
2327
|
+
width: 100%;
|
|
2328
|
+
}
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
`}#pe(){return`/* Dropdown Component */
|
|
2332
|
+
|
|
2333
|
+
/* Basic dropdown host */
|
|
2334
|
+
nav[data-dropdown] {
|
|
2335
|
+
position: relative;
|
|
2336
|
+
display: inline-block;
|
|
2337
|
+
padding: 0;
|
|
2338
|
+
|
|
2339
|
+
menu {
|
|
2340
|
+
position: absolute;
|
|
2341
|
+
list-style: none;
|
|
2342
|
+
padding: var(--spacing-2);
|
|
2343
|
+
margin: 0;
|
|
2344
|
+
background: var(--color-surface-overlay);
|
|
2345
|
+
border: 1px solid var(--color-border);
|
|
2346
|
+
border-radius: var(--radius-md);
|
|
2347
|
+
box-shadow: var(--shadow-lg);
|
|
2348
|
+
top: 100%;
|
|
2349
|
+
bottom: auto;
|
|
2350
|
+
left: 0;
|
|
2351
|
+
right: auto;
|
|
2352
|
+
margin-top: var(--spacing-2);
|
|
2353
|
+
--dropdown-transition-duration: var(--transition-fast, 160ms);
|
|
2354
|
+
min-width: max(100%, var(--dropdown-min-width, 12rem));
|
|
2355
|
+
width: max-content;
|
|
2356
|
+
opacity: 0;
|
|
2357
|
+
scale: 0.95;
|
|
2358
|
+
visibility: hidden;
|
|
2359
|
+
display: none;
|
|
2360
|
+
pointer-events: none;
|
|
2361
|
+
transform-origin: top center;
|
|
2362
|
+
z-index: var(--z-dropdown, 1050);
|
|
2363
|
+
max-height: min(60vh, 24rem);
|
|
2364
|
+
overflow-y: auto;
|
|
2365
|
+
transition:
|
|
2366
|
+
opacity var(--dropdown-transition-duration) ease,
|
|
2367
|
+
scale var(--dropdown-transition-duration) ease,
|
|
2368
|
+
visibility 0s linear var(--dropdown-transition-duration),
|
|
2369
|
+
display 0s linear var(--dropdown-transition-duration);
|
|
2370
|
+
transition-behavior: allow-discrete;
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
menu[aria-hidden="false"] {
|
|
2374
|
+
display: block;
|
|
2375
|
+
opacity: 1;
|
|
2376
|
+
scale: 1;
|
|
2377
|
+
visibility: visible;
|
|
2378
|
+
pointer-events: auto;
|
|
2379
|
+
transition:
|
|
2380
|
+
opacity var(--dropdown-transition-duration) ease,
|
|
2381
|
+
scale var(--dropdown-transition-duration) ease,
|
|
2382
|
+
visibility 0s linear 0s,
|
|
2383
|
+
display 0s linear 0s;
|
|
2384
|
+
}
|
|
2385
|
+
|
|
2386
|
+
li {
|
|
2387
|
+
padding: var(--spacing-1) 0;
|
|
2388
|
+
|
|
2389
|
+
& + li {
|
|
2390
|
+
border-top: 1px solid var(--color-border);
|
|
2391
|
+
margin-top: var(--spacing-2);
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
&:has(> hr) {
|
|
2395
|
+
border-top: none;
|
|
2396
|
+
margin-top: 0;
|
|
2397
|
+
padding: 0;
|
|
2398
|
+
|
|
2399
|
+
& + li {
|
|
2400
|
+
border-top: none;
|
|
2401
|
+
margin-top: 0;
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
& > hr {
|
|
2406
|
+
border: none;
|
|
2407
|
+
border-top: 3px solid var(--color-border);
|
|
2408
|
+
margin: var(--spacing-2) 0;
|
|
2409
|
+
}
|
|
2410
|
+
}
|
|
2411
|
+
|
|
2412
|
+
a {
|
|
2413
|
+
display: flex;
|
|
2414
|
+
color: var(--color-text-primary);
|
|
2415
|
+
text-decoration: none;
|
|
2416
|
+
align-items: center;
|
|
2417
|
+
gap: var(--spacing-2);
|
|
2418
|
+
|
|
2419
|
+
&.danger {
|
|
2420
|
+
color: var(--color-danger-600);
|
|
2421
|
+
}
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
&.align-right,
|
|
2425
|
+
&[data-align="right"],
|
|
2426
|
+
&[data-align="end"],
|
|
2427
|
+
&[data-dropdown-align="right"],
|
|
2428
|
+
&[data-dropdown-align="end"] {
|
|
2429
|
+
menu {
|
|
2430
|
+
left: auto;
|
|
2431
|
+
right: 0;
|
|
2432
|
+
}
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
&[data-mode="up"],
|
|
2436
|
+
&[data-dropdown-direction="up"] {
|
|
2437
|
+
menu {
|
|
2438
|
+
top: auto;
|
|
2439
|
+
bottom: 100%;
|
|
2440
|
+
margin-top: 0;
|
|
2441
|
+
margin-bottom: var(--spacing-2);
|
|
2442
|
+
transform-origin: bottom center;
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
|
|
2446
|
+
&[data-mode="down"],
|
|
2447
|
+
&[data-dropdown-direction="down"] {
|
|
2448
|
+
menu {
|
|
2449
|
+
top: 100%;
|
|
2450
|
+
bottom: auto;
|
|
2451
|
+
margin-top: var(--spacing-2);
|
|
2452
|
+
margin-bottom: 0;
|
|
2453
|
+
transform-origin: top center;
|
|
2454
|
+
}
|
|
2455
|
+
}
|
|
2456
|
+
|
|
2457
|
+
&[data-mode="auto"] menu {
|
|
2458
|
+
top: 100%;
|
|
2459
|
+
bottom: auto;
|
|
2460
|
+
}
|
|
2461
|
+
|
|
2462
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2463
|
+
menu {
|
|
2464
|
+
transition-duration: 0.01s !important;
|
|
2465
|
+
}
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
|
|
2469
|
+
@starting-style {
|
|
2470
|
+
nav[data-dropdown] menu[aria-hidden="false"] {
|
|
2471
|
+
opacity: 0;
|
|
2472
|
+
scale: 0.95;
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
`}#ue(){let{layout:e={}}=this.options.design,t=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280},o=e.gridSystem||{},r=o.columns||[1,2,3,4,6],a=o.autoFitBreakpoints||{sm:"150px",md:"250px",lg:"350px",xl:"450px"},i=[`
|
|
2476
|
+
/* ============================================================================
|
|
2477
|
+
Layout Utilities
|
|
2478
|
+
Modern grid and flex system for building responsive layouts
|
|
2479
|
+
============================================================================ */
|
|
2480
|
+
|
|
2481
|
+
/* Container */
|
|
2482
|
+
.container {
|
|
2483
|
+
display: block;
|
|
2484
|
+
width: 100%;
|
|
2485
|
+
max-width: ${e.containerMaxWidth||"1400px"};
|
|
2486
|
+
margin: 0 auto;
|
|
2487
|
+
padding: ${e.containerPadding||"var(--spacing-6)"};
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
/* Grid System */
|
|
2491
|
+
.grid {
|
|
2492
|
+
display: grid;
|
|
2493
|
+
gap: var(--spacing-4);
|
|
2494
|
+
}
|
|
2495
|
+
|
|
2496
|
+
`];for(let s of r)i.push(`.grid-cols-${s} { grid-template-columns: repeat(${s}, 1fr); }
|
|
2497
|
+
`);i.push(`
|
|
2498
|
+
/* Auto-fit grids (responsive) */
|
|
2499
|
+
`);for(let[s,c]of Object.entries(a))i.push(`.grid-auto-${s} { grid-template-columns: repeat(auto-fit, minmax(${c}, 1fr)); }
|
|
2500
|
+
`);return i.push(`
|
|
2501
|
+
/* Gap utilities */
|
|
2502
|
+
.gap-0 { gap: 0; }
|
|
2503
|
+
.gap-xs { gap: var(--spacing-1); }
|
|
2504
|
+
.gap-sm { gap: var(--spacing-2); }
|
|
2505
|
+
.gap-md { gap: var(--spacing-4); }
|
|
2506
|
+
.gap-lg { gap: var(--spacing-6); }
|
|
2507
|
+
.gap-xl { gap: var(--spacing-8); }
|
|
2508
|
+
|
|
2509
|
+
`),i.push(`
|
|
2510
|
+
/* Flexbox System */
|
|
2511
|
+
.flex {
|
|
2512
|
+
display: flex;
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
.flex-wrap {
|
|
2516
|
+
flex-wrap: wrap;
|
|
2517
|
+
}
|
|
2518
|
+
|
|
2519
|
+
.flex-col {
|
|
2520
|
+
flex-direction: column;
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
.flex-row {
|
|
2524
|
+
flex-direction: row;
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
/* Flex alignment */
|
|
2528
|
+
.items-start { align-items: flex-start; }
|
|
2529
|
+
.items-center { align-items: center; }
|
|
2530
|
+
.items-end { align-items: flex-end; }
|
|
2531
|
+
.items-stretch { align-items: stretch; }
|
|
2532
|
+
.items-baseline { align-items: baseline; }
|
|
2533
|
+
|
|
2534
|
+
.justify-start { justify-content: flex-start; }
|
|
2535
|
+
.justify-center { justify-content: center; }
|
|
2536
|
+
.justify-end { justify-content: flex-end; }
|
|
2537
|
+
.justify-between { justify-content: space-between; }
|
|
2538
|
+
.justify-around { justify-content: space-around; }
|
|
2539
|
+
.justify-evenly { justify-content: space-evenly; }
|
|
2540
|
+
|
|
2541
|
+
/* Responsive helpers */
|
|
2542
|
+
@media (max-width: ${t.md-1}px) {
|
|
2543
|
+
.mobile-stack { flex-direction: column; }
|
|
2544
|
+
.mobile-stack > * { width: 100%; }
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
/* ============================================================================
|
|
2548
|
+
Backdrop Utilities
|
|
2549
|
+
Reusable backdrop layer for modal components (dialogs, drawers, overlays)
|
|
2550
|
+
============================================================================ */
|
|
2551
|
+
|
|
2552
|
+
/* Base backdrop class for modal overlays */
|
|
2553
|
+
.backdrop {
|
|
2554
|
+
position: fixed;
|
|
2555
|
+
inset: 0;
|
|
2556
|
+
background: var(--backdrop-bg);
|
|
2557
|
+
backdrop-filter: var(--backdrop-filter);
|
|
2558
|
+
opacity: 0;
|
|
2559
|
+
pointer-events: none;
|
|
2560
|
+
transition: opacity 0.2s ease;
|
|
2561
|
+
z-index: var(--z-modal, 1040);
|
|
2562
|
+
|
|
2563
|
+
&.active {
|
|
2564
|
+
opacity: var(--backdrop-opacity, 1);
|
|
2565
|
+
pointer-events: auto;
|
|
2566
|
+
}
|
|
2567
|
+
|
|
2568
|
+
/* Backdrop variants */
|
|
2569
|
+
&-light {
|
|
2570
|
+
--backdrop-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
|
|
2571
|
+
--backdrop-brightness: 1.1;
|
|
2572
|
+
}
|
|
2573
|
+
|
|
2574
|
+
&-dark {
|
|
2575
|
+
--backdrop-bg: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.5));
|
|
2576
|
+
--backdrop-brightness: 0.6;
|
|
2577
|
+
}
|
|
2578
|
+
|
|
2579
|
+
&-blur-sm {
|
|
2580
|
+
--backdrop-blur: 5px;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
&-blur-md {
|
|
2584
|
+
--backdrop-blur: 10px;
|
|
2585
|
+
}
|
|
2586
|
+
|
|
2587
|
+
&-blur-lg {
|
|
2588
|
+
--backdrop-blur: 20px;
|
|
2589
|
+
}
|
|
2590
|
+
}
|
|
2591
|
+
`),i.join("")}#he(){return`/* Media Element Utilities */
|
|
2592
|
+
|
|
2593
|
+
/* Gallery images */
|
|
2594
|
+
.img-gallery {
|
|
2595
|
+
width: 100%;
|
|
2596
|
+
height: auto;
|
|
2597
|
+
aspect-ratio: 1;
|
|
2598
|
+
object-fit: cover;
|
|
2599
|
+
border-radius: var(--radius-sm);
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2602
|
+
/* Responsive images with different radius sizes */
|
|
2603
|
+
.img-rounded-sm { border-radius: var(--radius-sm); }
|
|
2604
|
+
.img-rounded-md { border-radius: var(--radius-md); }
|
|
2605
|
+
.img-rounded-lg { border-radius: var(--radius-lg); }
|
|
2606
|
+
.img-rounded-xl { border-radius: var(--radius-xl); }
|
|
2607
|
+
.img-rounded-full { border-radius: var(--radius-full); }
|
|
2608
|
+
|
|
2609
|
+
/* Inline images */
|
|
2610
|
+
.img-inline {
|
|
2611
|
+
display: inline;
|
|
2612
|
+
vertical-align: middle;
|
|
2613
|
+
border-radius: var(--radius-xs);
|
|
2614
|
+
margin: 0 var(--spacing-1);
|
|
2615
|
+
max-width: 60px;
|
|
2616
|
+
height: auto;
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
/* Video specific utilities */
|
|
2620
|
+
.video-responsive {
|
|
2621
|
+
width: 100%;
|
|
2622
|
+
max-width: 600px;
|
|
2623
|
+
height: auto;
|
|
2624
|
+
border-radius: var(--radius-md);
|
|
2625
|
+
}
|
|
2626
|
+
|
|
2627
|
+
/* Figure utilities */
|
|
2628
|
+
.figure-responsive {
|
|
2629
|
+
width: 100%;
|
|
2630
|
+
height: auto;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
`}#ge(){let{layout:e={},a11y:t={}}=this.options.design,o=e.breakpoints||{sm:640,md:768,lg:1024,xl:1280},r=t.minTouchTarget||u.TouchTargetSizes.standard;return`/* Mobile-First Responsive Design */
|
|
2634
|
+
|
|
2635
|
+
/* Small devices (${o.sm}px and up) */
|
|
2636
|
+
@media (min-width: ${o.sm}px) {
|
|
2637
|
+
.sm\\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
|
|
2638
|
+
.sm\\:flex-row { flex-direction: row; }
|
|
2639
|
+
.sm\\:text-sm { font-size: var(--font-size-sm); }
|
|
2640
|
+
.sm\\:p-6 { padding: var(--spacing-6); }
|
|
2641
|
+
.sm\\:gap-6 { gap: var(--spacing-6); }
|
|
2642
|
+
.sm\\:hidden { display: none; }
|
|
2643
|
+
.sm\\:block { display: block; }
|
|
2644
|
+
}
|
|
2645
|
+
|
|
2646
|
+
/* Medium devices (${o.md}px and up) */
|
|
2647
|
+
@media (min-width: ${o.md}px) {
|
|
2648
|
+
.md\\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
|
|
2649
|
+
.md\\:text-lg { font-size: var(--font-size-lg); }
|
|
2650
|
+
.md\\:p-8 { padding: var(--spacing-8); }
|
|
2651
|
+
.md\\:gap-8 { gap: var(--spacing-8); }
|
|
2652
|
+
.md\\:flex-row { flex-direction: row; }
|
|
2653
|
+
.md\\:w-1\\/2 { width: 50%; }
|
|
2654
|
+
.md\\:w-1\\/3 { width: 33.333333%; }
|
|
2655
|
+
.md\\:hidden { display: none; }
|
|
2656
|
+
.md\\:block { display: block; }
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
/* Large devices (${o.lg}px and up) */
|
|
2660
|
+
@media (min-width: ${o.lg}px) {
|
|
2661
|
+
.lg\\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
|
|
2662
|
+
.lg\\:text-xl { font-size: var(--font-size-xl); }
|
|
2663
|
+
.lg\\:p-12 { padding: var(--spacing-12); }
|
|
2664
|
+
.lg\\:gap-12 { gap: var(--spacing-12); }
|
|
2665
|
+
.lg\\:w-1\\/4 { width: 25%; }
|
|
2666
|
+
.lg\\:hidden { display: none; }
|
|
2667
|
+
.lg\\:block { display: block; }
|
|
2668
|
+
}
|
|
2669
|
+
|
|
2670
|
+
/* Touch device optimizations */
|
|
2671
|
+
@media (hover: none) and (pointer: coarse) {
|
|
2672
|
+
/* Touch devices - larger touch targets for interactive elements */
|
|
2673
|
+
button, a, select, textarea,
|
|
2674
|
+
input:not([type="radio"]):not([type="checkbox"]) {
|
|
2675
|
+
min-height: ${r}px;
|
|
2676
|
+
min-width: ${r}px;
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
/* Radio and checkbox inputs: keep reasonable size but ensure label tap area is large */
|
|
2680
|
+
input[type="radio"],
|
|
2681
|
+
input[type="checkbox"] {
|
|
2682
|
+
/* Keep native size - labels provide the touch target */
|
|
2683
|
+
min-height: unset;
|
|
2684
|
+
min-width: unset;
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
/* Ensure labels with radio/checkbox have adequate touch targets */
|
|
2688
|
+
/* Exclude button-style fieldsets which already have proper sizing */
|
|
2689
|
+
label:has(input[type="radio"]):not(fieldset.buttons label),
|
|
2690
|
+
label:has(input[type="checkbox"]):not(fieldset.buttons label),
|
|
2691
|
+
fieldset[role="radiogroup"]:not(.buttons) label,
|
|
2692
|
+
fieldset[role="group"]:not(.buttons) label {
|
|
2693
|
+
min-height: ${r}px;
|
|
2694
|
+
display: inline-flex;
|
|
2695
|
+
align-items: center;
|
|
2696
|
+
padding: var(--spacing-2) 0;
|
|
2697
|
+
}
|
|
2698
|
+
|
|
2699
|
+
/* Disable hover effects
|
|
2700
|
+
on touch devices */
|
|
2701
|
+
.card {
|
|
2702
|
+
&:hover {
|
|
2703
|
+
box-shadow: var(--shadow-base);
|
|
2704
|
+
}
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2707
|
+
a {
|
|
2708
|
+
&:hover {
|
|
2709
|
+
color: var(--color-primary-600);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
/* Reduced motion */
|
|
2715
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2716
|
+
*, *::before, *::after {
|
|
2717
|
+
animation-duration: 0.01ms !important;
|
|
2718
|
+
animation-iteration-count: 1 !important;
|
|
2719
|
+
transition-duration: 0.01ms !important;
|
|
2720
|
+
scroll-behavior: auto !important;
|
|
2721
|
+
}
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
/* High contrast mode */
|
|
2725
|
+
@media (prefers-contrast: high) {
|
|
2726
|
+
:root {
|
|
2727
|
+
--color-primary-600: #0000ff;
|
|
2728
|
+
--color-primary-700: #0000cc;
|
|
2729
|
+
}
|
|
2730
|
+
|
|
2731
|
+
button, input, textarea, select {
|
|
2732
|
+
border-width: 2px;
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
|
|
2736
|
+
/* Print styles */
|
|
2737
|
+
@media print {
|
|
2738
|
+
*, *::before, *::after {
|
|
2739
|
+
background: transparent !important;
|
|
2740
|
+
color: black !important;
|
|
2741
|
+
box-shadow: none !important;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
a, a:visited {
|
|
2745
|
+
text-decoration: underline;
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
button {
|
|
2749
|
+
display: none;
|
|
2750
|
+
}
|
|
2751
|
+
|
|
2752
|
+
.mobile-hidden, .desktop-hidden {
|
|
2753
|
+
display: block !important;
|
|
2754
|
+
}
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2757
|
+
`}#a(e){let t=parseInt(e.slice(1,3),16)/255,o=parseInt(e.slice(3,5),16)/255,r=parseInt(e.slice(5,7),16)/255,a=Math.max(t,o,r),i=Math.min(t,o,r),s,c,l=(a+i)/2;if(a===i)s=c=0;else{let d=a-i;switch(c=l>.5?d/(2-a-i):d/(a+i),a){case t:s=(o-r)/d+(o<r?6:0);break;case o:s=(r-t)/d+2;break;case r:s=(t-o)/d+4;break}s/=6}return{h:s*360,s:c*100,l:l*100}}#t(e,t,o){e=e/360,t=t/100,o=o/100;let r=(l,d,p)=>(p<0&&(p+=1),p>1&&(p-=1),p<1/6?l+(d-l)*6*p:p<1/2?d:p<2/3?l+(d-l)*(2/3-p)*6:l),a,i,s;if(t===0)a=i=s=o;else{let l=o<.5?o*(1+t):o+t-o*t,d=2*o-l;a=r(d,l,e+1/3),i=r(d,l,e),s=r(d,l,e-1/3)}let c=l=>{let d=Math.round(l*255).toString(16);return d.length===1?"0"+d:d};return`#${c(a)}${c(i)}${c(s)}`}getTokens(){return this.tokens}exportCSS(){return this.layeredCSS}#me(){this.#e={tokens:this.#fe(),primitives:this.#be(),components:this.#ye(),utilities:this.#ve()},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`})}#fe(){let{colors:e,spacing:t,radius:o,borderWidths:r,typography:a,shadows:i,layout:s,transitions:c,zIndex:l,icons:d}=this.tokens,p=[`@layer tokens {
|
|
2758
|
+
:root {
|
|
2759
|
+
${this.#D(e)}
|
|
2760
|
+
${this.#W(t)}
|
|
2761
|
+
${this.#U(o)}
|
|
2762
|
+
${this.#j(r)}
|
|
2763
|
+
${this.#N(a)}
|
|
2764
|
+
${this.#O(i)}
|
|
2765
|
+
${this.#I(s)}
|
|
2766
|
+
${this.#H(c)}
|
|
2767
|
+
${this.#G(l)}
|
|
2768
|
+
${this.#q(d)}
|
|
2769
|
+
}
|
|
2770
|
+
${this.#K(e)}
|
|
2771
|
+
}`];return p.push(`
|
|
2772
|
+
/* Non-layered dark variables fallback (ensures attribute wins) */
|
|
2773
|
+
`),p.push(this.#V(e)),p.join("")}#be(){let{advanced:e={},a11y:t={},layout:o={}}=this.options.design,r=e.tabSize||u.TabSizes.standard,a=t.minTouchTarget||u.TouchTargetSizes.standard,i=o.breakpoints||{sm:640,md:768,lg:1024,xl:1280};return`@layer primitives {
|
|
2774
|
+
/* Base HTML reset */
|
|
2775
|
+
*, *::before, *::after {
|
|
2776
|
+
box-sizing: border-box;
|
|
2777
|
+
}
|
|
2778
|
+
|
|
2779
|
+
:where(html) {
|
|
2780
|
+
interpolate-size: allow-keywords;
|
|
2781
|
+
font-family: var(--font-family-body);
|
|
2782
|
+
font-size: var(--font-size-base);
|
|
2783
|
+
line-height: var(--font-line-height-normal);
|
|
2784
|
+
color: var(--color-text-primary);
|
|
2785
|
+
background-color: var(--color-surface-base);
|
|
2786
|
+
-webkit-text-size-adjust: 100%;
|
|
2787
|
+
-webkit-font-smoothing: antialiased;
|
|
2788
|
+
-moz-osx-font-smoothing: grayscale;
|
|
2789
|
+
tab-size: ${r};
|
|
2790
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
|
|
2791
|
+
}
|
|
2792
|
+
|
|
2793
|
+
:where(dialog){
|
|
2794
|
+
background-color: transparent;
|
|
2795
|
+
min-width: 320px;
|
|
2796
|
+
border: none;
|
|
2797
|
+
}
|
|
2798
|
+
|
|
2799
|
+
:where(body) {
|
|
2800
|
+
margin: 0;
|
|
2801
|
+
padding: 0;
|
|
2802
|
+
scroll-behavior: smooth;
|
|
2803
|
+
min-height: 100vh;
|
|
2804
|
+
min-height: var(--layout-min-height, 100vh);
|
|
2805
|
+
overflow-x: hidden;
|
|
2806
|
+
-webkit-overflow-scrolling: touch;
|
|
2807
|
+
}
|
|
2808
|
+
|
|
2809
|
+
:where(body.drawer-open) {
|
|
2810
|
+
/* overflow: hidden; */
|
|
2811
|
+
/* scrollbar-gutter: stable; */
|
|
2812
|
+
}
|
|
2813
|
+
|
|
2814
|
+
/* Button primitives */
|
|
2815
|
+
:where(button) {
|
|
2816
|
+
all: unset;
|
|
2817
|
+
box-sizing: border-box;
|
|
2818
|
+
font: inherit;
|
|
2819
|
+
color: var(--color-primary-contrast, white);
|
|
2820
|
+
background: var(--color-primary-600);
|
|
2821
|
+
padding: var(--spacing-2) var(--spacing-4);
|
|
2822
|
+
border: 0;
|
|
2823
|
+
border-radius: var(--radius-md);
|
|
2824
|
+
cursor: pointer;
|
|
2825
|
+
transition: opacity var(--transition-fast), background-color var(--transition-fast);
|
|
2826
|
+
display: inline-flex;
|
|
2827
|
+
align-items: center;
|
|
2828
|
+
justify-content: center;
|
|
2829
|
+
gap: var(--spacing-2);
|
|
2830
|
+
font-weight: var(--font-weight-medium);
|
|
2831
|
+
line-height: 1.5;
|
|
2832
|
+
min-height: ${a}px;
|
|
2833
|
+
touch-action: manipulation;
|
|
2834
|
+
user-select: none;
|
|
2835
|
+
}
|
|
2836
|
+
|
|
2837
|
+
:where(button):hover:not(:disabled) {
|
|
2838
|
+
opacity: 0.9;
|
|
2839
|
+
background-color: var(--color-primary-700);
|
|
2840
|
+
}
|
|
2841
|
+
|
|
2842
|
+
:where(button):focus-visible {
|
|
2843
|
+
outline: 2px solid var(--color-primary-500);
|
|
2844
|
+
outline-offset: 2px;
|
|
2845
|
+
}
|
|
2846
|
+
|
|
2847
|
+
:where(button):disabled {
|
|
2848
|
+
opacity: 0.5;
|
|
2849
|
+
cursor: not-allowed;
|
|
2850
|
+
}
|
|
2851
|
+
|
|
2852
|
+
:where(button):active:not(:disabled) {
|
|
2853
|
+
transform: scale(0.98);
|
|
2854
|
+
}
|
|
2855
|
+
|
|
2856
|
+
/* Input primitives */
|
|
2857
|
+
:where(input:not([type="radio"]):not([type="checkbox"]):not([type="range"]):not([type="color"])),
|
|
2858
|
+
:where(select),
|
|
2859
|
+
:where(textarea) {
|
|
2860
|
+
font: inherit;
|
|
2861
|
+
color: var(--color-text-primary);
|
|
2862
|
+
background: var(--color-input-bg);
|
|
2863
|
+
border: 1px solid var(--color-border);
|
|
2864
|
+
border-radius: var(--radius-md);
|
|
2865
|
+
padding: var(--spacing-2) var(--spacing-3);
|
|
2866
|
+
min-height: 40px;
|
|
2867
|
+
width: 100%;
|
|
2868
|
+
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
|
|
2869
|
+
appearance: none;
|
|
2870
|
+
}
|
|
2871
|
+
|
|
2872
|
+
:where(input):focus-visible,
|
|
2873
|
+
:where(select):focus-visible,
|
|
2874
|
+
:where(textarea):focus-visible {
|
|
2875
|
+
outline: none;
|
|
2876
|
+
border-color: var(--color-primary-500);
|
|
2877
|
+
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-500) 30%, transparent);
|
|
2878
|
+
}
|
|
2879
|
+
|
|
2880
|
+
:where(input):disabled,
|
|
2881
|
+
:where(select):disabled,
|
|
2882
|
+
:where(textarea):disabled {
|
|
2883
|
+
opacity: 0.6;
|
|
2884
|
+
cursor: not-allowed;
|
|
2885
|
+
background-color: var(--color-input-disabled-bg);
|
|
2886
|
+
}
|
|
2887
|
+
|
|
2888
|
+
/* Harmonized placeholder styling */
|
|
2889
|
+
:where(input)::placeholder,
|
|
2890
|
+
:where(textarea)::placeholder,
|
|
2891
|
+
:where(pds-richtext)::placeholder {
|
|
2892
|
+
color: var(--color-text-muted);
|
|
2893
|
+
opacity: 1;
|
|
2894
|
+
font-weight: var(--font-weight-normal);
|
|
2895
|
+
}
|
|
2896
|
+
|
|
2897
|
+
:where(textarea) {
|
|
2898
|
+
min-height: 80px;
|
|
2899
|
+
resize: vertical;
|
|
2900
|
+
}
|
|
2901
|
+
|
|
2902
|
+
/* Link primitives */
|
|
2903
|
+
:where(a) {
|
|
2904
|
+
color: var(--color-primary-600);
|
|
2905
|
+
text-decoration: underline;
|
|
2906
|
+
text-underline-offset: 0.2em;
|
|
2907
|
+
transition: opacity var(--transition-fast);
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
:where(a):hover {
|
|
2911
|
+
opacity: 0.8;
|
|
2912
|
+
}
|
|
2913
|
+
|
|
2914
|
+
:where(a):focus-visible {
|
|
2915
|
+
outline: 2px solid var(--color-primary-500);
|
|
2916
|
+
outline-offset: 2px;
|
|
2917
|
+
border-radius: var(--radius-sm);
|
|
2918
|
+
}
|
|
2919
|
+
|
|
2920
|
+
/* Form primitives */
|
|
2921
|
+
:where(label) {
|
|
2922
|
+
display: block;
|
|
2923
|
+
font-weight: var(--font-weight-medium);
|
|
2924
|
+
margin-bottom: var(--spacing-2);
|
|
2925
|
+
color: var(--color-text-primary);
|
|
2926
|
+
font-size: var(--font-size-sm);
|
|
2927
|
+
}
|
|
2928
|
+
|
|
2929
|
+
/* Checkbox enhancement - visually hide native input but keep accessible
|
|
2930
|
+
Excludes button-style checkboxes in fieldsets and special containers */
|
|
2931
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]) input[type="checkbox"]) {
|
|
2932
|
+
position: absolute;
|
|
2933
|
+
opacity: 0;
|
|
2934
|
+
width: 1px;
|
|
2935
|
+
height: 1px;
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
/* Style label container for checkbox */
|
|
2939
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"])) {
|
|
2940
|
+
display: inline-flex;
|
|
2941
|
+
align-items: center;
|
|
2942
|
+
gap: var(--spacing-2);
|
|
2943
|
+
cursor: pointer;
|
|
2944
|
+
user-select: none;
|
|
2945
|
+
position: relative;
|
|
2946
|
+
padding-left: calc(var(--spacing-5) + var(--spacing-3));
|
|
2947
|
+
}
|
|
2948
|
+
|
|
2949
|
+
/* Custom checkbox box using PDS tokens - works with or without span wrapper */
|
|
2950
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"])::before) {
|
|
2951
|
+
content: "";
|
|
2952
|
+
position: absolute;
|
|
2953
|
+
left: 0;
|
|
2954
|
+
top: 50%;
|
|
2955
|
+
transform: translateY(-50%);
|
|
2956
|
+
width: var(--spacing-5);
|
|
2957
|
+
height: var(--spacing-5);
|
|
2958
|
+
border: var(--border-width-md) solid var(--color-border);
|
|
2959
|
+
border-radius: var(--radius-sm);
|
|
2960
|
+
background: var(--color-surface-base);
|
|
2961
|
+
transition: all var(--transition-fast);
|
|
2962
|
+
flex-shrink: 0;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
/* Checkmark */
|
|
2966
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:checked)::after) {
|
|
2967
|
+
content: "";
|
|
2968
|
+
position: absolute;
|
|
2969
|
+
left: var(--spacing-2);
|
|
2970
|
+
top: 50%;
|
|
2971
|
+
transform: translateY(-60%) rotate(45deg);
|
|
2972
|
+
width: var(--spacing-1-5);
|
|
2973
|
+
height: var(--spacing-3);
|
|
2974
|
+
border: solid var(--color-primary-contrast, white);
|
|
2975
|
+
border-width: 0 2px 2px 0;
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
/* Checked state */
|
|
2979
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:checked)::before) {
|
|
2980
|
+
background: var(--color-primary-600);
|
|
2981
|
+
border-color: var(--color-primary-600);
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
/* Focus styles for accessibility */
|
|
2985
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:focus)::before) {
|
|
2986
|
+
outline: 2px solid var(--color-primary-500);
|
|
2987
|
+
outline-offset: 2px;
|
|
2988
|
+
}
|
|
2989
|
+
|
|
2990
|
+
/* Hover effects */
|
|
2991
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:not(:disabled)):hover::before) {
|
|
2992
|
+
border-color: var(--color-primary-600);
|
|
2993
|
+
background: var(--color-surface-subtle);
|
|
2994
|
+
}
|
|
2995
|
+
|
|
2996
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:checked:not(:disabled)):hover::before) {
|
|
2997
|
+
background: var(--color-primary-700);
|
|
2998
|
+
border-color: var(--color-primary-700);
|
|
2999
|
+
}
|
|
3000
|
+
|
|
3001
|
+
/* Disabled state */
|
|
3002
|
+
:where(label:not(fieldset label, .checkbox-container label, [data-toggle]):has(input[type="checkbox"]:disabled)) {
|
|
3003
|
+
opacity: 0.5;
|
|
3004
|
+
cursor: not-allowed;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
3007
|
+
:where(fieldset) {
|
|
3008
|
+
border: none;
|
|
3009
|
+
padding: var(--spacing-4);
|
|
3010
|
+
margin: 0 0 var(--spacing-4) 0;
|
|
3011
|
+
background-color: var(--color-surface-subtle);
|
|
3012
|
+
}
|
|
3013
|
+
|
|
3014
|
+
:where(legend) {
|
|
3015
|
+
display: block;
|
|
3016
|
+
font-weight: var(--font-weight-semibold);
|
|
3017
|
+
padding: 0;
|
|
3018
|
+
color: var(--color-text-primary);
|
|
3019
|
+
font-weight: var(--font-weight-semibold);
|
|
3020
|
+
color: var(--color-text-primary);
|
|
3021
|
+
margin: 0 0 var(--spacing-3) 0;
|
|
3022
|
+
border: none;
|
|
3023
|
+
line-height: var(--font-line-height-tight);
|
|
3024
|
+
font-size: var(--font-size-lg);
|
|
3025
|
+
background: transparent; /* avoid browser default notch behavior */
|
|
3026
|
+
width: auto;
|
|
3027
|
+
box-sizing: border-box;
|
|
3028
|
+
}
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
/* List primitives */
|
|
3032
|
+
:where(ul, ol) {
|
|
3033
|
+
padding-left: var(--spacing-6);
|
|
3034
|
+
margin: var(--spacing-3) 0;
|
|
3035
|
+
}
|
|
3036
|
+
|
|
3037
|
+
:where(li) {
|
|
3038
|
+
margin: var(--spacing-1) 0;
|
|
3039
|
+
}
|
|
3040
|
+
|
|
3041
|
+
/* Typography primitives */
|
|
3042
|
+
:where(h1, h2, h3, h4, h5, h6) {
|
|
3043
|
+
font-family: var(--font-family-headings);
|
|
3044
|
+
font-weight: var(--font-weight-bold);
|
|
3045
|
+
line-height: var(--font-line-height-tight);
|
|
3046
|
+
margin: var(--spacing-4) 0 var(--spacing-3) 0;
|
|
3047
|
+
color: var(--color-text-primary);
|
|
3048
|
+
word-wrap: break-word;
|
|
3049
|
+
hyphens: auto;
|
|
3050
|
+
overflow-wrap: break-word;
|
|
3051
|
+
}
|
|
3052
|
+
|
|
3053
|
+
/* Mobile-first heading sizes */
|
|
3054
|
+
:where(h1) { font-size: var(--font-size-2xl); }
|
|
3055
|
+
:where(h2) { font-size: var(--font-size-xl); }
|
|
3056
|
+
:where(h3) { font-size: var(--font-size-lg); }
|
|
3057
|
+
:where(h4) { font-size: var(--font-size-base); }
|
|
3058
|
+
:where(h5) { font-size: var(--font-size-sm); }
|
|
3059
|
+
:where(h6) { font-size: var(--font-size-xs); }
|
|
3060
|
+
|
|
3061
|
+
/* Scale up on larger screens */
|
|
3062
|
+
@media (min-width: ${i.sm}px) {
|
|
3063
|
+
:where(h1) { font-size: var(--font-size-3xl); }
|
|
3064
|
+
:where(h2) { font-size: var(--font-size-2xl); }
|
|
3065
|
+
:where(h3) { font-size: var(--font-size-xl); }
|
|
3066
|
+
:where(h4) { font-size: var(--font-size-lg); }
|
|
3067
|
+
:where(h5) { font-size: var(--font-size-base); }
|
|
3068
|
+
:where(h6) { font-size: var(--font-size-sm); }
|
|
3069
|
+
}
|
|
3070
|
+
|
|
3071
|
+
:where(p) {
|
|
3072
|
+
margin: var(--spacing-3) 0;
|
|
3073
|
+
line-height: var(--font-line-height-relaxed);
|
|
3074
|
+
color: var(--color-text-primary);
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
/* Code primitives */
|
|
3078
|
+
:where(code) {
|
|
3079
|
+
font-family: var(--font-family-mono, monospace);
|
|
3080
|
+
font-size: 0.9em;
|
|
3081
|
+
background: var(--color-surface-muted);
|
|
3082
|
+
padding: 0.2em 0.4em;
|
|
3083
|
+
border-radius: var(--radius-sm);
|
|
3084
|
+
color: var(--color-text-primary);
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
:where(pre) {
|
|
3088
|
+
font-family: var(--font-family-mono, monospace);
|
|
3089
|
+
background: var(--color-surface-muted);
|
|
3090
|
+
padding: var(--spacing-4);
|
|
3091
|
+
border-radius: var(--radius-md);
|
|
3092
|
+
overflow-x: auto;
|
|
3093
|
+
margin: var(--spacing-4) 0;
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3096
|
+
:where(pre code) {
|
|
3097
|
+
background: none;
|
|
3098
|
+
padding: 0;
|
|
3099
|
+
}
|
|
3100
|
+
|
|
3101
|
+
/* Media primitives */
|
|
3102
|
+
:where(img, video) {
|
|
3103
|
+
max-width: 100%;
|
|
3104
|
+
height: auto;
|
|
3105
|
+
border-radius: var(--radius-sm);
|
|
3106
|
+
}
|
|
3107
|
+
|
|
3108
|
+
:where(figure) {
|
|
3109
|
+
margin: 0 0 var(--spacing-6) 0;
|
|
3110
|
+
}
|
|
3111
|
+
|
|
3112
|
+
:where(figcaption) {
|
|
3113
|
+
margin-top: var(--spacing-3);
|
|
3114
|
+
font-size: var(--font-size-sm);
|
|
3115
|
+
color: var(--color-text-secondary);
|
|
3116
|
+
line-height: var(--font-line-height-relaxed);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
|
|
3120
|
+
:where([hidden]) {
|
|
3121
|
+
display: none !important;
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
|
|
3125
|
+
`}#ye(){return`@layer components {
|
|
3126
|
+
|
|
3127
|
+
${this.#te()}
|
|
3128
|
+
|
|
3129
|
+
${this.#re()}
|
|
3130
|
+
|
|
3131
|
+
${this.#ae()}
|
|
3132
|
+
|
|
3133
|
+
${this.#ie()}
|
|
3134
|
+
|
|
3135
|
+
${this.#se()}
|
|
3136
|
+
|
|
3137
|
+
${this.#ne()}
|
|
3138
|
+
|
|
3139
|
+
${this.#pe()}
|
|
3140
|
+
|
|
3141
|
+
${this.#ce()}
|
|
3142
|
+
|
|
3143
|
+
${this.#oe()}
|
|
3144
|
+
|
|
3145
|
+
/* Card component */
|
|
3146
|
+
|
|
3147
|
+
.card {
|
|
3148
|
+
background: var(--color-surface-base);
|
|
3149
|
+
border-radius: var(--radius-md);
|
|
3150
|
+
padding: var(--spacing-4);
|
|
3151
|
+
|
|
3152
|
+
&-elevated {
|
|
3153
|
+
background: var(--color-surface-elevated);
|
|
3154
|
+
box-shadow: var(--shadow-md);
|
|
3155
|
+
}
|
|
3156
|
+
|
|
3157
|
+
&-outlined,
|
|
3158
|
+
&-basic {
|
|
3159
|
+
background: var(--color-surface-base);
|
|
3160
|
+
border: 1px solid var(--color-border);
|
|
3161
|
+
}
|
|
3162
|
+
|
|
3163
|
+
&-interactive:hover {
|
|
3164
|
+
transform: translateY(-2px);
|
|
3165
|
+
box-shadow: var(--shadow-lg);
|
|
3166
|
+
transition: transform var(--transition-fast), box-shadow var(--transition-fast);
|
|
3167
|
+
}
|
|
3168
|
+
}
|
|
3169
|
+
|
|
3170
|
+
${this.#le()}
|
|
3171
|
+
|
|
3172
|
+
${this.#Y()}
|
|
3173
|
+
|
|
3174
|
+
}
|
|
3175
|
+
`}#ve(){return`@layer utilities {
|
|
3176
|
+
|
|
3177
|
+
${this.#de()}
|
|
3178
|
+
|
|
3179
|
+
${this.#ue()}
|
|
3180
|
+
|
|
3181
|
+
/* Optional utilities/features controlled by config options */
|
|
3182
|
+
/* - Body background mesh rule (applies one of the generated mesh vars) */
|
|
3183
|
+
/* - Liquid glass utility class */
|
|
3184
|
+
${this.#J()}
|
|
3185
|
+
${this.#X()}
|
|
3186
|
+
|
|
3187
|
+
${this.#ee()}
|
|
3188
|
+
|
|
3189
|
+
/* Surface utilities */
|
|
3190
|
+
|
|
3191
|
+
.surface {
|
|
3192
|
+
background-color: var(--color-surface-base);
|
|
3193
|
+
}
|
|
3194
|
+
|
|
3195
|
+
.surface-subtle {
|
|
3196
|
+
background-color: var(--color-surface-subtle);
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
.surface-elevated {
|
|
3200
|
+
background-color: var(--color-surface-elevated);
|
|
3201
|
+
}
|
|
3202
|
+
|
|
3203
|
+
.surface-sunken {
|
|
3204
|
+
background-color: var(--color-surface-sunken);
|
|
3205
|
+
}
|
|
3206
|
+
|
|
3207
|
+
.surface-overlay {
|
|
3208
|
+
background-color: var(--color-surface-overlay);
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
/* Translucent semantic variants */
|
|
3212
|
+
.surface-translucent {
|
|
3213
|
+
background-color: var(--color-surface-translucent-50);
|
|
3214
|
+
}
|
|
3215
|
+
|
|
3216
|
+
.surface-translucent-25 {
|
|
3217
|
+
background-color: var(--color-surface-translucent-25);
|
|
3218
|
+
}
|
|
3219
|
+
|
|
3220
|
+
.surface-translucent-50 {
|
|
3221
|
+
background-color: var(--color-surface-translucent-50);
|
|
3222
|
+
}
|
|
3223
|
+
|
|
3224
|
+
.surface-translucent-75 {
|
|
3225
|
+
background-color: var(--color-surface-translucent-75);
|
|
3226
|
+
}
|
|
3227
|
+
|
|
3228
|
+
/* Legacy utility retained for backwards compatibility (opinionated overlay) */
|
|
3229
|
+
.surface-overlay {
|
|
3230
|
+
padding: var(--spacing-4);
|
|
3231
|
+
background-color: var(--color-surface-overlay);
|
|
3232
|
+
box-shadow: var(--shadow-lg);
|
|
3233
|
+
border-radius: var(--radius-md);
|
|
3234
|
+
}
|
|
3235
|
+
|
|
3236
|
+
|
|
3237
|
+
/* Inverse surface (dark) using PDS tokens; text/icons inherit currentColor */
|
|
3238
|
+
.surface-inverse {
|
|
3239
|
+
background-color: var(--color-surface-inverse);
|
|
3240
|
+
/* Ensure foregrounds inside use the correct smart-surface tokens */
|
|
3241
|
+
color: var(--surface-inverse-text);
|
|
3242
|
+
--color-text-primary: var(--surface-inverse-text);
|
|
3243
|
+
--color-text-secondary: var(--surface-inverse-text-secondary);
|
|
3244
|
+
--color-text-muted: var(--surface-inverse-text-muted);
|
|
3245
|
+
/* Ensure code/pre and other muted surfaces have contrast on inverse */
|
|
3246
|
+
--color-surface-muted: rgba(255, 255, 255, 0.08);
|
|
3247
|
+
/* Optional: adjust borders/shadows if utilities/components read these */
|
|
3248
|
+
--color-border: var(--surface-inverse-border);
|
|
3249
|
+
|
|
3250
|
+
pds-icon {
|
|
3251
|
+
color: var(--surface-inverse-icon);
|
|
3252
|
+
}
|
|
3253
|
+
}
|
|
3254
|
+
|
|
3255
|
+
/* Shadow utilities */
|
|
3256
|
+
.shadow-sm {
|
|
3257
|
+
box-shadow: var(--shadow-sm);
|
|
3258
|
+
}
|
|
3259
|
+
|
|
3260
|
+
.shadow-base, .shadow {
|
|
3261
|
+
box-shadow: var(--shadow-base);
|
|
3262
|
+
}
|
|
3263
|
+
|
|
3264
|
+
.shadow-md {
|
|
3265
|
+
box-shadow: var(--shadow-md);
|
|
3266
|
+
}
|
|
3267
|
+
|
|
3268
|
+
.shadow-lg {
|
|
3269
|
+
box-shadow: var(--shadow-lg);
|
|
3270
|
+
}
|
|
3271
|
+
|
|
3272
|
+
.shadow-xl {
|
|
3273
|
+
box-shadow: var(--shadow-xl);
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
.shadow-inner {
|
|
3277
|
+
box-shadow: var(--shadow-inner);
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
.shadow-none {
|
|
3281
|
+
box-shadow: none;
|
|
3282
|
+
}
|
|
3283
|
+
|
|
3284
|
+
.text-muted {
|
|
3285
|
+
color: var(--color-text-muted);
|
|
3286
|
+
}
|
|
3287
|
+
|
|
3288
|
+
|
|
3289
|
+
${this.#he()}
|
|
3290
|
+
|
|
3291
|
+
${this.#ge()}
|
|
3292
|
+
|
|
3293
|
+
}
|
|
3294
|
+
`}#xe(){this.#o={tokens:new CSSStyleSheet,primitives:new CSSStyleSheet,components:new CSSStyleSheet,utilities:new CSSStyleSheet},this.#we()}#we(){this.#o.tokens.replaceSync(this.#e.tokens),this.#o.primitives.replaceSync(this.#e.primitives),this.#o.components.replaceSync(this.#e.components),this.#o.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}
|
|
3295
|
+
${this.#e.primitives}
|
|
3296
|
+
${this.#e.components}
|
|
3297
|
+
${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 oe<"u"?oe: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 e=[],t=this.tokens.colors;for(let[o,r]of Object.entries(t))typeof r=="object"&&r!==null&&e.push({name:o,scale:r});return e},getColorScale:e=>this.tokens.colors[e]||null,getSpacingValues:()=>Object.entries(this.tokens.spacing).map(([e,t])=>({key:e,value:t})),getTypography:()=>this.tokens.typography,getLayerCSS:e=>{let t=["tokens","primitives","components","utilities"];if(!t.includes(e))throw new Error(`Invalid layer: ${e}. Must be one of ${t.join(", ")}`);return this.#e?.[e]||""},usesEnumValue:(e,t)=>{let o=this.options.design||{};return JSON.stringify(o).includes(t)}}}}get tokensStylesheet(){return this.#o?.tokens}get primitivesStylesheet(){return this.#o?.primitives}get componentsStylesheet(){return this.#o?.components}get utilitiesStylesheet(){return this.#o?.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(e,t){let o=t.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$");return`// Pure Design System - ${e}
|
|
3298
|
+
// Auto-generated - do not edit directly
|
|
3299
|
+
|
|
3300
|
+
export const ${e} = new CSSStyleSheet();
|
|
3301
|
+
${e}.replaceSync(\`${o}\`);
|
|
3302
|
+
|
|
3303
|
+
export const ${e}CSS = \`${o}\`;
|
|
3304
|
+
`}static applyStyles(e){if(!e||typeof e!="object"){e?.options?.log?.("error","[Generator] applyStyles requires a generator object");return}let t=e.layeredCSS||e.css||"";if(!t){e?.options?.log?.("warn","[Generator] No CSS available on designer to apply");return}n.installRuntimeStyles(t)}static installRuntimeStyles(e){try{if(typeof document>"u")return;if(typeof CSSStyleSheet<"u"&&"adoptedStyleSheets"in Document.prototype){let r=new CSSStyleSheet;r.replaceSync(e),r._pds=!0;let a=(document.adoptedStyleSheets||[]).filter(i=>i._pds!==!0);document.adoptedStyleSheets=[...a,r],n.__pdsRuntimeSheet=r;return}let t="pds-runtime-stylesheet",o=document.getElementById(t);if(!o){o=document.createElement("style"),o.id=t,o.type="text/css";let r=document.head||document.getElementsByTagName("head")[0];r?r.appendChild(o):document.documentElement.appendChild(o)}o.textContent=e}catch(t){console.warn("Generator.installRuntimeStyles failed:",t)}}};async function Oe(n,e=[]){try{let t=await PDS.registry.getStylesheet("primitives");if(n.adoptedStyleSheets=[t,...e],PDS.registry.isLive){let o=n.host?.tagName?.toLowerCase()||"unknown"}}catch(t){let o=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt primitives:`,t),n.adoptedStyleSheets=e}}async function Ie(n,e=["primitives"],t=[]){try{let r=(await Promise.all(e.map(a=>PDS.registry.getStylesheet(a)))).filter(a=>a!==null);if(n.adoptedStyleSheets=[...r,...t],PDS.registry.isLive){let a=n.host?.tagName?.toLowerCase()||"unknown"}}catch(o){let r=n.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt layers:`,o),n.adoptedStyleSheets=t}}function He(n){let e=new CSSStyleSheet;return e.replaceSync(n),e}function Ge(){return pdsRegistry.isLive}var be=class{constructor(){this._mode="static",this._designer=null,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"}}setDesigner(e,t={}){this._designer=e,this._mode="live";let o=t?.presetName;o?e?.options?.log?.("log",`PDS live with preset "${o}"`):e?.options?.log?.("log","PDS live with custom config")}setStaticMode(e={}){this._mode="static",this._staticPaths={...this._staticPaths,...e},console.log("[PDS Registry] Switched to STATIC mode",this._staticPaths)}async getStylesheet(e){if(this._mode==="live"&&this._designer)switch(e){case"tokens":return this._designer.tokensStylesheet;case"primitives":return this._designer.primitivesStylesheet;case"components":return this._designer.componentsStylesheet;case"utilities":return this._designer.utilitiesStylesheet;default:return this._designer?.options?.log?.("warn",`[PDS Registry] Unknown layer: ${e}`),null}else try{return(await import(this._staticPaths[e]))[e]}catch(t){console.error(`[PDS Registry] Failed to load static ${e}:`,t),console.error(`[PDS Registry] Looking for: ${this._staticPaths[e]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:export' and configured PDS.start() with the correct static.root path");let o=new CSSStyleSheet;return o.replaceSync("/* Failed to load "+e+" */"),o}}get mode(){return this._mode}get isLive(){return this._mode==="live"&&this._designer!==null}get hasDesigner(){return this._designer!==null}},qe=new be;var C={"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,backgroundMesh:2},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}}};C.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,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 ne(n="log",e,...t){if(this?.debug||this?.design?.debug||!1||n==="error"||n==="warn"){let r=console[n]||console.log;t.length>0?r(e,...t):r(e)}}var ie=globalThis,ce=ie.ShadowRoot&&(ie.ShadyCSS===void 0||ie.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ke=Symbol(),Ve=new WeakMap,se=class{constructor(e,t,o){if(this._$cssResult$=!0,o!==Ke)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o,t=this.t;if(ce&&e===void 0){let o=t!==void 0&&t.length===1;o&&(e=Ve.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),o&&Ve.set(t,e))}return e}toString(){return this.cssText}},Ze=n=>new se(typeof n=="string"?n:n+"",void 0,Ke);var Qe=(n,e)=>{if(ce)n.adoptedStyleSheets=e.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(let t of e){let o=document.createElement("style"),r=ie.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=t.cssText,n.appendChild(o)}},ye=ce?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(let o of e.cssRules)t+=o.cssText;return Ze(t)})(n):n;var{is:Ft,defineProperty:Rt,getOwnPropertyDescriptor:Pt,getOwnPropertyNames:Dt,getOwnPropertySymbols:Bt,getPrototypeOf:Wt}=Object,le=globalThis,Ye=le.trustedTypes,Ut=Ye?Ye.emptyScript:"",jt=le.reactiveElementPolyfillSupport,q=(n,e)=>n,ve={toAttribute(n,e){switch(e){case Boolean:n=n?Ut:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Xe=(n,e)=>!Ft(n,e),Je={attribute:!0,type:String,converter:ve,reflect:!1,useDefault:!1,hasChanged:Xe};Symbol.metadata??=Symbol("metadata"),le.litPropertyMetadata??=new WeakMap;var L=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,t=Je){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(e,o,t);r!==void 0&&Rt(this.prototype,e,r)}}static getPropertyDescriptor(e,t,o){let{get:r,set:a}=Pt(this.prototype,e)??{get(){return this[t]},set(i){this[t]=i}};return{get:r,set(i){let s=r?.call(this);a?.call(this,i),this.requestUpdate(e,s,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??Je}static _$Ei(){if(this.hasOwnProperty(q("elementProperties")))return;let e=Wt(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(q("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(q("properties"))){let t=this.properties,o=[...Dt(t),...Bt(t)];for(let r of o)this.createProperty(r,t[r])}let e=this[Symbol.metadata];if(e!==null){let t=litPropertyMetadata.get(e);if(t!==void 0)for(let[o,r]of t)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[t,o]of this.elementProperties){let r=this._$Eu(t,o);r!==void 0&&this._$Eh.set(r,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){let t=[];if(Array.isArray(e)){let o=new Set(e.flat(1/0).reverse());for(let r of o)t.unshift(ye(r))}else e!==void 0&&t.push(ye(e));return t}static _$Eu(e,t){let o=t.attribute;return o===!1?void 0:typeof o=="string"?o:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(e=>e(this))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){let e=new Map,t=this.constructor.elementProperties;for(let o of t.keys())this.hasOwnProperty(o)&&(e.set(o,this[o]),delete this[o]);e.size>0&&(this._$Ep=e)}createRenderRoot(){let e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Qe(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,o){this._$AK(e,o)}_$ET(e,t){let o=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,o);if(r!==void 0&&o.reflect===!0){let a=(o.converter?.toAttribute!==void 0?o.converter:ve).toAttribute(t,o.type);this._$Em=e,a==null?this.removeAttribute(r):this.setAttribute(r,a),this._$Em=null}}_$AK(e,t){let o=this.constructor,r=o._$Eh.get(e);if(r!==void 0&&this._$Em!==r){let a=o.getPropertyOptions(r),i=typeof a.converter=="function"?{fromAttribute:a.converter}:a.converter?.fromAttribute!==void 0?a.converter:ve;this._$Em=r;let s=i.fromAttribute(t,a.type);this[r]=s??this._$Ej?.get(r)??s,this._$Em=null}}requestUpdate(e,t,o){if(e!==void 0){let r=this.constructor,a=this[e];if(o??=r.getPropertyOptions(e),!((o.hasChanged??Xe)(a,t)||o.useDefault&&o.reflect&&a===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,o))))return;this.C(e,t,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:o,reflect:r,wrapped:a},i){o&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,i??t??this[e]),a!==!0||i!==void 0)||(this._$AL.has(e)||(this.hasUpdated||o||(t=void 0),this._$AL.set(e,t)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}let e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,a]of this._$Ep)this[r]=a;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,a]of o){let{wrapped:i}=a,s=this[r];i!==!0||this._$AL.has(r)||s===void 0||this.C(r,void 0,a,s)}}let e=!1,t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(t)):this._$EM()}catch(o){throw e=!1,this._$EM(),o}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM()}updated(e){}firstUpdated(e){}};L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[q("elementProperties")]=new Map,L[q("finalized")]=new Map,jt?.({ReactiveElement:L}),(le.reactiveElementVersions??=[]).push("2.1.1");var Ee=globalThis,de=Ee.trustedTypes,et=de?de.createPolicy("lit-html",{createHTML:n=>n}):void 0,it="$lit$",R=`lit$${Math.random().toFixed(9).slice(2)}$`,st="?"+R,Nt=`<${st}>`,W=document,K=()=>W.createComment(""),Z=n=>n===null||typeof n!="object"&&typeof n!="function",Me=Array.isArray,Ot=n=>Me(n)||typeof n?.[Symbol.iterator]=="function",xe=`[
|
|
3305
|
+
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,tt=/-->/g,rt=/>/g,D=RegExp(`>|${xe}(?:([^\\s"'>=/]+)(${xe}*=${xe}*(?:[^
|
|
3306
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ot=/'/g,at=/"/g,ct=/^(?:script|style|textarea|title)$/i,Ae=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Ar=Ae(1),Cr=Ae(2),_r=Ae(3),U=Symbol.for("lit-noChange"),k=Symbol.for("lit-nothing"),nt=new WeakMap,B=W.createTreeWalker(W,129);function lt(n,e){if(!Me(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return et!==void 0?et.createHTML(e):e}var It=(n,e)=>{let t=n.length-1,o=[],r,a=e===2?"<svg>":e===3?"<math>":"",i=V;for(let s=0;s<t;s++){let c=n[s],l,d,p=-1,h=0;for(;h<c.length&&(i.lastIndex=h,d=i.exec(c),d!==null);)h=i.lastIndex,i===V?d[1]==="!--"?i=tt:d[1]!==void 0?i=rt:d[2]!==void 0?(ct.test(d[2])&&(r=RegExp("</"+d[2],"g")),i=D):d[3]!==void 0&&(i=D):i===D?d[0]===">"?(i=r??V,p=-1):d[1]===void 0?p=-2:(p=i.lastIndex-d[2].length,l=d[1],i=d[3]===void 0?D:d[3]==='"'?at:ot):i===at||i===ot?i=D:i===tt||i===rt?i=V:(i=D,r=void 0);let g=i===D&&n[s+1].startsWith("/>")?" ":"";a+=i===V?c+Nt:p>=0?(o.push(l),c.slice(0,p)+it+c.slice(p)+R+g):c+R+(p===-2?s:g)}return[lt(n,a+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),o]},Q=class n{constructor({strings:e,_$litType$:t},o){let r;this.parts=[];let a=0,i=0,s=e.length-1,c=this.parts,[l,d]=It(e,t);if(this.el=n.createElement(l,o),B.currentNode=this.el.content,t===2||t===3){let p=this.el.content.firstChild;p.replaceWith(...p.childNodes)}for(;(r=B.nextNode())!==null&&c.length<s;){if(r.nodeType===1){if(r.hasAttributes())for(let p of r.getAttributeNames())if(p.endsWith(it)){let h=d[i++],g=r.getAttribute(p).split(R),x=/([.?@])?(.*)/.exec(h);c.push({type:1,index:a,name:x[2],strings:g,ctor:x[1]==="."?ke:x[1]==="?"?Se:x[1]==="@"?$e:H}),r.removeAttribute(p)}else p.startsWith(R)&&(c.push({type:6,index:a}),r.removeAttribute(p));if(ct.test(r.tagName)){let p=r.textContent.split(R),h=p.length-1;if(h>0){r.textContent=de?de.emptyScript:"";for(let g=0;g<h;g++)r.append(p[g],K()),B.nextNode(),c.push({type:2,index:++a});r.append(p[h],K())}}}else if(r.nodeType===8)if(r.data===st)c.push({type:2,index:a});else{let p=-1;for(;(p=r.data.indexOf(R,p+1))!==-1;)c.push({type:7,index:a}),p+=R.length-1}a++}}static createElement(e,t){let o=W.createElement("template");return o.innerHTML=e,o}};function I(n,e,t=n,o){if(e===U)return e;let r=o!==void 0?t._$Co?.[o]:t._$Cl,a=Z(e)?void 0:e._$litDirective$;return r?.constructor!==a&&(r?._$AO?.(!1),a===void 0?r=void 0:(r=new a(n),r._$AT(n,t,o)),o!==void 0?(t._$Co??=[])[o]=r:t._$Cl=r),r!==void 0&&(e=I(n,r._$AS(n,e.values),r,o)),e}var we=class{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){let{el:{content:t},parts:o}=this._$AD,r=(e?.creationScope??W).importNode(t,!0);B.currentNode=r;let a=B.nextNode(),i=0,s=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new Y(a,a.nextSibling,this,e):c.type===1?l=new c.ctor(a,c.name,c.strings,this,e):c.type===6&&(l=new ze(a,this,e)),this._$AV.push(l),c=o[++s]}i!==c?.index&&(a=B.nextNode(),i++)}return B.currentNode=W,r}p(e){let t=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(e,o,t),t+=o.strings.length-2):o._$AI(e[t])),t++}},Y=class n{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,o,r){this.type=2,this._$AH=k,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode,t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=I(this,e,t),Z(e)?e===k||e==null||e===""?(this._$AH!==k&&this._$AR(),this._$AH=k):e!==this._$AH&&e!==U&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ot(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==k&&Z(this._$AH)?this._$AA.nextSibling.data=e:this.T(W.createTextNode(e)),this._$AH=e}$(e){let{values:t,_$litType$:o}=e,r=typeof o=="number"?this._$AC(e):(o.el===void 0&&(o.el=Q.createElement(lt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(t);else{let a=new we(r,this),i=a.u(this.options);a.p(t),this.T(i),this._$AH=a}}_$AC(e){let t=nt.get(e.strings);return t===void 0&&nt.set(e.strings,t=new Q(e)),t}k(e){Me(this._$AH)||(this._$AH=[],this._$AR());let t=this._$AH,o,r=0;for(let a of e)r===t.length?t.push(o=new n(this.O(K()),this.O(K()),this,this.options)):o=t[r],o._$AI(a),r++;r<t.length&&(this._$AR(o&&o._$AB.nextSibling,r),t.length=r)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){let o=e.nextSibling;e.remove(),e=o}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}},H=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,o,r,a){this.type=1,this._$AH=k,this._$AN=void 0,this.element=e,this.name=t,this._$AM=r,this.options=a,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=k}_$AI(e,t=this,o,r){let a=this.strings,i=!1;if(a===void 0)e=I(this,e,t,0),i=!Z(e)||e!==this._$AH&&e!==U,i&&(this._$AH=e);else{let s=e,c,l;for(e=a[0],c=0;c<a.length-1;c++)l=I(this,s[o+c],t,c),l===U&&(l=this._$AH[c]),i||=!Z(l)||l!==this._$AH[c],l===k?e=k:e!==k&&(e+=(l??"")+a[c+1]),this._$AH[c]=l}i&&!r&&this.j(e)}j(e){e===k?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}},ke=class extends H{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===k?void 0:e}},Se=class extends H{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==k)}},$e=class extends H{constructor(e,t,o,r,a){super(e,t,o,r,a),this.type=5}_$AI(e,t=this){if((e=I(this,e,t,0)??k)===U)return;let o=this._$AH,r=e===k&&o!==k||e.capture!==o.capture||e.once!==o.once||e.passive!==o.passive,a=e!==k&&(o===k||r);r&&this.element.removeEventListener(this.name,this,o),a&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}},ze=class{constructor(e,t,o){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(e){I(this,e)}};var Ht=Ee.litHtmlPolyfillSupport;Ht?.(Q,Y),(Ee.litHtmlVersions??=[]).push("3.3.1");var j=(n,e,t)=>{let o=t?.renderBefore??e,r=o._$litPart$;if(r===void 0){let a=t?.renderBefore??null;o._$litPart$=r=new Y(e.insertBefore(K(),a),a,void 0,t??{})}return r._$AI(n),r};var Ce=globalThis,G=class extends L{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){let t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=j(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return U}};G._$litElement$=!0,G.finalized=!0,Ce.litElementHydrateSupport?.({LitElement:G});var Gt=Ce.litElementPolyfillSupport;Gt?.({LitElement:G});(Ce.litElementVersions??=[]).push("4.2.1");var dt={mode:"live",preset:"default",static:{root:"public/assets/pds/"},autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(n,e,...t){console[n](e,...t)}};async function pt(n,e={}){return e={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...e},new Promise(o=>{let r=document.createElement("dialog");dt.options?.liquidGlassEffects&&r.classList.add("liquid-glass"),e.size&&r.classList.add(`dialog-${e.size}`),e.type&&r.classList.add(`dialog-${e.type}`),e.class&&(Array.isArray(e.class)?r.classList.add(...e.class):r.classList.add(e.class));let a=Object.entries(e.buttons).map(([s,c])=>{let l=c.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${c.cancel?"button":"submit"}" class="${l}" value="${s}">${c.name}</button>`});if(e.useForm){r.innerHTML=`
|
|
3307
|
+
<header>
|
|
3308
|
+
<h2>${e.title}</h2>
|
|
3309
|
+
</header>
|
|
3310
|
+
|
|
3311
|
+
<article id="msg-container"></article>
|
|
3312
|
+
`;let s=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?j(n,s):typeof n=="string"?s.textContent=n:j(n,s),requestAnimationFrame(()=>{let c=r.querySelector("form");if(c){let l=document.createElement("footer");l.innerHTML=a.join(""),c.appendChild(l)}})}else{r.innerHTML=`
|
|
3313
|
+
<form method="dialog">
|
|
3314
|
+
<header>
|
|
3315
|
+
<h2>${e.title}</h2>
|
|
3316
|
+
</header>
|
|
3317
|
+
|
|
3318
|
+
<article id="msg-container"></article>
|
|
3319
|
+
|
|
3320
|
+
<footer>
|
|
3321
|
+
${a.join("")}
|
|
3322
|
+
</footer>
|
|
3323
|
+
</form>
|
|
3324
|
+
`;let s=r.querySelector("#msg-container");typeof n=="object"&&n._$litType$?j(n,s):typeof n=="string"?s.textContent=n:j(n,s)}r.addEventListener("click",s=>{s.target.closest('button[value="cancel"]')&&(r.close(),o(!1))});let i=()=>{let s=r.querySelector("form");s?s.addEventListener("submit",c=>{c.preventDefault();let l;e.useForm&&c.submitter.value==="ok"?(console.log("Found form:",s),console.log("Form elements:",s?Array.from(s.elements):"no form"),l=new FormData(s),console.log("FormData entries:",Array.from(l.entries()))):l=c.submitter.value==="ok",r.close(),o(l)}):requestAnimationFrame(i)};i(),r.addEventListener("close",()=>{setTimeout(()=>r.remove(),200)}),document.body.appendChild(r),typeof e.rendered=="function"&&e.rendered(r),r.showModal()})}var pe=class{constructor(e){this.pds=e,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(e){if(!e||e.length<2)return[];let t=e.toLowerCase().trim(),o=this.tokenize(t),r=this.analyzeQuery(o,t),a=[];r.intents.has("color")&&a.push(...this.queryColors(r,t)),(r.intents.has("utility")||r.intents.has("border")||r.intents.has("layout")||t.includes("class"))&&a.push(...this.queryUtilities(r,t)),(r.intents.has("component")||r.entities.size>0)&&a.push(...this.queryComponents(r,t)),(r.intents.has("layout")||r.intents.has("pattern"))&&a.push(...this.queryPatterns(r,t)),r.intents.has("typography")&&a.push(...this.queryTypography(r,t)),r.intents.has("spacing")&&a.push(...this.querySpacing(r,t));let i=new Map;for(let s of a){let c=s.value;(!i.has(c)||i.get(c).score<s.score)&&i.set(c,s)}return Array.from(i.values()).sort((s,c)=>c.score-s.score).slice(0,10)}tokenize(e){return e.toLowerCase().replace(/[?!.]/g,"").split(/\s+/).filter(t=>t.length>0)}analyzeQuery(e,t){let o={intents:new Set,entities:new Set,modifiers:new Set,isQuestion:!1,tokens:e,fullText:t};o.isQuestion=this.questionWords.some(r=>e.includes(r));for(let[r,a]of Object.entries(this.intents))a.some(i=>e.includes(i)||t.includes(i))&&o.intents.add(r);for(let[r,a]of Object.entries(this.entities))a.some(i=>e.includes(i)||t.includes(i))&&o.entities.add(r);return(e.includes("hover")||t.includes("hover"))&&o.modifiers.add("hover"),(e.includes("focus")||t.includes("focus"))&&o.modifiers.add("focus"),(e.includes("active")||t.includes("active"))&&o.modifiers.add("active"),(e.includes("disabled")||t.includes("disabled"))&&o.modifiers.add("disabled"),o}queryColors(e,t){let o=[],r=this.pds.compiled;if(!r?.tokens?.colors)return o;let a=r.tokens.colors,i=Array.from(e.entities),s=Array.from(e.modifiers);if(s.includes("focus")&&e.intents.has("border")&&i.includes("input")&&o.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"}),(t.includes("foreground")||t.includes("text"))&&(t.includes("surface")||e.entities.has("surface"))&&(o.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"}),o.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"})),t.includes("primary")||t.includes("accent")||t.includes("secondary")){let c=t.includes("primary")?"primary":t.includes("accent")?"accent":"secondary";for(let l of[500,600,700]){let d=`--color-${c}-${l}`;o.push({text:`${c.charAt(0).toUpperCase()+c.slice(1)} ${l}: var(${d})`,value:d,icon:"palette",category:"Color Scale",score:80-(l-500)/100,cssVar:`var(${d})`,description:`${c} color scale shade ${l}`})}}if(i.includes("button")&&e.intents.has("color")){let c=s[0];c?o.push({text:`Button ${c} fill: var(--primary-fill-${c})`,value:`--primary-fill-${c}`,icon:"palette",category:"Interactive Token",score:92,description:`Button background color in ${c} state`}):o.push({text:"Button fill: var(--primary-fill)",value:"--primary-fill",icon:"palette",category:"Interactive Token",score:88,description:"Default button background color"})}return o}queryUtilities(e,t){let o=[],r=this.pds.ontology;if(!r?.utilities)return o;let a=r.utilities;return e.intents.has("border")&&a.filter(s=>s.includes("border")||s.includes("outline")).forEach(s=>{let c=80;t.includes("gradient")&&s.includes("gradient")&&(c=95),t.includes("glow")&&s.includes("glow")&&(c=95),o.push({text:`${s} - Border utility class`,value:s,icon:"code",category:"Utility Class",score:c,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),e.intents.has("layout")&&a.filter(s=>s.includes("flex")||s.includes("grid")||s.includes("items-")||s.includes("justify-")||s.includes("gap-")).forEach(s=>{o.push({text:`${s} - Layout utility`,value:s,icon:"layout",category:"Utility Class",score:85,code:`<div class="${s}">...</div>`,description:this.describeUtility(s)})}),t.includes("group")&&e.entities.has("button")&&o.push({text:".btn-group - Group buttons together",value:".btn-group",icon:"code",category:"Utility Class",score:90,code:`<div class="btn-group">
|
|
3325
|
+
<button class="btn-primary">One</button>
|
|
3326
|
+
<button class="btn-primary">Two</button>
|
|
3327
|
+
</div>`,description:"Container for grouped buttons with connected styling"}),o}queryComponents(e,t){let o=[],r=this.pds.ontology;return!r?.components&&!r?.primitives||(r.components&&r.components.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id);i>50&&o.push({text:`<${a.id}> - ${a.name}`,value:a.id,icon:"brackets-curly",category:"Web Component",score:i,code:`<${a.id}></${a.id}>`,description:a.description||`${a.name} web component`})}),r.primitives&&r.primitives.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id);if(i>50){let s=a.selectors?.[0]||a.id;o.push({text:`${s} - ${a.name}`,value:a.id,icon:"tag",category:"Primitive",score:i-5,code:this.generatePrimitiveExample(a),description:a.description||`${a.name} primitive element`})}}),t.includes("icon")&&(t.includes("only")||t.includes("button"))&&o.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">
|
|
3328
|
+
<pds-icon icon="heart"></pds-icon>
|
|
3329
|
+
</button>`,description:"Button with only an icon, no text label"})),o}queryPatterns(e,t){let o=[],r=this.pds.ontology;return r?.layoutPatterns&&(r.layoutPatterns.forEach(a=>{let i=this.scoreMatch(t,a.name+" "+a.id+" "+(a.description||""));if(i>50){let s=a.selectors?.[0]||`.${a.id}`;o.push({text:`${a.name} - ${a.description||"Layout pattern"}`,value:a.id,icon:"layout",category:"Layout Pattern",score:i,code:`<div class="${s.replace(".","")}">
|
|
3330
|
+
<!-- content -->
|
|
3331
|
+
</div>`,description:a.description||a.name})}}),(t.includes("container")||t.includes("group"))&&(o.push({text:"Card - Container for grouping content",value:"card",icon:"layout",category:"Primitive",score:88,code:`<article class="card">
|
|
3332
|
+
<header>
|
|
3333
|
+
<h3>Title</h3>
|
|
3334
|
+
</header>
|
|
3335
|
+
<p>Content...</p>
|
|
3336
|
+
</article>`,description:"Card container with optional header, body, and footer"}),o.push({text:"Section - Semantic container for grouping",value:"section",icon:"layout",category:"Pattern",score:85,code:`<section>
|
|
3337
|
+
<h2>Section Title</h2>
|
|
3338
|
+
<!-- content -->
|
|
3339
|
+
</section>`,description:"Semantic section element for content grouping"}))),o}queryTypography(e,t){let o=[],r=this.pds.compiled;if(!r?.tokens?.typography)return o;let a=r.tokens.typography;return(t.includes("heading")||t.includes("title"))&&o.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"}),(t.includes("body")||t.includes("text"))&&o.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"}),o}querySpacing(e,t){let o=[],r=this.pds.compiled;if(!r?.tokens?.spacing)return o;let a=r.tokens.spacing;for(let[i,s]of Object.entries(a))["2","4","6","8"].includes(i)&&o.push({text:`Spacing ${i}: var(--spacing-${i})`,value:`--spacing-${i}`,icon:"ruler",category:"Spacing Token",score:75,cssVar:`var(--spacing-${i})`,description:`Spacing value: ${s}`});return o}scoreMatch(e,t){let o=e.toLowerCase(),r=t.toLowerCase(),a=0;if(o===r)return 100;r.includes(o)&&(a+=80);let i=this.tokenize(o),s=this.tokenize(r),c=i.filter(l=>s.includes(l)).length;return a+=c/i.length*40,r.startsWith(o)&&(a+=20),Math.min(100,a)}generatePrimitiveExample(e){let t=e.selectors?.[0]||e.id;return t.includes("button")||e.id==="button"?'<button class="btn-primary">Click me</button>':t.includes("card")||e.id==="card"?`<article class="card">
|
|
3340
|
+
<h3>Title</h3>
|
|
3341
|
+
<p>Content</p>
|
|
3342
|
+
</article>`:t.includes("badge")||e.id==="badge"?'<span class="badge">New</span>':`<${t}>Content</${t}>`}describeUtility(e){return e.includes("border-gradient")?"Apply animated gradient border effect":e.includes("border-glow")?"Apply glowing border effect":e.includes("flex")?"Flexbox container utility":e.includes("grid")?"Grid container utility":e.includes("gap-")?"Set gap between flex/grid children":e.includes("items-")?"Align items in flex container":e.includes("justify-")?"Justify content in flex container":e===".btn-group"?"Group buttons with connected styling":"Utility class for styling"}};var _e={};We(_e,{deepMerge:()=>ut,isObject:()=>ue});function ue(n){return n&&typeof n=="object"&&!Array.isArray(n)}function ut(n,e){let t={...n};return ue(n)&&ue(e)&&Object.keys(e).forEach(o=>{ue(e[o])?o in n?t[o]=ut(n[o],e[o]):Object.assign(t,{[o]:e[o]}):Object.assign(t,{[o]:e[o]})}),t}var ht=[{selector:"nav[data-dropdown]",description:"Enhances a nav element with data-dropdown to function as a dropdown menu.",demoHtml:`
|
|
3343
|
+
<nav data-dropdown>
|
|
3344
|
+
<button class="btn-primary">Menu</button>
|
|
3345
|
+
<menu>
|
|
3346
|
+
<li><a href="#">Item 1</a></li>
|
|
3347
|
+
<li><a href="#">Item 2</a></li>
|
|
3348
|
+
</menu>
|
|
3349
|
+
</nav>
|
|
3350
|
+
`.trim()},{selector:"label[data-toggle]",description:"Creates a toggle switch element from a checkbox.",demoHtml:`
|
|
3351
|
+
<label data-toggle>
|
|
3352
|
+
<input type="checkbox">
|
|
3353
|
+
<span data-label>Enable notifications</span>
|
|
3354
|
+
</label>
|
|
3355
|
+
`.trim()},{selector:'input[type="range"]',description:"Enhances range inputs with an attached <output>.",demoHtml:`
|
|
3356
|
+
<label class="range-output">
|
|
3357
|
+
<span data-label>Volume</span>
|
|
3358
|
+
<input type="range" min="0" max="100" value="40">
|
|
3359
|
+
</label>
|
|
3360
|
+
`.trim()},{selector:"form [required]",description:"Enhances required form fields using an asterisk in the label.",demoHtml:`
|
|
3361
|
+
<form action'#" method="post">
|
|
3362
|
+
<label>
|
|
3363
|
+
<span>Field Label</span>
|
|
3364
|
+
<input type="text" required>
|
|
3365
|
+
</label>
|
|
3366
|
+
<nav class="form-actions">
|
|
3367
|
+
<button type="submit" class="btn-primary">Submit</button>
|
|
3368
|
+
</nav>
|
|
3369
|
+
</form>
|
|
3370
|
+
`.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:`
|
|
3371
|
+
<fieldset role="group" data-open>
|
|
3372
|
+
<label>
|
|
3373
|
+
<span data-label>Test</span>
|
|
3374
|
+
<input value="lala" name="test1" type="radio" />
|
|
3375
|
+
</label>
|
|
3376
|
+
</fieldset>
|
|
3377
|
+
`.trim()},{selector:"button, a[class*='btn-']",description:"Automatically manages spinner icon for buttons with .btn-working class",demoHtml:`
|
|
3378
|
+
<button class="btn-primary btn-working">
|
|
3379
|
+
<span>Saving</span>
|
|
3380
|
+
</button>
|
|
3381
|
+
`.trim()}];function qt(n){if(n.dataset.enhancedDropdown)return;n.dataset.enhancedDropdown="true";let e=n.querySelector("menu");if(!e)return;let t=n.querySelector("[data-dropdown-toggle]")||n.querySelector("button");t&&!t.hasAttribute("type")&&t.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),e.setAttribute("role",e.getAttribute("role")||"menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-controls",e.id),t.setAttribute("aria-expanded","false"));let o=()=>{let s=(n.getAttribute("data-mode")||"auto").toLowerCase();if(s==="up"||s==="down")return s;let c=n.getBoundingClientRect(),l=Math.max(0,window.innerHeight-c.bottom);return Math.max(0,c.top)>l?"up":"down"},r=()=>{n.dataset.dropdownDirection=o(),e.setAttribute("aria-hidden","false"),t?.setAttribute("aria-expanded","true")},a=()=>{e.setAttribute("aria-hidden","true"),t?.setAttribute("aria-expanded","false")},i=()=>{e.getAttribute("aria-hidden")==="false"?a():r()};t?.addEventListener("click",s=>{s.preventDefault(),s.stopPropagation(),i()}),document.addEventListener("click",s=>{n.contains(s.target)||a()}),n.addEventListener("keydown",s=>{s.key==="Escape"&&(a(),t?.focus())}),n.addEventListener("focusout",s=>{(!s.relatedTarget||!n.contains(s.relatedTarget))&&a()})}function Vt(n){if(n.dataset.enhancedToggle)return;n.dataset.enhancedToggle="true";let e=n.querySelector('input[type="checkbox"]');if(!e)return;n.hasAttribute("tabindex")||n.setAttribute("tabindex","0"),n.setAttribute("role","switch"),n.setAttribute("aria-checked",e.checked?"true":"false");let t=document.createElement("span");t.className="toggle-switch",t.setAttribute("role","presentation"),t.setAttribute("aria-hidden","true");let o=document.createElement("span");o.className="toggle-knob",t.appendChild(o),n.insertBefore(t,e.nextSibling);let r=()=>{n.setAttribute("aria-checked",e.checked?"true":"false")},a=()=>{e.disabled||(e.checked=!e.checked,r(),e.dispatchEvent(new Event("change",{bubbles:!0})))};n.addEventListener("click",i=>{i.preventDefault(),a()}),n.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),a())}),e.addEventListener("change",r)}function Kt(n){if(n.dataset.enhancedRange)return;let e=n.closest("label"),t=e?.classList.contains("range-output"),o=n.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${o}-output`;if(n.id=o,t){let a=e.querySelector("span");if(a&&!a.classList.contains("range-output-wrapper")){let i=document.createElement("span");i.className="range-output-wrapper",i.style.display="flex",i.style.justifyContent="space-between",i.style.alignItems="center";let s=document.createElement("span");s.textContent=a.textContent,i.appendChild(s);let c=document.createElement("output");c.id=r,c.setAttribute("for",o),c.style.color="var(--surface-text-secondary, var(--color-text-secondary))",c.style.fontSize="0.875rem",c.textContent=n.value,i.appendChild(c),a.textContent="",a.appendChild(i);let l=()=>{c.textContent=n.value};n.addEventListener("input",l)}}else{let a=n.closest(".range-container");a||(a=document.createElement("div"),a.className="range-container",n.parentNode?.insertBefore(a,n),a.appendChild(n)),a.style.position="relative";let i=document.createElement("output");i.id=r,i.setAttribute("for",o),i.className="range-bubble",i.setAttribute("aria-live","polite"),a.appendChild(i);let s=()=>{let d=parseFloat(n.min)||0,p=parseFloat(n.max)||100,h=parseFloat(n.value),g=(h-d)/(p-d);i.style.left=`calc(${g*100}% )`,i.textContent=String(h)},c=()=>i.classList.add("visible"),l=()=>i.classList.remove("visible");n.addEventListener("input",s),n.addEventListener("pointerdown",c),n.addEventListener("pointerup",l),n.addEventListener("pointerleave",l),n.addEventListener("focus",c),n.addEventListener("blur",l),s()}n.dataset.enhancedRange="1"}function Zt(n){let e=n.closest("label");if(!e||e.querySelector(".required-asterisk"))return;let t=document.createElement("span");t.classList.add("required-asterisk"),t.textContent="*",t.style.marginLeft="4px",e.querySelector("span").appendChild(t);let o=n.closest("form");if(o&&!o.querySelector(".required-legend")){let r=document.createElement("div");r.classList.add("required-legend","pill","pill-outline"),r.style.fontSize="0.9em",r.style.marginBottom="8px",r.textContent="* Required fields",o.insertBefore(r,o.querySelector(".form-actions")||o.lastElementChild)}}function Qt(n){if(n.dataset.enhancedOpenGroup)return;n.dataset.enhancedOpenGroup="true",n.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let t=n.querySelector('input[type="radio"], input[type="checkbox"]');n.appendChild(e),e.addEventListener("keydown",o=>{if(o.key==="Enter"||o.key==="Tab"){let r=e.value.trim();if(r){o.preventDefault();let a=t.type==="radio"?"radio":"checkbox",i=`open-group-${Math.random().toString(36).substring(2,11)}`,s=document.createElement("label"),c=document.createElement("span");c.setAttribute("data-label",""),c.textContent=r;let l=document.createElement("input");l.type=a,l.name=t.name||n.getAttribute("data-name")||"open-group",l.value=r,l.id=i,s.appendChild(c),s.appendChild(l),n.insertBefore(s,e),e.value=""}}else if(o.key==="Backspace"&&e.value===""){o.preventDefault();let r=n.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Yt(n){if(n.dataset.enhancedBtnWorking)return;n.dataset.enhancedBtnWorking="true";let e=null,t=!1;new MutationObserver(r=>{r.forEach(a=>{if(a.attributeName==="class"){let i=n.classList.contains("btn-working"),s=n.querySelector("pds-icon");if(i)if(s)e||(e=s.getAttribute("icon")),s.setAttribute("icon","circle-notch");else{let c=document.createElement("pds-icon");c.setAttribute("icon","circle-notch"),c.setAttribute("size","sm"),n.insertBefore(c,n.firstChild),t=!0}else a.oldValue?.includes("btn-working")&&s&&(t?(s.remove(),t=!1):e&&(s.setAttribute("icon",e),e=null))}})}).observe(n,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var Jt=new Map([["nav[data-dropdown]",qt],["label[data-toggle]",Vt],['input[type="range"]',Kt],["form [required]",Zt],["fieldset[role=group][data-open]",Qt],["button, a[class*='btn-']",Yt]]),gt=ht.map(n=>({...n,run:Jt.get(n.selector)||(()=>{})}));var ft="pds",Xt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,mt=/^[a-z]:/i;function J(n=""){return n.endsWith("/")?n:`${n}/`}function er(n="",e=ft){let t=n.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(t)?t:`${t}/${e}`}function tr(n){return n.replace(/^\.\/+/,"")}function rr(n){return mt.test(n)?n.replace(mt,"").replace(/^\/+/,""):n}function or(n){return n.startsWith("public/")?n.substring(7):n}function bt(n,e={}){let t=e.segment||ft,o=e.defaultRoot||`/assets/${t}/`,r=n?.public&&n.public?.root||n?.static&&n.static?.root||null;if(!r||typeof r!="string")return J(o);let a=r.trim();return a?(a=a.replace(/\\/g,"/"),a=er(a,t),a=J(a),Xt.test(a)?a:(a=tr(a),a=rr(a),a.startsWith("/")||(a=or(a),a.startsWith("/")||(a=`/${a}`),a=a.replace(/\/+/g,(i,s)=>s===0?i:"/")),J(a))):J(o)}function yt(n){let e=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(e.toLowerCase()))return!0;let r=document.createElement("canvas").getContext("2d");if(!r)return!1;let a="mmmmmmmmmmlli",i="72px",s="monospace";r.font=`${i} ${s}`;let c=r.measureText(a).width;r.font=`${i} "${e}", ${s}`;let l=r.measureText(a).width;return c!==l}function ar(n){return n?n.split(",").map(o=>o.trim())[0].replace(/['"]/g,"").trim():null}async function nr(n,e={}){if(!n)return Promise.resolve();let{weights:t=[400,500,600,700],italic:o=!1}=e,r=ar(n);if(!r||yt(r))return Promise.resolve();let a=encodeURIComponent(r);return document.querySelector(`link[href*="fonts.googleapis.com"][href*="${a}"]`)?(console.log(`Font "${r}" is already loading or loaded`),Promise.resolve()):(console.log(`Loading font "${r}" from Google Fonts...`),new Promise((s,c)=>{let l=document.createElement("link");l.rel="stylesheet";let d=o?`ital,wght@0,${t.join(";0,")};1,${t.join(";1,")}`:`wght@${t.join(";")}`;l.href=`https://fonts.googleapis.com/css2?family=${a}:${d}&display=swap`,l.setAttribute("data-font-loader",r),l.onload=()=>{console.log(`Successfully loaded font "${r}"`),s()},l.onerror=()=>{console.warn(`Failed to load font "${r}" from Google Fonts`),c(new Error(`Failed to load font: ${r}`))},document.head.appendChild(l),setTimeout(()=>{yt(r)||console.warn(`Font "${r}" did not load within timeout`),s()},5e3)}))}async function vt(n){if(!n)return Promise.resolve();let e=new Set;n.fontFamilyHeadings&&e.add(n.fontFamilyHeadings),n.fontFamilyBody&&e.add(n.fontFamilyBody),n.fontFamilyMono&&e.add(n.fontFamilyMono);let t=Array.from(e).map(o=>nr(o).catch(r=>{console.warn(`Could not load font: ${o}`,r)}));await Promise.all(t)}var Fe=class extends EventTarget{},m=new Fe;m.Generator=ae;m.registry=qe;m.ontology=Ne;m.adoptLayers=Ie;m.adoptPrimitives=Oe;m.createStylesheet=He;m.isLiveMode=Ge;m.enums=u;m.ask=pt;m.common=_e;m.presets=C;m.findComponentForElement=je;m.query=async function(n){return await new pe(m).search(n)};function St(n){let e=typeof CustomEvent=="function";try{let t=e?new CustomEvent("pds:ready",{detail:n}):new Event("pds:ready");m.dispatchEvent(t)}catch{}if(typeof document<"u")if(e){let t={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",t))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",t))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}Object.defineProperty(m,"currentConfig",{value:null,writable:!0,enumerable:!0,configurable:!1});Object.defineProperty(m,"compiled",{get(){return m.registry?.isLive&&m.registry?._designer?m.registry._designer.compiled:null},enumerable:!0,configurable:!1});typeof window<"u"&&(window.PDS=m);typeof document<"u"&&m.addEventListener("pds:ready",n=>{let e=n.detail?.mode;e&&(document.documentElement.classList.add(`pds-${e}`),e==="live"&&document.documentElement.classList.add("pds-ready"))});var Le="pure-ds-theme",N=null,X=null;function $t(n){try{if(typeof document>"u")return;let e="light";n?n==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=n:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function zt(n){try{if(N&&X){try{typeof N.removeEventListener=="function"?N.removeEventListener("change",X):typeof N.removeListener=="function"&&N.removeListener(X)}catch{}N=null,X=null}if(n==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),t=o=>{let r=o?.matches===void 0?e.matches:o.matches;try{let a=r?"dark":"light";document.documentElement.setAttribute("data-theme",a),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:a,source:"system"}}))}catch{}};N=e,X=t,typeof e.addEventListener=="function"?e.addEventListener("change",t):typeof e.addListener=="function"&&e.addListener(t)}}catch{}}Object.defineProperty(m,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(Le)||null}catch{return null}},set(n){try{if(typeof window>"u")return;n==null?localStorage.removeItem(Le):localStorage.setItem(Le,n),$t(n),zt(n),m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:n,source:"api"}}))}catch{}}});m.defaultEnhancers=gt;function Et(n={},e={}){let t=Number(e.minContrast||4.5),o=s=>{let c=String(s||"").replace("#",""),l=c.length===3?c.split("").map(p=>p+p).join(""):c,d=parseInt(l||"0",16);return{r:d>>16&255,g:d>>8&255,b:d&255}},r=s=>{let{r:c,g:l,b:d}=o(s),p=[c/255,l/255,d/255].map(h=>h<=.03928?h/12.92:Math.pow((h+.055)/1.055,2.4));return .2126*p[0]+.7152*p[1]+.0722*p[2]},a=(s,c)=>{if(!s||!c)return 0;let l=r(s),d=r(c),p=Math.max(l,d),h=Math.min(l,d);return(p+.05)/(h+.05)},i=[];try{let c=new m.Generator({design:structuredClone(n)}).tokens.colors,l={surfaceBg:c.surface?.base,surfaceText:c.gray?.[900]||"#000000",primaryFill:c.interactive?.light?.fill||c.primary?.[600],primaryText:c.interactive?.light?.text||c.primary?.[600]},d=a(l.primaryFill,"#ffffff");d<t&&i.push({path:"/colors/primary",message:`Primary button contrast too low in light theme (${d.toFixed(2)} < ${t}). Choose a darker primary.`,ratio:d,min:t,context:"light/btn-primary"});let p=a(l.surfaceBg,l.surfaceText);p<t&&i.push({path:"/colors/background",message:`Base text contrast on surface (light) is too low (${p.toFixed(2)} < ${t}). Adjust background or secondary (gray).`,ratio:p,min:t,context:"light/surface-text"});let h=a(l.primaryText,l.surfaceBg);h<t&&i.push({path:"/colors/primary",message:`Primary text on surface is too low for outline/link styles (light) (${h.toFixed(2)} < ${t}). Choose a darker primary or lighter surface.`,ratio:h,min:t,context:"light/outline"});let g=c.dark;if(g){let x={surfaceBg:g.surface?.base||c.surface?.inverse,primaryFill:c.interactive?.dark?.fill||g.primary?.[600],primaryText:c.interactive?.dark?.text||g.primary?.[600]},f=a(x.primaryFill,"#ffffff");f<t&&i.push({path:"/colors/darkMode/primary",message:`Primary button contrast too low in dark theme (${f.toFixed(2)} < ${t}). Override darkMode.primary or pick a brighter hue.`,ratio:f,min:t,context:"dark/btn-primary"});let b=a(x.primaryText,x.surfaceBg);b<t&&i.push({path:"/colors/darkMode/primary",message:`Primary text on surface is too low for outline/link styles (dark) (${b.toFixed(2)} < ${t}). Override darkMode.primary/background.`,ratio:b,min:t,context:"dark/outline"})}}catch(s){i.push({path:"/",message:`Validation failed: ${String(s?.message||s)}`,ratio:0,min:0})}return{ok:i.length===0,issues:i}}m.validateDesign=Et;function sr(n=[],e={}){let t=[],o=Array.isArray(n)?n:n&&typeof n=="object"?Object.values(n):[];for(let r of o){let a,i=null;if(typeof r=="string"){let l=String(r).toLowerCase(),d=C?.[l]||Object.values(C||{}).find(p=>ee(p.name)===l||String(p.name||"").toLowerCase()===l);if(!d){t.push({name:r,ok:!1,issues:[{path:"/",message:`Preset not found: ${r}`,ratio:0,min:0}]});continue}a=d.name||l,i=structuredClone(d)}else if(r&&typeof r=="object")if(a=r.name||r.preset||void 0,"preset"in r||"design"in r){let l=String(r.preset||"default").toLowerCase(),d=C?.[l]||Object.values(C||{}).find(h=>ee(h.name)===l||String(h.name||"").toLowerCase()===l);if(!d){t.push({name:a,ok:!1,issues:[{path:"/",message:`Preset not found: ${r.preset}`,ratio:0,min:0}]});continue}let p=structuredClone(d);r.design&&typeof r.design=="object"&&(p=Re(p,structuredClone(r.design))),i=p}else i=r;if(!i){t.push({name:a,ok:!1,issues:[{path:"/",message:"Invalid design entry",ratio:0,min:0}]});continue}let{ok:s,issues:c}=Et(i,e);t.push({name:a,ok:s,issues:c})}return{ok:t.every(r=>r.ok),results:t}}m.validateDesigns=sr;function Mt({manageTheme:n,themeStorageKey:e}){let t="light",o=null;if(n&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{$t(o),zt(o)}catch{}o?o==="system"?t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=o:t=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:t,storedTheme:o}}function Re(n={},e={}){if(!e||typeof e!="object")return n;let t=Array.isArray(n)?[...n]:{...n};for(let[o,r]of Object.entries(e))r&&typeof r=="object"&&!Array.isArray(r)?t[o]=Re(t[o]&&typeof t[o]=="object"?t[o]:{},r):t[o]=r;return t}function ee(n=""){return String(n).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function re(n){if(n==null)return n;if(typeof n=="function")return;if(typeof n!="object")return n;if(Array.isArray(n))return n.map(t=>re(t)).filter(t=>t!==void 0);let e={};for(let t in n)if(n.hasOwnProperty(t)){let o=n[t];if(typeof o!="function"){let r=re(o);r!==void 0&&(e[t]=r)}}return e}var cr=/^[a-z][a-z0-9+\-.]*:\/\//i,te=(()=>{try{return import.meta.url}catch{return}})();function he(n,e={}){if(!n||cr.test(n))return n;let{preferModule:t=!0}=e,o=()=>{if(!te)return null;try{return new URL(n,te).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(t?o()||r():r()||o())||n}var ge=n=>typeof n=="string"&&n.length&&!n.endsWith("/")?`${n}/`:n,kt=(()=>{if(te)try{let n=new URL(te);if(/\/public\/assets\/js\//.test(n.pathname))return new URL("../pds/",te).href}catch{return}})();function At(n){let e=!!(n?.public?.root||n?.static?.root),t=bt(n);return!e&&kt&&(t=kt),ge(he(t))}function Ct(n={},e={}){let t=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 r=o??e.enhancers??[],a=n&&n.preset,i=n&&n.design,s="preset"in(n||{})||"design"in(n||{})||"enhancers"in(n||{}),c,l=null;if(s){let d=String(a||"default").toLowerCase(),p=C?.[d]||Object.values(C||{}).find(M=>ee(M.name)===d||String(M.name||"").toLowerCase()===d);if(!p)throw new Error(`PDS preset not found: "${a||"default"}"`);l={id:p.id||ee(p.name),name:p.name||p.id||String(d)};let h=structuredClone(p);if(i&&typeof i=="object"){let M=re(i);h=Re(h,structuredClone(M))}let{mode:g,autoDefine:x,applyGlobalStyles:f,manageTheme:b,themeStorageKey:E,preloadStyles:F,criticalLayers:_,preset:S,design:$,enhancers:z,log:T,...me}=n;c={...me,design:h,preset:l.name,log:T||ne}}else if(t){let{log:d,...p}=n;c={design:structuredClone(p),log:d||ne}}else{let d=C?.default||Object.values(C||{}).find(p=>ee(p.name)==="default");if(!d)throw new Error("PDS default preset not available");l={id:d.id||"default",name:d.name||"Default"},c={design:structuredClone(d),preset:l.name,log:ne}}return{generatorConfig:c,enhancers:r,presetInfo:l}}async function _t(n){let{autoDefineBaseURL:e="/auto-define/",autoDefinePreload:t=[],autoDefineMapper:o=null,enhancers:r=[],autoDefineOverrides:a=null,autoDefinePreferModule:i=!0}=n,s=(()=>{let l=new Map;return(m.defaultEnhancers||[]).forEach(d=>l.set(d.selector,d)),(r||[]).forEach(d=>l.set(d.selector,d)),Array.from(l.values())})(),c=null;if(typeof window<"u"&&typeof document<"u"){let l=null;try{let f=await Promise.resolve().then(()=>(wt(),xt));l=f?.AutoDefiner||f?.default?.AutoDefiner||f?.default||null}catch(f){console.warn("AutoDefiner not available:",f?.message||f)}let d=f=>{switch(f){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${f}.js`}},{mapper:p,...h}=a&&typeof a=="object"?a:{},x={baseURL:e&&ge(he(e,{preferModule:i})),predefine:t,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:s,onError:(f,b)=>{typeof f=="string"&&f.startsWith("pds-")?console.warn(`\u26A0\uFE0F PDS component <${f}> not found. Assets may not be installed.`):console.error(`\u274C Auto-define error for <${f}>:`,b)},...h,mapper:f=>{if(customElements.get(f))return null;if(typeof o=="function")try{let b=o(f);return b===void 0?d(f):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),d(f)}return d(f)}};l&&(c=new l(x),t.length>0&&typeof l.define=="function"&&await l.define(...t,{baseURL:e,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:c}}async function lr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'live', ... }) requires a valid configuration object");if(typeof document<"u"&&document.adoptedStyleSheets){let s=`
|
|
3382
|
+
html { opacity: 0; }
|
|
3383
|
+
html.pds-ready { opacity: 1; transition: opacity 0.3s ease-in; }
|
|
3384
|
+
`;try{if(!document.adoptedStyleSheets.some(l=>l._pdsFouc)){let l=new CSSStyleSheet;l.replaceSync(s),l._pdsFouc=!0,document.adoptedStyleSheets=[l,...document.adoptedStyleSheets]}}catch(c){if(console.warn("Constructable stylesheets not supported, using <style> tag fallback:",c),!document.head.querySelector("style[data-pds-fouc]")){let d=document.createElement("style");d.setAttribute("data-pds-fouc",""),d.textContent=s,document.head.insertBefore(d,document.head.firstChild)}}}let e=n.applyGlobalStyles??!0,t=n.manageTheme??!0,o=n.themeStorageKey??"pure-ds-theme",r=n.preloadStyles??!1,a=n.criticalLayers??["tokens","primitives"],i=n&&n.autoDefine||null;try{let{resolvedTheme:s,storedTheme:c}=Mt({manageTheme:t,themeStorageKey:o}),l=Ct(n,{}),d=l.enhancers,{log:p,...h}=l.generatorConfig,g=structuredClone(h);g.log=p,t&&(g.theme=s);let x=new m.Generator(g);if(g.design?.typography)try{await vt(g.design.typography)}catch(S){g?.log?.("warn","Failed to load some fonts from Google Fonts:",S)}if(r&&typeof window<"u"&&document.head)try{let S=a.map($=>{try{return x.css?.[$]||""}catch(z){return g?.log?.("warn",`Failed to generate critical CSS for layer "${$}":`,z),""}}).filter($=>$.trim()).join(`
|
|
3385
|
+
`);if(S){let $=document.head.querySelector("style[data-pds-critical]");$&&$.remove();let z=document.createElement("style");z.setAttribute("data-pds-critical",""),z.textContent=S;let T=document.head.querySelector('meta[charset], meta[name="viewport"]');T?T.parentNode.insertBefore(z,T.nextSibling):document.head.insertBefore(z,document.head.firstChild)}}catch(S){g?.log?.("warn","Failed to preload critical styles:",S)}m.registry.setDesigner(x,{presetName:l.presetInfo?.name}),e&&(await m.Generator.applyStyles(x),typeof window<"u"&&setTimeout(()=>{let S=document.head.querySelector("style[data-pds-critical]");S&&S.remove();let $=document.head.querySelector("style[data-pds-preload]");$&&$.remove();let z=document.getElementById("pds-runtime-stylesheet");z&&z.remove()},100));let f=At(n),b;i&&i.baseURL?b=ge(he(i.baseURL,{preferModule:!1})):b=`${f}components/`;let E=null;try{E=(await _t({autoDefineBaseURL:b,autoDefinePreload:i&&Array.isArray(i.predefine)&&i.predefine||[],autoDefineMapper:i&&typeof i.mapper=="function"&&i.mapper||null,enhancers:d,autoDefineOverrides:i||null,autoDefinePreferModule:!(i&&i.baseURL)})).autoDefiner}catch(S){g?.log?.("error","\u274C Failed to initialize AutoDefiner/Enhancers:",S)}let F=x?.options||g,_=re(n);return m.currentConfig=Object.freeze({mode:"live",...structuredClone(_),design:structuredClone(l.generatorConfig.design),preset:l.generatorConfig.preset,theme:s}),St({mode:"live",generator:x,config:F,theme:s,autoDefiner:E}),{generator:x,config:F,theme:s,autoDefiner:E}}catch(s){throw m.dispatchEvent(new CustomEvent("pds:error",{detail:{error:s}})),s}}async function dr(n){let e=n&&n.mode||"live",{mode:t,...o}=n||{};return e==="static"?pr(o):lr(o)}m.start=dr;async function pr(n){if(!n||typeof n!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let e=n.applyGlobalStyles??!0,t=n.manageTheme??!0,o=n.themeStorageKey??"pure-ds-theme",r=n.staticPaths??{},a=At(n),i=n&&n.autoDefine||null,s;i&&i.baseURL?s=ge(he(i.baseURL,{preferModule:!1})):s=`${a}components/`;let c=i&&Array.isArray(i.predefine)&&i.predefine||[],l=i&&typeof i.mapper=="function"&&i.mapper||null;try{let{resolvedTheme:d}=Mt({manageTheme:t,themeStorageKey:o}),p=Ct(n,{}),h=p.enhancers;if(r={...{tokens:`${a}styles/pds-tokens.css.js`,primitives:`${a}styles/pds-primitives.css.js`,components:`${a}styles/pds-components.css.js`,utilities:`${a}styles/pds-utilities.css.js`,styles:`${a}styles/pds-styles.css.js`},...r},m.registry.setStaticMode(r),e&&typeof document<"u")try{let b=await m.registry.getStylesheet("styles");if(b){b._pds=!0;let E=(document.adoptedStyleSheets||[]).filter(F=>F._pds!==!0);document.adoptedStyleSheets=[...E,b]}}catch(b){console.warn("Failed to apply static styles:",b)}let x=null;try{x=(await _t({autoDefineBaseURL:s,autoDefinePreload:c,autoDefineMapper:l,enhancers:h,autoDefineOverrides:i||null,autoDefinePreferModule:!(i&&i.baseURL)})).autoDefiner}catch(b){console.error("\u274C Failed to initialize AutoDefiner/Enhancers (static):",b)}let f=re(n);return m.currentConfig=Object.freeze({mode:"static",...structuredClone(f),design:structuredClone(p.generatorConfig.design),preset:p.generatorConfig.preset,theme:d}),St({mode:"static",config:p.generatorConfig,theme:d,autoDefiner:x}),{config:p.generatorConfig,theme:d,autoDefiner:x}}catch(d){throw m.dispatchEvent(new CustomEvent("pds:error",{detail:{error:d}})),d}}async function ur(n,e={}){let{storageKey:t="pure-ds-theme",persist:o=!0}=e;if(!["light","dark","system"].includes(n))throw new Error(`Invalid theme "${n}". Must be "light", "dark", or "system".`);if(typeof window>"u")return n==="system"?"light":n;let r=n;if(n==="system"&&(r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",r),o&&localStorage.setItem(t,n),m.registry.isLive&&m.registry.hasDesigner)try{let a=m.registry._designer;if(a&&a.configure){let i={...a.config,theme:r};a.configure(i),await m.Generator.applyStyles(a)}}catch(a){currentDesigner?.options?.log?.("warn","Failed to update styles for new theme:",a)}return m.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:r,requested:n,source:"programmatic"}})),r}m.setTheme=ur;function hr(n,e={}){if(typeof window>"u"||!document.head||!n)return;let{theme:t,layers:o=["tokens"]}=e;try{let r=t||"light";(t==="system"||!t)&&(r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.setAttribute("data-theme",r);let a=n.design?{...n,theme:r}:{design:n,theme:r},i=new m.Generator(a),s=o.map(c=>{try{return i.css?.[c]||""}catch{return""}}).filter(c=>c.trim()).join(`
|
|
3386
|
+
`);if(s){let c=document.head.querySelector("style[data-pds-preload]");c&&c.remove();let l=document.createElement("style");l.setAttribute("data-pds-preload",""),l.textContent=s,document.head.insertBefore(l,document.head.firstChild)}}catch(r){console.warn("PDS preload failed:",r)}}m.preloadCritical=hr;export{m as PDS,Et as validateDesign};
|
|
3387
|
+
/*! Bundled license information:
|
|
3388
|
+
|
|
3389
|
+
@lit/reactive-element/css-tag.js:
|
|
3390
|
+
(**
|
|
3391
|
+
* @license
|
|
3392
|
+
* Copyright 2019 Google LLC
|
|
3393
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3394
|
+
*)
|
|
3395
|
+
|
|
3396
|
+
@lit/reactive-element/reactive-element.js:
|
|
3397
|
+
(**
|
|
3398
|
+
* @license
|
|
3399
|
+
* Copyright 2017 Google LLC
|
|
3400
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3401
|
+
*)
|
|
3402
|
+
|
|
3403
|
+
lit-html/lit-html.js:
|
|
3404
|
+
(**
|
|
3405
|
+
* @license
|
|
3406
|
+
* Copyright 2017 Google LLC
|
|
3407
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3408
|
+
*)
|
|
3409
|
+
|
|
3410
|
+
lit-element/lit-element.js:
|
|
3411
|
+
(**
|
|
3412
|
+
* @license
|
|
3413
|
+
* Copyright 2017 Google LLC
|
|
3414
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3415
|
+
*)
|
|
3416
|
+
|
|
3417
|
+
lit-html/is-server.js:
|
|
3418
|
+
(**
|
|
3419
|
+
* @license
|
|
3420
|
+
* Copyright 2022 Google LLC
|
|
3421
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
3422
|
+
*)
|
|
3423
|
+
*/
|