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

@contentful/f36-copybutton

Package Overview
Dependencies
Maintainers
102
Versions
344
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentful/f36-copybutton - npm Package Compare versions

Comparing version 4.0.1-next-v4-6381.2242 to 4.0.1-next-v4-6391.2243

2

dist/main.js

@@ -1,2 +0,2 @@

var e=d(require("@babel/runtime/helpers/extends")),{cx:t,css:o}=require("emotion"),r=require("react"),n=d(r),{useCallback:a,useRef:i,useState:u}=r,c=d(require("react-copy-to-clipboard")),{CopyIcon:l}=require("@contentful/f36-icons"),{Tooltip:s}=require("@contentful/f36-tooltip"),p=d(require("@contentful/f36-tokens"));function d(e){return e&&e.__esModule?e.default:e}var f,b,y,m,g={};f=g,b="CopyButton",y=()=>C,Object.defineProperty(f,b,{get:y,set:m,enumerable:!0,configurable:!0});function h(r,d){const{onCopy:f,value:b,className:y,testId:m="cf-ui-copy-button",tooltipText:g="Copy to clipboard",tooltipCopiedText:h="Copied!",tooltipProps:C,...v}=r,x={wrapper:o({display:"inline-block",height:`calc(1rem * (40 / ${p.fontBaseDefault}))`,position:"relative",width:`calc(1rem * (40 / ${p.fontBaseDefault}))`},""),copyButton:o({alignItems:"center",background:p.colorWhite,border:`1px solid ${p.gray300}`,display:"inline-flex",height:"100%",justifyContent:"center",outline:"none",padding:0,transition:`background ${p.transitionDurationShort} ${p.transitionEasingDefault}`,width:"100%","&:hover":{backgroundColor:p.gray100,cursor:"pointer"},"&:active":{backgroundColor:p.gray200,cursor:"pointer"},"&:focus":{boxShadow:p.glowMuted}},"")},[k,q]=u(!1),w=i(null),E=a((e=>{f&&f(e),q(!0),setTimeout((()=>{q(!1),w.current&&w.current.blur()}),1e3)}),[f]);return n.createElement("div",e({ref:d,"data-test-id":m,className:t(x.wrapper,y)},v),n.createElement(c,{text:b,onCopy:E},n.createElement(s,e({content:k?h:g},C),n.createElement("button",{type:"button",ref:w,className:t(x.copyButton),"aria-label":`Copy ${b} to clipboard`},n.createElement(l,{variant:"muted"})))))}const C=n.forwardRef(h);var v,x;v=module.exports,x=g,Object.keys(x).forEach((function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(v,e,{enumerable:!0,get:function(){return x[e]}})}));
var e=d(require("@babel/runtime/helpers/extends")),{cx:t,css:o}=require("emotion"),r=require("react"),n=d(r),{useRef:a,useState:i,useCallback:u}=r,c=d(require("react-copy-to-clipboard")),{CopyIcon:l}=require("@contentful/f36-icons"),{Tooltip:s}=require("@contentful/f36-tooltip"),p=d(require("@contentful/f36-tokens"));function d(e){return e&&e.__esModule?e.default:e}var f,b,y,m,g={};f=g,b="CopyButton",y=()=>C,Object.defineProperty(f,b,{get:y,set:m,enumerable:!0,configurable:!0});function h(r,d){const{onCopy:f,value:b,className:y,testId:m="cf-ui-copy-button",tooltipText:g="Copy to clipboard",tooltipCopiedText:h="Copied!",tooltipProps:C,...v}=r,x={wrapper:o({display:"inline-block",height:`calc(1rem * (40 / ${p.fontBaseDefault}))`,position:"relative",width:`calc(1rem * (40 / ${p.fontBaseDefault}))`},""),copyButton:o({alignItems:"center",background:p.colorWhite,border:`1px solid ${p.gray300}`,display:"inline-flex",height:"100%",justifyContent:"center",outline:"none",padding:0,transition:`background ${p.transitionDurationShort} ${p.transitionEasingDefault}`,width:"100%","&:hover":{backgroundColor:p.gray100,cursor:"pointer"},"&:active":{backgroundColor:p.gray200,cursor:"pointer"},"&:focus":{boxShadow:p.glowMuted}},"")},[k,q]=i(!1),w=a(null),E=u((e=>{f&&f(e),q(!0),setTimeout((()=>{q(!1),w.current&&w.current.blur()}),1e3)}),[f]);return n.createElement("div",e({ref:d,"data-test-id":m,className:t(x.wrapper,y)},v),n.createElement(c,{text:b,onCopy:E},n.createElement(s,e({content:k?h:g},C),n.createElement("button",{type:"button",ref:w,className:t(x.copyButton),"aria-label":`Copy ${b} to clipboard`},n.createElement(l,{variant:"muted"})))))}const C=n.forwardRef(h);var v,x;v=module.exports,x=g,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
{
"name": "@contentful/f36-copybutton",
"version": "4.0.1-next-v4-6381.2242+321e9349",
"version": "4.0.1-next-v4-6391.2243+daaadf93",
"description": "Forma 36: CopyButton component",

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

"@babel/runtime": "^7.6.2",
"@contentful/f36-core": "4.0.1-next-v4-6381.2242+321e9349",
"@contentful/f36-icons": "4.0.1-next-v4-6381.2242+321e9349",
"@contentful/f36-tokens": "4.0.1-next-v4-6381.2242+321e9349",
"@contentful/f36-tooltip": "4.0.1-next-v4-6381.2242+321e9349",
"@contentful/f36-core": "4.0.1-next-v4-6391.2243+daaadf93",
"@contentful/f36-icons": "4.0.1-next-v4-6391.2243+daaadf93",
"@contentful/f36-tokens": "4.0.1-next-v4-6391.2243+daaadf93",
"@contentful/f36-tooltip": "4.0.1-next-v4-6391.2243+daaadf93",
"emotion": "^10.0.17",

@@ -39,3 +39,3 @@ "react-copy-to-clipboard": "^5.0.3"

},
"gitHead": "321e93492bc3c4bd0e59402fb94012c266848f13"
"gitHead": "daaadf935ca4bf9c78a22aaa77f723266a7e3623"
}
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