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-6748.2278 to 4.0.1-next-v4-6754.2279

2

dist/module.js

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

import t from"@babel/runtime/helpers/esm/extends";import{cx as e,css as o}from"emotion";import r,{useRef as n,useState as a,useCallback as i}from"react";import c from"react-copy-to-clipboard";import{CopyIcon as l}from"@contentful/f36-icons";import{Tooltip as s}from"@contentful/f36-tooltip";import p from"@contentful/f36-tokens";var u,m,f,d;u={},m="CopyButton",f=()=>y,Object.defineProperty(u,m,{get:f,set:d,enumerable:!0,configurable:!0});function b(u,m){const{onCopy:f,value:d,className:b,testId:y="cf-ui-copy-button",tooltipText:g="Copy to clipboard",tooltipCopiedText:C="Copied!",tooltipProps:h,...x}=u,k={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}},"")},[v,w]=a(!1),B=n(null),E=i((t=>{f&&f(t),w(!0),setTimeout((()=>{w(!1),B.current&&B.current.blur()}),1e3)}),[f]);return r.createElement("div",t({ref:m,"data-test-id":y,className:e(k.wrapper,b)},x),r.createElement(c,{text:d,onCopy:E},r.createElement(s,t({content:v?C:g},h),r.createElement("button",{type:"button",ref:B,className:e(k.copyButton),"aria-label":`Copy ${d} to clipboard`},r.createElement(l,{variant:"muted"})))))}const y=r.forwardRef(b);export{y as CopyButton};
import t from"@babel/runtime/helpers/esm/extends";import{cx as e,css as o}from"emotion";import r,{useCallback as n,useRef as a,useState as i}from"react";import c from"react-copy-to-clipboard";import{CopyIcon as l}from"@contentful/f36-icons";import{Tooltip as s}from"@contentful/f36-tooltip";import p from"@contentful/f36-tokens";var u,m,f,d;u={},m="CopyButton",f=()=>y,Object.defineProperty(u,m,{get:f,set:d,enumerable:!0,configurable:!0});function b(u,m){const{onCopy:f,value:d,className:b,testId:y="cf-ui-copy-button",tooltipText:g="Copy to clipboard",tooltipCopiedText:C="Copied!",tooltipProps:h,...x}=u,k={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}},"")},[v,w]=i(!1),B=a(null),E=n((t=>{f&&f(t),w(!0),setTimeout((()=>{w(!1),B.current&&B.current.blur()}),1e3)}),[f]);return r.createElement("div",t({ref:m,"data-test-id":y,className:e(k.wrapper,b)},x),r.createElement(c,{text:d,onCopy:E},r.createElement(s,t({content:v?C:g},h),r.createElement("button",{type:"button",ref:B,className:e(k.copyButton),"aria-label":`Copy ${d} to clipboard`},r.createElement(l,{variant:"muted"})))))}const y=r.forwardRef(b);export{y as CopyButton};
//# sourceMappingURL=module.js.map
{
"name": "@contentful/f36-copybutton",
"version": "4.0.1-next-v4-6748.2278+3d8c58a5",
"version": "4.0.1-next-v4-6754.2279+d702f155",
"description": "Forma 36: CopyButton component",

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

"@babel/runtime": "^7.6.2",
"@contentful/f36-core": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-icons": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-tokens": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-tooltip": "4.0.1-next-v4-6748.2278+3d8c58a5",
"@contentful/f36-core": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-icons": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-tokens": "4.0.1-next-v4-6754.2279+d702f155",
"@contentful/f36-tooltip": "4.0.1-next-v4-6754.2279+d702f155",
"emotion": "^10.0.17",

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

},
"gitHead": "3d8c58a50b62f4e2e2a9157e1385a21650ed191a"
"gitHead": "d702f155ce0fbb822f92e55422796f4f4c88ba0d"
}
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