Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@contentful/f36-tabs

Package Overview
Dependencies
Maintainers
102
Versions
343
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-tabs - npm Package Compare versions

Comparing version 4.0.1-next-v4-6685.2275 to 4.0.1-next-v4-6714.2276

2

dist/main.js

@@ -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"),{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",(()=>u)),l(d,"Tab",(()=>m)),l(d,"TabPanel",(()=>v));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({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 m=a.forwardRef(p);function h({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 v=a.forwardRef(h);var y,g;y=module.exports,g=d,Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(y,e,{enumerable:!0,get:function(){return g[e]}})}));
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",(()=>u)),l(d,"Tab",(()=>m)),l(d,"TabPanel",(()=>v));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({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 m=a.forwardRef(p);function h({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 v=a.forwardRef(h);var y,g;y=module.exports,g=d,Object.keys(g).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(y,e,{enumerable:!0,get:function(){return g[e]}})}));
//# sourceMappingURL=main.js.map
{
"name": "@contentful/f36-tabs",
"version": "4.0.1-next-v4-6685.2275+1e33af55",
"version": "4.0.1-next-v4-6714.2276+fd8aedf5",
"description": "Forma 36: Tabs component",

@@ -10,5 +10,5 @@ "scripts": {

"@babel/runtime": "^7.6.2",
"@contentful/f36-button": "4.0.1-next-v4-6685.2275+1e33af55",
"@contentful/f36-core": "4.0.1-next-v4-6685.2275+1e33af55",
"@contentful/f36-tokens": "4.0.1-next-v4-6685.2275+1e33af55",
"@contentful/f36-button": "4.0.1-next-v4-6714.2276+fd8aedf5",
"@contentful/f36-core": "4.0.1-next-v4-6714.2276+fd8aedf5",
"@contentful/f36-tokens": "4.0.1-next-v4-6714.2276+fd8aedf5",
"emotion": "^10.0.17"

@@ -37,3 +37,3 @@ },

},
"gitHead": "1e33af55749ec626327a2849d3a6dc70d6e159bf"
"gitHead": "fd8aedf5553d30aac21d370e024594b1068f4ca2"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc