@contentful/f36-table
Advanced tools
Comparing version 4.0.1-next-v4-6795.2281 to 4.0.1-next-v4-6811.2284
@@ -1,2 +0,2 @@ | ||
var e=c(require("@babel/runtime/helpers/extends")),{css:t,cx:o}=require("emotion"),a=require("react"),l=c(a),{forwardRef:r,createContext:d}=a,{Box:s}=require("@contentful/f36-core"),i=c(require("@contentful/f36-tokens"));function n(e,t,o,a){Object.defineProperty(e,t,{get:o,set:a,enumerable:!0,configurable:!0})}function c(e){return e&&e.__esModule?e.default:e}n(module.exports,"Table",(()=>u)),n(module.exports,"TableBody",(()=>m)),n(module.exports,"TableCell",(()=>h)),n(module.exports,"contextOptions",(()=>b)),n(module.exports,"TableCellContext",(()=>f)),n(module.exports,"TableHead",(()=>p)),n(module.exports,"TableRow",(()=>g));const u=r((({children:a,className:r,layout:d="inline",testId:n="cf-ui-table",...c},u)=>{const m={inline:t({borderRadius:i.borderRadiusMedium,boxShadow:`0 0 0 1px ${i.gray200}`,"th:first-child":{borderTopLeftRadius:i.borderRadiusMedium},"th:last-child":{borderTopRightRadius:i.borderRadiusMedium},"tr:last-child td:first-child":{borderBottomLeftRadius:i.borderRadiusMedium},"tr:last-child td:last-child":{borderBottomRightRadius:i.borderRadiusMedium}},""),root:t({name:"8atqhb",styles:"width:100%;"})};return l.createElement(s,e({cellPadding:"0",cellSpacing:"0"},c,{as:"table",display:"table",ref:u,className:o(m.root,{[m.inline]:"inline"===d},r),testId:n}),a)}));u.displayName="Table";const m=r((function({className:t,children:o,testId:a="cf-ui-table-body",...r},d){return l.createElement(s,e({},r,{as:"tbody",className:t,ref:d,testId:a}),o)})),b={body:{name:"body",as:"td",offsetTop:0},head:{name:"head",as:"th",offsetTop:0}},f=d(b.body),h=r((({align:a="left",children:r,className:d,sorting:n=!1,testId:c="cf-ui-table-cell",...u},m)=>l.createElement(f.Consumer,null,(({as:b,name:f,offsetTop:h})=>{const p="head"===f;return l.createElement(s,e({},u,{as:b,className:o(t({backgroundColor:p?i.gray100:void 0,borderBottom:`1px solid ${i.gray200}`,color:n?i.gray900:i.gray700,fontFamily:i.fontStackPrimary,fontSize:i.fontSizeM,fontWeight:p?i.fontWeightMedium:i.fontWeightNormal,lineHeight:i.lineHeightDefault,padding:`${i.spacingS} ${i.spacingM}`,textAlign:a,verticalAlign:"top"},""),d),ref:m,style:{...u.style,top:h||void 0},testId:c}),r)}))));h.displayName="TableCell";const p=r((({children:a,className:r,isSticky:d=!1,offsetTop:n,testId:c="cf-ui-table-head",...u},m)=>{const h=o(d?t({th:{position:"sticky",top:0,zIndex:i.zIndexDefault}},""):"",r);return l.createElement(f.Provider,{value:{...b.head,offsetTop:n||0}},l.createElement(s,e({},u,{as:"thead",className:h,ref:m,testId:c}),a))}));p.displayName="TableHead";const g=r((({className:a,children:r,selected:d=!1,testId:n="cf-ui-table-row",...c},u)=>{const m={root:t({"&:last-child td":{borderBottom:"none"},"&:hover td":{backgroundColor:i.gray100}},""),selected:t({"td, th":{backgroundColor:i.blue100},"td:last-child":{boxShadow:`inset -2px 0 0 ${i.blue500}`}},"")};return l.createElement(s,e({},c,{as:"tr",className:o(m.root,{[m.selected]:d},a),ref:u,testId:n}),r)}));g.displayName="TableRow"; | ||
var e=c(require("@babel/runtime/helpers/extends")),{cx:t,css:o}=require("emotion"),a=require("react"),l=c(a),{forwardRef:r,createContext:d}=a,{Box:s}=require("@contentful/f36-core"),i=c(require("@contentful/f36-tokens"));function n(e,t,o,a){Object.defineProperty(e,t,{get:o,set:a,enumerable:!0,configurable:!0})}function c(e){return e&&e.__esModule?e.default:e}n(module.exports,"Table",(()=>u)),n(module.exports,"TableBody",(()=>m)),n(module.exports,"TableCell",(()=>h)),n(module.exports,"contextOptions",(()=>b)),n(module.exports,"TableCellContext",(()=>f)),n(module.exports,"TableHead",(()=>p)),n(module.exports,"TableRow",(()=>g));const u=r((({children:a,className:r,layout:d="inline",testId:n="cf-ui-table",...c},u)=>{const m={inline:o({borderRadius:i.borderRadiusMedium,boxShadow:`0 0 0 1px ${i.gray200}`,"th:first-child":{borderTopLeftRadius:i.borderRadiusMedium},"th:last-child":{borderTopRightRadius:i.borderRadiusMedium},"tr:last-child td:first-child":{borderBottomLeftRadius:i.borderRadiusMedium},"tr:last-child td:last-child":{borderBottomRightRadius:i.borderRadiusMedium}},""),root:o({name:"8atqhb",styles:"width:100%;"})};return l.createElement(s,e({cellPadding:"0",cellSpacing:"0"},c,{as:"table",display:"table",ref:u,className:t(m.root,{[m.inline]:"inline"===d},r),testId:n}),a)}));u.displayName="Table";const m=r((function({className:t,children:o,testId:a="cf-ui-table-body",...r},d){return l.createElement(s,e({},r,{as:"tbody",className:t,ref:d,testId:a}),o)})),b={body:{name:"body",as:"td",offsetTop:0},head:{name:"head",as:"th",offsetTop:0}},f=d(b.body),h=r((({align:a="left",children:r,className:d,sorting:n=!1,testId:c="cf-ui-table-cell",...u},m)=>l.createElement(f.Consumer,null,(({as:b,name:f,offsetTop:h})=>{const p="head"===f;return l.createElement(s,e({},u,{as:b,className:t(o({backgroundColor:p?i.gray100:void 0,borderBottom:`1px solid ${i.gray200}`,color:n?i.gray900:i.gray700,fontFamily:i.fontStackPrimary,fontSize:i.fontSizeM,fontWeight:p?i.fontWeightMedium:i.fontWeightNormal,lineHeight:i.lineHeightDefault,padding:`${i.spacingS} ${i.spacingM}`,textAlign:a,verticalAlign:"top"},""),d),ref:m,style:{...u.style,top:h||void 0},testId:c}),r)}))));h.displayName="TableCell";const p=r((({children:a,className:r,isSticky:d=!1,offsetTop:n,testId:c="cf-ui-table-head",...u},m)=>{const h=t(d?o({th:{position:"sticky",top:0,zIndex:i.zIndexDefault}},""):"",r);return l.createElement(f.Provider,{value:{...b.head,offsetTop:n||0}},l.createElement(s,e({},u,{as:"thead",className:h,ref:m,testId:c}),a))}));p.displayName="TableHead";const g=r((({className:a,children:r,selected:d=!1,testId:n="cf-ui-table-row",...c},u)=>{const m={root:o({"&:last-child td":{borderBottom:"none"},"&:hover td":{backgroundColor:i.gray100}},""),selected:o({"td, th":{backgroundColor:i.blue100},"td:last-child":{boxShadow:`inset -2px 0 0 ${i.blue500}`}},"")};return l.createElement(s,e({},c,{as:"tr",className:t(m.root,{[m.selected]:d},a),ref:u,testId:n}),r)}));g.displayName="TableRow"; | ||
//# sourceMappingURL=main.js.map |
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/extends";import{cx as t,css as a}from"emotion";import o,{forwardRef as s,createContext as l}from"react";import{Box as r}from"@contentful/f36-core";import d from"@contentful/f36-tokens";const i=s((({children:s,className:l,layout:i="inline",testId:n="cf-ui-table",...c},m)=>{const f={inline:a({borderRadius:d.borderRadiusMedium,boxShadow:`0 0 0 1px ${d.gray200}`,"th:first-child":{borderTopLeftRadius:d.borderRadiusMedium},"th:last-child":{borderTopRightRadius:d.borderRadiusMedium},"tr:last-child td:first-child":{borderBottomLeftRadius:d.borderRadiusMedium},"tr:last-child td:last-child":{borderBottomRightRadius:d.borderRadiusMedium}},""),root:a({name:"8atqhb",styles:"width:100%;"})};return o.createElement(r,e({cellPadding:"0",cellSpacing:"0"},c,{as:"table",display:"table",ref:m,className:t(f.root,{[f.inline]:"inline"===i},l),testId:n}),s)}));i.displayName="Table";const n=s((function({className:t,children:a,testId:s="cf-ui-table-body",...l},d){return o.createElement(r,e({},l,{as:"tbody",className:t,ref:d,testId:s}),a)})),c={body:{name:"body",as:"td",offsetTop:0},head:{name:"head",as:"th",offsetTop:0}},m=l(c.body),f=s((({align:s="left",children:l,className:i,sorting:n=!1,testId:c="cf-ui-table-cell",...f},b)=>o.createElement(m.Consumer,null,(({as:m,name:u,offsetTop:h})=>{const p="head"===u;return o.createElement(r,e({},f,{as:m,className:t(a({backgroundColor:p?d.gray100:void 0,borderBottom:`1px solid ${d.gray200}`,color:n?d.gray900:d.gray700,fontFamily:d.fontStackPrimary,fontSize:d.fontSizeM,fontWeight:p?d.fontWeightMedium:d.fontWeightNormal,lineHeight:d.lineHeightDefault,padding:`${d.spacingS} ${d.spacingM}`,textAlign:s,verticalAlign:"top"},""),i),ref:b,style:{...f.style,top:h||void 0},testId:c}),l)}))));f.displayName="TableCell";const b=s((({children:s,className:l,isSticky:i=!1,offsetTop:n,testId:f="cf-ui-table-head",...b},u)=>{const h=t(i?a({th:{position:"sticky",top:0,zIndex:d.zIndexDefault}},""):"",l);return o.createElement(m.Provider,{value:{...c.head,offsetTop:n||0}},o.createElement(r,e({},b,{as:"thead",className:h,ref:u,testId:f}),s))}));b.displayName="TableHead";const u=s((({className:s,children:l,selected:i=!1,testId:n="cf-ui-table-row",...c},m)=>{const f={root:a({"&:last-child td":{borderBottom:"none"},"&:hover td":{backgroundColor:d.gray100}},""),selected:a({"td, th":{backgroundColor:d.blue100},"td:last-child":{boxShadow:`inset -2px 0 0 ${d.blue500}`}},"")};return o.createElement(r,e({},c,{as:"tr",className:t(f.root,{[f.selected]:i},s),ref:m,testId:n}),l)}));u.displayName="TableRow";export{i as Table,n as TableBody,f as TableCell,c as contextOptions,m as TableCellContext,b as TableHead,u as TableRow}; | ||
import e from"@babel/runtime/helpers/esm/extends";import{css as t,cx as a}from"emotion";import o,{forwardRef as s,createContext as l}from"react";import{Box as r}from"@contentful/f36-core";import d from"@contentful/f36-tokens";const i=s((({children:s,className:l,layout:i="inline",testId:n="cf-ui-table",...c},m)=>{const f={inline:t({borderRadius:d.borderRadiusMedium,boxShadow:`0 0 0 1px ${d.gray200}`,"th:first-child":{borderTopLeftRadius:d.borderRadiusMedium},"th:last-child":{borderTopRightRadius:d.borderRadiusMedium},"tr:last-child td:first-child":{borderBottomLeftRadius:d.borderRadiusMedium},"tr:last-child td:last-child":{borderBottomRightRadius:d.borderRadiusMedium}},""),root:t({name:"8atqhb",styles:"width:100%;"})};return o.createElement(r,e({cellPadding:"0",cellSpacing:"0"},c,{as:"table",display:"table",ref:m,className:a(f.root,{[f.inline]:"inline"===i},l),testId:n}),s)}));i.displayName="Table";const n=s((function({className:t,children:a,testId:s="cf-ui-table-body",...l},d){return o.createElement(r,e({},l,{as:"tbody",className:t,ref:d,testId:s}),a)})),c={body:{name:"body",as:"td",offsetTop:0},head:{name:"head",as:"th",offsetTop:0}},m=l(c.body),f=s((({align:s="left",children:l,className:i,sorting:n=!1,testId:c="cf-ui-table-cell",...f},b)=>o.createElement(m.Consumer,null,(({as:m,name:u,offsetTop:h})=>{const p="head"===u;return o.createElement(r,e({},f,{as:m,className:a(t({backgroundColor:p?d.gray100:void 0,borderBottom:`1px solid ${d.gray200}`,color:n?d.gray900:d.gray700,fontFamily:d.fontStackPrimary,fontSize:d.fontSizeM,fontWeight:p?d.fontWeightMedium:d.fontWeightNormal,lineHeight:d.lineHeightDefault,padding:`${d.spacingS} ${d.spacingM}`,textAlign:s,verticalAlign:"top"},""),i),ref:b,style:{...f.style,top:h||void 0},testId:c}),l)}))));f.displayName="TableCell";const b=s((({children:s,className:l,isSticky:i=!1,offsetTop:n,testId:f="cf-ui-table-head",...b},u)=>{const h=a(i?t({th:{position:"sticky",top:0,zIndex:d.zIndexDefault}},""):"",l);return o.createElement(m.Provider,{value:{...c.head,offsetTop:n||0}},o.createElement(r,e({},b,{as:"thead",className:h,ref:u,testId:f}),s))}));b.displayName="TableHead";const u=s((({className:s,children:l,selected:i=!1,testId:n="cf-ui-table-row",...c},m)=>{const f={root:t({"&:last-child td":{borderBottom:"none"},"&:hover td":{backgroundColor:d.gray100}},""),selected:t({"td, th":{backgroundColor:d.blue100},"td:last-child":{boxShadow:`inset -2px 0 0 ${d.blue500}`}},"")};return o.createElement(r,e({},c,{as:"tr",className:a(f.root,{[f.selected]:i},s),ref:m,testId:n}),l)}));u.displayName="TableRow";export{i as Table,n as TableBody,f as TableCell,c as contextOptions,m as TableCellContext,b as TableHead,u as TableRow}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-table", | ||
"version": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"version": "4.0.1-next-v4-6811.2284+e70f58a9", | ||
"description": "Forma 36: Table component", | ||
@@ -10,4 +10,4 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-core": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6795.2281+a79c4356", | ||
"@contentful/f36-core": "4.0.1-next-v4-6811.2284+e70f58a9", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6811.2284+e70f58a9", | ||
"emotion": "^10.0.17" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "a79c43565da14e28a3ca93825c0dbad7b20fa068" | ||
"gitHead": "e70f58a9db293569e511c624deb789c471a1bb53" | ||
} |
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