@pure-ds/core 0.7.28 → 0.7.29
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pds-generator.d.ts","sourceRoot":"","sources":["../../../../../src/js/pds-core/pds-generator.js"],"names":[],"mappings":"AA4gLA;;;;;;;;;GASG;AACH,8CALW,MAAM,YAEd;IAAyB,WAAW,GAA5B,MAAM;CACd,GAAU;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,KAAK,CAAC;QAAC,IAAI,EAAC,MAAM,CAAC;QAAC,OAAO,EAAC,MAAM,CAAC;QAAC,KAAK,EAAC,MAAM,CAAC;QAAC,GAAG,EAAC,MAAM,CAAC;QAAC,OAAO,CAAC,EAAC,MAAM,CAAA;KAAC,CAAC,CAAA;CAAE,CAyPpH;AAED;;;;;;;GAOG;AACH,0CAJW,KAAK,CAAC,MAAM,CAAC,YACb,MAAM,GACJ;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,OAAO,CAAC;QAAC,MAAM,EAAE,KAAK,CAAC;YAAC,IAAI,EAAC,MAAM,CAAC;YAAC,OAAO,EAAC,MAAM,CAAC;YAAC,KAAK,EAAC,MAAM,CAAC;YAAC,GAAG,EAAC,MAAM,CAAC;YAAC,OAAO,CAAC,EAAC,MAAM,CAAA;SAAC,CAAC,CAAA;KAAE,CAAC,CAAA;CAAE,CAkGpK;AAr3LD;;;GAGG;AACH;IAEE,mCAAiB;IAEjB,2BAEC;IAOD,0BA6CC;IA5CC;;MAIC;IAaD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAAmC;IA6BrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAiCC;IA8eD;;;;OAIG;IACH,kDAyBC;IAiFD;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA6DC;IA6uHD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAEC;IAGD,oBAEC;IAsxBD,qBAEC;IACD,yBAEC;IACD,yBAEC;IACD,wBAEC;IACD,yBAMC;IAED;;;;;;OAMG;IACH,oBA6JC;IAGD,4BAEC;IACD,gCAEC;IACD,gCAEC;IACD,+BAEC;IAmBD;;;OAGG;IACH;;;;;;MAoBC;;CAkBF"}
|
package/package.json
CHANGED
package/public/assets/js/app.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var $e=Object.defineProperty;var Ie=(e,t)=>{for(var s in t)$e(e,s,{get:t[s],enumerable:!0})};var J=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(s){console.error(`[PDS Registry] Failed to load static ${t}:`,s),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let n=new CSSStyleSheet;return n.replaceSync("/* Failed to load "+t+" */"),n}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},P=new J;async function me(e,t=[],s=null){try{let n=s?.primitivesStylesheet?s.primitivesStylesheet:await P.getStylesheet("primitives");e.adoptedStyleSheets=[n,...t]}catch(n){let a=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${a}> failed to adopt primitives:`,n),e.adoptedStyleSheets=t}}async function he(e,t=["primitives"],s=[],n=null){let a=Array.isArray(s)?s.filter(Boolean):[];if(a.length){let d=(Array.isArray(e.adoptedStyleSheets)?e.adoptedStyleSheets:[]).filter(y=>!a.includes(y));e.adoptedStyleSheets=[...d,...a]}try{let d=(await Promise.all(t.map(async y=>{if(n)switch(y){case"tokens":return n.tokensStylesheet;case"primitives":return n.primitivesStylesheet;case"components":return n.componentsStylesheet;case"utilities":return n.utilitiesStylesheet;default:break}return P.getStylesheet(y)}))).filter(y=>y!==null);e.adoptedStyleSheets=[...d,...a]}catch(o){let d=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${d}> failed to adopt layers:`,o),e.adoptedStyleSheets=a}}function ye(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var be={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}};var Z={};Ie(Z,{deepMerge:()=>ge,fragmentFromTemplateLike:()=>Ne,isObject:()=>O,parseHTML:()=>X});function O(e){return e&&typeof e=="object"&&!Array.isArray(e)}function ge(e,t){let s={...e};return O(e)&&O(t)&&Object.keys(t).forEach(n=>{O(t[n])?n in e?s[n]=ge(e[n],t[n]):Object.assign(s,{[n]:t[n]}):Object.assign(s,{[n]:t[n]})}),s}function Ne(e){let t=Array.isArray(e?.strings)?e.strings:[],s=Array.isArray(e?.values)?e.values:[],n=new Set,a=[],o=/(\s)(\.[\w-]+)=\s*$/;for(let i=0;i<t.length;i+=1){let g=t[i]??"",f=g.match(o);if(f&&i<s.length){let w=f[2].slice(1),L=`pds-val-${i}`;g=g.replace(o,`$1data-pds-prop="${w}:${L}"`),n.add(i)}a.push(g),i<s.length&&!n.has(i)&&a.push(`<!--pds-val-${i}-->`)}let d=document.createElement("template");d.innerHTML=a.join("");let y=(i,g)=>{let f=i.parentNode;if(!f)return;if(g==null){f.removeChild(i);return}let E=w=>{if(w!=null){if(w instanceof Node){f.insertBefore(w,i);return}if(Array.isArray(w)){w.forEach(L=>E(L));return}f.insertBefore(document.createTextNode(String(w)),i)}};E(g),f.removeChild(i)},S=document.createTreeWalker(d.content,NodeFilter.SHOW_COMMENT),h=[];for(;S.nextNode();){let i=S.currentNode;i?.nodeValue?.startsWith("pds-val-")&&h.push(i)}return h.forEach(i=>{let g=Number(i.nodeValue.replace("pds-val-",""));y(i,s[g])}),d.content.querySelectorAll("*").forEach(i=>{let g=i.getAttribute("data-pds-prop");if(!g)return;let[f,E]=g.split(":"),w=Number(String(E).replace("pds-val-",""));f&&Number.isInteger(w)&&(i[f]=s[w]),i.removeAttribute("data-pds-prop")}),d.content}function X(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes}var Se="pds",Oe=/^([a-z][a-z0-9+\-.]*:)?\/\//i,we=/^[a-z]:/i;function U(e=""){return e.endsWith("/")?e:`${e}/`}function ze(e="",t=Se){let s=e.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(s)?s:`${s}/${t}`}function Fe(e){return e.replace(/^\.\/+/,"")}function We(e){return we.test(e)?e.replace(we,"").replace(/^\/+/,""):e}function Be(e){return e.startsWith("public/")?e.substring(7):e}function z(e,t={}){let s=t.segment||Se,n=t.defaultRoot||`/assets/${s}/`,a=e?.public&&e.public?.root||e?.static&&e.static?.root||null;if(!a||typeof a!="string")return U(n);let o=a.trim();return o?(o=o.replace(/\\/g,"/"),o=ze(o,s),o=U(o),Oe.test(o)?o:(o=Fe(o),o=We(o),o.startsWith("/")||(o=Be(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(d,y)=>y===0?d:"/")),U(o))):U(n)}async function qe(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let s=e,{baseURL:n,mapper:a=h=>`${h}.js`,onError:o=(h,c)=>console.error(`[defineWebComponents] ${h}:`,c)}=t,d=n?new URL(n,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),y=h=>h.toLowerCase().replace(/(^|-)([a-z])/g,(c,i,g)=>g.toUpperCase()),S=async h=>{try{if(customElements.get(h))return{tag:h,status:"already-defined"};let c=a(h),g=await import(c instanceof URL?c.href:new URL(c,d).href),f=g?.default??g?.[y(h)];if(!f){if(customElements.get(h))return{tag:h,status:"self-defined"};throw new Error(`No export found for ${h}. Expected default export or named export "${y(h)}".`)}return customElements.get(h)?{tag:h,status:"race-already-defined"}:(customElements.define(h,f),{tag:h,status:"defined"})}catch(c){throw o(h,c),c}};return Promise.all(s.map(S))}var F=class{constructor(t={}){let{baseURL:s,mapper:n,onError:a,predicate:o=()=>!0,attributeModule:d="data-module",root:y=document,scanExisting:S=!0,debounceMs:h=16,observeShadows:c=!0,enhancers:i=[],patchAttachShadow:g=!0}=t,f=new Set,E=new Set,w=new Set,L=new Map,k=new WeakMap,_=new WeakMap,m=0,b=!1,x=null,N=l=>{if(!l||!i.length)return;let u=_.get(l);u||(u=new Set,_.set(l,u));for(let p of i)if(!(!p.selector||!p.run)&&!u.has(p.selector))try{l.matches&&l.matches(p.selector)&&(p.run(l),u.add(p.selector))}catch(v){console.warn(`[AutoDefiner] Error applying enhancer for selector "${p.selector}":`,v)}},M=(l,u)=>{if(!b&&!(!l||!l.includes("-"))&&!customElements.get(l)&&!E.has(l)&&!w.has(l)){if(u&&u.getAttribute){let p=u.getAttribute(d);p&&!L.has(l)&&L.set(l,p)}f.add(l),Ce()}},Ce=()=>{m||(m=setTimeout(pe,h))},R=l=>{if(l){if(l.nodeType===1){let u=l,p=u.tagName?.toLowerCase();p&&p.includes("-")&&!customElements.get(p)&&o(p,u)&&M(p,u),N(u),c&&u.shadowRoot&&Y(u.shadowRoot)}l.querySelectorAll&&l.querySelectorAll("*").forEach(u=>{let p=u.tagName?.toLowerCase();p&&p.includes("-")&&!customElements.get(p)&&o(p,u)&&M(p,u),N(u),c&&u.shadowRoot&&Y(u.shadowRoot)})}},Y=l=>{if(!l||k.has(l))return;R(l);let u=new MutationObserver(p=>{for(let v of p)v.addedNodes?.forEach(D=>{R(D)}),v.type==="attributes"&&v.target&&R(v.target)});u.observe(l,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[d,...i.map(p=>p.selector).filter(p=>p.startsWith("data-"))]}),k.set(l,u)};async function pe(){if(clearTimeout(m),m=0,!f.size)return;let l=Array.from(f);f.clear(),l.forEach(u=>E.add(u));try{let u=p=>L.get(p)??(n?n(p):`${p}.js`);await qe(...l,{baseURL:s,mapper:u,onError:(p,v)=>{w.add(p),a?.(p,v)}})}catch{}finally{l.forEach(u=>E.delete(u))}}let ue=y===document?document.documentElement:y,fe=new MutationObserver(l=>{for(let u of l)u.addedNodes?.forEach(p=>{R(p)}),u.type==="attributes"&&u.target&&R(u.target)});if(fe.observe(ue,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[d,...i.map(l=>l.selector).filter(l=>l.startsWith("data-"))]}),c&&g&&Element.prototype.attachShadow){let l=Element.prototype.attachShadow;Element.prototype.attachShadow=function(p){let v=l.call(this,p);if(p&&p.mode==="open"){Y(v);let D=this.tagName?.toLowerCase();D&&D.includes("-")&&!customElements.get(D)&&M(D,this)}return v},x=()=>Element.prototype.attachShadow=l}return S&&R(ue),{stop(){b=!0,fe.disconnect(),x&&x(),m&&(clearTimeout(m),m=0),k.forEach(l=>l.disconnect())},flush:pe}}static async define(...t){let s={};t.length&&typeof t[t.length-1]=="object"&&(s=t.pop()||{});let n=t,{baseURL:a,mapper:o=c=>`${c}.js`,onError:d=(c,i)=>console.error(`[defineWebComponents] ${c}:`,i)}=s,y=a?new URL(a,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),S=c=>c.toLowerCase().replace(/(^|-)([a-z])/g,(i,g,f)=>f.toUpperCase()),h=async c=>{try{if(customElements.get(c))return{tag:c,status:"already-defined"};let i=o(c),f=await import(i instanceof URL?i.href:new URL(i,y).href),E=f?.default??f?.[S(c)];if(!E){if(customElements.get(c))return{tag:c,status:"self-defined"};throw new Error(`No export found for ${c}. Expected default export or named export "${S(c)}".`)}return customElements.get(c)?{tag:c,status:"race-already-defined"}:(customElements.define(c,E),{tag:c,status:"defined"})}catch(i){throw d(c,i),i}};return Promise.all(n.map(h))}};var He=/^[a-z][a-z0-9+\-.]*:\/\//i,C=(()=>{try{return import.meta.url}catch{return}})(),W=e=>typeof e=="string"&&e.length&&!e.endsWith("/")?`${e}/`:e;function B(e,t={}){if(!e||He.test(e))return e;let{preferModule:s=!0}=t,n=()=>{if(!C)return null;try{return new URL(e,C).href}catch{return null}},a=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(e,window.location.origin).href}catch{return null}};return(s?n()||a():a()||n())||e}var Ee=(()=>{if(C)try{let e=new URL(C);if(/\/public\/assets\/js\//.test(e.pathname))return new URL("../pds/",C).href}catch{return}})(),_e=!1;function Le(e){_e||typeof document>"u"||(_e=!0,e.addEventListener("pds:ready",t=>{let s=t.detail?.mode;s&&document.documentElement.classList.add(`pds-${s}`,"pds-ready")}))}function ve({manageTheme:e,themeStorageKey:t,applyResolvedTheme:s,setupSystemListenerIfNeeded:n}){let a="light",o=null;if(e&&typeof window<"u"){try{o=localStorage.getItem(t)||null}catch{o=null}try{s?.(o),n?.(o)}catch{}o?o==="system"?a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":a=o:a=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:a,storedTheme:o}}function q(e,{resolvePublicAssetURL:t}){let s=!!(e?.public?.root||e?.static?.root),n=t(e);return!s&&Ee&&(n=Ee),W(B(n))}async function Ae(e,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:s="/auto-define/",autoDefinePreload:n=[],autoDefineMapper:a=null,enhancers:o=[],autoDefineOverrides:d=null,autoDefinePreferModule:y=!0}=e,S=(()=>{let c=new Map;return(t||[]).forEach(i=>c.set(i.selector,i)),(o||[]).forEach(i=>c.set(i.selector,i)),Array.from(c.values())})(),h=null;if(typeof window<"u"&&typeof document<"u"){let c=F,i=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:g,enhancers:f,...E}=d&&typeof d=="object"?d:{},w=f?Array.isArray(f)?f:typeof f=="object"?Object.values(f):[]:[],L=(()=>{let m=new Map;return(S||[]).forEach(b=>{b?.selector&&m.set(b.selector,b)}),(w||[]).forEach(b=>{if(!b?.selector)return;let x=m.get(b.selector)||null;m.set(b.selector,{...x||{},...b,run:typeof b?.run=="function"?b.run:x?.run})}),Array.from(m.values())})(),_={baseURL:s&&W(B(s,{preferModule:y})),predefine:n,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:L,onError:(m,b)=>{if(typeof m=="string"&&m.startsWith("pds-")){let N=["pds-form","pds-drawer"].includes(m),M=b?.message?.includes("#pds/lit")||b?.message?.includes("Failed to resolve module specifier");N&&M?console.error(`\u274C PDS component <${m}> requires Lit but #pds/lit is not in import map.
|
|
2
|
-
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,b)},...E,mapper:m=>{if(customElements.get(m))return null;if(typeof a=="function")try{let b=a(m);return b===void 0?i(m):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),i(m)}return i(m)}};h=new c(_),n.length>0&&typeof c.define=="function"&&await c.define(...n,{baseURL:s,mapper:_.mapper,onError:_.onError})}return{autoDefiner:h,mergedEnhancers:S}}var ee=["light","dark"],te=new Set(ee);function Ve(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):ee).filter(n=>te.has(n));return s.length?s:ee}function se(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(te.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(te.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ke(e,t){let s=se(t);return Ve(e).includes(s)}var oe=class extends EventTarget{},je="__PURE_DS_PDS_SINGLETON__",ie=typeof globalThis<"u"?globalThis:window,ne=ie?.[je],r=ne&&typeof ne.addEventListener=="function"?ne:new oe;ie&&(ie[je]=r);typeof r.initializing!="boolean"&&(r.initializing=!1);"currentPreset"in r||(r.currentPreset=null);typeof r.debug!="boolean"&&(r.debug=!1);"currentConfig"in r||(r.currentConfig=null);"compiled"in r||(r.compiled=null);var H=null,V=null,K=null,G=null;function Q(e,t){return t&&typeof t=="string"?t:`${q(r.currentConfig||{},{resolvePublicAssetURL:z})}core/${e}`}async function Ke(){return Array.isArray(r.defaultEnhancers)&&r.defaultEnhancers.length>0?r.defaultEnhancers:(G||(G=import(Q("pds-enhancers.js",r.currentConfig?.enhancersURL)).then(t=>{let s=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return r.defaultEnhancers=s,s}).catch(t=>{throw G=null,t})),G)}async function Ge(){return typeof r.ask=="function"&&r.ask!==Re?r.ask:(V||(V=import(Q("pds-ask.js",r.currentConfig?.askURL)).then(t=>{let s=t?.ask;if(typeof s!="function")throw new Error("Failed to load ask helper");return r.ask=s,s}).catch(t=>{throw V=null,t})),V)}async function I(){return typeof r.toast=="function"&&r.toast!==T?r.toast:(K||(K=import(Q("pds-toast.js",r.currentConfig?.toastURL)).then(t=>{let s=t?.toast;if(typeof s!="function")throw new Error("Failed to load toast helper");return r.toast=s,s}).catch(t=>{throw K=null,t})),K)}async function Re(...e){return(await Ge())(...e)}async function T(...e){return(await I())(...e)}T.success=async(...e)=>(await I()).success(...e);T.error=async(...e)=>(await I()).error(...e);T.warning=async(...e)=>(await I()).warning(...e);T.info=async(...e)=>(await I()).info(...e);var xe=function(e="log",t,...s){let n=!!(r.registry&&!r.registry.isLive),a=(this?.debug||this?.design?.debug||r.debug||!1)===!0;if(n){if(!r.debug)return}else if(!a&&e!=="error"&&e!=="warn")return;let o=console[e]||console.log;s.length>0?o(t,...s):o(t)};function ae(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>ae(s)).filter(s=>s!==void 0);let t={};for(let[s,n]of Object.entries(e)){let a=ae(n);a!==void 0&&(t[s]=a)}return t}function De(e,t=new WeakSet){if(!e||typeof e!="object"||t.has(e))return e;t.add(e),Object.freeze(e);for(let s of Object.keys(e))De(e[s],t);return e}function ce(e){return e==null||typeof e!="object"?e:De(structuredClone(ae(e)))}async function Qe(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}r.registry=P;r.enums=be;r.adoptLayers=he;r.adoptPrimitives=me;r.parse=X;r.createStylesheet=ye;r.isLiveMode=()=>P.isLive;r.ask=Re;r.toast=T;r.common=Z;r.AutoComplete=null;r.loadAutoComplete=async()=>{if(r.AutoComplete&&typeof r.AutoComplete.connect=="function")return r.AutoComplete;let e=Q("pds-autocomplete.js",r.currentConfig?.autoCompleteURL);return H||(H=import(e).then(t=>{let s=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!s)throw new Error("AutoComplete export not found in module");return r.AutoComplete=s,s}).catch(t=>{throw H=null,t})),H};function Pe(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");r.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function Te(e={}){let t=typeof CustomEvent=="function",s={at:Date.now(),...e};try{let n=t?new CustomEvent("pds:config-changed",{detail:s}):new Event("pds:config-changed");r.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:s,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",n))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var re="pure-ds-theme",j=null,$=null;function de(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function le(e){try{if(j&&$){try{typeof j.removeEventListener=="function"?j.removeEventListener("change",$):typeof j.removeListener=="function"&&j.removeListener($)}catch{}j=null,$=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let a=n?.matches===void 0?t.matches:n.matches;try{let o=a?"dark":"light";document.documentElement.setAttribute("data-theme",o),r.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:o,source:"system"}}))}catch{}};j=t,$=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}var Ye=Object.getOwnPropertyDescriptor(r,"theme");Ye||Object.defineProperty(r,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(re)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=r.currentConfig?.design||null,s=se(e);if(t&&!ke(t,s)){let n=t?.name||r.currentPreset?.name||r.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),r.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(re):localStorage.setItem(re,e),de(e),le(e),r.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});r.defaultEnhancers=[];async function Je(e){r.initializing=!0;try{let t=e&&e.mode||"live",{mode:s,...n}=e||{};r.currentConfig=ce(n);let a;if(t==="static")a=await Xe(n);else{let d=q(n,{resolvePublicAssetURL:z}),y=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",d).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:S}=await import(y);a=await S(r,n,{emitReady:Pe,emitConfigChanged:Te,applyResolvedTheme:de,setupSystemListenerIfNeeded:le})}r.compiled=ce(a?.config||null);let o=r?.compiled?.design?.icons?.externalPath||"/assets/img/icons/";return typeof console<"u"&&typeof console.info=="function"&&console.info(`[PDS] startup ready; external icon path: ${o}`),a}finally{r.initializing=!1}}r.start=Je;async function Xe(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",a=e.staticPaths??{},o=q(e,{resolvePublicAssetURL:z}),d=e&&e.autoDefine||null,y;d&&d.baseURL?y=W(B(d.baseURL,{preferModule:!1})):y=`${o}components/`;let S=d&&Array.isArray(d.predefine)&&d.predefine||[],h=d&&typeof d.mapper=="function"&&d.mapper||null;try{Le(r);let{resolvedTheme:c}=ve({manageTheme:s,themeStorageKey:n,applyResolvedTheme:de,setupSystemListenerIfNeeded:le}),i=await Qe(o,e),g=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],f=i?.config?{...i.config,...e,design:e?.design||i.config.design,preset:e?.preset||i.config.preset}:{...e},E={tokens:`${o}styles/pds-tokens.css.js`,primitives:`${o}styles/pds-primitives.css.js`,components:`${o}styles/pds-components.css.js`,utilities:`${o}styles/pds-utilities.css.js`,styles:`${o}styles/pds-styles.css.js`},w=i?.paths||{};if(a={...E,...w,...a},r.registry.setStaticMode(a),t&&typeof document<"u")try{let _=await r.registry.getStylesheet("styles");if(_){_._pds=!0;let m=(document.adoptedStyleSheets||[]).filter(b=>b._pds!==!0);document.adoptedStyleSheets=[...m,_],Te({mode:"static",source:"static:styles-applied"})}}catch(_){xe.call(r,"warn","Failed to apply static styles:",_)}let L=null,k=[];try{let _=await Ke(),m=await Ae({autoDefineBaseURL:y,autoDefinePreload:S,autoDefineMapper:h,enhancers:g,autoDefineOverrides:d||null,autoDefinePreferModule:!(d&&d.baseURL)},{baseEnhancers:_});L=m.autoDefiner,k=m.mergedEnhancers||[]}catch(_){xe.call(r,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",_)}return r.compiled=ce({mode:"static",...f,theme:c,enhancers:k}),Pe({mode:"static",config:f,theme:c,autoDefiner:L}),{config:f,theme:c,autoDefiner:L}}catch(c){throw r.dispatchEvent(new CustomEvent("pds:error",{detail:{error:c}})),c}}var Me={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(e,t,...s){console[e](t,...s)}};var A={name:"@pure-ds/core",shortname:"pds",version:"0.7.28",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/pds/core.js",module:"./public/assets/pds/core.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-setup-mcp":"packages/pds-cli/bin/pds-setup-mcp.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js","pds-mcp-server":"packages/pds-cli/bin/pds-mcp-server.js","pds-mcp-health":"packages/pds-cli/bin/pds-mcp-health.js","pds-mcp-eval":"packages/pds-cli/bin/pds-mcp-eval.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/pds/core.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/core.js","public/assets/pds/core/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","pds:mcp:server":"node packages/pds-cli/bin/pds-mcp-server.js","pds:mcp:health":"node packages/pds-cli/bin/pds-mcp-health.js","pds:mcp:eval":"node packages/pds-cli/bin/pds-mcp-eval.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.2","pure-web":"1.1.32"},customElements:"custom-elements.json"};await r.start(Me);var Ue=typeof A.repository=="string"?A.repository:A.repository?.url,et=Ue?Ue.replace(/^git\+/,"").replace(/\.git$/,""):"",Lt=A.homepage||et,vt=A.bugs?.url||"";document.body.innerHTML=`
|
|
2
|
+
See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,b)},...E,mapper:m=>{if(customElements.get(m))return null;if(typeof a=="function")try{let b=a(m);return b===void 0?i(m):b}catch(b){return console.warn("Custom autoDefine.mapper error; falling back to default:",b?.message||b),i(m)}return i(m)}};h=new c(_),n.length>0&&typeof c.define=="function"&&await c.define(...n,{baseURL:s,mapper:_.mapper,onError:_.onError})}return{autoDefiner:h,mergedEnhancers:S}}var ee=["light","dark"],te=new Set(ee);function Ve(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):ee).filter(n=>te.has(n));return s.length?s:ee}function se(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(te.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(te.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function ke(e,t){let s=se(t);return Ve(e).includes(s)}var oe=class extends EventTarget{},je="__PURE_DS_PDS_SINGLETON__",ie=typeof globalThis<"u"?globalThis:window,ne=ie?.[je],r=ne&&typeof ne.addEventListener=="function"?ne:new oe;ie&&(ie[je]=r);typeof r.initializing!="boolean"&&(r.initializing=!1);"currentPreset"in r||(r.currentPreset=null);typeof r.debug!="boolean"&&(r.debug=!1);"currentConfig"in r||(r.currentConfig=null);"compiled"in r||(r.compiled=null);var H=null,V=null,K=null,G=null;function Q(e,t){return t&&typeof t=="string"?t:`${q(r.currentConfig||{},{resolvePublicAssetURL:z})}core/${e}`}async function Ke(){return Array.isArray(r.defaultEnhancers)&&r.defaultEnhancers.length>0?r.defaultEnhancers:(G||(G=import(Q("pds-enhancers.js",r.currentConfig?.enhancersURL)).then(t=>{let s=Array.isArray(t?.defaultPDSEnhancers)?t.defaultPDSEnhancers:[];return r.defaultEnhancers=s,s}).catch(t=>{throw G=null,t})),G)}async function Ge(){return typeof r.ask=="function"&&r.ask!==Re?r.ask:(V||(V=import(Q("pds-ask.js",r.currentConfig?.askURL)).then(t=>{let s=t?.ask;if(typeof s!="function")throw new Error("Failed to load ask helper");return r.ask=s,s}).catch(t=>{throw V=null,t})),V)}async function I(){return typeof r.toast=="function"&&r.toast!==T?r.toast:(K||(K=import(Q("pds-toast.js",r.currentConfig?.toastURL)).then(t=>{let s=t?.toast;if(typeof s!="function")throw new Error("Failed to load toast helper");return r.toast=s,s}).catch(t=>{throw K=null,t})),K)}async function Re(...e){return(await Ge())(...e)}async function T(...e){return(await I())(...e)}T.success=async(...e)=>(await I()).success(...e);T.error=async(...e)=>(await I()).error(...e);T.warning=async(...e)=>(await I()).warning(...e);T.info=async(...e)=>(await I()).info(...e);var xe=function(e="log",t,...s){let n=!!(r.registry&&!r.registry.isLive),a=(this?.debug||this?.design?.debug||r.debug||!1)===!0;if(n){if(!r.debug)return}else if(!a&&e!=="error"&&e!=="warn")return;let o=console[e]||console.log;s.length>0?o(t,...s):o(t)};function ae(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>ae(s)).filter(s=>s!==void 0);let t={};for(let[s,n]of Object.entries(e)){let a=ae(n);a!==void 0&&(t[s]=a)}return t}function De(e,t=new WeakSet){if(!e||typeof e!="object"||t.has(e))return e;t.add(e),Object.freeze(e);for(let s of Object.keys(e))De(e[s],t);return e}function ce(e){return e==null||typeof e!="object"?e:De(structuredClone(ae(e)))}async function Qe(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}r.registry=P;r.enums=be;r.adoptLayers=he;r.adoptPrimitives=me;r.parse=X;r.createStylesheet=ye;r.isLiveMode=()=>P.isLive;r.ask=Re;r.toast=T;r.common=Z;r.AutoComplete=null;r.loadAutoComplete=async()=>{if(r.AutoComplete&&typeof r.AutoComplete.connect=="function")return r.AutoComplete;let e=Q("pds-autocomplete.js",r.currentConfig?.autoCompleteURL);return H||(H=import(e).then(t=>{let s=t?.AutoComplete||t?.default?.AutoComplete||t?.default||null;if(!s)throw new Error("AutoComplete export not found in module");return r.AutoComplete=s,s}).catch(t=>{throw H=null,t})),H};function Pe(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");r.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function Te(e={}){let t=typeof CustomEvent=="function",s={at:Date.now(),...e};try{let n=t?new CustomEvent("pds:config-changed",{detail:s}):new Event("pds:config-changed");r.dispatchEvent(n)}catch{}if(typeof document<"u")if(t){let n={detail:s,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",n))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}var re="pure-ds-theme",j=null,$=null;function de(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function le(e){try{if(j&&$){try{typeof j.removeEventListener=="function"?j.removeEventListener("change",$):typeof j.removeListener=="function"&&j.removeListener($)}catch{}j=null,$=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let a=n?.matches===void 0?t.matches:n.matches;try{let o=a?"dark":"light";document.documentElement.setAttribute("data-theme",o),r.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:o,source:"system"}}))}catch{}};j=t,$=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}var Ye=Object.getOwnPropertyDescriptor(r,"theme");Ye||Object.defineProperty(r,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(re)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=r.currentConfig?.design||null,s=se(e);if(t&&!ke(t,s)){let n=t?.name||r.currentPreset?.name||r.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),r.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(re):localStorage.setItem(re,e),de(e),le(e),r.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});r.defaultEnhancers=[];async function Je(e){r.initializing=!0;try{let t=e&&e.mode||"live",{mode:s,...n}=e||{};r.currentConfig=ce(n);let a;if(t==="static")a=await Xe(n);else{let d=q(n,{resolvePublicAssetURL:z}),y=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",d).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:S}=await import(y);a=await S(r,n,{emitReady:Pe,emitConfigChanged:Te,applyResolvedTheme:de,setupSystemListenerIfNeeded:le})}r.compiled=ce(a?.config||null);let o=r?.compiled?.design?.icons?.externalPath||"/assets/img/icons/";return typeof console<"u"&&typeof console.info=="function"&&console.info(`[PDS] startup ready; external icon path: ${o}`),a}finally{r.initializing=!1}}r.start=Je;async function Xe(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",a=e.staticPaths??{},o=q(e,{resolvePublicAssetURL:z}),d=e&&e.autoDefine||null,y;d&&d.baseURL?y=W(B(d.baseURL,{preferModule:!1})):y=`${o}components/`;let S=d&&Array.isArray(d.predefine)&&d.predefine||[],h=d&&typeof d.mapper=="function"&&d.mapper||null;try{Le(r);let{resolvedTheme:c}=ve({manageTheme:s,themeStorageKey:n,applyResolvedTheme:de,setupSystemListenerIfNeeded:le}),i=await Qe(o,e),g=Array.isArray(e?.enhancers)?e.enhancers:e?.enhancers&&typeof e.enhancers=="object"?Object.values(e.enhancers):[],f=i?.config?{...i.config,...e,design:e?.design||i.config.design,preset:e?.preset||i.config.preset}:{...e},E={tokens:`${o}styles/pds-tokens.css.js`,primitives:`${o}styles/pds-primitives.css.js`,components:`${o}styles/pds-components.css.js`,utilities:`${o}styles/pds-utilities.css.js`,styles:`${o}styles/pds-styles.css.js`},w=i?.paths||{};if(a={...E,...w,...a},r.registry.setStaticMode(a),t&&typeof document<"u")try{let _=await r.registry.getStylesheet("styles");if(_){_._pds=!0;let m=(document.adoptedStyleSheets||[]).filter(b=>b._pds!==!0);document.adoptedStyleSheets=[...m,_],Te({mode:"static",source:"static:styles-applied"})}}catch(_){xe.call(r,"warn","Failed to apply static styles:",_)}let L=null,k=[];try{let _=await Ke(),m=await Ae({autoDefineBaseURL:y,autoDefinePreload:S,autoDefineMapper:h,enhancers:g,autoDefineOverrides:d||null,autoDefinePreferModule:!(d&&d.baseURL)},{baseEnhancers:_});L=m.autoDefiner,k=m.mergedEnhancers||[]}catch(_){xe.call(r,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",_)}return r.compiled=ce({mode:"static",...f,theme:c,enhancers:k}),Pe({mode:"static",config:f,theme:c,autoDefiner:L}),{config:f,theme:c,autoDefiner:L}}catch(c){throw r.dispatchEvent(new CustomEvent("pds:error",{detail:{error:c}})),c}}var Me={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(e,t,...s){console[e](t,...s)}};var A={name:"@pure-ds/core",shortname:"pds",version:"0.7.29",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/pds/core.js",module:"./public/assets/pds/core.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-setup-mcp":"packages/pds-cli/bin/pds-setup-mcp.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js","pds-mcp-server":"packages/pds-cli/bin/pds-mcp-server.js","pds-mcp-health":"packages/pds-cli/bin/pds-mcp-health.js","pds-mcp-eval":"packages/pds-cli/bin/pds-mcp-eval.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/pds/core.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/core.js","public/assets/pds/core/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","pds:mcp:server":"node packages/pds-cli/bin/pds-mcp-server.js","pds:mcp:health":"node packages/pds-cli/bin/pds-mcp-health.js","pds:mcp:eval":"node packages/pds-cli/bin/pds-mcp-eval.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.2","pure-web":"1.1.32"},customElements:"custom-elements.json"};await r.start(Me);var Ue=typeof A.repository=="string"?A.repository:A.repository?.url,et=Ue?Ue.replace(/^git\+/,"").replace(/\.git$/,""):"",Lt=A.homepage||et,vt=A.bugs?.url||"";document.body.innerHTML=`
|
|
3
3
|
<pds-toaster id="global-toaster"></pds-toaster>
|
|
4
4
|
|
|
5
5
|
<div class="container text-center">
|
|
@@ -1315,18 +1315,23 @@ select {
|
|
|
1315
1315
|
|
|
1316
1316
|
/* Button styling */
|
|
1317
1317
|
button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
1318
|
+
--btn-pad-y: max(calc(var(--spacing-1) * ${g}), var(--spacing-2));
|
|
1319
|
+
--btn-target-h: max(${h}px, calc(var(--font-size-base) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1318
1320
|
display: inline-flex;
|
|
1319
1321
|
gap: var(--spacing-1);
|
|
1320
1322
|
align-items: center;
|
|
1321
1323
|
justify-content: center;
|
|
1322
|
-
min-height:
|
|
1323
|
-
|
|
1324
|
+
min-height: var(--btn-target-h);
|
|
1325
|
+
height: var(--btn-target-h);
|
|
1326
|
+
padding: var(--btn-pad-y) var(--spacing-6);
|
|
1324
1327
|
border: var(--border-width-medium) solid transparent;
|
|
1325
1328
|
border-radius: var(--radius-md);
|
|
1329
|
+
box-sizing: border-box;
|
|
1326
1330
|
font-family: var(--font-family-body);
|
|
1327
1331
|
font-size: var(--font-size-base);
|
|
1328
1332
|
font-weight: var(--font-weight-medium);
|
|
1329
1333
|
line-height: 1;
|
|
1334
|
+
white-space: nowrap;
|
|
1330
1335
|
cursor: pointer;
|
|
1331
1336
|
transition: all var(--transition-fast);
|
|
1332
1337
|
text-decoration: none;
|
|
@@ -1476,22 +1481,31 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1476
1481
|
}
|
|
1477
1482
|
|
|
1478
1483
|
.btn-sm {
|
|
1479
|
-
|
|
1484
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${g}), var(--spacing-2)) * 0.85);
|
|
1485
|
+
--btn-target-h: max(calc(${h}px * 0.85), calc(var(--font-size-sm) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1486
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 0.8);
|
|
1480
1487
|
font-size: var(--font-size-sm);
|
|
1481
|
-
min-height:
|
|
1488
|
+
min-height: var(--btn-target-h);
|
|
1489
|
+
height: var(--btn-target-h);
|
|
1482
1490
|
}
|
|
1483
1491
|
|
|
1484
1492
|
.btn-xs {
|
|
1485
|
-
|
|
1493
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${g}), var(--spacing-2)) * 0.7);
|
|
1494
|
+
--btn-target-h: max(calc(${h}px * 0.7), calc(var(--font-size-xs) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1495
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 0.65);
|
|
1486
1496
|
font-size: var(--font-size-xs);
|
|
1487
|
-
min-height:
|
|
1497
|
+
min-height: var(--btn-target-h);
|
|
1498
|
+
height: var(--btn-target-h);
|
|
1488
1499
|
}
|
|
1489
1500
|
|
|
1490
1501
|
|
|
1491
1502
|
.btn-lg {
|
|
1492
|
-
|
|
1503
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${g}), var(--spacing-2)) * 1.15);
|
|
1504
|
+
--btn-target-h: max(calc(${h}px * 1.15), calc(var(--font-size-lg) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1505
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 1.35);
|
|
1493
1506
|
font-size: var(--font-size-lg);
|
|
1494
|
-
min-height:
|
|
1507
|
+
min-height: var(--btn-target-h);
|
|
1508
|
+
height: var(--btn-target-h);
|
|
1495
1509
|
}
|
|
1496
1510
|
|
|
1497
1511
|
/* Working/loading state for buttons */
|
|
@@ -2847,9 +2861,9 @@ nav[data-dropdown] {
|
|
|
2847
2861
|
}
|
|
2848
2862
|
|
|
2849
2863
|
/* Touch device optimizations */
|
|
2850
|
-
@media (
|
|
2864
|
+
@media (pointer: coarse) {
|
|
2851
2865
|
/* Touch devices - larger touch targets for interactive elements */
|
|
2852
|
-
|
|
2866
|
+
select, textarea,
|
|
2853
2867
|
input:not([type="radio"]):not([type="checkbox"]) {
|
|
2854
2868
|
min-height: ${o}px;
|
|
2855
2869
|
min-width: ${o}px;
|
|
@@ -1315,18 +1315,23 @@ select {
|
|
|
1315
1315
|
|
|
1316
1316
|
/* Button styling */
|
|
1317
1317
|
button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
1318
|
+
--btn-pad-y: max(calc(var(--spacing-1) * ${g}), var(--spacing-2));
|
|
1319
|
+
--btn-target-h: max(${h}px, calc(var(--font-size-base) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1318
1320
|
display: inline-flex;
|
|
1319
1321
|
gap: var(--spacing-1);
|
|
1320
1322
|
align-items: center;
|
|
1321
1323
|
justify-content: center;
|
|
1322
|
-
min-height:
|
|
1323
|
-
|
|
1324
|
+
min-height: var(--btn-target-h);
|
|
1325
|
+
height: var(--btn-target-h);
|
|
1326
|
+
padding: var(--btn-pad-y) var(--spacing-6);
|
|
1324
1327
|
border: var(--border-width-medium) solid transparent;
|
|
1325
1328
|
border-radius: var(--radius-md);
|
|
1329
|
+
box-sizing: border-box;
|
|
1326
1330
|
font-family: var(--font-family-body);
|
|
1327
1331
|
font-size: var(--font-size-base);
|
|
1328
1332
|
font-weight: var(--font-weight-medium);
|
|
1329
1333
|
line-height: 1;
|
|
1334
|
+
white-space: nowrap;
|
|
1330
1335
|
cursor: pointer;
|
|
1331
1336
|
transition: all var(--transition-fast);
|
|
1332
1337
|
text-decoration: none;
|
|
@@ -1476,22 +1481,31 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
1476
1481
|
}
|
|
1477
1482
|
|
|
1478
1483
|
.btn-sm {
|
|
1479
|
-
|
|
1484
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${g}), var(--spacing-2)) * 0.85);
|
|
1485
|
+
--btn-target-h: max(calc(${h}px * 0.85), calc(var(--font-size-sm) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1486
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 0.8);
|
|
1480
1487
|
font-size: var(--font-size-sm);
|
|
1481
|
-
min-height:
|
|
1488
|
+
min-height: var(--btn-target-h);
|
|
1489
|
+
height: var(--btn-target-h);
|
|
1482
1490
|
}
|
|
1483
1491
|
|
|
1484
1492
|
.btn-xs {
|
|
1485
|
-
|
|
1493
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${g}), var(--spacing-2)) * 0.7);
|
|
1494
|
+
--btn-target-h: max(calc(${h}px * 0.7), calc(var(--font-size-xs) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1495
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 0.65);
|
|
1486
1496
|
font-size: var(--font-size-xs);
|
|
1487
|
-
min-height:
|
|
1497
|
+
min-height: var(--btn-target-h);
|
|
1498
|
+
height: var(--btn-target-h);
|
|
1488
1499
|
}
|
|
1489
1500
|
|
|
1490
1501
|
|
|
1491
1502
|
.btn-lg {
|
|
1492
|
-
|
|
1503
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${g}), var(--spacing-2)) * 1.15);
|
|
1504
|
+
--btn-target-h: max(calc(${h}px * 1.15), calc(var(--font-size-lg) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
1505
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 1.35);
|
|
1493
1506
|
font-size: var(--font-size-lg);
|
|
1494
|
-
min-height:
|
|
1507
|
+
min-height: var(--btn-target-h);
|
|
1508
|
+
height: var(--btn-target-h);
|
|
1495
1509
|
}
|
|
1496
1510
|
|
|
1497
1511
|
/* Working/loading state for buttons */
|
|
@@ -2847,9 +2861,9 @@ nav[data-dropdown] {
|
|
|
2847
2861
|
}
|
|
2848
2862
|
|
|
2849
2863
|
/* Touch device optimizations */
|
|
2850
|
-
@media (
|
|
2864
|
+
@media (pointer: coarse) {
|
|
2851
2865
|
/* Touch devices - larger touch targets for interactive elements */
|
|
2852
|
-
|
|
2866
|
+
select, textarea,
|
|
2853
2867
|
input:not([type="radio"]):not([type="checkbox"]) {
|
|
2854
2868
|
min-height: ${o}px;
|
|
2855
2869
|
min-width: ${o}px;
|
|
@@ -2731,18 +2731,23 @@ select {
|
|
|
2731
2731
|
|
|
2732
2732
|
/* Button styling */
|
|
2733
2733
|
button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
2734
|
+
--btn-pad-y: max(calc(var(--spacing-1) * ${buttonPaddingValue}), var(--spacing-2));
|
|
2735
|
+
--btn-target-h: max(${minButtonHeight}px, calc(var(--font-size-base) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
2734
2736
|
display: inline-flex;
|
|
2735
2737
|
gap: var(--spacing-1);
|
|
2736
2738
|
align-items: center;
|
|
2737
2739
|
justify-content: center;
|
|
2738
|
-
min-height:
|
|
2739
|
-
|
|
2740
|
+
min-height: var(--btn-target-h);
|
|
2741
|
+
height: var(--btn-target-h);
|
|
2742
|
+
padding: var(--btn-pad-y) var(--spacing-6);
|
|
2740
2743
|
border: var(--border-width-medium) solid transparent;
|
|
2741
2744
|
border-radius: var(--radius-md);
|
|
2745
|
+
box-sizing: border-box;
|
|
2742
2746
|
font-family: var(--font-family-body);
|
|
2743
2747
|
font-size: var(--font-size-base);
|
|
2744
2748
|
font-weight: var(--font-weight-medium);
|
|
2745
2749
|
line-height: 1;
|
|
2750
|
+
white-space: nowrap;
|
|
2746
2751
|
cursor: pointer;
|
|
2747
2752
|
transition: all var(--transition-fast);
|
|
2748
2753
|
text-decoration: none;
|
|
@@ -2896,22 +2901,31 @@ button, .btn, input[type="submit"], input[type="button"], input[type="reset"] {
|
|
|
2896
2901
|
}
|
|
2897
2902
|
|
|
2898
2903
|
.btn-sm {
|
|
2899
|
-
|
|
2904
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${buttonPaddingValue}), var(--spacing-2)) * 0.85);
|
|
2905
|
+
--btn-target-h: max(calc(${minButtonHeight}px * 0.85), calc(var(--font-size-sm) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
2906
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 0.8);
|
|
2900
2907
|
font-size: var(--font-size-sm);
|
|
2901
|
-
min-height:
|
|
2908
|
+
min-height: var(--btn-target-h);
|
|
2909
|
+
height: var(--btn-target-h);
|
|
2902
2910
|
}
|
|
2903
2911
|
|
|
2904
2912
|
.btn-xs {
|
|
2905
|
-
|
|
2913
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${buttonPaddingValue}), var(--spacing-2)) * 0.7);
|
|
2914
|
+
--btn-target-h: max(calc(${minButtonHeight}px * 0.7), calc(var(--font-size-xs) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
2915
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 0.65);
|
|
2906
2916
|
font-size: var(--font-size-xs);
|
|
2907
|
-
min-height:
|
|
2917
|
+
min-height: var(--btn-target-h);
|
|
2918
|
+
height: var(--btn-target-h);
|
|
2908
2919
|
}
|
|
2909
2920
|
|
|
2910
2921
|
|
|
2911
2922
|
.btn-lg {
|
|
2912
|
-
|
|
2923
|
+
--btn-pad-y: calc(max(calc(var(--spacing-1) * ${buttonPaddingValue}), var(--spacing-2)) * 1.15);
|
|
2924
|
+
--btn-target-h: max(calc(${minButtonHeight}px * 1.15), calc(var(--font-size-lg) + (var(--btn-pad-y) * 2) + (var(--border-width-medium) * 2)));
|
|
2925
|
+
padding: var(--btn-pad-y) calc(var(--spacing-6) * 1.35);
|
|
2913
2926
|
font-size: var(--font-size-lg);
|
|
2914
|
-
min-height:
|
|
2927
|
+
min-height: var(--btn-target-h);
|
|
2928
|
+
height: var(--btn-target-h);
|
|
2915
2929
|
}
|
|
2916
2930
|
|
|
2917
2931
|
/* Working/loading state for buttons */
|
|
@@ -4412,9 +4426,9 @@ nav[data-dropdown] {
|
|
|
4412
4426
|
}
|
|
4413
4427
|
|
|
4414
4428
|
/* Touch device optimizations */
|
|
4415
|
-
@media (
|
|
4429
|
+
@media (pointer: coarse) {
|
|
4416
4430
|
/* Touch devices - larger touch targets for interactive elements */
|
|
4417
|
-
|
|
4431
|
+
select, textarea,
|
|
4418
4432
|
input:not([type="radio"]):not([type="checkbox"]) {
|
|
4419
4433
|
min-height: ${minTouchTarget}px;
|
|
4420
4434
|
min-width: ${minTouchTarget}px;
|