@bedrock-layout/solid 0.4.0 → 0.7.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/lib/index.cjs.js +159 -11
- package/lib/index.d.ts +89 -3
- package/lib/index.m.js +284 -8
- package/lib/index.umd.js +159 -11
- package/package.json +2 -2
package/lib/index.cjs.js
CHANGED
|
@@ -1,25 +1,92 @@
|
|
|
1
|
-
"use strict";var he=Object.defineProperty,de=Object.defineProperties;var pe=Object.getOwnPropertyDescriptors;var V=Object.getOwnPropertySymbols;var me=Object.prototype.hasOwnProperty,ye=Object.prototype.propertyIsEnumerable;var W=(e,t,n)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,q=(e,t)=>{for(var n in t||(t={}))me.call(t,n)&&W(e,n,t[n]);if(V)for(var n of V(t))ye.call(t,n)&&W(e,n,t[n]);return e},U=(e,t)=>de(e,pe(t));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";let be={data:""},xe=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||be,we=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Se=/\/\*[^]*?\*\/|\s\s+|\n/g,b=(e,t)=>{let n="",s="",l="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":s+=i[1]=="f"?b(o,i):i+"{"+b(o,i[1]=="k"?"":t)+"}":typeof o=="object"?s+=b(o,t?t.replace(/([^,])+/g,r=>i.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,r):r?r+" "+c:c)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=b.p?b.p(i,o):i+":"+o+";")}return n+(t&&l?t+"{"+l+"}":l)+s},S={},ee=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+ee(e[n]);return t}return e},Ae=(e,t,n,s,l)=>{let i=ee(e),o=S[i]||(S[i]=(r=>{let c=0,u=11;for(;c<r.length;)u=101*u+r.charCodeAt(c++)>>>0;return"go"+u})(i));if(!S[o]){let r=i!==e?e:(c=>{let u,f=[{}];for(;u=we.exec(c.replace(Se,""));)u[4]?f.shift():u[3]?f.unshift(f[0][u[3]]=f[0][u[3]]||{}):f[0][u[1]]=u[2];return f[0]})(e);S[o]=b(l?{["@keyframes "+o]:r}:r,n?"":"."+o)}return((r,c,u)=>{c.data.indexOf(r)==-1&&(c.data=u?r+c.data:c.data+r)})(S[o],t,s),o},Ce=(e,t,n)=>e.reduce((s,l,i)=>{let o=t[i];if(o&&o.call){let r=o(n),c=r&&r.props&&r.props.className||/^go/.test(r)&&r;o=c?"."+c:r&&typeof r=="object"?r.props?"":b(r,""):r===!1?"":r}return s+l+(o==null?"":o)},"");function P(e){let t=this||{},n=e.call?e(t.p):e;return Ae(n.unshift?n.raw?Ce(n,[].slice.call(arguments,1),t.p):n.reduce((s,l)=>Object.assign(s,l&&l.call?l(t.p):l),{}):n,xe(t.target),t.g,t.o,t.k)}P.bind({g:1});P.bind({k:1});const Ne=(e,t)=>e===t,Ee=Symbol("solid-proxy"),X={equals:Ne};let $e=ie;const T={},y=1,D=2,Pe={owned:null,cleanups:null,context:null,owner:null};var d=null;let N=null,a=null,A=null,g=null,m=null,I=0;function Te(e,t,n){const s=B(e,t,!0,y);E(s)}function C(e,t,n){const s=B(e,t,!1,y);E(s)}function K(e,t,n){n=n?Object.assign({},X,n):X;const s=B(e,t,!0,0);return s.pending=T,s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,E(s),ve.bind(s)}function Le(e){if(A)return e();let t;const n=A=[];try{t=e()}finally{A=null}return se(()=>{for(let s=0;s<n.length;s+=1){const l=n[s];if(l.pending!==T){const i=l.pending;l.pending=T,te(l,i)}}},!1),t}function M(e){let t,n=a;return a=null,t=e(),a=n,t}function Oe(e){const t=Symbol("context");return{id:t,Provider:Me(t),defaultValue:e}}function ke(e){return ce(d,e.id)||e.defaultValue}function je(e){const t=K(e);return K(()=>j(t()))}function ve(){const e=N;if(this.sources&&(this.state||e)){const t=g;g=null,this.state===y||e?E(this):_(this),g=t}if(a){const t=this.observers?this.observers.length:0;a.sources?(a.sources.push(this),a.sourceSlots.push(t)):(a.sources=[this],a.sourceSlots=[t]),this.observers?(this.observers.push(a),this.observerSlots.push(a.sources.length-1)):(this.observers=[a],this.observerSlots=[a.sources.length-1])}return this.value}function te(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(A)return e.pending===T&&A.push(e),e.pending=t,t;let s=!1;return e.value=t,e.observers&&e.observers.length&&se(()=>{for(let l=0;l<e.observers.length;l+=1){const i=e.observers[l];s&&N.disposed.has(i),i.pure?g.push(i):m.push(i),i.observers&&(s&&!i.tState||!s&&!i.state)&&le(i),s||(i.state=y)}if(g.length>1e6)throw g=[],new Error},!1),t}function E(e){if(!e.fn)return;re(e);const t=d,n=a,s=I;a=d=e,De(e,e.value,s),a=n,d=t}function De(e,t,n){let s;try{s=e.fn(t)}catch(l){oe(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?te(e,s):e.value=s,e.updatedAt=n)}function B(e,t,n,s=y,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:d,context:null,pure:n};return d===null||d!==Pe&&(d.owned?d.owned.push(i):d.owned=[i]),i}function ne(e){const t=N;if(e.state!==y)return e.state=0;if(e.suspense&&M(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<I);)(e.state||t)&&n.push(e);for(let s=n.length-1;s>=0;s--)if(e=n[s],e.state===y||t)E(e);else if(e.state===D||t){const l=g;g=null,_(e,n[0]),g=l}}function se(e,t){if(g)return e();let n=!1;t||(g=[]),m?n=!0:m=[],I++;try{return e()}catch(s){oe(s)}finally{Ie(n)}}function Ie(e){g&&(ie(g),g=null),!e&&(m.length?Le(()=>{$e(m),m=null}):m=null)}function ie(e){for(let t=0;t<e.length;t++)ne(e[t])}function _(e,t){e.state=0;const n=N;for(let s=0;s<e.sources.length;s+=1){const l=e.sources[s];l.sources&&(l.state===y||n?l!==t&&ne(l):(l.state===D||n)&&_(l,t))}}function le(e){const t=N;for(let n=0;n<e.observers.length;n+=1){const s=e.observers[n];(!s.state||t)&&(s.state=D,s.pure?g.push(s):m.push(s),s.observers&&le(s))}}function re(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const i=l.pop(),o=n.observerSlots.pop();s<l.length&&(i.sourceSlots[o]=s,l[s]=i,n.observerSlots[s]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)re(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function oe(e){throw e}function ce(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&ce(e.owner,t))}function j(e){if(typeof e=="function"&&!e.length)return j(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=j(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function Me(e){return function(n){let s;return Te(()=>s=M(()=>(d.context={[e]:n.value},je(()=>n.children)))),s}}function $(){return!0}const ue={get(e,t,n){return t===Ee?n:e.get(t)},has(e,t){return e.has(t)},set:$,deleteProperty:$,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:$,deleteProperty:$}},ownKeys(e){return e.keys()}};function k(e){return typeof e=="function"?e():e}function G(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const s=k(e[n])[t];if(s!==void 0)return s}},has(t){for(let n=e.length-1;n>=0;n--)if(t in k(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(k(e[n])));return[...new Set(t)]}},ue)}function H(e,...t){const n=new Set(t.flat()),s=Object.getOwnPropertyDescriptors(e),l=t.map(i=>{const o={};for(let r=0;r<i.length;r++){const c=i[r];Object.defineProperty(o,c,s[c]?s[c]:{get(){return e[c]},set(){return!0}})}return o});return l.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},ue)),l}const Be=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],_e=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Be]),Fe=new Set(["innerHTML","textContent","innerText","children"]),Ve={className:"class",htmlFor:"for"},R={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},We=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),qe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Ue(e,t,n){let s=n.length,l=t.length,i=s,o=0,r=0,c=t[l-1].nextSibling,u=null;for(;o<l||r<i;){if(t[o]===n[r]){o++,r++;continue}for(;t[l-1]===n[i-1];)l--,i--;if(l===o){const f=i<s?r?n[r-1].nextSibling:n[i-r]:c;for(;r<i;)e.insertBefore(n[r++],f)}else if(i===r)for(;o<l;)(!u||!u.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[i-1]&&n[r]===t[l-1]){const f=t[--l].nextSibling;e.insertBefore(n[r++],t[o++].nextSibling),e.insertBefore(n[--i],f),t[l]=n[i]}else{if(!u){u=new Map;let h=r;for(;h<i;)u.set(n[h],h++)}const f=u.get(t[o]);if(f!=null)if(r<f&&f<i){let h=o,p=1,w;for(;++h<l&&h<i&&!((w=u.get(t[h]))==null||w!==f+p);)p++;if(p>f-r){const O=t[o];for(;r<f;)e.insertBefore(n[r++],O)}else e.replaceChild(n[r++],t[o++])}else o++;else t[o++].remove()}}}const Q="_$DX_DELEGATE";function Xe(e,t=window.document){const n=t[Q]||(t[Q]=new Set);for(let s=0,l=e.length;s<l;s++){const i=e[s];n.has(i)||(n.add(i),t.addEventListener(i,ze))}}function Ke(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Ge(e,t,n,s){s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s)}function He(e,t,n,s){s?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,l=>n[0](n[1],l)):e.addEventListener(t,n)}function Re(e,t,n={}){const s=Object.keys(t||{}),l=Object.keys(n);let i,o;for(i=0,o=l.length;i<o;i++){const r=l[i];!r||r==="undefined"||t[r]||(Y(e,r,!1),delete n[r])}for(i=0,o=s.length;i<o;i++){const r=s[i],c=!!t[r];!r||r==="undefined"||n[r]===c||!c||(Y(e,r,!0),n[r]=c)}return n}function Qe(e,t,n={}){const s=e.style;if(t==null||typeof t=="string")return s.cssText=t;typeof n=="string"&&(n={});let l,i;for(i in n)t[i]==null&&s.removeProperty(i),delete n[i];for(i in t)l=t[i],l!==n[i]&&(s.setProperty(i,l),n[i]=l);return n}function Ye(e,t,n,s){typeof t=="function"?C(l=>J(e,t(),l,n,s)):J(e,t,void 0,n,s)}function Ze(e,t,n,s,l={}){for(const i in l)if(!(i in t)){if(i==="children")continue;Z(e,i,null,l[i],n)}for(const i in t){if(i==="children"){s||L(e,t.children);continue}const o=t[i];l[i]=Z(e,i,o,l[i],n)}}function Je(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Y(e,t,n){const s=t.trim().split(/\s+/);for(let l=0,i=s.length;l<i;l++)e.classList.toggle(s[l],n)}function Z(e,t,n,s,l){let i,o,r;if(t==="style")return Qe(e,n,s);if(t==="classList")return Re(e,n,s);if(n===s)return s;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const c=t.slice(2).toLowerCase(),u=We.has(c);He(e,c,n,u),u&&Xe([c])}else if((r=Fe.has(t))||!l&&(R[t]||(o=_e.has(t)))||(i=e.nodeName.includes("-")))i&&!o&&!r?e[Je(t)]=n:e[R[t]||t]=n;else{const c=l&&t.indexOf(":")>-1&&qe[t.split(":")[0]];c?Ge(e,c,t,n):Ke(e,Ve[t]||t,n)}return n}function ze(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const s=n[t];if(s&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?s(l,e):s(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function J(e,t,n={},s,l){return!l&&"children"in t&&C(()=>n.children=L(e,t.children,n.children)),C(()=>Ze(e,t,s,!0,n)),n}function L(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),o){let r=n[0];r&&r.nodeType===3?r.data=t:r=document.createTextNode(t),n=x(e,n,s,r)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=x(e,n,s);else{if(i==="function")return C(()=>{let r=t();for(;typeof r=="function";)r=r();n=L(e,r,n,s)}),()=>n;if(Array.isArray(t)){const r=[];if(v(r,t,l))return C(()=>n=L(e,r,n,s,!0)),()=>n;if(r.length===0){if(n=x(e,n,s),o)return n}else Array.isArray(n)?n.length===0?z(e,r,s):Ue(e,n,r):(n&&x(e),z(e,r));n=r}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=x(e,n,s,t);x(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function v(e,t,n){let s=!1;for(let l=0,i=t.length;l<i;l++){let o=t[l],r;if(o instanceof Node)e.push(o);else if(!(o==null||o===!0||o===!1))if(Array.isArray(o))s=v(e,o)||s;else if((r=typeof o)=="string")e.push(document.createTextNode(o));else if(r==="function")if(n){for(;typeof o=="function";)o=o();s=v(e,Array.isArray(o)?o:[o])||s}else e.push(o),s=!0;else e.push(document.createTextNode(o.toString()))}return s}function z(e,t,n){for(let s=0,l=t.length;s<l;s++)e.insertBefore(t[s],n)}function x(e,t,n,s){if(n===void 0)return e.textContent="";const l=s||document.createTextNode("");if(t.length){let i=!1;for(let o=t.length-1;o>=0;o--){const r=t[o];if(l!==r){const c=r.parentNode===e;!i&&!o?c?e.replaceChild(l,r):e.insertBefore(l,n):c&&r.remove()}else i=!0}}else e.insertBefore(l,n);return[l]}function et(e,...t){}const tt=!1,nt=Oe();function st(e){let t=this||{};return(...n)=>{const s=l=>{const i=ke(nt),o=G(l,{theme:i}),r=G(o,{get className(){const p=o.className,w="className"in o&&/^go[0-9]+/.test(p);let O=P.apply({target:t.target,o:w,p:o,g:t.g},n);return[p,O].filter(Boolean).join(" ")}}),[c,u]=H(r,["as"]),f=c.as||e;let h;if(typeof f=="function")h=f(u);else if(tt){const[p,w]=H(u,["children"]);h=et([`<${f} `,">",`</${f}>`],void 0,p.children||"")}else h=document.createElement(f),Ye(h,u);return h};return s.className=l=>M(()=>P.apply({target:t.target,p:l,g:t.g},n)),s}}const fe=new Proxy(st,{get(e,t){return e(t)}});function ae(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const ge={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"};function it(e){return e.reduce((t,[n,s])=>U(q({},t),{[n]:s}),{})}const F=(e,t)=>{var o,r;const n=(r=(o=t==null?void 0:t.space)!=null?o:t==null?void 0:t.spacing)!=null?r:ge,l=it(Object.entries(n).map(([c,u])=>[c,typeof u=="number"?`${u}px`:u]))[e];return ae(l)?l:void 0},lt=fe("div")`
|
|
1
|
+
"use strict";var me=Object.defineProperty,xe=Object.defineProperties;var be=Object.getOwnPropertyDescriptors;var X=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable;var K=(e,t,n)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,I=(e,t)=>{for(var n in t||(t={}))we.call(t,n)&&K(e,n,t[n]);if(X)for(var n of X(t))Se.call(t,n)&&K(e,n,t[n]);return e},D=(e,t)=>xe(e,be(t));Object.defineProperty(exports,"__esModule",{value:!0});exports[Symbol.toStringTag]="Module";let $e={data:""},Ae=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||$e,Ce=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ve=/\/\*[^]*?\*\/|\s\s+|\n/g,w=(e,t)=>{let n="",i="",r="";for(let s in e){let l=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+l+";":i+=s[1]=="f"?w(l,s):s+"{"+w(l,s[1]=="k"?"":t)+"}":typeof l=="object"?i+=w(l,t?t.replace(/([^,])+/g,o=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):s):l!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=w.p?w.p(s,l):s+":"+l+";")}return n+(t&&r?t+"{"+r+"}":r)+i},C={},re=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+re(e[n]);return t}return e},ke=(e,t,n,i,r)=>{let s=re(e),l=C[s]||(C[s]=(o=>{let c=0,a=11;for(;c<o.length;)a=101*a+o.charCodeAt(c++)>>>0;return"go"+a})(s));if(!C[l]){let o=s!==e?e:(c=>{let a,u=[{}];for(;a=Ce.exec(c.replace(ve,""));)a[4]?u.shift():a[3]?u.unshift(u[0][a[3]]=u[0][a[3]]||{}):u[0][a[1]]=a[2];return u[0]})(e);C[l]=w(r?{["@keyframes "+l]:o}:o,n?"":"."+l)}return((o,c,a)=>{c.data.indexOf(o)==-1&&(c.data=a?o+c.data:c.data+o)})(C[l],t,i),l},Ee=(e,t,n)=>e.reduce((i,r,s)=>{let l=t[s];if(l&&l.call){let o=l(n),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":w(o,""):o===!1?"":o}return i+r+(l==null?"":l)},"");function x(e){let t=this||{},n=e.call?e(t.p):e;return ke(n.unshift?n.raw?Ee(n,[].slice.call(arguments,1),t.p):n.reduce((i,r)=>Object.assign(i,r&&r.call?r(t.p):r),{}):n,Ae(t.target),t.g,t.o,t.k)}x.bind({g:1});x.bind({k:1});const Ne=(e,t)=>e===t,je=Symbol("solid-proxy"),G={equals:Ne};let Pe=ae;const O={},b=1,R=2,Oe={owned:null,cleanups:null,context:null,owner:null};var h=null;let E=null,f=null,v=null,g=null,m=null,V=0;function Te(e,t,n){const i=_(e,t,!0,b);N(i)}function k(e,t,n){const i=_(e,t,!1,b);N(i)}function H(e,t,n){n=n?Object.assign({},G,n):G;const i=_(e,t,!0,0);return i.pending=O,i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,N(i),ze.bind(i)}function Le(e){if(v)return e();let t;const n=v=[];try{t=e()}finally{v=null}return ce(()=>{for(let i=0;i<n.length;i+=1){const r=n[i];if(r.pending!==O){const s=r.pending;r.pending=O,le(r,s)}}},!1),t}function W(e){let t,n=f;return f=null,t=e(),f=n,t}function Ie(e){const t=Symbol("context");return{id:t,Provider:Re(t),defaultValue:e}}function De(e){return de(h,e.id)||e.defaultValue}function Me(e){const t=H(e);return H(()=>B(t()))}function ze(){const e=E;if(this.sources&&(this.state||e)){const t=g;g=null,this.state===b||e?N(this):U(this),g=t}if(f){const t=this.observers?this.observers.length:0;f.sources?(f.sources.push(this),f.sourceSlots.push(t)):(f.sources=[this],f.sourceSlots=[t]),this.observers?(this.observers.push(f),this.observerSlots.push(f.sources.length-1)):(this.observers=[f],this.observerSlots=[f.sources.length-1])}return this.value}function le(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(v)return e.pending===O&&v.push(e),e.pending=t,t;let i=!1;return e.value=t,e.observers&&e.observers.length&&ce(()=>{for(let r=0;r<e.observers.length;r+=1){const s=e.observers[r];i&&E.disposed.has(s),s.pure?g.push(s):m.push(s),s.observers&&(i&&!s.tState||!i&&!s.state)&&ue(s),i||(s.state=b)}if(g.length>1e6)throw g=[],new Error},!1),t}function N(e){if(!e.fn)return;fe(e);const t=h,n=f,i=V;f=h=e,Be(e,e.value,i),f=n,h=t}function Be(e,t,n){let i;try{i=e.fn(t)}catch(r){ge(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?le(e,i):e.value=i,e.updatedAt=n)}function _(e,t,n,i=b,r){const s={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:h,context:null,pure:n};return h===null||h!==Oe&&(h.owned?h.owned.push(s):h.owned=[s]),s}function oe(e){const t=E;if(e.state!==b)return e.state=0;if(e.suspense&&W(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<V);)(e.state||t)&&n.push(e);for(let i=n.length-1;i>=0;i--)if(e=n[i],e.state===b||t)N(e);else if(e.state===R||t){const r=g;g=null,U(e,n[0]),g=r}}function ce(e,t){if(g)return e();let n=!1;t||(g=[]),m?n=!0:m=[],V++;try{return e()}catch(i){ge(i)}finally{Fe(n)}}function Fe(e){g&&(ae(g),g=null),!e&&(m.length?Le(()=>{Pe(m),m=null}):m=null)}function ae(e){for(let t=0;t<e.length;t++)oe(e[t])}function U(e,t){e.state=0;const n=E;for(let i=0;i<e.sources.length;i+=1){const r=e.sources[i];r.sources&&(r.state===b||n?r!==t&&oe(r):(r.state===R||n)&&U(r,t))}}function ue(e){const t=E;for(let n=0;n<e.observers.length;n+=1){const i=e.observers[n];(!i.state||t)&&(i.state=R,i.pure?g.push(i):m.push(i),i.observers&&ue(i))}}function fe(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const s=r.pop(),l=n.observerSlots.pop();i<r.length&&(s.sourceSlots[l]=i,r[i]=s,n.observerSlots[i]=l)}}if(e.owned){for(t=0;t<e.owned.length;t++)fe(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function ge(e){throw e}function de(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&de(e.owner,t))}function B(e){if(typeof e=="function"&&!e.length)return B(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=B(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Re(e){return function(n){let i;return Te(()=>i=W(()=>(h.context={[e]:n.value},Me(()=>n.children)))),i}}function j(){return!0}const he={get(e,t,n){return t===je?n:e.get(t)},has(e,t){return e.has(t)},set:j,deleteProperty:j,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:j,deleteProperty:j}},ownKeys(e){return e.keys()}};function M(e){return typeof e=="function"?e():e}function Q(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const i=M(e[n])[t];if(i!==void 0)return i}},has(t){for(let n=e.length-1;n>=0;n--)if(t in M(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(M(e[n])));return[...new Set(t)]}},he)}function Y(e,...t){const n=new Set(t.flat()),i=Object.getOwnPropertyDescriptors(e),r=t.map(s=>{const l={};for(let o=0;o<s.length;o++){const c=s[o];Object.defineProperty(l,c,i[c]?i[c]:{get(){return e[c]},set(){return!0}})}return l});return r.push(new Proxy({get(s){return n.has(s)?void 0:e[s]},has(s){return n.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!n.has(s))}},he)),r}const Ve=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],We=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...Ve]),_e=new Set(["innerHTML","textContent","innerText","children"]),Ue={className:"class",htmlFor:"for"},Z={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},qe=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),Xe={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Ke(e,t,n){let i=n.length,r=t.length,s=i,l=0,o=0,c=t[r-1].nextSibling,a=null;for(;l<r||o<s;){if(t[l]===n[o]){l++,o++;continue}for(;t[r-1]===n[s-1];)r--,s--;if(r===l){const u=s<i?o?n[o-1].nextSibling:n[s-o]:c;for(;o<s;)e.insertBefore(n[o++],u)}else if(s===o)for(;l<r;)(!a||!a.has(t[l]))&&t[l].remove(),l++;else if(t[l]===n[s-1]&&n[o]===t[r-1]){const u=t[--r].nextSibling;e.insertBefore(n[o++],t[l++].nextSibling),e.insertBefore(n[--s],u),t[r]=n[s]}else{if(!a){a=new Map;let d=o;for(;d<s;)a.set(n[d],d++)}const u=a.get(t[l]);if(u!=null)if(o<u&&u<s){let d=l,p=1,A;for(;++d<r&&d<s&&!((A=a.get(t[d]))==null||A!==u+p);)p++;if(p>u-o){const L=t[l];for(;o<u;)e.insertBefore(n[o++],L)}else e.replaceChild(n[o++],t[l++])}else l++;else t[l++].remove()}}}const J="_$DX_DELEGATE";function Ge(e,t=window.document){const n=t[J]||(t[J]=new Set);for(let i=0,r=e.length;i<r;i++){const s=e[i];n.has(s)||(n.add(s),t.addEventListener(s,it))}}function He(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Qe(e,t,n,i){i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i)}function Ye(e,t,n,i){i?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,r=>n[0](n[1],r)):e.addEventListener(t,n)}function Ze(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let s,l;for(s=0,l=r.length;s<l;s++){const o=r[s];!o||o==="undefined"||t[o]||(ee(e,o,!1),delete n[o])}for(s=0,l=i.length;s<l;s++){const o=i[s],c=!!t[o];!o||o==="undefined"||n[o]===c||!c||(ee(e,o,!0),n[o]=c)}return n}function Je(e,t,n={}){const i=e.style;if(t==null||typeof t=="string")return i.cssText=t;typeof n=="string"&&(n={});let r,s;for(s in n)t[s]==null&&i.removeProperty(s),delete n[s];for(s in t)r=t[s],r!==n[s]&&(i.setProperty(s,r),n[s]=r);return n}function et(e,t,n,i){typeof t=="function"?k(r=>ne(e,t(),r,n,i)):ne(e,t,void 0,n,i)}function tt(e,t,n,i,r={}){for(const s in r)if(!(s in t)){if(s==="children")continue;te(e,s,null,r[s],n)}for(const s in t){if(s==="children"){i||T(e,t.children);continue}const l=t[s];r[s]=te(e,s,l,r[s],n)}}function nt(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function ee(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,s=i.length;r<s;r++)e.classList.toggle(i[r],n)}function te(e,t,n,i,r){let s,l,o;if(t==="style")return Je(e,n,i);if(t==="classList")return Ze(e,n,i);if(n===i)return i;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const c=t.slice(2).toLowerCase(),a=qe.has(c);Ye(e,c,n,a),a&&Ge([c])}else if((o=_e.has(t))||!r&&(Z[t]||(l=We.has(t)))||(s=e.nodeName.includes("-")))s&&!l&&!o?e[nt(t)]=n:e[Z[t]||t]=n;else{const c=r&&t.indexOf(":")>-1&&Xe[t.split(":")[0]];c?Qe(e,c,t,n):He(e,Ue[t]||t,n)}return n}function it(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i(r,e):i(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function ne(e,t,n={},i,r){return!r&&"children"in t&&k(()=>n.children=T(e,t.children,n.children)),k(()=>tt(e,t,i,!0,n)),n}function T(e,t,n,i,r){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,l=i!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number")if(s==="number"&&(t=t.toString()),l){let o=n[0];o&&o.nodeType===3?o.data=t:o=document.createTextNode(t),n=$(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||s==="boolean")n=$(e,n,i);else{if(s==="function")return k(()=>{let o=t();for(;typeof o=="function";)o=o();n=T(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[];if(F(o,t,r))return k(()=>n=T(e,o,n,i,!0)),()=>n;if(o.length===0){if(n=$(e,n,i),l)return n}else Array.isArray(n)?n.length===0?ie(e,o,i):Ke(e,n,o):(n&&$(e),ie(e,o));n=o}else if(t instanceof Node){if(Array.isArray(n)){if(l)return n=$(e,n,i,t);$(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function F(e,t,n){let i=!1;for(let r=0,s=t.length;r<s;r++){let l=t[r],o;if(l instanceof Node)e.push(l);else if(!(l==null||l===!0||l===!1))if(Array.isArray(l))i=F(e,l)||i;else if((o=typeof l)=="string")e.push(document.createTextNode(l));else if(o==="function")if(n){for(;typeof l=="function";)l=l();i=F(e,Array.isArray(l)?l:[l])||i}else e.push(l),i=!0;else e.push(document.createTextNode(l.toString()))}return i}function ie(e,t,n){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function $(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let s=!1;for(let l=t.length-1;l>=0;l--){const o=t[l];if(r!==o){const c=o.parentNode===e;!s&&!l?c?e.replaceChild(r,o):e.insertBefore(r,n):c&&o.remove()}else s=!0}}else e.insertBefore(r,n);return[r]}function st(e,...t){}const rt=!1,lt=Ie();function ot(e){let t=this||{};return(...n)=>{const i=r=>{const s=De(lt),l=Q(r,{theme:s}),o=Q(l,{get className(){const p=l.className,A="className"in l&&/^go[0-9]+/.test(p);let L=x.apply({target:t.target,o:A,p:l,g:t.g},n);return[p,L].filter(Boolean).join(" ")}}),[c,a]=Y(o,["as"]),u=c.as||e;let d;if(typeof u=="function")d=u(a);else if(rt){const[p,A]=Y(a,["children"]);d=st([`<${u} `,">",`</${u}>`],void 0,p.children||"")}else d=document.createElement(u),et(d,a);return d};return i.className=r=>W(()=>x.apply({target:t.target,p:r,g:t.g},n)),i}}const y=new Proxy(ot,{get(e,t){return e(t)}});function ye(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const q={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"};function ct(e){return e.reduce((t,[n,i])=>D(I({},t),{[n]:i}),{})}const S=(e,t)=>{var l,o;const n=(o=(l=t==null?void 0:t.space)!=null?l:t==null?void 0:t.spacing)!=null?o:q,r=ct(Object.entries(n).map(([c,a])=>[c,typeof a=="number"?`${a}px`:a]))[e];return ye(r)?r:void 0};function at(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ut=y("div")`
|
|
2
|
+
@property --maxWidth {
|
|
3
|
+
syntax: "<length-percentage>";
|
|
4
|
+
inherits: false;
|
|
5
|
+
initial-value: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
--maxWidth: ${e=>at(e.maxWidth)};
|
|
9
|
+
|
|
10
|
+
box-sizing: content-box;
|
|
11
|
+
|
|
12
|
+
margin-inline-start: auto;
|
|
13
|
+
margin-inline-end: auto;
|
|
14
|
+
margin-inline: auto;
|
|
15
|
+
|
|
16
|
+
max-inline-size: var(--maxWidth, 100%);
|
|
17
|
+
|
|
18
|
+
${e=>e.centerChildren?x`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
`:""}
|
|
23
|
+
|
|
24
|
+
${e=>e.centerText?x`
|
|
25
|
+
text-align: center;
|
|
26
|
+
`:""}
|
|
27
|
+
`;function ft(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const gt=y("div")`
|
|
28
|
+
@property --basis {
|
|
29
|
+
syntax: "<length-percentage>";
|
|
30
|
+
inherits: true;
|
|
31
|
+
initial-value: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
2
34
|
@property --gutter {
|
|
3
35
|
syntax: "<length-percentage>";
|
|
4
36
|
inherits: false;
|
|
5
|
-
initial-value:
|
|
37
|
+
initial-value: 0px;
|
|
6
38
|
}
|
|
7
39
|
|
|
8
|
-
--
|
|
40
|
+
--basis: ${e=>ft(e.basis)};
|
|
41
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
42
|
+
|
|
9
43
|
box-sizing: border-box;
|
|
10
44
|
> * {
|
|
11
45
|
margin: 0;
|
|
46
|
+
flex-basis: var(--basis, 100%);
|
|
47
|
+
flex-grow: ${e=>e.noStretchedColumns?"0":"1"};
|
|
48
|
+
flex-shrink: 1;
|
|
12
49
|
}
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
50
|
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
16
53
|
gap: var(--gutter, 0px);
|
|
17
|
-
|
|
54
|
+
`;function dt(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function ht(e){return Array.isArray(e)?e.join("/"):e}function yt(e){return dt(e)?ht(e):void 0}const pt=y.div`
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: block;
|
|
57
|
+
inline-size: 100%;
|
|
58
|
+
position: relative;
|
|
59
|
+
overflow: hidden;
|
|
18
60
|
|
|
19
|
-
|
|
20
|
-
|
|
61
|
+
${e=>{const t=yt(e.ratio);return t?x`
|
|
62
|
+
aspect-ratio: ${t};
|
|
63
|
+
`:""}};
|
|
64
|
+
|
|
65
|
+
> * {
|
|
66
|
+
position: absolute;
|
|
67
|
+
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
inset-block-end: 0;
|
|
70
|
+
inset-inline-start: 0;
|
|
71
|
+
inset-inline-end: 0;
|
|
72
|
+
|
|
73
|
+
inset-block: 0;
|
|
74
|
+
inset-inline: 0;
|
|
75
|
+
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> :is(img, video) {
|
|
82
|
+
inline-size: 100%;
|
|
83
|
+
block-size: 100%;
|
|
84
|
+
size: 100%;
|
|
85
|
+
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
|
|
21
88
|
}
|
|
22
|
-
`,
|
|
89
|
+
`,mt=y("div")`
|
|
23
90
|
@property --gutter {
|
|
24
91
|
syntax: "<length-percentage>";
|
|
25
92
|
inherits: false;
|
|
@@ -32,7 +99,7 @@
|
|
|
32
99
|
initial-value: 639px;
|
|
33
100
|
}
|
|
34
101
|
|
|
35
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=
|
|
102
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
36
103
|
--minItemWidth: ${e=>{var t;return typeof e.minItemWidth=="string"?e.minItemWidth:`${(t=e.minItemWidth)!=null?t:0}px`}};
|
|
37
104
|
|
|
38
105
|
box-sizing: border-box;
|
|
@@ -47,4 +114,85 @@
|
|
|
47
114
|
auto-fit,
|
|
48
115
|
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
49
116
|
);
|
|
50
|
-
|
|
117
|
+
`,P={start:"flex-start",end:"flex-end",center:"center"},z=D(I({},P),{stretch:"stretch"}),pe=y.div`
|
|
118
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
119
|
+
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
> * {
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
gap: var(--gutter, 0px);
|
|
128
|
+
|
|
129
|
+
justify-content: ${e=>typeof e.justify!="undefined"&&P[e.justify]?P[e.justify]:P.start};
|
|
130
|
+
|
|
131
|
+
align-items: ${e=>typeof e.align!="undefined"&&z[e.align]?z[e.align]:z.start};
|
|
132
|
+
`;function xt(e){return e&&e>-1?!0:typeof e=="string"&&typeof CSS!==void 0?CSS.supports(`height: ${e}`):!1}const bt=y(pe)`
|
|
133
|
+
@property --switchAt {
|
|
134
|
+
syntax: "<length-percentage>";
|
|
135
|
+
inherits: true;
|
|
136
|
+
initial-value: 0;
|
|
137
|
+
}
|
|
138
|
+
flex-wrap: nowrap;
|
|
139
|
+
${e=>e.stretch==="all"?"> * { flex: 1 }":e.stretch==="start"?"> :first-child { flex: 1 }":e.stretch==="end"?"> :last-child { flex: 1 }":typeof e.stretch=="number"?`> :nth-child(${e.stretch+1}) { flex: 1 }`:""}
|
|
140
|
+
|
|
141
|
+
${e=>xt(e.switchAt)?x`
|
|
142
|
+
--switchAt: ${typeof e.switchAt=="string"?e.switchAt:`${e.switchAt}px`};
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
> * {
|
|
145
|
+
min-inline-size: fit-content;
|
|
146
|
+
flex-basis: calc(
|
|
147
|
+
(var(--switchAt) - (100% - var(--gutter, 0px))) * 999
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
`:""}
|
|
151
|
+
|
|
152
|
+
&[style*="--switchAt"] {
|
|
153
|
+
flex-wrap: wrap;
|
|
154
|
+
> * {
|
|
155
|
+
min-inline-size: fit-content;
|
|
156
|
+
flex-basis: calc((var(--switchAt) - (100% - var(--gutter, 0px))) * 999);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`,se=new Set(["left","right","top","bottom","inlineStart","inlineEnd","blockStart","blockEnd"]),wt=(e,t)=>({left:`padding-inline-start:${t};`,right:`padding-inline-end:${t};`,top:`padding-block-start:${t};`,bottom:`padding-block-end:${t};`,inlineStart:`padding-inline-start:${t};`,inlineEnd:`padding-inline-end:${t};`,blockStart:`padding-block-start:${t};`,blockEnd:`padding-block-end:${t};`})[e];function St(e){return t=>{const n=S(t,e);return n!=null?n:"0px"}}function $t(e,t){var s;if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=new Set(Object.keys((s=e==null?void 0:e.spacing)!=null?s:q));(()=>typeof t=="string"?!0:Array.isArray(t)?t.every(l=>n.has(l)):t&&Object.keys(t).every(l=>se.has(l))&&Object.values(t).every(l=>n.has(l)))()||console.error("Invalid padding Type");const r=St(e);return typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((l,[o,c])=>se.has(o)?l+wt(o,r(c)):l,""):t?`padding: ${Array.from(Array.isArray(t)?t:[t]).map(l=>r(l)).join(" ")}`:""}const At=y.div`
|
|
160
|
+
box-sizing: border-box;
|
|
161
|
+
${e=>$t(e.theme,e.padding)}
|
|
162
|
+
`,Ct=y.div`
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
> * {
|
|
165
|
+
margin: 0;
|
|
166
|
+
scroll-snap-align: start;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
170
|
+
|
|
171
|
+
display: flex;
|
|
172
|
+
gap: var(--gutter, 0px);
|
|
173
|
+
|
|
174
|
+
overflow-x: scroll;
|
|
175
|
+
|
|
176
|
+
scroll-snap-type: ${({snapType:e="none"})=>{switch(e){case"none":return"none";case"proximity":return"x proximity";case"mandatory":return"x mandatory";default:return"none"}}};
|
|
177
|
+
`,vt=y("div")`
|
|
178
|
+
@property --gutter {
|
|
179
|
+
syntax: "<length-percentage>";
|
|
180
|
+
inherits: false;
|
|
181
|
+
initial-value: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=S(e.gutter,e.theme))!=null?t:"0px"}};
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
> * {
|
|
187
|
+
margin: 0;
|
|
188
|
+
}
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
|
|
192
|
+
gap: var(--gutter, 0px);
|
|
193
|
+
align-content: start;
|
|
194
|
+
|
|
195
|
+
& > [data-bedrock-column] {
|
|
196
|
+
grid-column: span 1 / auto;
|
|
197
|
+
}
|
|
198
|
+
`;exports.Center=ut;exports.ColumnDrop=gt;exports.Frame=pt;exports.Grid=mt;exports.Inline=bt;exports.InlineCluster=pe;exports.PadBox=At;exports.Reel=Ct;exports.Stack=vt;exports.checkIsCSSLength=ye;exports.getSpacingValue=S;exports.spacing=q;
|
package/lib/index.d.ts
CHANGED
|
@@ -28,11 +28,32 @@ declare type SpacingOptions = ThemeOrDefaultSpace<DefaultTheme>;
|
|
|
28
28
|
declare type MaybeValue = CSSLength | undefined;
|
|
29
29
|
declare type GetSpacingValue = (spacingKey: SpacingOptions, theme?: Partial<BaseTheme>) => MaybeValue;
|
|
30
30
|
export declare const getSpacingValue: GetSpacingValue;
|
|
31
|
-
|
|
31
|
+
declare type MaxWidth = number | CSSLength;
|
|
32
|
+
export interface CenterProps {
|
|
33
|
+
maxWidth?: MaxWidth;
|
|
34
|
+
centerText?: boolean;
|
|
35
|
+
centerChildren?: boolean;
|
|
36
|
+
}
|
|
37
|
+
export declare const Center: ((props: CenterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
38
|
+
className: (props: CenterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
39
|
+
};
|
|
40
|
+
declare type Basis = CSSLength | number;
|
|
41
|
+
export interface ColumnDropProps {
|
|
32
42
|
gutter?: SpacingOptions;
|
|
43
|
+
basis?: Basis;
|
|
44
|
+
noStretchedColumns?: boolean;
|
|
33
45
|
}
|
|
34
|
-
export declare const
|
|
35
|
-
className: (props:
|
|
46
|
+
export declare const ColumnDrop: ((props: ColumnDropProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
47
|
+
className: (props: ColumnDropProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
48
|
+
};
|
|
49
|
+
declare type RatioString = `${number}/${number}` | `${number} / ${number}`;
|
|
50
|
+
declare type Ratio = [number, number] | RatioString;
|
|
51
|
+
export interface FrameProps {
|
|
52
|
+
ratio?: Ratio;
|
|
53
|
+
position?: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const Frame: ((props: FrameProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
56
|
+
className: (props: FrameProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
36
57
|
};
|
|
37
58
|
declare type MinItemWidth = number | CSSLength;
|
|
38
59
|
export interface GridProps {
|
|
@@ -42,4 +63,69 @@ export interface GridProps {
|
|
|
42
63
|
export declare const Grid: ((props: GridProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
43
64
|
className: (props: GridProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
44
65
|
};
|
|
66
|
+
declare const justifyMap: {
|
|
67
|
+
readonly start: "flex-start";
|
|
68
|
+
readonly end: "flex-end";
|
|
69
|
+
readonly center: "center";
|
|
70
|
+
};
|
|
71
|
+
declare const alignMap: {
|
|
72
|
+
readonly stretch: "stretch";
|
|
73
|
+
readonly start: "flex-start";
|
|
74
|
+
readonly end: "flex-end";
|
|
75
|
+
readonly center: "center";
|
|
76
|
+
};
|
|
77
|
+
export interface InlineClusterProps {
|
|
78
|
+
justify?: keyof typeof justifyMap;
|
|
79
|
+
align?: keyof typeof alignMap;
|
|
80
|
+
gutter: SpacingOptions;
|
|
81
|
+
}
|
|
82
|
+
export declare const InlineCluster: ((props: InlineClusterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
83
|
+
className: (props: InlineClusterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
84
|
+
};
|
|
85
|
+
declare type Stretch = "all" | "start" | "end" | number;
|
|
86
|
+
declare type SwitchAt = string | number;
|
|
87
|
+
export interface InlineProps extends InlineClusterProps {
|
|
88
|
+
stretch?: Stretch;
|
|
89
|
+
switchAt?: SwitchAt;
|
|
90
|
+
}
|
|
91
|
+
export declare const Inline: ((props: InlineProps & InlineClusterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
92
|
+
className: (props: InlineProps & InlineClusterProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
93
|
+
};
|
|
94
|
+
declare type PaddingObj = {
|
|
95
|
+
left: SpacingOptions;
|
|
96
|
+
} | {
|
|
97
|
+
right: SpacingOptions;
|
|
98
|
+
} | {
|
|
99
|
+
top: SpacingOptions;
|
|
100
|
+
} | {
|
|
101
|
+
bottom: SpacingOptions;
|
|
102
|
+
} | {
|
|
103
|
+
inlineStart: SpacingOptions;
|
|
104
|
+
} | {
|
|
105
|
+
inlineEnd: SpacingOptions;
|
|
106
|
+
} | {
|
|
107
|
+
blockStart: SpacingOptions;
|
|
108
|
+
} | {
|
|
109
|
+
blockEnd: SpacingOptions;
|
|
110
|
+
};
|
|
111
|
+
declare type PaddingTypes = SpacingOptions | PaddingObj | [SpacingOptions] | [SpacingOptions, SpacingOptions] | [SpacingOptions, SpacingOptions, SpacingOptions] | [SpacingOptions, SpacingOptions, SpacingOptions, SpacingOptions];
|
|
112
|
+
export interface PadBoxProps {
|
|
113
|
+
padding: PaddingTypes;
|
|
114
|
+
}
|
|
115
|
+
export declare const PadBox: ((props: PadBoxProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
116
|
+
className: (props: PadBoxProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
117
|
+
};
|
|
118
|
+
export interface ReelProps {
|
|
119
|
+
snapType?: "none" | "proximity" | "mandatory";
|
|
120
|
+
gutter: SpacingOptions;
|
|
121
|
+
}
|
|
122
|
+
export declare const Reel: ((props: ReelProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
123
|
+
className: (props: ReelProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
124
|
+
};
|
|
125
|
+
export interface StackProps {
|
|
126
|
+
gutter?: SpacingOptions;
|
|
127
|
+
}
|
|
128
|
+
export declare const Stack: ((props: StackProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => import("solid-js").JSX.Element) & {
|
|
129
|
+
className: (props: StackProps & import("solid-js").JSX.HTMLAttributes<HTMLDivElement>) => string;
|
|
130
|
+
};
|
|
45
131
|
export {};
|
package/lib/index.m.js
CHANGED
|
@@ -951,29 +951,129 @@ const getSpacingValue = (spacingKey, theme) => {
|
|
|
951
951
|
const isCSSLength = checkIsCSSLength(spacingVal);
|
|
952
952
|
return isCSSLength ? spacingVal : void 0;
|
|
953
953
|
};
|
|
954
|
-
|
|
954
|
+
function getSafeMaxWidth(maxWidth) {
|
|
955
|
+
if (maxWidth === void 0)
|
|
956
|
+
return "100%";
|
|
957
|
+
if (typeof maxWidth === "number")
|
|
958
|
+
return `${maxWidth}px`;
|
|
959
|
+
return maxWidth;
|
|
960
|
+
}
|
|
961
|
+
const Center = styled("div")`
|
|
962
|
+
@property --maxWidth {
|
|
963
|
+
syntax: "<length-percentage>";
|
|
964
|
+
inherits: false;
|
|
965
|
+
initial-value: 100%;
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
--maxWidth: ${(props) => getSafeMaxWidth(props.maxWidth)};
|
|
969
|
+
|
|
970
|
+
box-sizing: content-box;
|
|
971
|
+
|
|
972
|
+
margin-inline-start: auto;
|
|
973
|
+
margin-inline-end: auto;
|
|
974
|
+
margin-inline: auto;
|
|
975
|
+
|
|
976
|
+
max-inline-size: var(--maxWidth, 100%);
|
|
977
|
+
|
|
978
|
+
${(props) => props.centerChildren ? u`
|
|
979
|
+
display: flex;
|
|
980
|
+
flex-direction: column;
|
|
981
|
+
align-items: center;
|
|
982
|
+
` : ""}
|
|
983
|
+
|
|
984
|
+
${(props) => props.centerText ? u`
|
|
985
|
+
text-align: center;
|
|
986
|
+
` : ""}
|
|
987
|
+
`;
|
|
988
|
+
function getSafeBasis(basis) {
|
|
989
|
+
if (basis === void 0)
|
|
990
|
+
return "100%";
|
|
991
|
+
if (typeof basis === "number")
|
|
992
|
+
return `${basis}px`;
|
|
993
|
+
return basis;
|
|
994
|
+
}
|
|
995
|
+
const ColumnDrop = styled("div")`
|
|
996
|
+
@property --basis {
|
|
997
|
+
syntax: "<length-percentage>";
|
|
998
|
+
inherits: true;
|
|
999
|
+
initial-value: 100%;
|
|
1000
|
+
}
|
|
1001
|
+
|
|
955
1002
|
@property --gutter {
|
|
956
1003
|
syntax: "<length-percentage>";
|
|
957
1004
|
inherits: false;
|
|
958
|
-
initial-value:
|
|
1005
|
+
initial-value: 0px;
|
|
959
1006
|
}
|
|
960
1007
|
|
|
1008
|
+
--basis: ${(props) => getSafeBasis(props.basis)};
|
|
961
1009
|
--gutter: ${(props) => {
|
|
962
1010
|
var _a;
|
|
963
1011
|
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
964
1012
|
}};
|
|
1013
|
+
|
|
965
1014
|
box-sizing: border-box;
|
|
966
1015
|
> * {
|
|
967
1016
|
margin: 0;
|
|
1017
|
+
flex-basis: var(--basis, 100%);
|
|
1018
|
+
flex-grow: ${(props) => props.noStretchedColumns ? "0" : "1"};
|
|
1019
|
+
flex-shrink: 1;
|
|
968
1020
|
}
|
|
969
|
-
display: flex;
|
|
970
|
-
flex-direction: column;
|
|
971
1021
|
|
|
1022
|
+
display: flex;
|
|
1023
|
+
flex-wrap: wrap;
|
|
972
1024
|
gap: var(--gutter, 0px);
|
|
973
|
-
|
|
1025
|
+
`;
|
|
1026
|
+
function checkIsRatio(ratio) {
|
|
1027
|
+
const isCorrectArray = Array.isArray(ratio) && ratio.length === 2 && ratio.every(Number.isFinite);
|
|
1028
|
+
return isCorrectArray || typeof ratio === "string" && /^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(ratio);
|
|
1029
|
+
}
|
|
1030
|
+
function getRatioString(ratio) {
|
|
1031
|
+
return Array.isArray(ratio) ? ratio.join("/") : ratio;
|
|
1032
|
+
}
|
|
1033
|
+
function getSafeRatio(ratio) {
|
|
1034
|
+
const isRatio = checkIsRatio(ratio);
|
|
1035
|
+
return isRatio ? getRatioString(ratio) : void 0;
|
|
1036
|
+
}
|
|
1037
|
+
const Frame = styled.div`
|
|
1038
|
+
box-sizing: border-box;
|
|
1039
|
+
display: block;
|
|
1040
|
+
inline-size: 100%;
|
|
1041
|
+
position: relative;
|
|
1042
|
+
overflow: hidden;
|
|
974
1043
|
|
|
975
|
-
|
|
976
|
-
|
|
1044
|
+
${(props) => {
|
|
1045
|
+
const maybeRatio = getSafeRatio(props.ratio);
|
|
1046
|
+
if (maybeRatio) {
|
|
1047
|
+
return u`
|
|
1048
|
+
aspect-ratio: ${maybeRatio};
|
|
1049
|
+
`;
|
|
1050
|
+
}
|
|
1051
|
+
return "";
|
|
1052
|
+
}};
|
|
1053
|
+
|
|
1054
|
+
> * {
|
|
1055
|
+
position: absolute;
|
|
1056
|
+
|
|
1057
|
+
inset-block-start: 0;
|
|
1058
|
+
inset-block-end: 0;
|
|
1059
|
+
inset-inline-start: 0;
|
|
1060
|
+
inset-inline-end: 0;
|
|
1061
|
+
|
|
1062
|
+
inset-block: 0;
|
|
1063
|
+
inset-inline: 0;
|
|
1064
|
+
|
|
1065
|
+
display: flex;
|
|
1066
|
+
justify-content: center;
|
|
1067
|
+
align-items: center;
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
> :is(img, video) {
|
|
1071
|
+
inline-size: 100%;
|
|
1072
|
+
block-size: 100%;
|
|
1073
|
+
size: 100%;
|
|
1074
|
+
|
|
1075
|
+
object-fit: cover;
|
|
1076
|
+
object-position: ${(props) => typeof props.position === "string" ? props.position : "50%"};
|
|
977
1077
|
}
|
|
978
1078
|
`;
|
|
979
1079
|
const Grid = styled("div")`
|
|
@@ -1011,4 +1111,180 @@ const Grid = styled("div")`
|
|
|
1011
1111
|
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
1012
1112
|
);
|
|
1013
1113
|
`;
|
|
1014
|
-
|
|
1114
|
+
const justifyMap = {
|
|
1115
|
+
start: "flex-start",
|
|
1116
|
+
end: "flex-end",
|
|
1117
|
+
center: "center"
|
|
1118
|
+
};
|
|
1119
|
+
const alignMap = __spreadProps(__spreadValues({}, justifyMap), {
|
|
1120
|
+
stretch: "stretch"
|
|
1121
|
+
});
|
|
1122
|
+
const InlineCluster = styled.div`
|
|
1123
|
+
--gutter: ${(props) => {
|
|
1124
|
+
var _a;
|
|
1125
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1126
|
+
}};
|
|
1127
|
+
|
|
1128
|
+
box-sizing: border-box;
|
|
1129
|
+
> * {
|
|
1130
|
+
margin: 0;
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
display: flex;
|
|
1134
|
+
flex-wrap: wrap;
|
|
1135
|
+
gap: var(--gutter, 0px);
|
|
1136
|
+
|
|
1137
|
+
justify-content: ${(props) => typeof props.justify !== "undefined" && justifyMap[props.justify] ? justifyMap[props.justify] : justifyMap.start};
|
|
1138
|
+
|
|
1139
|
+
align-items: ${(props) => typeof props.align !== "undefined" && alignMap[props.align] ? alignMap[props.align] : alignMap.start};
|
|
1140
|
+
`;
|
|
1141
|
+
function shouldUseSwitch(switchAt) {
|
|
1142
|
+
if (switchAt && switchAt > -1) {
|
|
1143
|
+
return true;
|
|
1144
|
+
}
|
|
1145
|
+
if (typeof switchAt === "string" && typeof CSS !== void 0) {
|
|
1146
|
+
return CSS.supports(`height: ${switchAt}`);
|
|
1147
|
+
}
|
|
1148
|
+
return false;
|
|
1149
|
+
}
|
|
1150
|
+
const Inline = styled(InlineCluster)`
|
|
1151
|
+
@property --switchAt {
|
|
1152
|
+
syntax: "<length-percentage>";
|
|
1153
|
+
inherits: true;
|
|
1154
|
+
initial-value: 0;
|
|
1155
|
+
}
|
|
1156
|
+
flex-wrap: nowrap;
|
|
1157
|
+
${(props) => props.stretch === "all" ? `> * { flex: 1 }` : props.stretch === "start" ? `> :first-child { flex: 1 }` : props.stretch === "end" ? `> :last-child { flex: 1 }` : typeof props.stretch === "number" ? `> :nth-child(${props.stretch + 1}) { flex: 1 }` : ""}
|
|
1158
|
+
|
|
1159
|
+
${(props) => shouldUseSwitch(props.switchAt) ? u`
|
|
1160
|
+
--switchAt: ${typeof props.switchAt === "string" ? props.switchAt : `${props.switchAt}px`};
|
|
1161
|
+
flex-wrap: wrap;
|
|
1162
|
+
> * {
|
|
1163
|
+
min-inline-size: fit-content;
|
|
1164
|
+
flex-basis: calc(
|
|
1165
|
+
(var(--switchAt) - (100% - var(--gutter, 0px))) * 999
|
|
1166
|
+
);
|
|
1167
|
+
}
|
|
1168
|
+
` : ""}
|
|
1169
|
+
|
|
1170
|
+
&[style*="--switchAt"] {
|
|
1171
|
+
flex-wrap: wrap;
|
|
1172
|
+
> * {
|
|
1173
|
+
min-inline-size: fit-content;
|
|
1174
|
+
flex-basis: calc((var(--switchAt) - (100% - var(--gutter, 0px))) * 999);
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
`;
|
|
1178
|
+
const validKeys = /* @__PURE__ */ new Set([
|
|
1179
|
+
"left",
|
|
1180
|
+
"right",
|
|
1181
|
+
"top",
|
|
1182
|
+
"bottom",
|
|
1183
|
+
"inlineStart",
|
|
1184
|
+
"inlineEnd",
|
|
1185
|
+
"blockStart",
|
|
1186
|
+
"blockEnd"
|
|
1187
|
+
]);
|
|
1188
|
+
const keyToProperty = (key, val) => {
|
|
1189
|
+
const modernMap = {
|
|
1190
|
+
left: `padding-inline-start:${val};`,
|
|
1191
|
+
right: `padding-inline-end:${val};`,
|
|
1192
|
+
top: `padding-block-start:${val};`,
|
|
1193
|
+
bottom: `padding-block-end:${val};`,
|
|
1194
|
+
inlineStart: `padding-inline-start:${val};`,
|
|
1195
|
+
inlineEnd: `padding-inline-end:${val};`,
|
|
1196
|
+
blockStart: `padding-block-start:${val};`,
|
|
1197
|
+
blockEnd: `padding-block-end:${val};`
|
|
1198
|
+
};
|
|
1199
|
+
return modernMap[key];
|
|
1200
|
+
};
|
|
1201
|
+
function paddingOrDefault(theme) {
|
|
1202
|
+
return (key) => {
|
|
1203
|
+
const maybePadding = getSpacingValue(key, theme);
|
|
1204
|
+
return maybePadding != null ? maybePadding : "0px";
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
function paddingToString(theme, padding) {
|
|
1208
|
+
var _a;
|
|
1209
|
+
if (Array.isArray(padding) && padding.length > 4) {
|
|
1210
|
+
throw new Error("padding arrays can only be 4 or less in length");
|
|
1211
|
+
}
|
|
1212
|
+
const validSpacings = new Set(Object.keys((_a = theme == null ? void 0 : theme.spacing) != null ? _a : spacing));
|
|
1213
|
+
const isValidPadding = () => {
|
|
1214
|
+
if (typeof padding === "string")
|
|
1215
|
+
return true;
|
|
1216
|
+
if (Array.isArray(padding)) {
|
|
1217
|
+
return padding.every((val) => validSpacings.has(val));
|
|
1218
|
+
}
|
|
1219
|
+
return padding && Object.keys(padding).every((key) => validKeys.has(key)) && Object.values(padding).every((val) => validSpacings.has(val));
|
|
1220
|
+
};
|
|
1221
|
+
if (!isValidPadding()) {
|
|
1222
|
+
console.error("Invalid padding Type");
|
|
1223
|
+
}
|
|
1224
|
+
const getPadding = paddingOrDefault(theme);
|
|
1225
|
+
return typeof padding === "object" && !Array.isArray(padding) ? Object.entries(padding).reduce((acc, [key, val]) => validKeys.has(key) ? acc + keyToProperty(key, getPadding(val)) : acc, "") : padding ? `padding: ${Array.from(Array.isArray(padding) ? padding : [padding]).map((pad) => getPadding(pad)).join(" ")}` : "";
|
|
1226
|
+
}
|
|
1227
|
+
const PadBox = styled.div`
|
|
1228
|
+
box-sizing: border-box;
|
|
1229
|
+
${(props) => paddingToString(props.theme, props.padding)}
|
|
1230
|
+
`;
|
|
1231
|
+
const Reel = styled.div`
|
|
1232
|
+
box-sizing: border-box;
|
|
1233
|
+
> * {
|
|
1234
|
+
margin: 0;
|
|
1235
|
+
scroll-snap-align: start;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
--gutter: ${(props) => {
|
|
1239
|
+
var _a;
|
|
1240
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1241
|
+
}};
|
|
1242
|
+
|
|
1243
|
+
display: flex;
|
|
1244
|
+
gap: var(--gutter, 0px);
|
|
1245
|
+
|
|
1246
|
+
overflow-x: scroll;
|
|
1247
|
+
|
|
1248
|
+
scroll-snap-type: ${({ snapType = "none" }) => {
|
|
1249
|
+
switch (snapType) {
|
|
1250
|
+
case "none": {
|
|
1251
|
+
return "none";
|
|
1252
|
+
}
|
|
1253
|
+
case "proximity": {
|
|
1254
|
+
return "x proximity";
|
|
1255
|
+
}
|
|
1256
|
+
case "mandatory": {
|
|
1257
|
+
return "x mandatory";
|
|
1258
|
+
}
|
|
1259
|
+
default: {
|
|
1260
|
+
return "none";
|
|
1261
|
+
}
|
|
1262
|
+
}
|
|
1263
|
+
}};
|
|
1264
|
+
`;
|
|
1265
|
+
const Stack = styled("div")`
|
|
1266
|
+
@property --gutter {
|
|
1267
|
+
syntax: "<length-percentage>";
|
|
1268
|
+
inherits: false;
|
|
1269
|
+
initial-value: 0;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
--gutter: ${(props) => {
|
|
1273
|
+
var _a;
|
|
1274
|
+
return props.gutter ? (_a = getSpacingValue(props.gutter, props.theme)) != null ? _a : "0px" : "0px";
|
|
1275
|
+
}};
|
|
1276
|
+
box-sizing: border-box;
|
|
1277
|
+
> * {
|
|
1278
|
+
margin: 0;
|
|
1279
|
+
}
|
|
1280
|
+
display: flex;
|
|
1281
|
+
flex-direction: column;
|
|
1282
|
+
|
|
1283
|
+
gap: var(--gutter, 0px);
|
|
1284
|
+
align-content: start;
|
|
1285
|
+
|
|
1286
|
+
& > [data-bedrock-column] {
|
|
1287
|
+
grid-column: span 1 / auto;
|
|
1288
|
+
}
|
|
1289
|
+
`;
|
|
1290
|
+
export { Center, ColumnDrop, Frame, Grid, Inline, InlineCluster, PadBox, Reel, Stack, checkIsCSSLength, getSpacingValue, spacing };
|
package/lib/index.umd.js
CHANGED
|
@@ -1,25 +1,92 @@
|
|
|
1
|
-
var st=Object.defineProperty,it=Object.defineProperties;var lt=Object.getOwnPropertyDescriptors;var ge=Object.getOwnPropertySymbols;var rt=Object.prototype.hasOwnProperty,ot=Object.prototype.propertyIsEnumerable;var de=(a,g,m)=>g in a?st(a,g,{enumerable:!0,configurable:!0,writable:!0,value:m}):a[g]=m,he=(a,g)=>{for(var m in g||(g={}))rt.call(g,m)&&de(a,m,g[m]);if(ge)for(var m of ge(g))ot.call(g,m)&&de(a,m,g[m]);return a},pe=(a,g)=>it(a,lt(g));(function(a,g){typeof exports=="object"&&typeof module!="undefined"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(a=typeof globalThis!="undefined"?globalThis:a||self,g(a.solid={}))})(this,function(a){"use strict";let g={data:""},m=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||g,me=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,ye=/\/\*[^]*?\*\/|\s\s+|\n/g,S=(e,t)=>{let n="",s="",l="";for(let i in e){let o=e[i];i[0]=="@"?i[1]=="i"?n=i+" "+o+";":s+=i[1]=="f"?S(o,i):i+"{"+S(o,i[1]=="k"?"":t)+"}":typeof o=="object"?s+=S(o,t?t.replace(/([^,])+/g,r=>i.replace(/(^:.*)|([^,])+/g,u=>/&/.test(u)?u.replace(/&/g,r):r?r+" "+u:u)):i):o!=null&&(i=/^--/.test(i)?i:i.replace(/[A-Z]/g,"-$&").toLowerCase(),l+=S.p?S.p(i,o):i+":"+o+";")}return n+(t&&l?t+"{"+l+"}":l)+s},C={},U=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+U(e[n]);return t}return e},be=(e,t,n,s,l)=>{let i=U(e),o=C[i]||(C[i]=(r=>{let u=0,c=11;for(;u<r.length;)c=101*c+r.charCodeAt(u++)>>>0;return"go"+c})(i));if(!C[o]){let r=i!==e?e:(u=>{let c,f=[{}];for(;c=me.exec(u.replace(ye,""));)c[4]?f.shift():c[3]?f.unshift(f[0][c[3]]=f[0][c[3]]||{}):f[0][c[1]]=c[2];return f[0]})(e);C[o]=S(l?{["@keyframes "+o]:r}:r,n?"":"."+o)}return((r,u,c)=>{u.data.indexOf(r)==-1&&(u.data=c?r+u.data:u.data+r)})(C[o],t,s),o},we=(e,t,n)=>e.reduce((s,l,i)=>{let o=t[i];if(o&&o.call){let r=o(n),u=r&&r.props&&r.props.className||/^go/.test(r)&&r;o=u?"."+u:r&&typeof r=="object"?r.props?"":S(r,""):r===!1?"":r}return s+l+(o==null?"":o)},"");function L(e){let t=this||{},n=e.call?e(t.p):e;return be(n.unshift?n.raw?we(n,[].slice.call(arguments,1),t.p):n.reduce((s,l)=>Object.assign(s,l&&l.call?l(t.p):l),{}):n,m(t.target),t.g,t.o,t.k)}L.bind({g:1}),L.bind({k:1});const xe=(e,t)=>e===t,Se=Symbol("solid-proxy"),X={equals:xe};let Ae=Q;const O={},b=1,v=2,Ce={owned:null,cleanups:null,context:null,owner:null};var y=null;let N=null,d=null,E=null,h=null,w=null,D=0;function Ne(e,t,n){const s=M(e,t,!0,b);$(s)}function T(e,t,n){const s=M(e,t,!1,b);$(s)}function K(e,t,n){n=n?Object.assign({},X,n):X;const s=M(e,t,!0,0);return s.pending=O,s.observers=null,s.observerSlots=null,s.comparator=n.equals||void 0,$(s),Le.bind(s)}function Ee(e){if(E)return e();let t;const n=E=[];try{t=e()}finally{E=null}return R(()=>{for(let s=0;s<n.length;s+=1){const l=n[s];if(l.pending!==O){const i=l.pending;l.pending=O,G(l,i)}}},!1),t}function I(e){let t,n=d;return d=null,t=e(),d=n,t}function Te(e){const t=Symbol("context");return{id:t,Provider:je(t),defaultValue:e}}function $e(e){return z(y,e.id)||e.defaultValue}function Pe(e){const t=K(e);return K(()=>_(t()))}function Le(){const e=N;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===b||e?$(this):B(this),h=t}if(d){const t=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(t)):(d.sources=[this],d.sourceSlots=[t]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return this.value}function G(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(E)return e.pending===O&&E.push(e),e.pending=t,t;let s=!1;return e.value=t,e.observers&&e.observers.length&&R(()=>{for(let l=0;l<e.observers.length;l+=1){const i=e.observers[l];s&&N.disposed.has(i),i.pure?h.push(i):w.push(i),i.observers&&(s&&!i.tState||!s&&!i.state)&&Y(i),s||(i.state=b)}if(h.length>1e6)throw h=[],new Error},!1),t}function $(e){if(!e.fn)return;Z(e);const t=y,n=d,s=D;d=y=e,Oe(e,e.value,s),d=n,y=t}function Oe(e,t,n){let s;try{s=e.fn(t)}catch(l){J(l)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?G(e,s):e.value=s,e.updatedAt=n)}function M(e,t,n,s=b,l){const i={fn:e,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:y,context:null,pure:n};return y===null||y!==Ce&&(y.owned?y.owned.push(i):y.owned=[i]),i}function H(e){const t=N;if(e.state!==b)return e.state=0;if(e.suspense&&I(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<D);)(e.state||t)&&n.push(e);for(let s=n.length-1;s>=0;s--)if(e=n[s],e.state===b||t)$(e);else if(e.state===v||t){const l=h;h=null,B(e,n[0]),h=l}}function R(e,t){if(h)return e();let n=!1;t||(h=[]),w?n=!0:w=[],D++;try{return e()}catch(s){J(s)}finally{ke(n)}}function ke(e){h&&(Q(h),h=null),!e&&(w.length?Ee(()=>{Ae(w),w=null}):w=null)}function Q(e){for(let t=0;t<e.length;t++)H(e[t])}function B(e,t){e.state=0;const n=N;for(let s=0;s<e.sources.length;s+=1){const l=e.sources[s];l.sources&&(l.state===b||n?l!==t&&H(l):(l.state===v||n)&&B(l,t))}}function Y(e){const t=N;for(let n=0;n<e.observers.length;n+=1){const s=e.observers[n];(!s.state||t)&&(s.state=v,s.pure?h.push(s):w.push(s),s.observers&&Y(s))}}function Z(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),s=e.sourceSlots.pop(),l=n.observers;if(l&&l.length){const i=l.pop(),o=n.observerSlots.pop();s<l.length&&(i.sourceSlots[o]=s,l[s]=i,n.observerSlots[s]=o)}}if(e.owned){for(t=0;t<e.owned.length;t++)Z(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function J(e){throw e}function z(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&z(e.owner,t))}function _(e){if(typeof e=="function"&&!e.length)return _(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const s=_(e[n]);Array.isArray(s)?t.push.apply(t,s):t.push(s)}return t}return e}function je(e){return function(n){let s;return Ne(()=>s=I(()=>(y.context={[e]:n.value},Pe(()=>n.children)))),s}}function k(){return!0}const ee={get(e,t,n){return t===Se?n:e.get(t)},has(e,t){return e.has(t)},set:k,deleteProperty:k,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:k,deleteProperty:k}},ownKeys(e){return e.keys()}};function F(e){return typeof e=="function"?e():e}function te(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const s=F(e[n])[t];if(s!==void 0)return s}},has(t){for(let n=e.length-1;n>=0;n--)if(t in F(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(F(e[n])));return[...new Set(t)]}},ee)}function ne(e,...t){const n=new Set(t.flat()),s=Object.getOwnPropertyDescriptors(e),l=t.map(i=>{const o={};for(let r=0;r<i.length;r++){const u=i[r];Object.defineProperty(o,u,s[u]?s[u]:{get(){return e[u]},set(){return!0}})}return o});return l.push(new Proxy({get(i){return n.has(i)?void 0:e[i]},has(i){return n.has(i)?!1:i in e},keys(){return Object.keys(e).filter(i=>!n.has(i))}},ee)),l}const ve=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],De=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...ve]),Ie=new Set(["innerHTML","textContent","innerText","children"]),Me={className:"class",htmlFor:"for"},se={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},Be=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),_e={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function Fe(e,t,n){let s=n.length,l=t.length,i=s,o=0,r=0,u=t[l-1].nextSibling,c=null;for(;o<l||r<i;){if(t[o]===n[r]){o++,r++;continue}for(;t[l-1]===n[i-1];)l--,i--;if(l===o){const f=i<s?r?n[r-1].nextSibling:n[i-r]:u;for(;r<i;)e.insertBefore(n[r++],f)}else if(i===r)for(;o<l;)(!c||!c.has(t[o]))&&t[o].remove(),o++;else if(t[o]===n[i-1]&&n[r]===t[l-1]){const f=t[--l].nextSibling;e.insertBefore(n[r++],t[o++].nextSibling),e.insertBefore(n[--i],f),t[l]=n[i]}else{if(!c){c=new Map;let p=r;for(;p<i;)c.set(n[p],p++)}const f=c.get(t[o]);if(f!=null)if(r<f&&f<i){let p=o,x=1,P;for(;++p<l&&p<i&&!((P=c.get(t[p]))==null||P!==f+x);)x++;if(x>f-r){const q=t[o];for(;r<f;)e.insertBefore(n[r++],q)}else e.replaceChild(n[r++],t[o++])}else o++;else t[o++].remove()}}}const ie="_$DX_DELEGATE";function Ve(e,t=window.document){const n=t[ie]||(t[ie]=new Set);for(let s=0,l=e.length;s<l;s++){const i=e[s];n.has(i)||(n.add(i),t.addEventListener(i,Qe))}}function We(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function qe(e,t,n,s){s==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,s)}function Ue(e,t,n,s){s?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,l=>n[0](n[1],l)):e.addEventListener(t,n)}function Xe(e,t,n={}){const s=Object.keys(t||{}),l=Object.keys(n);let i,o;for(i=0,o=l.length;i<o;i++){const r=l[i];!r||r==="undefined"||t[r]||(le(e,r,!1),delete n[r])}for(i=0,o=s.length;i<o;i++){const r=s[i],u=!!t[r];!r||r==="undefined"||n[r]===u||!u||(le(e,r,!0),n[r]=u)}return n}function Ke(e,t,n={}){const s=e.style;if(t==null||typeof t=="string")return s.cssText=t;typeof n=="string"&&(n={});let l,i;for(i in n)t[i]==null&&s.removeProperty(i),delete n[i];for(i in t)l=t[i],l!==n[i]&&(s.setProperty(i,l),n[i]=l);return n}function Ge(e,t,n,s){typeof t=="function"?T(l=>oe(e,t(),l,n,s)):oe(e,t,void 0,n,s)}function He(e,t,n,s,l={}){for(const i in l)if(!(i in t)){if(i==="children")continue;re(e,i,null,l[i],n)}for(const i in t){if(i==="children"){s||j(e,t.children);continue}const o=t[i];l[i]=re(e,i,o,l[i],n)}}function Re(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function le(e,t,n){const s=t.trim().split(/\s+/);for(let l=0,i=s.length;l<i;l++)e.classList.toggle(s[l],n)}function re(e,t,n,s,l){let i,o,r;if(t==="style")return Ke(e,n,s);if(t==="classList")return Xe(e,n,s);if(n===s)return s;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const u=t.slice(2).toLowerCase(),c=Be.has(u);Ue(e,u,n,c),c&&Ve([u])}else if((r=Ie.has(t))||!l&&(se[t]||(o=De.has(t)))||(i=e.nodeName.includes("-")))i&&!o&&!r?e[Re(t)]=n:e[se[t]||t]=n;else{const u=l&&t.indexOf(":")>-1&&_e[t.split(":")[0]];u?qe(e,u,t,n):We(e,Me[t]||t,n)}return n}function Qe(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const s=n[t];if(s&&!n.disabled){const l=n[`${t}Data`];if(l!==void 0?s(l,e):s(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function oe(e,t,n={},s,l){return!l&&"children"in t&&T(()=>n.children=j(e,t.children,n.children)),T(()=>He(e,t,s,!0,n)),n}function j(e,t,n,s,l){for(;typeof n=="function";)n=n();if(t===n)return n;const i=typeof t,o=s!==void 0;if(e=o&&n[0]&&n[0].parentNode||e,i==="string"||i==="number")if(i==="number"&&(t=t.toString()),o){let r=n[0];r&&r.nodeType===3?r.data=t:r=document.createTextNode(t),n=A(e,n,s,r)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||i==="boolean")n=A(e,n,s);else{if(i==="function")return T(()=>{let r=t();for(;typeof r=="function";)r=r();n=j(e,r,n,s)}),()=>n;if(Array.isArray(t)){const r=[];if(V(r,t,l))return T(()=>n=j(e,r,n,s,!0)),()=>n;if(r.length===0){if(n=A(e,n,s),o)return n}else Array.isArray(n)?n.length===0?ue(e,r,s):Fe(e,n,r):(n&&A(e),ue(e,r));n=r}else if(t instanceof Node){if(Array.isArray(n)){if(o)return n=A(e,n,s,t);A(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function V(e,t,n){let s=!1;for(let l=0,i=t.length;l<i;l++){let o=t[l],r;if(o instanceof Node)e.push(o);else if(!(o==null||o===!0||o===!1))if(Array.isArray(o))s=V(e,o)||s;else if((r=typeof o)=="string")e.push(document.createTextNode(o));else if(r==="function")if(n){for(;typeof o=="function";)o=o();s=V(e,Array.isArray(o)?o:[o])||s}else e.push(o),s=!0;else e.push(document.createTextNode(o.toString()))}return s}function ue(e,t,n){for(let s=0,l=t.length;s<l;s++)e.insertBefore(t[s],n)}function A(e,t,n,s){if(n===void 0)return e.textContent="";const l=s||document.createTextNode("");if(t.length){let i=!1;for(let o=t.length-1;o>=0;o--){const r=t[o];if(l!==r){const u=r.parentNode===e;!i&&!o?u?e.replaceChild(l,r):e.insertBefore(l,n):u&&r.remove()}else i=!0}}else e.insertBefore(l,n);return[l]}function Ye(e,...t){}function ut(e){}const Ze=!1,Je=Te();function ze(e){let t=this||{};return(...n)=>{const s=l=>{const i=$e(Je),o=te(l,{theme:i}),r=te(o,{get className(){const x=o.className,P="className"in o&&/^go[0-9]+/.test(x);let q=L.apply({target:t.target,o:P,p:o,g:t.g},n);return[x,q].filter(Boolean).join(" ")}}),[u,c]=ne(r,["as"]),f=u.as||e;let p;if(typeof f=="function")p=f(c);else if(Ze){const[x,P]=ne(c,["children"]);p=Ye([`<${f} `,">",`</${f}>`],void 0,x.children||"")}else p=document.createElement(f),Ge(p,c);return p};return s.className=l=>I(()=>L.apply({target:t.target,p:l,g:t.g},n)),s}}const ce=new Proxy(ze,{get(e,t){return e(t)}});function fe(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const ae={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"};function et(e){return e.reduce((t,[n,s])=>pe(he({},t),{[n]:s}),{})}const W=(e,t)=>{var o,r;const n=(r=(o=t==null?void 0:t.space)!=null?o:t==null?void 0:t.spacing)!=null?r:ae,l=et(Object.entries(n).map(([u,c])=>[u,typeof c=="number"?`${c}px`:c]))[e];return fe(l)?l:void 0},tt=ce("div")`
|
|
1
|
+
var $t=Object.defineProperty,At=Object.defineProperties;var Ct=Object.getOwnPropertyDescriptors;var xe=Object.getOwnPropertySymbols;var vt=Object.prototype.hasOwnProperty,kt=Object.prototype.propertyIsEnumerable;var be=(u,g,p)=>g in u?$t(u,g,{enumerable:!0,configurable:!0,writable:!0,value:p}):u[g]=p,K=(u,g)=>{for(var p in g||(g={}))vt.call(g,p)&&be(u,p,g[p]);if(xe)for(var p of xe(g))kt.call(g,p)&&be(u,p,g[p]);return u},G=(u,g)=>At(u,Ct(g));(function(u,g){typeof exports=="object"&&typeof module!="undefined"?g(exports):typeof define=="function"&&define.amd?define(["exports"],g):(u=typeof globalThis!="undefined"?globalThis:u||self,g(u.solid={}))})(this,function(u){"use strict";let g={data:""},p=e=>typeof window=="object"?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||g,we=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,Se=/\/\*[^]*?\*\/|\s\s+|\n/g,A=(e,t)=>{let n="",i="",r="";for(let s in e){let l=e[s];s[0]=="@"?s[1]=="i"?n=s+" "+l+";":i+=s[1]=="f"?A(l,s):s+"{"+A(l,s[1]=="k"?"":t)+"}":typeof l=="object"?i+=A(l,t?t.replace(/([^,])+/g,o=>s.replace(/(^:.*)|([^,])+/g,c=>/&/.test(c)?c.replace(/&/g,o):o?o+" "+c:c)):s):l!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),r+=A.p?A.p(s,l):s+":"+l+";")}return n+(t&&r?t+"{"+r+"}":r)+i},k={},H=e=>{if(typeof e=="object"){let t="";for(let n in e)t+=n+H(e[n]);return t}return e},$e=(e,t,n,i,r)=>{let s=H(e),l=k[s]||(k[s]=(o=>{let c=0,a=11;for(;c<o.length;)a=101*a+o.charCodeAt(c++)>>>0;return"go"+a})(s));if(!k[l]){let o=s!==e?e:(c=>{let a,f=[{}];for(;a=we.exec(c.replace(Se,""));)a[4]?f.shift():a[3]?f.unshift(f[0][a[3]]=f[0][a[3]]||{}):f[0][a[1]]=a[2];return f[0]})(e);k[l]=A(r?{["@keyframes "+l]:o}:o,n?"":"."+l)}return((o,c,a)=>{c.data.indexOf(o)==-1&&(c.data=a?o+c.data:c.data+o)})(k[l],t,i),l},Ae=(e,t,n)=>e.reduce((i,r,s)=>{let l=t[s];if(l&&l.call){let o=l(n),c=o&&o.props&&o.props.className||/^go/.test(o)&&o;l=c?"."+c:o&&typeof o=="object"?o.props?"":A(o,""):o===!1?"":o}return i+r+(l==null?"":l)},"");function b(e){let t=this||{},n=e.call?e(t.p):e;return $e(n.unshift?n.raw?Ae(n,[].slice.call(arguments,1),t.p):n.reduce((i,r)=>Object.assign(i,r&&r.call?r(t.p):r),{}):n,p(t.target),t.g,t.o,t.k)}b.bind({g:1}),b.bind({k:1});const Ce=(e,t)=>e===t,ve=Symbol("solid-proxy"),Q={equals:Ce};let ke=te;const O={},w=1,M=2,Ee={owned:null,cleanups:null,context:null,owner:null};var m=null;let E=null,d=null,N=null,h=null,S=null,z=0;function Ne(e,t,n){const i=F(e,t,!0,w);T(i)}function j(e,t,n){const i=F(e,t,!1,w);T(i)}function Y(e,t,n){n=n?Object.assign({},Q,n):Q;const i=F(e,t,!0,0);return i.pending=O,i.observers=null,i.observerSlots=null,i.comparator=n.equals||void 0,T(i),Le.bind(i)}function je(e){if(N)return e();let t;const n=N=[];try{t=e()}finally{N=null}return ee(()=>{for(let i=0;i<n.length;i+=1){const r=n[i];if(r.pending!==O){const s=r.pending;r.pending=O,Z(r,s)}}},!1),t}function B(e){let t,n=d;return d=null,t=e(),d=n,t}function Te(e){const t=Symbol("context");return{id:t,Provider:Me(t),defaultValue:e}}function Pe(e){return re(m,e.id)||e.defaultValue}function Oe(e){const t=Y(e);return Y(()=>V(t()))}function Le(){const e=E;if(this.sources&&(this.state||e)){const t=h;h=null,this.state===w||e?T(this):R(this),h=t}if(d){const t=this.observers?this.observers.length:0;d.sources?(d.sources.push(this),d.sourceSlots.push(t)):(d.sources=[this],d.sourceSlots=[t]),this.observers?(this.observers.push(d),this.observerSlots.push(d.sources.length-1)):(this.observers=[d],this.observerSlots=[d.sources.length-1])}return this.value}function Z(e,t,n){if(e.comparator&&e.comparator(e.value,t))return t;if(N)return e.pending===O&&N.push(e),e.pending=t,t;let i=!1;return e.value=t,e.observers&&e.observers.length&&ee(()=>{for(let r=0;r<e.observers.length;r+=1){const s=e.observers[r];i&&E.disposed.has(s),s.pure?h.push(s):S.push(s),s.observers&&(i&&!s.tState||!i&&!s.state)&&ne(s),i||(s.state=w)}if(h.length>1e6)throw h=[],new Error},!1),t}function T(e){if(!e.fn)return;ie(e);const t=m,n=d,i=z;d=m=e,Ie(e,e.value,i),d=n,m=t}function Ie(e,t,n){let i;try{i=e.fn(t)}catch(r){se(r)}(!e.updatedAt||e.updatedAt<=n)&&(e.observers&&e.observers.length?Z(e,i):e.value=i,e.updatedAt=n)}function F(e,t,n,i=w,r){const s={fn:e,state:i,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:m,context:null,pure:n};return m===null||m!==Ee&&(m.owned?m.owned.push(s):m.owned=[s]),s}function J(e){const t=E;if(e.state!==w)return e.state=0;if(e.suspense&&B(e.suspense.inFallback))return e.suspense.effects.push(e);const n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<z);)(e.state||t)&&n.push(e);for(let i=n.length-1;i>=0;i--)if(e=n[i],e.state===w||t)T(e);else if(e.state===M||t){const r=h;h=null,R(e,n[0]),h=r}}function ee(e,t){if(h)return e();let n=!1;t||(h=[]),S?n=!0:S=[],z++;try{return e()}catch(i){se(i)}finally{De(n)}}function De(e){h&&(te(h),h=null),!e&&(S.length?je(()=>{ke(S),S=null}):S=null)}function te(e){for(let t=0;t<e.length;t++)J(e[t])}function R(e,t){e.state=0;const n=E;for(let i=0;i<e.sources.length;i+=1){const r=e.sources[i];r.sources&&(r.state===w||n?r!==t&&J(r):(r.state===M||n)&&R(r,t))}}function ne(e){const t=E;for(let n=0;n<e.observers.length;n+=1){const i=e.observers[n];(!i.state||t)&&(i.state=M,i.pure?h.push(i):S.push(i),i.observers&&ne(i))}}function ie(e){let t;if(e.sources)for(;e.sources.length;){const n=e.sources.pop(),i=e.sourceSlots.pop(),r=n.observers;if(r&&r.length){const s=r.pop(),l=n.observerSlots.pop();i<r.length&&(s.sourceSlots[l]=i,r[i]=s,n.observerSlots[i]=l)}}if(e.owned){for(t=0;t<e.owned.length;t++)ie(e.owned[t]);e.owned=null}if(e.cleanups){for(t=0;t<e.cleanups.length;t++)e.cleanups[t]();e.cleanups=null}e.state=0,e.context=null}function se(e){throw e}function re(e,t){return e&&(e.context&&e.context[t]!==void 0?e.context[t]:e.owner&&re(e.owner,t))}function V(e){if(typeof e=="function"&&!e.length)return V(e());if(Array.isArray(e)){const t=[];for(let n=0;n<e.length;n++){const i=V(e[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return t}return e}function Me(e){return function(n){let i;return Ne(()=>i=B(()=>(m.context={[e]:n.value},Oe(()=>n.children)))),i}}function L(){return!0}const le={get(e,t,n){return t===ve?n:e.get(t)},has(e,t){return e.has(t)},set:L,deleteProperty:L,getOwnPropertyDescriptor(e,t){return{configurable:!0,enumerable:!0,get(){return e.get(t)},set:L,deleteProperty:L}},ownKeys(e){return e.keys()}};function W(e){return typeof e=="function"?e():e}function oe(...e){return new Proxy({get(t){for(let n=e.length-1;n>=0;n--){const i=W(e[n])[t];if(i!==void 0)return i}},has(t){for(let n=e.length-1;n>=0;n--)if(t in W(e[n]))return!0;return!1},keys(){const t=[];for(let n=0;n<e.length;n++)t.push(...Object.keys(W(e[n])));return[...new Set(t)]}},le)}function ce(e,...t){const n=new Set(t.flat()),i=Object.getOwnPropertyDescriptors(e),r=t.map(s=>{const l={};for(let o=0;o<s.length;o++){const c=s[o];Object.defineProperty(l,c,i[c]?i[c]:{get(){return e[c]},set(){return!0}})}return l});return r.push(new Proxy({get(s){return n.has(s)?void 0:e[s]},has(s){return n.has(s)?!1:s in e},keys(){return Object.keys(e).filter(s=>!n.has(s))}},le)),r}const ze=["allowfullscreen","async","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected"],Be=new Set(["className","value","readOnly","formNoValidate","isMap","noModule","playsInline",...ze]),Fe=new Set(["innerHTML","textContent","innerText","children"]),Re={className:"class",htmlFor:"for"},ae={class:"className",formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly"},Ve=new Set(["beforeinput","click","dblclick","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]),We={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"};function _e(e,t,n){let i=n.length,r=t.length,s=i,l=0,o=0,c=t[r-1].nextSibling,a=null;for(;l<r||o<s;){if(t[l]===n[o]){l++,o++;continue}for(;t[r-1]===n[s-1];)r--,s--;if(r===l){const f=s<i?o?n[o-1].nextSibling:n[s-o]:c;for(;o<s;)e.insertBefore(n[o++],f)}else if(s===o)for(;l<r;)(!a||!a.has(t[l]))&&t[l].remove(),l++;else if(t[l]===n[s-1]&&n[o]===t[r-1]){const f=t[--r].nextSibling;e.insertBefore(n[o++],t[l++].nextSibling),e.insertBefore(n[--s],f),t[r]=n[s]}else{if(!a){a=new Map;let y=o;for(;y<s;)a.set(n[y],y++)}const f=a.get(t[l]);if(f!=null)if(o<f&&f<s){let y=l,$=1,P;for(;++y<r&&y<s&&!((P=a.get(t[y]))==null||P!==f+$);)$++;if($>f-o){const X=t[l];for(;o<f;)e.insertBefore(n[o++],X)}else e.replaceChild(n[o++],t[l++])}else l++;else t[l++].remove()}}}const ue="_$DX_DELEGATE";function Ue(e,t=window.document){const n=t[ue]||(t[ue]=new Set);for(let i=0,r=e.length;i<r;i++){const s=e[i];n.has(s)||(n.add(s),t.addEventListener(s,Je))}}function qe(e,t,n){n==null?e.removeAttribute(t):e.setAttribute(t,n)}function Xe(e,t,n,i){i==null?e.removeAttributeNS(t,n):e.setAttributeNS(t,n,i)}function Ke(e,t,n,i){i?Array.isArray(n)?(e[`$$${t}`]=n[0],e[`$$${t}Data`]=n[1]):e[`$$${t}`]=n:Array.isArray(n)?e.addEventListener(t,r=>n[0](n[1],r)):e.addEventListener(t,n)}function Ge(e,t,n={}){const i=Object.keys(t||{}),r=Object.keys(n);let s,l;for(s=0,l=r.length;s<l;s++){const o=r[s];!o||o==="undefined"||t[o]||(fe(e,o,!1),delete n[o])}for(s=0,l=i.length;s<l;s++){const o=i[s],c=!!t[o];!o||o==="undefined"||n[o]===c||!c||(fe(e,o,!0),n[o]=c)}return n}function He(e,t,n={}){const i=e.style;if(t==null||typeof t=="string")return i.cssText=t;typeof n=="string"&&(n={});let r,s;for(s in n)t[s]==null&&i.removeProperty(s),delete n[s];for(s in t)r=t[s],r!==n[s]&&(i.setProperty(s,r),n[s]=r);return n}function Qe(e,t,n,i){typeof t=="function"?j(r=>de(e,t(),r,n,i)):de(e,t,void 0,n,i)}function Ye(e,t,n,i,r={}){for(const s in r)if(!(s in t)){if(s==="children")continue;ge(e,s,null,r[s],n)}for(const s in t){if(s==="children"){i||I(e,t.children);continue}const l=t[s];r[s]=ge(e,s,l,r[s],n)}}function Ze(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function fe(e,t,n){const i=t.trim().split(/\s+/);for(let r=0,s=i.length;r<s;r++)e.classList.toggle(i[r],n)}function ge(e,t,n,i,r){let s,l,o;if(t==="style")return He(e,n,i);if(t==="classList")return Ge(e,n,i);if(n===i)return i;if(t==="ref")n(e);else if(t.slice(0,3)==="on:")e.addEventListener(t.slice(3),n);else if(t.slice(0,10)==="oncapture:")e.addEventListener(t.slice(10),n,!0);else if(t.slice(0,2)==="on"){const c=t.slice(2).toLowerCase(),a=Ve.has(c);Ke(e,c,n,a),a&&Ue([c])}else if((o=Fe.has(t))||!r&&(ae[t]||(l=Be.has(t)))||(s=e.nodeName.includes("-")))s&&!l&&!o?e[Ze(t)]=n:e[ae[t]||t]=n;else{const c=r&&t.indexOf(":")>-1&&We[t.split(":")[0]];c?Xe(e,c,t,n):qe(e,Re[t]||t,n)}return n}function Je(e){const t=`$$${e.type}`;let n=e.composedPath&&e.composedPath()[0]||e.target;for(e.target!==n&&Object.defineProperty(e,"target",{configurable:!0,value:n}),Object.defineProperty(e,"currentTarget",{configurable:!0,get(){return n||document}});n!==null;){const i=n[t];if(i&&!n.disabled){const r=n[`${t}Data`];if(r!==void 0?i(r,e):i(e),e.cancelBubble)return}n=n.host&&n.host!==n&&n.host instanceof Node?n.host:n.parentNode}}function de(e,t,n={},i,r){return!r&&"children"in t&&j(()=>n.children=I(e,t.children,n.children)),j(()=>Ye(e,t,i,!0,n)),n}function I(e,t,n,i,r){for(;typeof n=="function";)n=n();if(t===n)return n;const s=typeof t,l=i!==void 0;if(e=l&&n[0]&&n[0].parentNode||e,s==="string"||s==="number")if(s==="number"&&(t=t.toString()),l){let o=n[0];o&&o.nodeType===3?o.data=t:o=document.createTextNode(t),n=v(e,n,i,o)}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;else if(t==null||s==="boolean")n=v(e,n,i);else{if(s==="function")return j(()=>{let o=t();for(;typeof o=="function";)o=o();n=I(e,o,n,i)}),()=>n;if(Array.isArray(t)){const o=[];if(_(o,t,r))return j(()=>n=I(e,o,n,i,!0)),()=>n;if(o.length===0){if(n=v(e,n,i),l)return n}else Array.isArray(n)?n.length===0?he(e,o,i):_e(e,n,o):(n&&v(e),he(e,o));n=o}else if(t instanceof Node){if(Array.isArray(n)){if(l)return n=v(e,n,i,t);v(e,n,null,t)}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t}}return n}function _(e,t,n){let i=!1;for(let r=0,s=t.length;r<s;r++){let l=t[r],o;if(l instanceof Node)e.push(l);else if(!(l==null||l===!0||l===!1))if(Array.isArray(l))i=_(e,l)||i;else if((o=typeof l)=="string")e.push(document.createTextNode(l));else if(o==="function")if(n){for(;typeof l=="function";)l=l();i=_(e,Array.isArray(l)?l:[l])||i}else e.push(l),i=!0;else e.push(document.createTextNode(l.toString()))}return i}function he(e,t,n){for(let i=0,r=t.length;i<r;i++)e.insertBefore(t[i],n)}function v(e,t,n,i){if(n===void 0)return e.textContent="";const r=i||document.createTextNode("");if(t.length){let s=!1;for(let l=t.length-1;l>=0;l--){const o=t[l];if(r!==o){const c=o.parentNode===e;!s&&!l?c?e.replaceChild(r,o):e.insertBefore(r,n):c&&o.remove()}else s=!0}}else e.insertBefore(r,n);return[r]}function et(e,...t){}function Et(e){}const tt=!1,nt=Te();function it(e){let t=this||{};return(...n)=>{const i=r=>{const s=Pe(nt),l=oe(r,{theme:s}),o=oe(l,{get className(){const $=l.className,P="className"in l&&/^go[0-9]+/.test($);let X=b.apply({target:t.target,o:P,p:l,g:t.g},n);return[$,X].filter(Boolean).join(" ")}}),[c,a]=ce(o,["as"]),f=c.as||e;let y;if(typeof f=="function")y=f(a);else if(tt){const[$,P]=ce(a,["children"]);y=et([`<${f} `,">",`</${f}>`],void 0,$.children||"")}else y=document.createElement(f),Qe(y,a);return y};return i.className=r=>B(()=>b.apply({target:t.target,p:r,g:t.g},n)),i}}const x=new Proxy(it,{get(e,t){return e(t)}});function ye(e){return typeof e!="string"?!1:[/^[0-9]{0,10000}\.?[0-9]{1,10000}(vmin|vmax|vh|vw|%|ch|ex|em|rem|in|cm|mm|pt|pc|px)$/,/^var\(--\D{1,100}\)$/].some(t=>t.test(e))}const U={none:"0px",xxs:"0.0625rem",xs:"0.125rem",sm:"0.25rem",md:"0.5rem",mdLg:"0.75rem",lg:"1rem",lgXl:"1.5rem",xl:"2rem",xlXXl:"3rem",xxl:"4rem"};function st(e){return e.reduce((t,[n,i])=>G(K({},t),{[n]:i}),{})}const C=(e,t)=>{var l,o;const n=(o=(l=t==null?void 0:t.space)!=null?l:t==null?void 0:t.spacing)!=null?o:U,r=st(Object.entries(n).map(([c,a])=>[c,typeof a=="number"?`${a}px`:a]))[e];return ye(r)?r:void 0};function rt(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const lt=x("div")`
|
|
2
|
+
@property --maxWidth {
|
|
3
|
+
syntax: "<length-percentage>";
|
|
4
|
+
inherits: false;
|
|
5
|
+
initial-value: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
--maxWidth: ${e=>rt(e.maxWidth)};
|
|
9
|
+
|
|
10
|
+
box-sizing: content-box;
|
|
11
|
+
|
|
12
|
+
margin-inline-start: auto;
|
|
13
|
+
margin-inline-end: auto;
|
|
14
|
+
margin-inline: auto;
|
|
15
|
+
|
|
16
|
+
max-inline-size: var(--maxWidth, 100%);
|
|
17
|
+
|
|
18
|
+
${e=>e.centerChildren?b`
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
align-items: center;
|
|
22
|
+
`:""}
|
|
23
|
+
|
|
24
|
+
${e=>e.centerText?b`
|
|
25
|
+
text-align: center;
|
|
26
|
+
`:""}
|
|
27
|
+
`;function ot(e){return e===void 0?"100%":typeof e=="number"?`${e}px`:e}const ct=x("div")`
|
|
28
|
+
@property --basis {
|
|
29
|
+
syntax: "<length-percentage>";
|
|
30
|
+
inherits: true;
|
|
31
|
+
initial-value: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
2
34
|
@property --gutter {
|
|
3
35
|
syntax: "<length-percentage>";
|
|
4
36
|
inherits: false;
|
|
5
|
-
initial-value:
|
|
37
|
+
initial-value: 0px;
|
|
6
38
|
}
|
|
7
39
|
|
|
8
|
-
--
|
|
40
|
+
--basis: ${e=>ot(e.basis)};
|
|
41
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
42
|
+
|
|
9
43
|
box-sizing: border-box;
|
|
10
44
|
> * {
|
|
11
45
|
margin: 0;
|
|
46
|
+
flex-basis: var(--basis, 100%);
|
|
47
|
+
flex-grow: ${e=>e.noStretchedColumns?"0":"1"};
|
|
48
|
+
flex-shrink: 1;
|
|
12
49
|
}
|
|
13
|
-
display: flex;
|
|
14
|
-
flex-direction: column;
|
|
15
50
|
|
|
51
|
+
display: flex;
|
|
52
|
+
flex-wrap: wrap;
|
|
16
53
|
gap: var(--gutter, 0px);
|
|
17
|
-
|
|
54
|
+
`;function at(e){return Array.isArray(e)&&e.length===2&&e.every(Number.isFinite)||typeof e=="string"&&/^\d{1,1000} {0,1}\/ {0,1}\d{1,1000}$/.test(e)}function ut(e){return Array.isArray(e)?e.join("/"):e}function ft(e){return at(e)?ut(e):void 0}const gt=x.div`
|
|
55
|
+
box-sizing: border-box;
|
|
56
|
+
display: block;
|
|
57
|
+
inline-size: 100%;
|
|
58
|
+
position: relative;
|
|
59
|
+
overflow: hidden;
|
|
18
60
|
|
|
19
|
-
|
|
20
|
-
|
|
61
|
+
${e=>{const t=ft(e.ratio);return t?b`
|
|
62
|
+
aspect-ratio: ${t};
|
|
63
|
+
`:""}};
|
|
64
|
+
|
|
65
|
+
> * {
|
|
66
|
+
position: absolute;
|
|
67
|
+
|
|
68
|
+
inset-block-start: 0;
|
|
69
|
+
inset-block-end: 0;
|
|
70
|
+
inset-inline-start: 0;
|
|
71
|
+
inset-inline-end: 0;
|
|
72
|
+
|
|
73
|
+
inset-block: 0;
|
|
74
|
+
inset-inline: 0;
|
|
75
|
+
|
|
76
|
+
display: flex;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
align-items: center;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
> :is(img, video) {
|
|
82
|
+
inline-size: 100%;
|
|
83
|
+
block-size: 100%;
|
|
84
|
+
size: 100%;
|
|
85
|
+
|
|
86
|
+
object-fit: cover;
|
|
87
|
+
object-position: ${e=>typeof e.position=="string"?e.position:"50%"};
|
|
21
88
|
}
|
|
22
|
-
`,
|
|
89
|
+
`,dt=x("div")`
|
|
23
90
|
@property --gutter {
|
|
24
91
|
syntax: "<length-percentage>";
|
|
25
92
|
inherits: false;
|
|
@@ -32,7 +99,7 @@ var st=Object.defineProperty,it=Object.defineProperties;var lt=Object.getOwnProp
|
|
|
32
99
|
initial-value: 639px;
|
|
33
100
|
}
|
|
34
101
|
|
|
35
|
-
--gutter: ${e=>{var t;return e.gutter&&(t=
|
|
102
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
36
103
|
--minItemWidth: ${e=>{var t;return typeof e.minItemWidth=="string"?e.minItemWidth:`${(t=e.minItemWidth)!=null?t:0}px`}};
|
|
37
104
|
|
|
38
105
|
box-sizing: border-box;
|
|
@@ -47,4 +114,85 @@ var st=Object.defineProperty,it=Object.defineProperties;var lt=Object.getOwnProp
|
|
|
47
114
|
auto-fit,
|
|
48
115
|
minmax(min(var(--minItemWidth, 639px), 100%), 1fr)
|
|
49
116
|
);
|
|
50
|
-
|
|
117
|
+
`,D={start:"flex-start",end:"flex-end",center:"center"},q=G(K({},D),{stretch:"stretch"}),pe=x.div`
|
|
118
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
119
|
+
|
|
120
|
+
box-sizing: border-box;
|
|
121
|
+
> * {
|
|
122
|
+
margin: 0;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
display: flex;
|
|
126
|
+
flex-wrap: wrap;
|
|
127
|
+
gap: var(--gutter, 0px);
|
|
128
|
+
|
|
129
|
+
justify-content: ${e=>typeof e.justify!="undefined"&&D[e.justify]?D[e.justify]:D.start};
|
|
130
|
+
|
|
131
|
+
align-items: ${e=>typeof e.align!="undefined"&&q[e.align]?q[e.align]:q.start};
|
|
132
|
+
`;function ht(e){return e&&e>-1?!0:typeof e=="string"&&typeof CSS!==void 0?CSS.supports(`height: ${e}`):!1}const yt=x(pe)`
|
|
133
|
+
@property --switchAt {
|
|
134
|
+
syntax: "<length-percentage>";
|
|
135
|
+
inherits: true;
|
|
136
|
+
initial-value: 0;
|
|
137
|
+
}
|
|
138
|
+
flex-wrap: nowrap;
|
|
139
|
+
${e=>e.stretch==="all"?"> * { flex: 1 }":e.stretch==="start"?"> :first-child { flex: 1 }":e.stretch==="end"?"> :last-child { flex: 1 }":typeof e.stretch=="number"?`> :nth-child(${e.stretch+1}) { flex: 1 }`:""}
|
|
140
|
+
|
|
141
|
+
${e=>ht(e.switchAt)?b`
|
|
142
|
+
--switchAt: ${typeof e.switchAt=="string"?e.switchAt:`${e.switchAt}px`};
|
|
143
|
+
flex-wrap: wrap;
|
|
144
|
+
> * {
|
|
145
|
+
min-inline-size: fit-content;
|
|
146
|
+
flex-basis: calc(
|
|
147
|
+
(var(--switchAt) - (100% - var(--gutter, 0px))) * 999
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
`:""}
|
|
151
|
+
|
|
152
|
+
&[style*="--switchAt"] {
|
|
153
|
+
flex-wrap: wrap;
|
|
154
|
+
> * {
|
|
155
|
+
min-inline-size: fit-content;
|
|
156
|
+
flex-basis: calc((var(--switchAt) - (100% - var(--gutter, 0px))) * 999);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
`,me=new Set(["left","right","top","bottom","inlineStart","inlineEnd","blockStart","blockEnd"]),pt=(e,t)=>({left:`padding-inline-start:${t};`,right:`padding-inline-end:${t};`,top:`padding-block-start:${t};`,bottom:`padding-block-end:${t};`,inlineStart:`padding-inline-start:${t};`,inlineEnd:`padding-inline-end:${t};`,blockStart:`padding-block-start:${t};`,blockEnd:`padding-block-end:${t};`})[e];function mt(e){return t=>{const n=C(t,e);return n!=null?n:"0px"}}function xt(e,t){var s;if(Array.isArray(t)&&t.length>4)throw new Error("padding arrays can only be 4 or less in length");const n=new Set(Object.keys((s=e==null?void 0:e.spacing)!=null?s:U));(()=>typeof t=="string"?!0:Array.isArray(t)?t.every(l=>n.has(l)):t&&Object.keys(t).every(l=>me.has(l))&&Object.values(t).every(l=>n.has(l)))()||console.error("Invalid padding Type");const r=mt(e);return typeof t=="object"&&!Array.isArray(t)?Object.entries(t).reduce((l,[o,c])=>me.has(o)?l+pt(o,r(c)):l,""):t?`padding: ${Array.from(Array.isArray(t)?t:[t]).map(l=>r(l)).join(" ")}`:""}const bt=x.div`
|
|
160
|
+
box-sizing: border-box;
|
|
161
|
+
${e=>xt(e.theme,e.padding)}
|
|
162
|
+
`,wt=x.div`
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
> * {
|
|
165
|
+
margin: 0;
|
|
166
|
+
scroll-snap-align: start;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
170
|
+
|
|
171
|
+
display: flex;
|
|
172
|
+
gap: var(--gutter, 0px);
|
|
173
|
+
|
|
174
|
+
overflow-x: scroll;
|
|
175
|
+
|
|
176
|
+
scroll-snap-type: ${({snapType:e="none"})=>{switch(e){case"none":return"none";case"proximity":return"x proximity";case"mandatory":return"x mandatory";default:return"none"}}};
|
|
177
|
+
`,St=x("div")`
|
|
178
|
+
@property --gutter {
|
|
179
|
+
syntax: "<length-percentage>";
|
|
180
|
+
inherits: false;
|
|
181
|
+
initial-value: 0;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
--gutter: ${e=>{var t;return e.gutter&&(t=C(e.gutter,e.theme))!=null?t:"0px"}};
|
|
185
|
+
box-sizing: border-box;
|
|
186
|
+
> * {
|
|
187
|
+
margin: 0;
|
|
188
|
+
}
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
|
|
192
|
+
gap: var(--gutter, 0px);
|
|
193
|
+
align-content: start;
|
|
194
|
+
|
|
195
|
+
& > [data-bedrock-column] {
|
|
196
|
+
grid-column: span 1 / auto;
|
|
197
|
+
}
|
|
198
|
+
`;u.Center=lt,u.ColumnDrop=ct,u.Frame=gt,u.Grid=dt,u.Inline=yt,u.InlineCluster=pe,u.PadBox=bt,u.Reel=wt,u.Stack=St,u.checkIsCSSLength=ye,u.getSpacingValue=C,u.spacing=U,Object.defineProperty(u,"__esModule",{value:!0}),u[Symbol.toStringTag]="Module"});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bedrock-layout/solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "solid.js port of bedrock-layout primitives",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"private": false,
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"bugs": {
|
|
60
60
|
"url": "https://github.com/Bedrock-Layouts/Solid-Bedrock/issues"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "1afdd5970477604cb4933f06c91fa71c3327c262"
|
|
63
63
|
}
|