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-6436.2246 to 4.0.1-next-v4-6443.2247

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"),{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]}})}));
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]}})}));
//# 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{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",(()=>d)),n(l,"Tab",(()=>m)),n(l,"TabPanel",(()=>u));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({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 m=t.forwardRef(f);function p({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 u=t.forwardRef(p);export{d as Tabs,m as Tab,u 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{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",(()=>d)),n(l,"Tab",(()=>m)),n(l,"TabPanel",(()=>u));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({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 m=t.forwardRef(f);function p({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 u=t.forwardRef(p);export{d as Tabs,m as Tab,u as TabPanel};
//# sourceMappingURL=module.js.map
{
"name": "@contentful/f36-tabs",
"version": "4.0.1-next-v4-6436.2246+ab39734f",
"version": "4.0.1-next-v4-6443.2247+236460ce",
"description": "Forma 36: Tabs component",

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

"@babel/runtime": "^7.6.2",
"@contentful/f36-button": "4.0.1-next-v4-6436.2246+ab39734f",
"@contentful/f36-core": "4.0.1-next-v4-6436.2246+ab39734f",
"@contentful/f36-tokens": "4.0.1-next-v4-6436.2246+ab39734f",
"@contentful/f36-button": "4.0.1-next-v4-6443.2247+236460ce",
"@contentful/f36-core": "4.0.1-next-v4-6443.2247+236460ce",
"@contentful/f36-tokens": "4.0.1-next-v4-6443.2247+236460ce",
"emotion": "^10.0.17"

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

},
"gitHead": "ab39734f4c9f68e016c9f54ad78968569c3c12f2"
"gitHead": "236460ce04c14e69f1711a49589bb92a96134272"
}
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