@contentful/f36-skeleton
Advanced tools
Comparing version 4.0.1-next-v4-6859.2287 to 4.0.1-next-v4-7604.2322
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/extends";import t,{useCallback as n}from"react";import{Box as o,useId as r}from"@contentful/f36-core";import{TableRow as a,TableCell as i}from"@contentful/f36-table";function l(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}var s={};function f({numberOfLines:e=1,offsetLeft:o=0,offsetTop:r=0,lineHeight:a=21,marginBottom:i=20,width:l}){const s=n((e=>l||(e?"80%":"100%")),[l]);return t.createElement(t.Fragment,null,Array.from(Array(e)).map(((n,l)=>t.createElement("rect",{key:`skeleton-display-text-${l}`,x:o,y:l*(+a+ +i)+ +r,rx:"0",ry:"0",width:s(e>1&&e-l==1),height:a}))))}l(s,"SkeletonBodyText",(()=>m)),l(s,"SkeletonContainer",(()=>c)),l(s,"SkeletonDisplayText",(()=>u)),l(s,"SkeletonImage",(()=>p)),l(s,"SkeletonRow",(()=>g)),l(s,"SkeletonText",(()=>f));const m=({lineHeight:n=16,marginBottom:o=8,numberOfLines:r=2,offsetLeft:a=0,offsetTop:i=0,...l})=>t.createElement(f,e({lineHeight:n,marginBottom:o,numberOfLines:r>0?r:1,offsetLeft:a,offsetTop:i},l));function c({children:n,testId:a="cf-ui-skeleton-form",ariaLabel:i="Loading component...",width:l="100%",height:s="100%",preserveAspectRatio:f,backgroundColor:m="#e5ebed",backgroundOpacity:c=1,isAnimated:u=!0,speed:p=2,foregroundColor:d="#f7f9fa",foregroundOpacity:g=1,svgWidth:h="100%",svgHeight:b="100%",clipId:y,gradientId:k,animateId:E,...$}){const x=r(y,"cf-ui-skeleton-clip"),C=r(k,"cf-ui-skeleton-clip-gradient"),L=r(void 0,"animation"),T=E||L;return t.createElement(o,e({as:"svg",display:"block",role:"img","aria-label":i,preserveAspectRatio:f,width:h,height:b,testId:a},$),i?t.createElement("title",null,i):null,t.createElement("rect",{x:"0",y:"0",width:l,height:s,clipPath:`url(#${x})`,style:{fill:`url(#${C})`}}),t.createElement("defs",null,t.createElement("clipPath",{id:x},n),t.createElement("linearGradient",{id:C},t.createElement("stop",{offset:"0%",stopColor:m,stopOpacity:c},u&&t.createElement("animate",{id:T,attributeName:"stop-color",values:`${m}; ${d}; ${m}`,dur:`${p}s`,repeatCount:"indefinite"})),t.createElement("stop",{offset:"50%",stopColor:d,stopOpacity:g},u&&t.createElement("animate",{attributeName:"stop-color",values:`${m}; ${d}; ${m}`,begin:`${T}.begin+0.25s`,dur:`${p}s`,repeatCount:"indefinite"})),t.createElement("stop",{offset:"100%",stopColor:m,stopOpacity:c},u&&t.createElement("animate",{attributeName:"stop-color",begin:`${T}.begin+0.5s`,values:`${m}; ${d}; ${m}`,dur:`${p}s`,repeatCount:"indefinite"})))))}function u({lineHeight:n=21,marginBottom:o=20,numberOfLines:r=1,offsetLeft:a=0,offsetTop:i=0,width:l=100,...s}){return t.createElement(f,e({lineHeight:n,marginBottom:o,numberOfLines:r,offsetLeft:a,offsetTop:i,width:l},s))}function p({testId:n="cf-ui-skeleton-image",offsetLeft:o,offsetTop:r,width:a=70,height:i=70,radiusX:l=0,radiusY:s=0,...f}){return t.createElement("rect",e({x:o,y:r,rx:l,ry:s,width:a,height:i,"data-test-id":n},f))}const d=()=>t.createElement(i,null,t.createElement(c,{svgHeight:16},t.createElement(m,{numberOfLines:1}))),g=({columnCount:e=5,rowCount:n=1})=>t.createElement(t.Fragment,null,Array.from(Array(n)).map(((n,o)=>t.createElement(a,{key:o},Array.from(Array(e)).map(((e,n)=>t.createElement(d,{key:n})))))));export{m as SkeletonBodyText,c as SkeletonContainer,u as SkeletonDisplayText,p as SkeletonImage,g as SkeletonRow,f as SkeletonText}; | ||
import e from"@babel/runtime/helpers/esm/extends";import t,{useCallback as n}from"react";import{useId as o,Box as r}from"@contentful/f36-core";import{TableRow as a,TableCell as i}from"@contentful/f36-table";function l(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}var s={};function f({numberOfLines:e=1,offsetLeft:o=0,offsetTop:r=0,lineHeight:a=21,marginBottom:i=20,width:l}){const s=n((e=>l||(e?"80%":"100%")),[l]);return t.createElement(t.Fragment,null,Array.from(Array(e)).map(((n,l)=>t.createElement("rect",{key:`skeleton-display-text-${l}`,x:o,y:l*(+a+ +i)+ +r,rx:"0",ry:"0",width:s(e>1&&e-l==1),height:a}))))}l(s,"SkeletonBodyText",(()=>m)),l(s,"SkeletonContainer",(()=>c)),l(s,"SkeletonDisplayText",(()=>u)),l(s,"SkeletonImage",(()=>p)),l(s,"SkeletonRow",(()=>g)),l(s,"SkeletonText",(()=>f));const m=({lineHeight:n=16,marginBottom:o=8,numberOfLines:r=2,offsetLeft:a=0,offsetTop:i=0,...l})=>t.createElement(f,e({lineHeight:n,marginBottom:o,numberOfLines:r>0?r:1,offsetLeft:a,offsetTop:i},l));function c({children:n,testId:a="cf-ui-skeleton-form",ariaLabel:i="Loading component...",width:l="100%",height:s="100%",preserveAspectRatio:f,backgroundColor:m="#e5ebed",backgroundOpacity:c=1,isAnimated:u=!0,speed:p=2,foregroundColor:d="#f7f9fa",foregroundOpacity:g=1,svgWidth:h="100%",svgHeight:b="100%",clipId:y,gradientId:k,animateId:E,...$}){const x=o(y,"cf-ui-skeleton-clip"),C=o(k,"cf-ui-skeleton-clip-gradient"),L=o(void 0,"animation"),T=E||L;return t.createElement(r,e({as:"svg",display:"block",role:"img","aria-label":i,preserveAspectRatio:f,width:h,height:b,testId:a},$),i?t.createElement("title",null,i):null,t.createElement("rect",{x:"0",y:"0",width:l,height:s,clipPath:`url(#${x})`,style:{fill:`url(#${C})`}}),t.createElement("defs",null,t.createElement("clipPath",{id:x},n),t.createElement("linearGradient",{id:C},t.createElement("stop",{offset:"0%",stopColor:m,stopOpacity:c},u&&t.createElement("animate",{id:T,attributeName:"stop-color",values:`${m}; ${d}; ${m}`,dur:`${p}s`,repeatCount:"indefinite"})),t.createElement("stop",{offset:"50%",stopColor:d,stopOpacity:g},u&&t.createElement("animate",{attributeName:"stop-color",values:`${m}; ${d}; ${m}`,begin:`${T}.begin+0.25s`,dur:`${p}s`,repeatCount:"indefinite"})),t.createElement("stop",{offset:"100%",stopColor:m,stopOpacity:c},u&&t.createElement("animate",{attributeName:"stop-color",begin:`${T}.begin+0.5s`,values:`${m}; ${d}; ${m}`,dur:`${p}s`,repeatCount:"indefinite"})))))}function u({lineHeight:n=21,marginBottom:o=20,numberOfLines:r=1,offsetLeft:a=0,offsetTop:i=0,width:l=100,...s}){return t.createElement(f,e({lineHeight:n,marginBottom:o,numberOfLines:r,offsetLeft:a,offsetTop:i,width:l},s))}function p({testId:n="cf-ui-skeleton-image",offsetLeft:o,offsetTop:r,width:a=70,height:i=70,radiusX:l=0,radiusY:s=0,...f}){return t.createElement("rect",e({x:o,y:r,rx:l,ry:s,width:a,height:i,"data-test-id":n},f))}const d=()=>t.createElement(i,null,t.createElement(c,{svgHeight:16},t.createElement(m,{numberOfLines:1}))),g=({columnCount:e=5,rowCount:n=1})=>t.createElement(t.Fragment,null,Array.from(Array(n)).map(((n,o)=>t.createElement(a,{key:o},Array.from(Array(e)).map(((e,n)=>t.createElement(d,{key:n})))))));export{m as SkeletonBodyText,c as SkeletonContainer,u as SkeletonDisplayText,p as SkeletonImage,g as SkeletonRow,f as SkeletonText}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-skeleton", | ||
"version": "4.0.1-next-v4-6859.2287+1c884886", | ||
"version": "4.0.1-next-v4-7604.2322+0bee7360", | ||
"description": "Forma 36: Skeleton component", | ||
@@ -10,5 +10,5 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-core": "4.0.1-next-v4-6859.2287+1c884886", | ||
"@contentful/f36-table": "4.0.1-next-v4-6859.2287+1c884886", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6859.2287+1c884886", | ||
"@contentful/f36-core": "4.0.1-next-v4-7604.2322+0bee7360", | ||
"@contentful/f36-table": "4.0.1-next-v4-7604.2322+0bee7360", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-7604.2322+0bee7360", | ||
"emotion": "^10.0.17" | ||
@@ -37,3 +37,3 @@ }, | ||
}, | ||
"gitHead": "1c884886dfbd1a17e16a1c06523e23861922e466" | ||
"gitHead": "0bee7360d2456674a913f221d51a3b08d75a14bb" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package