@contentful/f36-tabs
Advanced tools
Comparing version 4.0.1-next-v4-8101.2339 to 4.0.1-next-v4-8125.2340
@@ -1,2 +0,2 @@ | ||
var e=c(require("@babel/runtime/helpers/extends")),t=require("react"),a=c(t),{useCallback:r}=t,{Box:i}=require("@contentful/f36-core"),{cx:o,css:n}=require("emotion"),s=c(require("@contentful/f36-tokens"));function l(e,t,a,r){Object.defineProperty(e,t,{get:a,set:r,enumerable:!0,configurable:!0})}function c(e){return e&&e.__esModule?e.default:e}var d={};l(d,"Tabs",(()=>y)),l(d,"Tab",(()=>v)),l(d,"TabPanel",(()=>m));const b={tabs:{display:"flex"},tab:{boxSizing:"border-box",whiteSpace:"nowrap",alignItems:"center",color:s.gray500,display:"flex",height:"100%",minHeight:s.spacing2Xl,position:"relative",cursor:"pointer",padding:`0 ${s.spacingM}`,fontSize:s.fontSizeM,fontFamily:s.fontStackPrimary,fontWeight:s.fontWeightMedium,outline:"none",textDecoration:"none","&:before":{content:'""',position:"absolute",background:s.colorPrimary,opacity:"0",bottom:"0",left:"0",right:"0",height:"2px"},"&:hover:before, &:hover:focus, &:last-child":{opacity:"0.5"}},tabSelected:{color:s.colorPrimary,"&:before, &:hover:before, &:hover:focus":{opacity:"1"}},tabDisabled:{opacity:"0.5",cursor:"not-allowed","&:before, &:hover:before, &:hover:focus":{opacity:"0"}},tabDividerVertical:{"& > *:not(:first-child)":{boxShadow:`inset 1px 0 0px 0px ${s.gray200}`}},tabDividerHorizontal:{boxShadow:`inset 0 -2px 0px 0px ${s.gray200}`}};function f({className:t,children:r,variant:s="default",testId:l="cf-ui-tabs",role:c="tablist",style:d,...f},u){const p={testId:l,className:(({className:e,variant:t})=>({tabs:o(n(b.tabs,""),e,{[n(b.tabDividerHorizontal,"")]:"horizontal-divider"===t,[n(b.tabDividerVertical,"")]:"vertical-divider"===t})}))({className:t,variant:s}).tabs,style:d,...f};return"navigation"===c?a.createElement(i,e({as:"nav"},p,{role:"navigation",ref:u}),r):a.createElement(i,e({as:"div"},p,{role:"tablist",ref:u}),r)}const u=a.forwardRef(f);function p({testId:t="cf-ui-tab-panel",className:r,children:o,id:n,...s},l){return a.createElement(i,e({as:"div"},s,{id:n,role:"tabpanel",testId:t,className:r,ref:l}),o)}const m=a.forwardRef(p);function h({children:t,className:s,isDisabled:l=!1,href:c,id:d,onSelect:f,isSelected:u=!1,style:p,tabIndex:m=0,testId:h="cf-ui-tab",...v},y){const g=(({className:e,isSelected:t,isDisabled:a})=>({tab:o(n(b.tab,""),e,{[n(b.tabSelected,"")]:t,[n(b.tabDisabled,"")]:a})}))({className:s,isSelected:u,isDisabled:l}),x=r((e=>{f&&!l&&f(d,e)}),[l,d,f]),S=r((e=>{f&&"Enter"===e.key&&(f(d,e),e.preventDefault())}),[d,f]),D={className:g.tab,onClick:x,onKeyPress:S,style:p,testId:h,tabIndex:m};return l&&(D["aria-disabled"]=!0),c?(D.href=c,u&&(D["aria-current"]="page"),a.createElement(i,e({as:"a"},D,v,{ref:y}),t)):(D["aria-selected"]=u,D.role="tab",D["aria-controls"]=d,a.createElement(i,e({as:"div"},D,v,{ref:y}),t))}const v=a.forwardRef(h),y=u;var g,x;y.Panel=m,y.Tab=v,g=module.exports,x=d,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(g,e,{enumerable:!0,get:function(){return x[e]}})})); | ||
var e=c(require("@babel/runtime/helpers/extends")),t=require("react"),a=c(t),{useCallback:r}=t,{Box:i}=require("@contentful/f36-core"),{css:o,cx:n}=require("emotion"),s=c(require("@contentful/f36-tokens"));function l(e,t,a,r){Object.defineProperty(e,t,{get:a,set:r,enumerable:!0,configurable:!0})}function c(e){return e&&e.__esModule?e.default:e}var d={};l(d,"Tabs",(()=>y)),l(d,"Tab",(()=>v)),l(d,"TabPanel",(()=>m));const b={tabs:{display:"flex"},tab:{boxSizing:"border-box",whiteSpace:"nowrap",alignItems:"center",color:s.gray500,display:"flex",height:"100%",minHeight:s.spacing2Xl,position:"relative",cursor:"pointer",padding:`0 ${s.spacingM}`,fontSize:s.fontSizeM,fontFamily:s.fontStackPrimary,fontWeight:s.fontWeightMedium,outline:"none",textDecoration:"none","&:before":{content:'""',position:"absolute",background:s.colorPrimary,opacity:"0",bottom:"0",left:"0",right:"0",height:"2px"},"&:hover:before, &:hover:focus, &:last-child":{opacity:"0.5"}},tabSelected:{color:s.colorPrimary,"&:before, &:hover:before, &:hover:focus":{opacity:"1"}},tabDisabled:{opacity:"0.5",cursor:"not-allowed","&:before, &:hover:before, &:hover:focus":{opacity:"0"}},tabDividerVertical:{"& > *:not(:first-child)":{boxShadow:`inset 1px 0 0px 0px ${s.gray200}`}},tabDividerHorizontal:{boxShadow:`inset 0 -2px 0px 0px ${s.gray200}`}};function f({className:t,children:r,variant:s="default",testId:l="cf-ui-tabs",role:c="tablist",style:d,...f},u){const p={testId:l,className:(({className:e,variant:t})=>({tabs:n(o(b.tabs,""),e,{[o(b.tabDividerHorizontal,"")]:"horizontal-divider"===t,[o(b.tabDividerVertical,"")]:"vertical-divider"===t})}))({className:t,variant:s}).tabs,style:d,...f};return"navigation"===c?a.createElement(i,e({as:"nav"},p,{role:"navigation",ref:u}),r):a.createElement(i,e({as:"div"},p,{role:"tablist",ref:u}),r)}const u=a.forwardRef(f);function p({testId:t="cf-ui-tab-panel",className:r,children:o,id:n,...s},l){return a.createElement(i,e({as:"div"},s,{id:n,role:"tabpanel",testId:t,className:r,ref:l}),o)}const m=a.forwardRef(p);function h({children:t,className:s,isDisabled:l=!1,href:c,id:d,onSelect:f,isSelected:u=!1,style:p,tabIndex:m=0,testId:h="cf-ui-tab",...v},y){const g=(({className:e,isSelected:t,isDisabled:a})=>({tab:n(o(b.tab,""),e,{[o(b.tabSelected,"")]:t,[o(b.tabDisabled,"")]:a})}))({className:s,isSelected:u,isDisabled:l}),x=r((e=>{f&&!l&&f(d,e)}),[l,d,f]),S=r((e=>{f&&"Enter"===e.key&&(f(d,e),e.preventDefault())}),[d,f]),D={className:g.tab,onClick:x,onKeyPress:S,style:p,testId:h,tabIndex:m};return l&&(D["aria-disabled"]=!0),c?(D.href=c,u&&(D["aria-current"]="page"),a.createElement(i,e({as:"a"},D,v,{ref:y}),t)):(D["aria-selected"]=u,D.role="tab",D["aria-controls"]=d,a.createElement(i,e({as:"div"},D,v,{ref:y}),t))}const v=a.forwardRef(h),y=u;var g,x;y.Panel=m,y.Tab=v,g=module.exports,x=d,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(g,e,{enumerable:!0,get:function(){return x[e]}})})); | ||
//# sourceMappingURL=main.js.map |
@@ -1,2 +0,2 @@ | ||
import e from"@babel/runtime/helpers/esm/extends";import t,{useCallback as a}from"react";import{Box as r}from"@contentful/f36-core";import{css as o,cx as i}from"emotion";import s from"@contentful/f36-tokens";function n(e,t,a,r){Object.defineProperty(e,t,{get:a,set:r,enumerable:!0,configurable:!0})}var l={};n(l,"Tabs",(()=>h)),n(l,"Tab",(()=>u)),n(l,"TabPanel",(()=>m));const c={tabs:{display:"flex"},tab:{boxSizing:"border-box",whiteSpace:"nowrap",alignItems:"center",color:s.gray500,display:"flex",height:"100%",minHeight:s.spacing2Xl,position:"relative",cursor:"pointer",padding:`0 ${s.spacingM}`,fontSize:s.fontSizeM,fontFamily:s.fontStackPrimary,fontWeight:s.fontWeightMedium,outline:"none",textDecoration:"none","&:before":{content:'""',position:"absolute",background:s.colorPrimary,opacity:"0",bottom:"0",left:"0",right:"0",height:"2px"},"&:hover:before, &:hover:focus, &:last-child":{opacity:"0.5"}},tabSelected:{color:s.colorPrimary,"&:before, &:hover:before, &:hover:focus":{opacity:"1"}},tabDisabled:{opacity:"0.5",cursor:"not-allowed","&:before, &:hover:before, &:hover:focus":{opacity:"0"}},tabDividerVertical:{"& > *:not(:first-child)":{boxShadow:`inset 1px 0 0px 0px ${s.gray200}`}},tabDividerHorizontal:{boxShadow:`inset 0 -2px 0px 0px ${s.gray200}`}};function b({className:a,children:s,variant:n="default",testId:l="cf-ui-tabs",role:b="tablist",style:d,...f},m){const p={testId:l,className:(({className:e,variant:t})=>({tabs:i(o(c.tabs,""),e,{[o(c.tabDividerHorizontal,"")]:"horizontal-divider"===t,[o(c.tabDividerVertical,"")]:"vertical-divider"===t})}))({className:a,variant:n}).tabs,style:d,...f};return"navigation"===b?t.createElement(r,e({as:"nav"},p,{role:"navigation",ref:m}),s):t.createElement(r,e({as:"div"},p,{role:"tablist",ref:m}),s)}const d=t.forwardRef(b);function f({testId:a="cf-ui-tab-panel",className:o,children:i,id:s,...n},l){return t.createElement(r,e({as:"div"},n,{id:s,role:"tabpanel",testId:a,className:o,ref:l}),i)}const m=t.forwardRef(f);function p({children:s,className:n,isDisabled:l=!1,href:b,id:d,onSelect:f,isSelected:m=!1,style:p,tabIndex:u=0,testId:h="cf-ui-tab",...v},y){const g=(({className:e,isSelected:t,isDisabled:a})=>({tab:i(o(c.tab,""),e,{[o(c.tabSelected,"")]:t,[o(c.tabDisabled,"")]:a})}))({className:n,isSelected:m,isDisabled:l}),x=a((e=>{f&&!l&&f(d,e)}),[l,d,f]),S=a((e=>{f&&"Enter"===e.key&&(f(d,e),e.preventDefault())}),[d,f]),D={className:g.tab,onClick:x,onKeyPress:S,style:p,testId:h,tabIndex:u};return l&&(D["aria-disabled"]=!0),b?(D.href=b,m&&(D["aria-current"]="page"),t.createElement(r,e({as:"a"},D,v,{ref:y}),s)):(D["aria-selected"]=m,D.role="tab",D["aria-controls"]=d,t.createElement(r,e({as:"div"},D,v,{ref:y}),s))}const u=t.forwardRef(p),h=d;h.Panel=m,h.Tab=u;export{h as Tabs,u as Tab,m as TabPanel}; | ||
import e from"@babel/runtime/helpers/esm/extends";import t,{useCallback as a}from"react";import{Box as r}from"@contentful/f36-core";import{cx as o,css as i}from"emotion";import s from"@contentful/f36-tokens";function n(e,t,a,r){Object.defineProperty(e,t,{get:a,set:r,enumerable:!0,configurable:!0})}var l={};n(l,"Tabs",(()=>h)),n(l,"Tab",(()=>u)),n(l,"TabPanel",(()=>m));const c={tabs:{display:"flex"},tab:{boxSizing:"border-box",whiteSpace:"nowrap",alignItems:"center",color:s.gray500,display:"flex",height:"100%",minHeight:s.spacing2Xl,position:"relative",cursor:"pointer",padding:`0 ${s.spacingM}`,fontSize:s.fontSizeM,fontFamily:s.fontStackPrimary,fontWeight:s.fontWeightMedium,outline:"none",textDecoration:"none","&:before":{content:'""',position:"absolute",background:s.colorPrimary,opacity:"0",bottom:"0",left:"0",right:"0",height:"2px"},"&:hover:before, &:hover:focus, &:last-child":{opacity:"0.5"}},tabSelected:{color:s.colorPrimary,"&:before, &:hover:before, &:hover:focus":{opacity:"1"}},tabDisabled:{opacity:"0.5",cursor:"not-allowed","&:before, &:hover:before, &:hover:focus":{opacity:"0"}},tabDividerVertical:{"& > *:not(:first-child)":{boxShadow:`inset 1px 0 0px 0px ${s.gray200}`}},tabDividerHorizontal:{boxShadow:`inset 0 -2px 0px 0px ${s.gray200}`}};function b({className:a,children:s,variant:n="default",testId:l="cf-ui-tabs",role:b="tablist",style:d,...f},m){const p={testId:l,className:(({className:e,variant:t})=>({tabs:o(i(c.tabs,""),e,{[i(c.tabDividerHorizontal,"")]:"horizontal-divider"===t,[i(c.tabDividerVertical,"")]:"vertical-divider"===t})}))({className:a,variant:n}).tabs,style:d,...f};return"navigation"===b?t.createElement(r,e({as:"nav"},p,{role:"navigation",ref:m}),s):t.createElement(r,e({as:"div"},p,{role:"tablist",ref:m}),s)}const d=t.forwardRef(b);function f({testId:a="cf-ui-tab-panel",className:o,children:i,id:s,...n},l){return t.createElement(r,e({as:"div"},n,{id:s,role:"tabpanel",testId:a,className:o,ref:l}),i)}const m=t.forwardRef(f);function p({children:s,className:n,isDisabled:l=!1,href:b,id:d,onSelect:f,isSelected:m=!1,style:p,tabIndex:u=0,testId:h="cf-ui-tab",...v},y){const g=(({className:e,isSelected:t,isDisabled:a})=>({tab:o(i(c.tab,""),e,{[i(c.tabSelected,"")]:t,[i(c.tabDisabled,"")]:a})}))({className:n,isSelected:m,isDisabled:l}),x=a((e=>{f&&!l&&f(d,e)}),[l,d,f]),S=a((e=>{f&&"Enter"===e.key&&(f(d,e),e.preventDefault())}),[d,f]),D={className:g.tab,onClick:x,onKeyPress:S,style:p,testId:h,tabIndex:u};return l&&(D["aria-disabled"]=!0),b?(D.href=b,m&&(D["aria-current"]="page"),t.createElement(r,e({as:"a"},D,v,{ref:y}),s)):(D["aria-selected"]=m,D.role="tab",D["aria-controls"]=d,t.createElement(r,e({as:"div"},D,v,{ref:y}),s))}const u=t.forwardRef(p),h=d;h.Panel=m,h.Tab=u;export{h as Tabs,u as Tab,m as TabPanel}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-tabs", | ||
"version": "4.0.1-next-v4-8101.2339+fc73436b", | ||
"version": "4.0.1-next-v4-8125.2340+450dfb35", | ||
"description": "Forma 36: Tabs component", | ||
@@ -10,5 +10,5 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-button": "4.0.1-next-v4-8101.2339+fc73436b", | ||
"@contentful/f36-core": "4.0.1-next-v4-8101.2339+fc73436b", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-8101.2339+fc73436b", | ||
"@contentful/f36-button": "4.0.1-next-v4-8125.2340+450dfb35", | ||
"@contentful/f36-core": "4.0.1-next-v4-8125.2340+450dfb35", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-8125.2340+450dfb35", | ||
"emotion": "^10.0.17" | ||
@@ -37,3 +37,3 @@ }, | ||
}, | ||
"gitHead": "fc73436bf00bd5ee2522752d6af44a2e3aab807e" | ||
"gitHead": "450dfb35cbbe21cd28e4d11d4206aa2c2deb31c8" | ||
} |
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