@contentful/f36-text-link
Advanced tools
Comparing version 4.0.1-next-v4-6321.2232 to 4.0.1-next-v4-6330.2234
@@ -1,2 +0,2 @@ | ||
var e=i(require("@babel/runtime/helpers/extends")),{cx:r,css:t}=require("emotion"),o=i(require("react")),{Flex:n}=require("@contentful/f36-core"),a=i(require("@contentful/f36-tokens"));function i(e){return e&&e.__esModule?e.default:e}var l,s,c,u,d={};l=d,s="TextLink",c=()=>p,Object.defineProperty(l,s,{get:c,set:u,enumerable:!0,configurable:!0});const f=e=>{switch(e){case"primary":return{color:a.blue600,"&:hover, &:focus":{color:a.blue700}};case"secondary":return{color:a.gray600,"&:hover, &:focus":{color:a.gray700}};case"positive":return{color:a.green600,"&:hover, &:focus":{color:a.green700}};case"negative":return{color:a.red600,"&:hover, &:focus":{color:a.red700}};case"muted":return{color:a.gray400,"&:hover, &:focus":{color:a.gray500}};case"white":return{color:a.colorWhite,"&:hover, &:focus":{color:a.gray100}};default:return{color:a.colorWhite}}},m=({variant:e,isDisabled:r})=>t({display:"inline-flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",border:0,padding:0,fontFamily:a.fontStackPrimary,fontSize:a.fontSizeM,fontWeight:a.fontWeightMedium,transition:`color ${a.transitionDurationShort} ${a.transitionEasingDefault}`,textDecoration:"none",background:"none",appearance:"none",whiteSpace:"normal",textAlign:"left",cursor:r?"not-allowed":"pointer",opacity:r?.5:1,...f(e),"&:focus, &:hover":{textDecoration:r?"none":"underline"},"&:focus":{boxShadow:a.glowPrimary,outline:"none",borderRadius:a.borderRadiusSmall}},""),g=()=>t({fill:"currentColor",transition:`fill ${a.transitionDurationShort} ${a.transitionEasingDefault}`},""),b=({alignIcon:e})=>"start"===e?t({name:"1cvn7av",styles:"margin-left:0.125rem;"}):"end"===e?t({name:"ulopsy",styles:"margin-right:0.125rem;"}):void 0,h="a",y=(t,a)=>{const{children:i,className:l,testId:s,variant:c="primary",href:u,icon:d,alignIcon:f="start",isDisabled:y,as:p=h,...v}=t,x={ref:a,className:r(m({variant:c,isDisabled:y}),t.className),"data-test-id":s,...v},D=d?o.createElement(n,{as:"span"},o.cloneElement(d,{className:r(d.props.className,g()),size:"tiny"})):null,E=o.createElement(o.Fragment,null,d&&"start"===f&&D,i&&o.createElement("span",{className:b({alignIcon:d?f:void 0})},i),d&&"end"===f&&D);return"button"===p?o.createElement("button",e({},x,{disabled:y,type:"button"}),E):o.createElement("a",e({},x,{href:u}),E)},p=o.forwardRef(y);var v,x;v=module.exports,x=d,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(v,e,{enumerable:!0,get:function(){return x[e]}})})); | ||
var e=i(require("@babel/runtime/helpers/extends")),{cx:r,css:t}=require("emotion"),o=i(require("react")),{Flex:n}=require("@contentful/f36-core"),a=i(require("@contentful/f36-tokens"));function i(e){return e&&e.__esModule?e.default:e}var l,c,s,u,f={};l=f,c="TextLink",s=()=>p,Object.defineProperty(l,c,{get:s,set:u,enumerable:!0,configurable:!0});const d=e=>{switch(e){case"primary":return{color:a.blue600,"&:hover, &:focus":{color:a.blue700}};case"secondary":return{color:a.gray600,"&:hover, &:focus":{color:a.gray700}};case"positive":return{color:a.green600,"&:hover, &:focus":{color:a.green700}};case"negative":return{color:a.red600,"&:hover, &:focus":{color:a.red700}};case"muted":return{color:a.gray400,"&:hover, &:focus":{color:a.gray500}};case"white":return{color:a.colorWhite,"&:hover, &:focus":{color:a.gray100}};default:return{color:a.colorWhite}}},m=({variant:e,isDisabled:r})=>t({display:"inline-flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",border:0,padding:0,fontFamily:a.fontStackPrimary,fontSize:a.fontSizeM,fontWeight:a.fontWeightMedium,transition:`color ${a.transitionDurationShort} ${a.transitionEasingDefault}`,textDecoration:"none",background:"none",appearance:"none",whiteSpace:"normal",textAlign:"left",cursor:r?"not-allowed":"pointer",opacity:r?.5:1,...d(e),"&:focus, &:hover":{textDecoration:r?"none":"underline"},"&:focus":{boxShadow:a.glowPrimary,outline:"none",borderRadius:a.borderRadiusSmall}},""),g=()=>t({fill:"currentColor",transition:`fill ${a.transitionDurationShort} ${a.transitionEasingDefault}`},""),b=({alignIcon:e})=>"start"===e?t({name:"1cvn7av",styles:"margin-left:0.125rem;"}):"end"===e?t({name:"ulopsy",styles:"margin-right:0.125rem;"}):void 0,h="a",y=(t,a)=>{const{children:i,className:l,testId:c="cf-ui-text-link",variant:s="primary",href:u,icon:f,alignIcon:d="start",isDisabled:y,as:p=h,...v}=t,x={ref:a,className:r(m({variant:s,isDisabled:y}),t.className),"data-test-id":c,...v},D=f?o.createElement(n,{as:"span"},o.cloneElement(f,{className:r(f.props.className,g()),size:"tiny"})):null,E=o.createElement(o.Fragment,null,f&&"start"===d&&D,i&&o.createElement("span",{className:b({alignIcon:f?d:void 0})},i),f&&"end"===d&&D);return"button"===p?o.createElement("button",e({},x,{disabled:y,type:"button"}),E):o.createElement("a",e({},x,{href:u}),E)},p=o.forwardRef(y);var v,x;v=module.exports,x=f,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(v,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{cx as r,css as o}from"emotion";import t from"react";import{Flex as n}from"@contentful/f36-core";import a from"@contentful/f36-tokens";var i,s,l,c;i={},s="TextLink",l=()=>b,Object.defineProperty(i,s,{get:l,set:c,enumerable:!0,configurable:!0});const u=e=>{switch(e){case"primary":return{color:a.blue600,"&:hover, &:focus":{color:a.blue700}};case"secondary":return{color:a.gray600,"&:hover, &:focus":{color:a.gray700}};case"positive":return{color:a.green600,"&:hover, &:focus":{color:a.green700}};case"negative":return{color:a.red600,"&:hover, &:focus":{color:a.red700}};case"muted":return{color:a.gray400,"&:hover, &:focus":{color:a.gray500}};case"white":return{color:a.colorWhite,"&:hover, &:focus":{color:a.gray100}};default:return{color:a.colorWhite}}},m=({variant:e,isDisabled:r})=>o({display:"inline-flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",border:0,padding:0,fontFamily:a.fontStackPrimary,fontSize:a.fontSizeM,fontWeight:a.fontWeightMedium,transition:`color ${a.transitionDurationShort} ${a.transitionEasingDefault}`,textDecoration:"none",background:"none",appearance:"none",whiteSpace:"normal",textAlign:"left",cursor:r?"not-allowed":"pointer",opacity:r?.5:1,...u(e),"&:focus, &:hover":{textDecoration:r?"none":"underline"},"&:focus":{boxShadow:a.glowPrimary,outline:"none",borderRadius:a.borderRadiusSmall}},""),f=()=>o({fill:"currentColor",transition:`fill ${a.transitionDurationShort} ${a.transitionEasingDefault}`},""),d=({alignIcon:e})=>"start"===e?o({name:"1cvn7av",styles:"margin-left:0.125rem;"}):"end"===e?o({name:"ulopsy",styles:"margin-right:0.125rem;"}):void 0,g="a",p=(o,a)=>{const{children:i,className:s,testId:l,variant:c="primary",href:u,icon:p,alignIcon:b="start",isDisabled:h,as:y=g,...v}=o,x={ref:a,className:r(m({variant:c,isDisabled:h}),o.className),"data-test-id":l,...v},D=p?t.createElement(n,{as:"span"},t.cloneElement(p,{className:r(p.props.className,f()),size:"tiny"})):null,S=t.createElement(t.Fragment,null,p&&"start"===b&&D,i&&t.createElement("span",{className:d({alignIcon:p?b:void 0})},i),p&&"end"===b&&D);return"button"===y?t.createElement("button",e({},x,{disabled:h,type:"button"}),S):t.createElement("a",e({},x,{href:u}),S)},b=t.forwardRef(p);export{b as TextLink}; | ||
import e from"@babel/runtime/helpers/esm/extends";import{cx as r,css as o}from"emotion";import t from"react";import{Flex as n}from"@contentful/f36-core";import a from"@contentful/f36-tokens";var i,s,l,c;i={},s="TextLink",l=()=>b,Object.defineProperty(i,s,{get:l,set:c,enumerable:!0,configurable:!0});const u=e=>{switch(e){case"primary":return{color:a.blue600,"&:hover, &:focus":{color:a.blue700}};case"secondary":return{color:a.gray600,"&:hover, &:focus":{color:a.gray700}};case"positive":return{color:a.green600,"&:hover, &:focus":{color:a.green700}};case"negative":return{color:a.red600,"&:hover, &:focus":{color:a.red700}};case"muted":return{color:a.gray400,"&:hover, &:focus":{color:a.gray500}};case"white":return{color:a.colorWhite,"&:hover, &:focus":{color:a.gray100}};default:return{color:a.colorWhite}}},m=({variant:e,isDisabled:r})=>o({display:"inline-flex",justifyContent:"center",alignItems:"center",boxSizing:"border-box",border:0,padding:0,fontFamily:a.fontStackPrimary,fontSize:a.fontSizeM,fontWeight:a.fontWeightMedium,transition:`color ${a.transitionDurationShort} ${a.transitionEasingDefault}`,textDecoration:"none",background:"none",appearance:"none",whiteSpace:"normal",textAlign:"left",cursor:r?"not-allowed":"pointer",opacity:r?.5:1,...u(e),"&:focus, &:hover":{textDecoration:r?"none":"underline"},"&:focus":{boxShadow:a.glowPrimary,outline:"none",borderRadius:a.borderRadiusSmall}},""),f=()=>o({fill:"currentColor",transition:`fill ${a.transitionDurationShort} ${a.transitionEasingDefault}`},""),d=({alignIcon:e})=>"start"===e?o({name:"1cvn7av",styles:"margin-left:0.125rem;"}):"end"===e?o({name:"ulopsy",styles:"margin-right:0.125rem;"}):void 0,g="a",p=(o,a)=>{const{children:i,className:s,testId:l="cf-ui-text-link",variant:c="primary",href:u,icon:p,alignIcon:b="start",isDisabled:h,as:y=g,...v}=o,x={ref:a,className:r(m({variant:c,isDisabled:h}),o.className),"data-test-id":l,...v},D=p?t.createElement(n,{as:"span"},t.cloneElement(p,{className:r(p.props.className,f()),size:"tiny"})):null,S=t.createElement(t.Fragment,null,p&&"start"===b&&D,i&&t.createElement("span",{className:d({alignIcon:p?b:void 0})},i),p&&"end"===b&&D);return"button"===y?t.createElement("button",e({},x,{disabled:h,type:"button"}),S):t.createElement("a",e({},x,{href:u}),S)},b=t.forwardRef(p);export{b as TextLink}; | ||
//# sourceMappingURL=module.js.map |
{ | ||
"name": "@contentful/f36-text-link", | ||
"version": "4.0.1-next-v4-6321.2232+4fbeb4b9", | ||
"version": "4.0.1-next-v4-6330.2234+82fc9a50", | ||
"description": "Forma 36: TextLink component", | ||
@@ -10,4 +10,4 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-core": "4.0.1-next-v4-6321.2232+4fbeb4b9", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6321.2232+4fbeb4b9", | ||
"@contentful/f36-core": "4.0.1-next-v4-6330.2234+82fc9a50", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-6330.2234+82fc9a50", | ||
"emotion": "^10.0.17" | ||
@@ -36,3 +36,3 @@ }, | ||
}, | ||
"gitHead": "4fbeb4b96baa267fe697a3143d14a4325fa77158" | ||
"gitHead": "82fc9a50a968ded4d1d5365e0c49f2eb83715710" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
70798