@leapdevuk/component-toolbox 0.0.38 → 0.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +10 -10
package/dist/index.cjs.js
CHANGED
|
@@ -69,7 +69,7 @@ For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Je(18,`(${n})`));return
|
|
|
69
69
|
`)):console.error([`MUI: The \`theme.${n}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${n}\` as a number.`].join(`
|
|
70
70
|
`)));const s=a[i];return o>=0?s:typeof s=="number"?-s:`-${s}`}:typeof a=="function"?a:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${n}\` value (${a}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
71
71
|
`)),()=>{})}function Wr(t){return It(t,"spacing",8,"spacing")}function Ft(t,n){return typeof n=="string"||n==null?n:t(n)}function qc(t,n){return e=>t.reduce((r,a)=>(r[a]=Ft(n,e),r),{})}function zc(t,n,e,r){if(!n.includes(e))return null;const a=Vc(e),o=qc(a,r),i=t[e];return Xe(t,i,o)}function Sa(t,n){const e=Wr(t.theme);return Object.keys(t).map(r=>zc(t,n,r,e)).reduce(kt,{})}function pe(t){return Sa(t,er)}pe.propTypes=process.env.NODE_ENV!=="production"?er.reduce((t,n)=>(t[n]=tt,t),{}):{};pe.filterProps=er;function be(t){return Sa(t,tr)}be.propTypes=process.env.NODE_ENV!=="production"?tr.reduce((t,n)=>(t[n]=tt,t),{}):{};be.filterProps=tr;process.env.NODE_ENV!=="production"&&Bc.reduce((t,n)=>(t[n]=tt,t),{});function rr(...t){const n=t.reduce((r,a)=>(a.filterProps.forEach(o=>{r[o]=a}),r),{}),e=r=>Object.keys(r).reduce((a,o)=>n[o]?kt(a,n[o](r)):a,{});return e.propTypes=process.env.NODE_ENV!=="production"?t.reduce((r,a)=>Object.assign(r,a.propTypes),{}):{},e.filterProps=t.reduce((r,a)=>r.concat(a.filterProps),[]),e}function je(t){return typeof t!="number"?t:`${t}px solid`}function Fe(t,n){return Ee({prop:t,themeKey:"borders",transform:n})}const Gc=Fe("border",je),Uc=Fe("borderTop",je),Qc=Fe("borderRight",je),Xc=Fe("borderBottom",je),Zc=Fe("borderLeft",je),Kc=Fe("borderColor"),Jc=Fe("borderTopColor"),e0=Fe("borderRightColor"),t0=Fe("borderBottomColor"),r0=Fe("borderLeftColor"),n0=Fe("outline",je),a0=Fe("outlineColor"),nr=t=>{if(t.borderRadius!==void 0&&t.borderRadius!==null){const n=It(t.theme,"shape.borderRadius",4,"borderRadius"),e=r=>({borderRadius:Ft(n,r)});return Xe(t,t.borderRadius,e)}return null};nr.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:tt}:{};nr.filterProps=["borderRadius"];rr(Gc,Uc,Qc,Xc,Zc,Kc,Jc,e0,t0,r0,nr,n0,a0);const ar=t=>{if(t.gap!==void 0&&t.gap!==null){const n=It(t.theme,"spacing",8,"gap"),e=r=>({gap:Ft(n,r)});return Xe(t,t.gap,e)}return null};ar.propTypes=process.env.NODE_ENV!=="production"?{gap:tt}:{};ar.filterProps=["gap"];const or=t=>{if(t.columnGap!==void 0&&t.columnGap!==null){const n=It(t.theme,"spacing",8,"columnGap"),e=r=>({columnGap:Ft(n,r)});return Xe(t,t.columnGap,e)}return null};or.propTypes=process.env.NODE_ENV!=="production"?{columnGap:tt}:{};or.filterProps=["columnGap"];const ir=t=>{if(t.rowGap!==void 0&&t.rowGap!==null){const n=It(t.theme,"spacing",8,"rowGap"),e=r=>({rowGap:Ft(n,r)});return Xe(t,t.rowGap,e)}return null};ir.propTypes=process.env.NODE_ENV!=="production"?{rowGap:tt}:{};ir.filterProps=["rowGap"];const o0=Ee({prop:"gridColumn"}),i0=Ee({prop:"gridRow"}),s0=Ee({prop:"gridAutoFlow"}),c0=Ee({prop:"gridAutoColumns"}),u0=Ee({prop:"gridAutoRows"}),l0=Ee({prop:"gridTemplateColumns"}),f0=Ee({prop:"gridTemplateRows"}),d0=Ee({prop:"gridTemplateAreas"}),h0=Ee({prop:"gridArea"});rr(ar,or,ir,o0,i0,s0,c0,u0,l0,f0,d0,h0);function gt(t,n){return n==="grey"?n:t}const m0=Ee({prop:"color",themeKey:"palette",transform:gt}),y0=Ee({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:gt}),g0=Ee({prop:"backgroundColor",themeKey:"palette",transform:gt});rr(m0,y0,g0);function Re(t){return t<=1&&t!==0?`${t*100}%`:t}const p0=Ee({prop:"width",transform:Re}),Hr=t=>{if(t.maxWidth!==void 0&&t.maxWidth!==null){const n=e=>{var a,o,i,s,l;const r=((i=(o=(a=t.theme)==null?void 0:a.breakpoints)==null?void 0:o.values)==null?void 0:i[e])||Kt[e];return r?((l=(s=t.theme)==null?void 0:s.breakpoints)==null?void 0:l.unit)!=="px"?{maxWidth:`${r}${t.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:Re(e)}};return Xe(t,t.maxWidth,n)}return null};Hr.filterProps=["maxWidth"];const b0=Ee({prop:"minWidth",transform:Re}),w0=Ee({prop:"height",transform:Re}),v0=Ee({prop:"maxHeight",transform:Re}),C0=Ee({prop:"minHeight",transform:Re});Ee({prop:"size",cssProperty:"width",transform:Re});Ee({prop:"size",cssProperty:"height",transform:Re});const x0=Ee({prop:"boxSizing"});rr(p0,Hr,b0,w0,v0,C0,x0);const Nt={border:{themeKey:"borders",transform:je},borderTop:{themeKey:"borders",transform:je},borderRight:{themeKey:"borders",transform:je},borderBottom:{themeKey:"borders",transform:je},borderLeft:{themeKey:"borders",transform:je},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:je},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:nr},color:{themeKey:"palette",transform:gt},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:gt},backgroundColor:{themeKey:"palette",transform:gt},p:{style:be},pt:{style:be},pr:{style:be},pb:{style:be},pl:{style:be},px:{style:be},py:{style:be},padding:{style:be},paddingTop:{style:be},paddingRight:{style:be},paddingBottom:{style:be},paddingLeft:{style:be},paddingX:{style:be},paddingY:{style:be},paddingInline:{style:be},paddingInlineStart:{style:be},paddingInlineEnd:{style:be},paddingBlock:{style:be},paddingBlockStart:{style:be},paddingBlockEnd:{style:be},m:{style:pe},mt:{style:pe},mr:{style:pe},mb:{style:pe},ml:{style:pe},mx:{style:pe},my:{style:pe},margin:{style:pe},marginTop:{style:pe},marginRight:{style:pe},marginBottom:{style:pe},marginLeft:{style:pe},marginX:{style:pe},marginY:{style:pe},marginInline:{style:pe},marginInlineStart:{style:pe},marginInlineEnd:{style:pe},marginBlock:{style:pe},marginBlockStart:{style:pe},marginBlockEnd:{style:pe},displayPrint:{cssProperty:!1,transform:t=>({"@media print":{display:t}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:ar},rowGap:{style:ir},columnGap:{style:or},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:Re},maxWidth:{style:Hr},minWidth:{transform:Re},height:{transform:Re},maxHeight:{transform:Re},minHeight:{transform:Re},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function T0(...t){const n=t.reduce((r,a)=>r.concat(Object.keys(a)),[]),e=new Set(n);return t.every(r=>e.size===Object.keys(r).length)}function E0(t,n){return typeof t=="function"?t(n):t}function S0(){function t(e,r,a,o){const i={[e]:r,theme:a},s=o[e];if(!s)return{[e]:r};const{cssProperty:l=e,themeKey:f,transform:h,style:d}=s;if(r==null)return null;if(f==="typography"&&r==="inherit")return{[e]:r};const m=Jt(a,f)||{};return d?d(i):Xe(i,r,E=>{let w=zt(m,h,E);return E===w&&typeof E=="string"&&(w=zt(m,h,`${e}${E==="default"?"":qe(E)}`,E)),l===!1?w:{[l]:w}})}function n(e){const{sx:r,theme:a={}}=e||{};if(!r)return null;const o=a.unstable_sxConfig??Nt;function i(s){let l=s;if(typeof s=="function")l=s(a);else if(typeof s!="object")return s;if(!l)return null;const f=Nc(a.breakpoints),h=Object.keys(f);let d=f;return Object.keys(l).forEach(m=>{const x=E0(l[m],a);if(x!=null)if(typeof x=="object")if(o[m])d=kt(d,t(m,x,a,o));else{const E=Xe({theme:a},x,w=>({[m]:w}));T0(E,x)?d[m]=n({sx:x,theme:a}):d=kt(d,E)}else d=kt(d,t(m,x,a,o))}),$c(a,Lc(h,d))}return Array.isArray(r)?r.map(i):i(r)}return n}const bt=S0();bt.filterProps=["sx"];const O0=t=>{var r;const n={systemProps:{},otherProps:{}},e=((r=t==null?void 0:t.theme)==null?void 0:r.unstable_sxConfig)??Nt;return Object.keys(t).forEach(a=>{e[a]?n.systemProps[a]=t[a]:n.otherProps[a]=t[a]}),n};function M0(t){const{sx:n,...e}=t,{systemProps:r,otherProps:a}=O0(e);let o;return Array.isArray(n)?o=[r,...n]:typeof n=="function"?o=(...i)=>{const s=n(...i);return Be(s)?{...r,...s}:r}:o={...r,...n},{...a,sx:o}}function k0(t){for(var n=0,e,r=0,a=t.length;a>=4;++r,a-=4)e=t.charCodeAt(r)&255|(t.charCodeAt(++r)&255)<<8|(t.charCodeAt(++r)&255)<<16|(t.charCodeAt(++r)&255)<<24,e=(e&65535)*1540483477+((e>>>16)*59797<<16),e^=e>>>24,n=(e&65535)*1540483477+((e>>>16)*59797<<16)^(n&65535)*1540483477+((n>>>16)*59797<<16);switch(a){case 3:n^=(t.charCodeAt(r+2)&255)<<16;case 2:n^=(t.charCodeAt(r+1)&255)<<8;case 1:n^=t.charCodeAt(r)&255,n=(n&65535)*1540483477+((n>>>16)*59797<<16)}return n^=n>>>13,n=(n&65535)*1540483477+((n>>>16)*59797<<16),((n^n>>>15)>>>0).toString(36)}var P0={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function D0(t){var n=Object.create(null);return function(e){return n[e]===void 0&&(n[e]=t(e)),n[e]}}var _0=!1,R0=/[A-Z]|^ms/g,$0=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Oa=function(n){return n.charCodeAt(1)===45},Fn=function(n){return n!=null&&typeof n!="boolean"},Tr=D0(function(t){return Oa(t)?t:t.replace(R0,"-$&").toLowerCase()}),Nn=function(n,e){switch(n){case"animation":case"animationName":if(typeof e=="string")return e.replace($0,function(r,a,o){return Ke={name:a,styles:o,next:Ke},a})}return P0[n]!==1&&!Oa(n)&&typeof e=="number"&&e!==0?e+"px":e},A0="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function Gt(t,n,e){if(e==null)return"";var r=e;if(r.__emotion_styles!==void 0)return r;switch(typeof e){case"boolean":return"";case"object":{var a=e;if(a.anim===1)return Ke={name:a.name,styles:a.styles,next:Ke},a.name;var o=e;if(o.styles!==void 0){var i=o.next;if(i!==void 0)for(;i!==void 0;)Ke={name:i.name,styles:i.styles,next:Ke},i=i.next;var s=o.styles+";";return s}return j0(t,n,e)}}var l=e;return l}function j0(t,n,e){var r="";if(Array.isArray(e))for(var a=0;a<e.length;a++)r+=Gt(t,n,e[a])+";";else for(var o in e){var i=e[o];if(typeof i!="object"){var s=i;Fn(s)&&(r+=Tr(o)+":"+Nn(o,s)+";")}else{if(o==="NO_COMPONENT_SELECTOR"&&_0)throw new Error(A0);if(Array.isArray(i)&&typeof i[0]=="string"&&n==null)for(var l=0;l<i.length;l++)Fn(i[l])&&(r+=Tr(o)+":"+Nn(o,i[l])+";");else{var f=Gt(t,n,i);switch(o){case"animation":case"animationName":{r+=Tr(o)+":"+f+";";break}default:r+=o+"{"+f+"}"}}}}return r}var Ln=/label:\s*([^\s;{]+)\s*(;|$)/g,Ke;function I0(t,n,e){if(t.length===1&&typeof t[0]=="object"&&t[0]!==null&&t[0].styles!==void 0)return t[0];var r=!0,a="";Ke=void 0;var o=t[0];if(o==null||o.raw===void 0)r=!1,a+=Gt(e,n,o);else{var i=o;a+=i[0]}for(var s=1;s<t.length;s++)if(a+=Gt(e,n,t[s]),r){var l=o;a+=l[s]}Ln.lastIndex=0;for(var f="",h;(h=Ln.exec(a))!==null;)f+="-"+h[1];var d=k0(a)+f;return{name:d,styles:a,next:Ke}}/**
|
|
72
|
-
* @mui/styled-engine v6.1.
|
|
72
|
+
* @mui/styled-engine v6.1.6
|
|
73
73
|
*
|
|
74
74
|
* @license MIT
|
|
75
75
|
* This source code is licensed under the MIT license found in the
|