@dopplerhq/universal-import-react
Advanced tools
Comparing version 0.0.5 to 0.0.6
interface DopplerImportButtonProps { | ||
secretName: string; | ||
secretValue: string; | ||
height?: number; | ||
} | ||
export declare function DopplerImportButton({ secretName, secretValue }: DopplerImportButtonProps): JSX.Element; | ||
export declare function DopplerImportButton(props: DopplerImportButtonProps): JSX.Element; | ||
export {}; |
@@ -36,29 +36,38 @@ import { encryption, utils } from "@dopplerhq/universal-import-core"; | ||
const jsxs = jsxRuntime.exports.jsxs; | ||
const Logo = (props) => /* @__PURE__ */ jsx("svg", { | ||
width: 14, | ||
height: 14, | ||
viewBox: "0 0 90 90", | ||
preserveAspectRatio: "xMidYMid meet", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg", | ||
...props, | ||
children: /* @__PURE__ */ jsx("path", { | ||
d: "M1.652 0C.933 0 .508.794.895 1.4L17.03 26.655a7.25 7.25 0 0 0 6.113 3.353h21.824c8 0 13 7.073 12.97 14.992-.029 7.92-5.358 14.922-12.97 14.922h-23.3a2.416 2.416 0 0 0-2.416 2.42v25.24A2.413 2.413 0 0 0 21.663 90h29.764C77.181 90 89.984 65.566 90 45c.016-20.566-12.638-45-38.573-45H1.652ZM12.24 59.992H6.444C2.885 59.992 0 63.349 0 67.49v21.847c0 .359.291.65.65.65h5.794c3.56 0 6.445-3.357 6.445-7.499V60.642a.65.65 0 0 0-.65-.65Z", | ||
fill: "#fff", | ||
preserveAspectRatio: "none" | ||
}) | ||
}); | ||
const ImportText = (props) => /* @__PURE__ */ jsx("svg", { | ||
fill: "none", | ||
height: 10, | ||
viewBox: "0 0 69 19", | ||
preserveAspectRatio: "xMidYMid meet", | ||
xmlns: "http://www.w3.org/2000/svg", | ||
...props, | ||
children: /* @__PURE__ */ jsx("path", { | ||
d: "M0 0h3.422v14.997H0V0ZM13.06 8.959c0-1.039-.138-1.774-.416-2.207-.263-.433-.724-.65-1.382-.65-.205 0-.417.015-.636.044-.22.014-.431.036-.636.065v8.786H6.72V4.003c.278-.072.6-.144.965-.216.38-.087.776-.159 1.185-.216.424-.073.856-.123 1.294-.152.439-.043.87-.065 1.295-.065.833 0 1.506.108 2.018.325.526.202.957.447 1.294.736a5.675 5.675 0 0 1 1.601-.78c.614-.187 1.177-.28 1.69-.28.92 0 1.674.129 2.259.389.6.245 1.074.598 1.425 1.06.351.462.593 1.01.724 1.645.132.635.198 1.341.198 2.12v6.428H19.4V8.959c0-1.039-.139-1.774-.416-2.207-.264-.433-.724-.65-1.383-.65-.175 0-.424.044-.745.13a2.905 2.905 0 0 0-.768.325c.102.332.168.685.197 1.06.03.361.044.75.044 1.169v6.21h-3.268V8.96ZM33.03 9.392c0-.996-.227-1.79-.68-2.38-.454-.607-1.127-.91-2.019-.91-.292 0-.563.015-.812.044a5.339 5.339 0 0 0-.614.065v5.82c.205.13.468.239.79.325.336.087.673.13 1.009.13 1.55 0 2.325-1.031 2.325-3.094Zm3.333-.087c0 .88-.11 1.681-.329 2.402-.219.722-.54 1.342-.965 1.861a4.35 4.35 0 0 1-1.58 1.212c-.628.289-1.352.433-2.17.433a5.932 5.932 0 0 1-2.414-.498V19h-3.268V4.003c.292-.086.629-.165 1.009-.238.38-.086.775-.158 1.184-.216.425-.058.849-.101 1.273-.13.438-.043.855-.065 1.25-.065.95 0 1.799.144 2.545.433.745.274 1.374.67 1.886 1.19a4.88 4.88 0 0 1 1.163 1.861c.277.736.416 1.558.416 2.467ZM49.668 9.284c0 .894-.132 1.716-.395 2.467a5.45 5.45 0 0 1-1.14 1.904 5.182 5.182 0 0 1-1.8 1.212c-.687.288-1.462.432-2.325.432-.848 0-1.623-.144-2.325-.432a5.233 5.233 0 0 1-1.777-1.212 5.728 5.728 0 0 1-1.162-1.904c-.278-.75-.417-1.573-.417-2.467 0-.895.139-1.71.417-2.446a5.767 5.767 0 0 1 1.184-1.882 5.47 5.47 0 0 1 1.8-1.212 5.942 5.942 0 0 1 2.28-.433c.834 0 1.594.144 2.282.433a5.184 5.184 0 0 1 1.799 1.212c.497.519.884 1.147 1.162 1.882.278.736.417 1.551.417 2.446Zm-3.334 0c0-.996-.205-1.775-.615-2.338-.394-.577-.965-.865-1.71-.865-.746 0-1.324.288-1.733.865-.41.563-.615 1.342-.615 2.338 0 .995.205 1.788.614 2.38.41.577.988.866 1.733.866.746 0 1.317-.289 1.711-.866.41-.591.615-1.385.615-2.38ZM59.154 6.47a17.493 17.493 0 0 0-1.032-.216 5.934 5.934 0 0 0-1.272-.13c-.205 0-.453.022-.746.065-.277.029-.49.065-.636.108v8.7H52.2V4.22c.585-.202 1.272-.39 2.062-.563.804-.187 1.696-.281 2.676-.281.175 0 .387.014.636.043.249.015.497.043.746.087.249.029.497.072.746.13.248.043.46.1.636.173l-.548 2.661ZM61.344.779l3.269-.52v3.355h3.926v2.683h-3.926v4.004c0 .678.117 1.219.35 1.623.25.404.74.606 1.47.606.351 0 .71-.03 1.075-.087.38-.072.724-.166 1.031-.281l.461 2.51a9.387 9.387 0 0 1-1.316.411c-.483.116-1.075.173-1.777.173-.892 0-1.63-.115-2.215-.346-.586-.245-1.053-.577-1.404-.995a3.879 3.879 0 0 1-.746-1.558 9.498 9.498 0 0 1-.198-2.013V.779Z", | ||
fill: "#fff" | ||
}) | ||
}); | ||
function ButtonStyles() { | ||
const Logo = (props) => { | ||
const { | ||
height, | ||
...rest | ||
} = props; | ||
return /* @__PURE__ */ jsx("svg", { | ||
height: height / 2, | ||
viewBox: "0 0 90 90", | ||
preserveAspectRatio: "xMidYMid meet", | ||
fill: "none", | ||
xmlns: "http://www.w3.org/2000/svg", | ||
...rest, | ||
children: /* @__PURE__ */ jsx("path", { | ||
d: "M1.652 0C.933 0 .508.794.895 1.4L17.03 26.655a7.25 7.25 0 0 0 6.113 3.353h21.824c8 0 13 7.073 12.97 14.992-.029 7.92-5.358 14.922-12.97 14.922h-23.3a2.416 2.416 0 0 0-2.416 2.42v25.24A2.413 2.413 0 0 0 21.663 90h29.764C77.181 90 89.984 65.566 90 45c.016-20.566-12.638-45-38.573-45H1.652ZM12.24 59.992H6.444C2.885 59.992 0 63.349 0 67.49v21.847c0 .359.291.65.65.65h5.794c3.56 0 6.445-3.357 6.445-7.499V60.642a.65.65 0 0 0-.65-.65Z", | ||
fill: "#fff", | ||
preserveAspectRatio: "none" | ||
}) | ||
}); | ||
}; | ||
const ImportText = (props) => { | ||
return /* @__PURE__ */ jsx("svg", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
height: props.height * 0.75, | ||
fill: "none", | ||
viewBox: "0 0 43 21", | ||
style: { | ||
paddingLeft: Math.ceil(props.height / 6) + 1, | ||
paddingTop: props.height >= 32 ? 1 : 0 | ||
}, | ||
children: /* @__PURE__ */ jsx("path", { | ||
fill: "#fff", | ||
d: "M.664.456h1.008V6H.664V.456zM5.336 3.8c0-.437-.056-.752-.168-.944-.107-.197-.31-.296-.608-.296-.107 0-.224.008-.352.024-.128.016-.224.03-.288.04V6h-.968V1.952a6.485 6.485 0 011.688-.224c.288 0 .523.037.704.112.187.075.341.173.464.296a2.003 2.003 0 01.528-.264c.112-.043.23-.077.352-.104.128-.027.256-.04.384-.04.325 0 .592.048.8.144.213.09.379.221.496.392.123.165.205.368.248.608.048.235.072.493.072.776V6H7.72V3.8c0-.437-.053-.752-.16-.944-.107-.197-.312-.296-.616-.296-.155 0-.301.027-.44.08a1.335 1.335 0 00-.312.144c.043.133.072.275.088.424.016.15.024.31.024.48V6h-.968V3.8zm7.314.128c0-.432-.099-.768-.296-1.008-.192-.24-.504-.36-.936-.36-.09 0-.187.005-.288.016a1.354 1.354 0 00-.288.048v2.392c.085.059.197.115.336.168.144.048.296.072.456.072.352 0 .608-.12.768-.36.165-.24.248-.563.248-.968zm.992-.016c0 .32-.043.613-.128.88-.08.267-.197.496-.352.688-.155.192-.35.341-.584.448-.23.107-.49.16-.784.16a2.034 2.034 0 01-.952-.232V7.48h-.968V1.952c.197-.053.44-.104.728-.152s.592-.072.912-.072c.33 0 .627.05.888.152.261.101.482.248.664.44.186.187.328.416.424.688.101.267.152.568.152.904zm4.781-.008c0 .33-.048.632-.144.904a2.001 2.001 0 01-.408.696c-.176.192-.389.341-.64.448-.245.107-.517.16-.816.16-.298 0-.57-.053-.816-.16a1.844 1.844 0 01-.632-.448 2.104 2.104 0 01-.416-.696 2.701 2.701 0 01-.144-.904c0-.33.048-.63.144-.896.102-.272.24-.504.416-.696.182-.192.395-.339.64-.44.246-.107.515-.16.808-.16.294 0 .563.053.808.16.251.101.464.248.64.44s.312.424.408.696c.102.267.152.565.152.896zm-.992 0c0-.416-.09-.744-.272-.984-.176-.245-.424-.368-.744-.368s-.57.123-.752.368c-.176.24-.264.568-.264.984 0 .421.088.755.264 1a.883.883 0 00.752.368c.32 0 .568-.123.744-.368.182-.245.272-.579.272-1zm4.374-1.216a2.636 2.636 0 00-.336-.08 2.19 2.19 0 00-.832-.016c-.118.021-.2.04-.248.056V6h-.968V2.016c.186-.07.418-.133.696-.192.282-.064.594-.096.936-.096.064 0 .138.005.224.016.085.005.17.016.256.032.085.01.168.027.248.048.08.016.144.032.192.048l-.168.816zm.794-1.976l.968-.16v1.264h1.488v.808h-1.488v1.704c0 .336.054.576.16.72.107.144.288.216.544.216.176 0 .33-.019.464-.056.139-.037.248-.072.328-.104l.16.768a3.281 3.281 0 01-.44.144 2.28 2.28 0 01-.64.08c-.298 0-.55-.04-.752-.12a1.12 1.12 0 01-.472-.344 1.413 1.413 0 01-.248-.552 3.486 3.486 0 01-.072-.744V.712zm5.211 0l.968-.16v1.264h1.488v.808h-1.488v1.704c0 .336.053.576.16.72.107.144.288.216.544.216.176 0 .33-.019.464-.056a3.07 3.07 0 00.328-.104l.16.768a3.281 3.281 0 01-.44.144 2.28 2.28 0 01-.64.08c-.299 0-.55-.04-.752-.12a1.12 1.12 0 01-.472-.344 1.414 1.414 0 01-.248-.552 3.486 3.486 0 01-.072-.744V.712zm7.082 3.192c0 .33-.048.632-.144.904a2.001 2.001 0 01-.408.696c-.176.192-.39.341-.64.448-.245.107-.517.16-.816.16-.298 0-.57-.053-.816-.16a1.844 1.844 0 01-.632-.448 2.102 2.102 0 01-.416-.696 2.701 2.701 0 01-.144-.904c0-.33.048-.63.144-.896.102-.272.24-.504.416-.696.181-.192.395-.339.64-.44.245-.107.515-.16.808-.16.294 0 .563.053.808.16.25.101.464.248.64.44s.312.424.408.696c.102.267.152.565.152.896zm-.992 0c0-.416-.09-.744-.272-.984-.176-.245-.424-.368-.744-.368s-.57.123-.752.368c-.176.24-.264.568-.264.984 0 .421.088.755.264 1a.883.883 0 00.752.368c.32 0 .568-.123.744-.368.181-.245.272-.579.272-1zM2.596 16.603c.08.007.172.015.275.022h.385c.858 0 1.492-.216 1.903-.649.418-.433.627-1.03.627-1.793 0-.8-.198-1.404-.594-1.815-.396-.41-1.023-.616-1.881-.616-.117 0-.238.004-.363.011a2.66 2.66 0 00-.352.022v4.818zm4.961-2.42c0 .66-.103 1.236-.308 1.727a3.173 3.173 0 01-.88 1.221 3.676 3.676 0 01-1.375.726 6.401 6.401 0 01-1.826.242c-.308 0-.667-.015-1.078-.044a8.265 8.265 0 01-1.21-.154v-7.425a9.445 9.445 0 011.232-.143c.433-.03.803-.044 1.111-.044.653 0 1.243.073 1.771.22.535.147.994.378 1.375.693.381.315.675.719.88 1.21.205.491.308 1.082.308 1.771zm6.735.913c0 .455-.066.873-.198 1.254a2.778 2.778 0 01-.572.968c-.249.264-.55.47-.902.616-.344.147-.733.22-1.166.22-.425 0-.814-.073-1.166-.22a2.623 2.623 0 01-.89-.616 2.918 2.918 0 01-.584-.968c-.139-.381-.209-.8-.209-1.254 0-.455.07-.869.21-1.243.146-.374.344-.693.593-.957.257-.264.558-.47.902-.616.352-.147.734-.22 1.144-.22.418 0 .8.073 1.144.22.352.147.653.352.902.616.25.264.444.583.583.957.14.374.21.788.21 1.243zm-1.672 0c0-.506-.102-.902-.308-1.188-.198-.293-.484-.44-.858-.44s-.663.147-.869.44c-.205.286-.308.682-.308 1.188 0 .506.103.91.308 1.21.206.293.495.44.87.44.373 0 .66-.147.857-.44.206-.3.308-.704.308-1.21zm6.649.055c0-.506-.114-.91-.341-1.21-.227-.308-.565-.462-1.012-.462-.147 0-.282.007-.407.022a2.629 2.629 0 00-.308.033v2.959c.103.066.235.121.396.165.169.044.337.066.506.066.777 0 1.166-.524 1.166-1.573zm1.672-.044c0 .447-.055.854-.165 1.221-.11.367-.271.682-.484.946-.213.264-.477.47-.792.616-.315.147-.678.22-1.089.22a2.938 2.938 0 01-1.21-.253v2.178h-1.639v-7.623a5.19 5.19 0 01.506-.121c.19-.044.389-.08.594-.11.213-.03.425-.051.638-.066.22-.022.429-.033.627-.033.477 0 .902.073 1.276.22.374.14.69.341.946.605.257.257.451.572.583.946.14.374.209.792.209 1.254zm4.967.044c0-.506-.114-.91-.341-1.21-.228-.308-.565-.462-1.012-.462-.147 0-.283.007-.407.022a2.626 2.626 0 00-.308.033v2.959c.102.066.234.121.396.165.168.044.337.066.506.066.777 0 1.166-.524 1.166-1.573zm1.672-.044c0 .447-.055.854-.165 1.221-.11.367-.272.682-.484.946-.213.264-.477.47-.792.616-.316.147-.679.22-1.09.22a2.937 2.937 0 01-1.21-.253v2.178h-1.638v-7.623c.146-.044.315-.084.506-.121.19-.044.388-.08.594-.11.212-.03.425-.051.638-.066.22-.022.429-.033.627-.033.476 0 .902.073 1.276.22.374.14.689.341.946.605.256.257.45.572.583.946.139.374.209.792.209 1.254zm3.57 3.003c-.477-.007-.866-.059-1.167-.154a1.806 1.806 0 01-.704-.396 1.438 1.438 0 01-.352-.627 3.66 3.66 0 01-.088-.836V9.728l1.64-.264v6.303c0 .147.01.279.032.396a.726.726 0 00.121.297.72.72 0 00.275.198c.118.051.275.084.473.099l-.23 1.353zm.895-2.959c0-.513.077-.96.23-1.342.162-.389.371-.711.628-.968s.55-.451.88-.583a2.815 2.815 0 011.034-.198c.821 0 1.47.253 1.947.759.476.499.715 1.236.715 2.211 0 .095-.004.202-.011.319l-.022.297h-3.718c.036.337.194.605.473.803.279.198.652.297 1.122.297.3 0 .594-.026.88-.077.293-.059.531-.128.715-.209l.22 1.331a2.262 2.262 0 01-.352.132 3.84 3.84 0 01-.495.11 5.877 5.877 0 01-1.188.121c-.52 0-.976-.077-1.364-.231a2.75 2.75 0 01-.957-.627 2.663 2.663 0 01-.561-.957 3.879 3.879 0 01-.176-1.188zm3.85-.627a1.536 1.536 0 00-.077-.407.908.908 0 00-.187-.352.922.922 0 00-.32-.253 1.005 1.005 0 00-.472-.099c-.183 0-.341.033-.473.099a.919.919 0 00-.33.242 1.177 1.177 0 00-.21.363 2.536 2.536 0 00-.098.407h2.167zm6.336-.858a8.664 8.664 0 00-.517-.11 2.937 2.937 0 00-.638-.066c-.103 0-.228.011-.374.033-.14.015-.246.033-.32.055V18h-1.638v-5.478a9.207 9.207 0 011.034-.286c.403-.095.85-.143 1.342-.143.088 0 .194.007.319.022.124.007.249.022.374.044.124.015.249.037.374.066.124.022.23.051.319.088l-.275 1.353z" | ||
}) | ||
}); | ||
}; | ||
function ButtonStyles(props) { | ||
return /* @__PURE__ */ jsx("style", { | ||
@@ -71,12 +80,13 @@ children: ` | ||
position: relative; | ||
justify-content: space-evenly; | ||
align-items: center; | ||
justify-content: center; | ||
flex-shrink: 0; | ||
width: 92px; | ||
height: 35px; | ||
width: ${props.width}px; | ||
height: ${props.height}px; | ||
font-weight: 700; | ||
color: #fff; | ||
border-radius: 3px; | ||
border-radius: ${props.height / 9}px; | ||
cursor: pointer; | ||
overflow: hidden; | ||
padding: 0 ${props.height / 4}px; | ||
} | ||
@@ -117,7 +127,2 @@ | ||
} | ||
.import-svg { | ||
margin-top: 2px; | ||
height: 13px; | ||
} | ||
` | ||
@@ -171,6 +176,8 @@ }); | ||
} | ||
function DopplerImportButton({ | ||
secretName, | ||
secretValue | ||
}) { | ||
function DopplerImportButton(props) { | ||
var _a; | ||
const { | ||
secretName, | ||
secretValue | ||
} = props; | ||
async function triggerImport() { | ||
@@ -187,7 +194,13 @@ const resolvedKey = await keyInfoPromise; | ||
} | ||
const height = Math.max((_a = props.height) != null ? _a : 32, 24); | ||
const width = height * 2; | ||
return /* @__PURE__ */ jsxs(ReactShadow, { | ||
children: [/* @__PURE__ */ jsx(ButtonStyles, {}), /* @__PURE__ */ jsxs("button", { | ||
children: [/* @__PURE__ */ jsx(ButtonStyles, { | ||
height, | ||
width | ||
}), /* @__PURE__ */ jsxs("button", { | ||
className: "doppler-btn", | ||
type: "button", | ||
onClick: triggerImport, | ||
title: "Import to Doppler", | ||
children: [/* @__PURE__ */ jsx("div", { | ||
@@ -197,4 +210,6 @@ className: "doppler-gradient" | ||
className: "doppler-gradient-hover" | ||
}), /* @__PURE__ */ jsx(Logo, {}), /* @__PURE__ */ jsx(ImportText, { | ||
className: "import-svg" | ||
}), /* @__PURE__ */ jsx(Logo, { | ||
height | ||
}), /* @__PURE__ */ jsx(ImportText, { | ||
height | ||
})] | ||
@@ -201,0 +216,0 @@ })] |
{ | ||
"name": "@dopplerhq/universal-import-react", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "types": "dist/index.d.ts", |
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
26723
244