@contentful/f36-copybutton
Advanced tools
Comparing version 4.0.1-next-v4-9971.2442 to 4.0.1
@@ -34,4 +34,4 @@ var $2mOCL$emotion = require("emotion"); | ||
alignItems: 'center', | ||
background: $parcel$interopDefault($2mOCL$contentfulf36tokens).colorWhite, | ||
border: `1px solid ${$parcel$interopDefault($2mOCL$contentfulf36tokens).gray300}`, | ||
background: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).colorWhite, | ||
border: `1px solid ${($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray300}`, | ||
display: 'inline-flex', | ||
@@ -42,14 +42,14 @@ height: '100%', | ||
padding: 0, | ||
transition: `background ${$parcel$interopDefault($2mOCL$contentfulf36tokens).transitionDurationShort} ${$parcel$interopDefault($2mOCL$contentfulf36tokens).transitionEasingDefault}`, | ||
transition: `background ${($parcel$interopDefault($2mOCL$contentfulf36tokens)).transitionDurationShort} ${($parcel$interopDefault($2mOCL$contentfulf36tokens)).transitionEasingDefault}`, | ||
width: '100%', | ||
'&:hover': { | ||
backgroundColor: $parcel$interopDefault($2mOCL$contentfulf36tokens).gray100, | ||
backgroundColor: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray100, | ||
cursor: 'pointer' | ||
}, | ||
'&:active': { | ||
backgroundColor: $parcel$interopDefault($2mOCL$contentfulf36tokens).gray200, | ||
backgroundColor: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray200, | ||
cursor: 'pointer' | ||
}, | ||
'&:focus': { | ||
boxShadow: $parcel$interopDefault($2mOCL$contentfulf36tokens).glowMuted | ||
boxShadow: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).glowMuted | ||
} | ||
@@ -59,13 +59,13 @@ }), | ||
cursor: 'not-allowed', | ||
backgroundColor: $parcel$interopDefault($2mOCL$contentfulf36tokens).gray100, | ||
backgroundColor: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray100, | ||
'&:hover': { | ||
cursor: 'not-allowed', | ||
backgroundColor: $parcel$interopDefault($2mOCL$contentfulf36tokens).gray100 | ||
backgroundColor: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray100 | ||
}, | ||
'&:focus': { | ||
borderColor: $parcel$interopDefault($2mOCL$contentfulf36tokens).gray300, | ||
borderColor: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray300, | ||
boxShadow: 'none' | ||
}, | ||
'&:active, &:active:hover': { | ||
borderColor: $parcel$interopDefault($2mOCL$contentfulf36tokens).gray300, | ||
borderColor: ($parcel$interopDefault($2mOCL$contentfulf36tokens)).gray300, | ||
boxShadow: 'none' | ||
@@ -95,3 +95,3 @@ } | ||
]); | ||
return(/*#__PURE__*/ $parcel$interopDefault($2mOCL$react).createElement("div", { | ||
return(/*#__PURE__*/ ($parcel$interopDefault($2mOCL$react)).createElement("div", { | ||
ref: ref, | ||
@@ -101,10 +101,10 @@ "data-test-id": testId, | ||
...otherProps | ||
}, /*#__PURE__*/ $parcel$interopDefault($2mOCL$react).createElement($parcel$interopDefault($2mOCL$reactcopytoclipboard), { | ||
}, /*#__PURE__*/ ($parcel$interopDefault($2mOCL$react)).createElement(($parcel$interopDefault($2mOCL$reactcopytoclipboard)), { | ||
text: value, | ||
onCopy: handleOnCopy | ||
}, /*#__PURE__*/ $parcel$interopDefault($2mOCL$react).createElement($2mOCL$contentfulf36tooltip.Tooltip, { | ||
}, /*#__PURE__*/ ($parcel$interopDefault($2mOCL$react)).createElement($2mOCL$contentfulf36tooltip.Tooltip, { | ||
content: copied ? tooltipCopiedText : tooltipText, | ||
...tooltipProps, | ||
isDisabled: isDisabled | ||
}, /*#__PURE__*/ $parcel$interopDefault($2mOCL$react).createElement("button", { | ||
}, /*#__PURE__*/ ($parcel$interopDefault($2mOCL$react)).createElement("button", { | ||
type: "button", | ||
@@ -116,4 +116,5 @@ ref: button, | ||
"aria-label": `Copy ${value} to clipboard`, | ||
disabled: isDisabled | ||
}, /*#__PURE__*/ $parcel$interopDefault($2mOCL$react).createElement($2mOCL$contentfulf36icons.CopyIcon, { | ||
disabled: isDisabled, | ||
"aria-live": "assertive" | ||
}, /*#__PURE__*/ ($parcel$interopDefault($2mOCL$react)).createElement($2mOCL$contentfulf36icons.CopyIcon, { | ||
variant: "muted", | ||
@@ -123,3 +124,3 @@ size: size === 'small' ? 'tiny' : 'small' | ||
} | ||
const $7cfc52ec8d291deb$export$4f2558dd25106ae2 = /*#__PURE__*/ $parcel$interopDefault($2mOCL$react).forwardRef($7cfc52ec8d291deb$var$_CopyButton); | ||
const $7cfc52ec8d291deb$export$4f2558dd25106ae2 = /*#__PURE__*/ ($parcel$interopDefault($2mOCL$react)).forwardRef($7cfc52ec8d291deb$var$_CopyButton); | ||
@@ -126,0 +127,0 @@ |
@@ -103,3 +103,4 @@ import {cx as $dnnsg$cx, css as $dnnsg$css} from "emotion"; | ||
"aria-label": `Copy ${value} to clipboard`, | ||
disabled: isDisabled | ||
disabled: isDisabled, | ||
"aria-live": "assertive" | ||
}, /*#__PURE__*/ $dnnsg$react.createElement($dnnsg$CopyIcon, { | ||
@@ -106,0 +107,0 @@ variant: "muted", |
@@ -43,4 +43,16 @@ import React from "react"; | ||
} | ||
export const CopyButton: React.ForwardRefExoticComponent<CopyButtonProps & React.RefAttributes<HTMLDivElement>>; | ||
export const CopyButton: React.ForwardRefExoticComponent<{ | ||
onCopy?: (string: any) => void; | ||
tooltipCopiedText?: string; | ||
tooltipText?: string; | ||
tooltipProps?: Omit<TooltipProps, 'content' | 'children'>; | ||
value: string; | ||
label?: string; | ||
isDisabled?: boolean; | ||
size?: 'small' | 'medium'; | ||
className?: string; | ||
testId?: string; | ||
style?: React.CSSProperties; | ||
} & React.RefAttributes<HTMLDivElement>>; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@contentful/f36-copybutton", | ||
"version": "4.0.1-next-v4-9971.2442+8f3e7a41", | ||
"version": "4.0.1", | ||
"description": "Forma 36: CopyButton component", | ||
@@ -10,6 +10,6 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-core": "4.0.1-next-v4-9971.2442+8f3e7a41", | ||
"@contentful/f36-icons": "4.0.1-next-v4-9971.2442+8f3e7a41", | ||
"@contentful/f36-tokens": "4.0.1-next-v4-9971.2442+8f3e7a41", | ||
"@contentful/f36-tooltip": "4.0.1-next-v4-9971.2442+8f3e7a41", | ||
"@contentful/f36-core": "^4.0.1", | ||
"@contentful/f36-icons": "^4.0.1", | ||
"@contentful/f36-tokens": "^4.0.0", | ||
"@contentful/f36-tooltip": "^4.0.1", | ||
"emotion": "^10.0.17", | ||
@@ -23,4 +23,3 @@ "react-copy-to-clipboard": "^5.0.3" | ||
"files": [ | ||
"dist", | ||
"src" | ||
"dist" | ||
], | ||
@@ -40,3 +39,3 @@ "main": "dist/main.js", | ||
}, | ||
"gitHead": "8f3e7a417569b40b3159d4389319b4e7c5753354" | ||
"gitHead": "cee6bd9ae0b1ca2ce23d42873d9344a20fe740d0" | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
54
0
33365
23944
10
268
58
+ Added@contentful/f36-core@4.74.1(transitive)
+ Added@contentful/f36-icon@4.74.1(transitive)
+ Added@contentful/f36-icons@4.29.0(transitive)
+ Added@contentful/f36-tokens@4.1.0(transitive)
+ Added@contentful/f36-tooltip@4.74.1(transitive)
+ Added@contentful/f36-utils@4.24.3(transitive)
+ Added@emotion/core@10.3.1(transitive)
+ Added@emotion/css@10.0.27(transitive)
+ Added@emotion/is-prop-valid@1.3.1(transitive)
+ Added@emotion/memoize@0.9.0(transitive)
+ Added@popperjs/core@2.11.8(transitive)
+ Addedcsstype@3.1.3(transitive)
+ Addedreact-dom@18.3.1(transitive)
+ Addedreact-fast-compare@3.2.2(transitive)
+ Addedreact-popper@2.3.0(transitive)
+ Addedscheduler@0.23.2(transitive)
+ Addedwarning@4.0.3(transitive)
Updated@contentful/f36-core@^4.0.1
Updated@contentful/f36-icons@^4.0.1