@bigbinary/neeto-molecules 3.16.8 → 3.16.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CardLayout.js +3 -3
- package/dist/CardLayout.js.map +1 -1
- package/dist/Container.js +1 -1
- package/dist/CopyToClipboardButton.js +3 -2
- package/dist/CopyToClipboardButton.js.map +1 -1
- package/dist/IpRestriction.js +1 -0
- package/dist/IpRestriction.js.map +1 -1
- package/dist/NeetoWidget.js +1 -1
- package/dist/NeetoWidget.js.map +1 -1
- package/dist/ProductEmbed.js +985 -302
- package/dist/ProductEmbed.js.map +1 -1
- package/dist/ShareViaLink.js +450 -189
- package/dist/ShareViaLink.js.map +1 -1
- package/dist/cjs/CardLayout.js +3 -3
- package/dist/cjs/CardLayout.js.map +1 -1
- package/dist/cjs/Container.js +1 -1
- package/dist/cjs/CopyToClipboardButton.js +3 -2
- package/dist/cjs/CopyToClipboardButton.js.map +1 -1
- package/dist/cjs/IpRestriction.js +1 -0
- package/dist/cjs/IpRestriction.js.map +1 -1
- package/dist/cjs/NeetoWidget.js +1 -1
- package/dist/cjs/NeetoWidget.js.map +1 -1
- package/dist/cjs/ProductEmbed.js +984 -301
- package/dist/cjs/ProductEmbed.js.map +1 -1
- package/dist/cjs/ShareViaLink.js +448 -187
- package/dist/cjs/ShareViaLink.js.map +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +48 -40
- package/types/ProductEmbed.d.ts +1 -0
- package/types/ShareViaLink.d.ts +28 -28
package/dist/CardLayout.js
CHANGED
|
@@ -22,7 +22,7 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
22
22
|
"data-testid": "neeto-molecules-card",
|
|
23
23
|
className: classnames(["neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border", className]),
|
|
24
24
|
children: [/*#__PURE__*/jsxs("div", {
|
|
25
|
-
className: "neeto-molecules-card__content p-4",
|
|
25
|
+
className: "neeto-molecules-card__content p-4 md:p-6",
|
|
26
26
|
children: [icon && /*#__PURE__*/jsx("div", {
|
|
27
27
|
className: "neeto-molecules-card__icon-wrapper mb-4 w-full text-left",
|
|
28
28
|
children: icon
|
|
@@ -33,12 +33,12 @@ var CardLayout = function CardLayout(_ref) {
|
|
|
33
33
|
}]),
|
|
34
34
|
children: title
|
|
35
35
|
}), description && /*#__PURE__*/jsx(Typography, {
|
|
36
|
-
className: "mb-
|
|
36
|
+
className: "mb-4",
|
|
37
37
|
style: "body1",
|
|
38
38
|
children: description
|
|
39
39
|
}), children]
|
|
40
40
|
}), actionBlock && /*#__PURE__*/jsx("div", {
|
|
41
|
-
className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4", className]),
|
|
41
|
+
className: classnames(["neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4 md:px-6", className]),
|
|
42
42
|
children: actionBlock
|
|
43
43
|
})]
|
|
44
44
|
})
|
package/dist/CardLayout.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardLayout.js","sources":["../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n icon,\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4\">\n {icon && (\n <div className=\"neeto-molecules-card__icon-wrapper mb-4 w-full text-left\">\n {icon}\n </div>\n )}\n {title && (\n <Typography\n style=\"h2\"\n className={classnames([\n \"mb-2\",\n { \"pb-2\": isNotPresent(description) },\n ])}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-
|
|
1
|
+
{"version":3,"file":"CardLayout.js","sources":["../src/components/CardLayout/index.jsx"],"sourcesContent":["import classnames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nconst CardLayout = ({\n className = \"\",\n icon,\n containerClassName = \"\",\n title = null,\n description = null,\n actionBlock,\n children,\n}) => (\n <div\n data-testid=\"neeto-molecules-card-container\"\n className={classnames([\n \"neeto-molecules-card__container mx-auto w-full max-w-3xl\",\n containerClassName,\n ])}\n >\n <div\n data-testid=\"neeto-molecules-card\"\n className={classnames([\n \"neeto-molecules-card neeto-ui-border-gray-300 neeto-ui-rounded-lg my-6 w-full border\",\n className,\n ])}\n >\n <div className=\"neeto-molecules-card__content p-4 md:p-6\">\n {icon && (\n <div className=\"neeto-molecules-card__icon-wrapper mb-4 w-full text-left\">\n {icon}\n </div>\n )}\n {title && (\n <Typography\n style=\"h2\"\n className={classnames([\n \"mb-2\",\n { \"pb-2\": isNotPresent(description) },\n ])}\n >\n {title}\n </Typography>\n )}\n {description && (\n <Typography className=\"mb-4\" style=\"body1\">\n {description}\n </Typography>\n )}\n {children}\n </div>\n {actionBlock && (\n <div\n className={classnames([\n \"neeto-molecules-card__action-block neeto-ui-bg-gray-50 neeto-ui-rounded-lg sticky bottom-0 w-full rounded-t-none p-4 md:px-6\",\n className,\n ])}\n >\n {actionBlock}\n </div>\n )}\n </div>\n </div>\n);\n\nCardLayout.propTypes = {\n /**\n * To set the title of the card.\n */\n title: PropTypes.string,\n /**\n * To set the description of the card.\n */\n description: PropTypes.node,\n /**\n * To set custom class name to the card.\n */\n className: PropTypes.string,\n /**\n * To set custom class name to the card container.\n */\n containerClassName: PropTypes.string,\n /**\n * To specify the content to be rendered in the card footer.\n */\n actionBlock: PropTypes.node,\n /**\n * To specify the components to be rendered inside the card.\n */\n children: PropTypes.node,\n /**\n * To set the icon of the card.\n */\n icon: PropTypes.node,\n};\n\nexport default CardLayout;\n"],"names":["CardLayout","_ref","_ref$className","className","icon","_ref$containerClassNa","containerClassName","_ref$title","title","_ref$description","description","actionBlock","children","_jsx","classnames","_jsxs","Typography","style","isNotPresent"],"mappings":";;;;;AAKA,IAAMA,UAAU,GAAG,SAAbA,UAAUA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAAC,cAAA,GAAAD,IAAA,CACdE,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;IACdE,IAAI,GAAAH,IAAA,CAAJG,IAAI;IAAAC,qBAAA,GAAAJ,IAAA,CACJK,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;IAAAE,UAAA,GAAAN,IAAA,CACvBO,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,UAAA;IAAAE,gBAAA,GAAAR,IAAA,CACZS,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,gBAAA;IAClBE,WAAW,GAAAV,IAAA,CAAXU,WAAW;IACXC,QAAQ,GAAAX,IAAA,CAARW,QAAQ,CAAA;AAAA,EAAA,oBAERC,GAAA,CAAA,KAAA,EAAA;AACE,IAAA,aAAA,EAAY,gCAAgC;IAC5CV,SAAS,EAAEW,UAAU,CAAC,CACpB,0DAA0D,EAC1DR,kBAAkB,CACnB,CAAE;AAAAM,IAAAA,QAAA,eAEHG,IAAA,CAAA,KAAA,EAAA;AACE,MAAA,aAAA,EAAY,sBAAsB;MAClCZ,SAAS,EAAEW,UAAU,CAAC,CACpB,sFAAsF,EACtFX,SAAS,CACV,CAAE;AAAAS,MAAAA,QAAA,gBAEHG,IAAA,CAAA,KAAA,EAAA;AAAKZ,QAAAA,SAAS,EAAC,0CAA0C;QAAAS,QAAA,EAAA,CACtDR,IAAI,iBACHS,GAAA,CAAA,KAAA,EAAA;AAAKV,UAAAA,SAAS,EAAC,0DAA0D;AAAAS,UAAAA,QAAA,EACtER,IAAAA;AAAI,SACF,CACN,EACAI,KAAK,iBACJK,GAAA,CAACG,UAAU,EAAA;AACTC,UAAAA,KAAK,EAAC,IAAI;AACVd,UAAAA,SAAS,EAAEW,UAAU,CAAC,CACpB,MAAM,EACN;YAAE,MAAM,EAAEI,YAAY,CAACR,WAAW,CAAA;AAAE,WAAC,CACtC,CAAE;AAAAE,UAAAA,QAAA,EAEFJ,KAAAA;AAAK,SACI,CACb,EACAE,WAAW,iBACVG,GAAA,CAACG,UAAU,EAAA;AAACb,UAAAA,SAAS,EAAC,MAAM;AAACc,UAAAA,KAAK,EAAC,OAAO;AAAAL,UAAAA,QAAA,EACvCF,WAAAA;SACS,CACb,EACAE,QAAQ,CAAA;AAAA,OACN,CAAC,EACLD,WAAW,iBACVE,GAAA,CAAA,KAAA,EAAA;QACEV,SAAS,EAAEW,UAAU,CAAC,CACpB,8HAA8H,EAC9HX,SAAS,CACV,CAAE;AAAAS,QAAAA,QAAA,EAEFD,WAAAA;AAAW,OACT,CACN,CAAA;KACE,CAAA;AAAC,GACH,CAAC,CAAA;AAAA;;;;"}
|
package/dist/Container.js
CHANGED
|
@@ -5,7 +5,7 @@ import { n } from './inject-css-DmrvuTKK.js';
|
|
|
5
5
|
import { jsx } from 'react/jsx-runtime';
|
|
6
6
|
import './_commonjsHelpers-BFTU3MAI.js';
|
|
7
7
|
|
|
8
|
-
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 2.5rem}@media screen and (max-width:
|
|
8
|
+
var css = ".neeto-molecules-container{align-items:flex-start;display:flex;flex-direction:column;flex-grow:1;height:100vh;justify-content:flex-start;overflow-y:auto;padding:0 2.5rem}@media screen and (max-width:767px){.neeto-molecules-container{padding:0 1.25rem}}.neeto-molecules-container--header-fixed{padding:0}.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:2.5rem;padding-right:2.5rem}@media screen and (max-width:768px){.neeto-molecules-container--header-fixed>.neeto-molecules-header,.neeto-molecules-container--header-fixed>.neeto-molecules-scrollable,.neeto-molecules-container--header-fixed>.neeto-molecules-subheader{padding-left:1.25rem;padding-right:1.25rem}}";
|
|
9
9
|
n(css,{});
|
|
10
10
|
|
|
11
11
|
var Container = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
@@ -22,7 +22,7 @@ var TOOLTIP_CONFIG = {
|
|
|
22
22
|
var css = ".neeto-molecules-copy-button{display:flex;justify-content:space-between}.neeto-molecules-copy-button .neeto-ui-btn:active,.neeto-molecules-copy-button .neeto-ui-btn:focus,.neeto-molecules-copy-button .neeto-ui-btn:hover{box-shadow:none}.neeto-molecules-copy-button--active{background:rgba(var(--neeto-ui-success-500));color:rgba(var(--neeto-ui-white))}.neeto-molecules-copy-button--active.neeto-ui-btn:active,.neeto-molecules-copy-button--active.neeto-ui-btn:focus,.neeto-molecules-copy-button--active.neeto-ui-btn:hover{background:rgba(var(--neeto-ui-success-500));box-shadow:none;color:rgba(var(--neeto-ui-white))}";
|
|
23
23
|
n(css,{});
|
|
24
24
|
|
|
25
|
-
var _excluded = ["className", "icon", "label", "successLabel", "tooltipContent", "successTooltipContent", "value", "style", "tooltipProps"];
|
|
25
|
+
var _excluded = ["className", "icon", "label", "successLabel", "tooltipContent", "successTooltipContent", "value", "style", "tooltipProps", "onClick"];
|
|
26
26
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
27
27
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
28
28
|
var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
@@ -37,6 +37,7 @@ var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
|
37
37
|
value = _ref.value,
|
|
38
38
|
style = _ref.style,
|
|
39
39
|
tooltipProps = _ref.tooltipProps,
|
|
40
|
+
onClick = _ref.onClick,
|
|
40
41
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
41
42
|
var _useTranslation = useTranslation(),
|
|
42
43
|
t = _useTranslation.t;
|
|
@@ -48,7 +49,7 @@ var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
|
|
|
48
49
|
var onHandleClick = function onHandleClick(event) {
|
|
49
50
|
event.preventDefault();
|
|
50
51
|
event.stopPropagation();
|
|
51
|
-
copyToClipboard(value, {
|
|
52
|
+
if (onClick) onClick(event);else copyToClipboard(value, {
|
|
52
53
|
showToastr: false
|
|
53
54
|
});
|
|
54
55
|
setIsChecked(true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboardButton.js","sources":["../src/components/CopyToClipboardButton/constants.js","../src/components/CopyToClipboardButton/index.jsx"],"sourcesContent":["const TIME_OUT = 2000;\n\nconst TOOLTIP_CONFIG = {\n trigger: \"click mouseenter\",\n hideAfter: TIME_OUT,\n position: \"top\",\n};\n\nconst BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n text: \"text\",\n};\n\nexport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES };\n","import { useState, useEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { copyToClipboard } from \"neetocommons/utils/general\";\nimport { Copy, Check } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeAll } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES } from \"./constants\";\nimport \"./copyToClipboard.scss\";\n\nconst CopyToClipboardButton = ({\n className,\n icon = Copy,\n label = \"\",\n successLabel,\n tooltipContent,\n successTooltipContent,\n value,\n style,\n tooltipProps,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const [isChecked, setIsChecked] = useState(false);\n\n const ref = useRef();\n\n const onHandleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n copyToClipboard(value, { showToastr: false });\n setIsChecked(true);\n setTimeout(() => {\n setIsChecked(false);\n }, TIME_OUT); // Reset copied state after 2 seconds\n };\n\n useEffect(() => {\n if (!ref.current) return;\n const buttonWidth = ref.current.clientWidth;\n ref.current.style.minWidth = `${buttonWidth}px`;\n }, []);\n\n const tooltipOptions = label\n ? null\n : mergeAll([\n TOOLTIP_CONFIG,\n {\n content: isChecked\n ? successTooltipContent || t(\"neetoMolecules.common.copied\")\n : tooltipContent || t(\"neetoMolecules.common.copyToClipboard\"),\n },\n tooltipProps,\n ]);\n\n const buttonLabel =\n isChecked && label\n ? successLabel || t(\"neetoMolecules.common.copied\")\n : label;\n const buttonIcon = isChecked ? Check : icon;\n\n return (\n <Button\n {...{ ref, style }}\n data-cy=\"copy-to-clipboard-button\"\n data-testid=\"copy-button\"\n icon={buttonIcon}\n label={buttonLabel}\n tooltipProps={tooltipOptions}\n className={classnames(\"neeto-molecules-copy-button\", {\n [className]: className,\n \"neeto-molecules-copy-button--active\": isChecked,\n })}\n onClick={onHandleClick}\n {...otherProps}\n />\n );\n};\n\nCopyToClipboardButton.propTypes = {\n /**\n * To provide additional classnames to the button.\n */\n className: PropTypes.string,\n /**\n * To provide the icon to be passed to the button. Defaults to the Copy icon.\n */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /**\n * To provide the label to the button. By default there is no label.\n */\n label: PropTypes.string,\n /**\n * The label of button when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successLabel: PropTypes.string,\n /**\n * The value to be copied to clipboard. (required)\n */\n value: PropTypes.string,\n /**\n * To specify the style of the Button.\n */\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copy to clipboard'.\n */\n tooltipContent: PropTypes.string,\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successTooltipContent: PropTypes.string,\n};\n\nexport default CopyToClipboardButton;\n"],"names":["TIME_OUT","TOOLTIP_CONFIG","trigger","hideAfter","position","CopyToClipboardButton","_ref","className","_ref$icon","icon","Copy","_ref$label","label","successLabel","tooltipContent","successTooltipContent","value","style","tooltipProps","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isChecked","setIsChecked","ref","useRef","onHandleClick","event","preventDefault","stopPropagation","copyToClipboard","showToastr","setTimeout","useEffect","current","buttonWidth","clientWidth","minWidth","concat","tooltipOptions","mergeAll","content","buttonLabel","buttonIcon","Check","_jsx","Button","_objectSpread","classnames","_defineProperty"
|
|
1
|
+
{"version":3,"file":"CopyToClipboardButton.js","sources":["../src/components/CopyToClipboardButton/constants.js","../src/components/CopyToClipboardButton/index.jsx"],"sourcesContent":["const TIME_OUT = 2000;\n\nconst TOOLTIP_CONFIG = {\n trigger: \"click mouseenter\",\n hideAfter: TIME_OUT,\n position: \"top\",\n};\n\nconst BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n text: \"text\",\n};\n\nexport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES };\n","import { useState, useEffect, useRef } from \"react\";\n\nimport classnames from \"classnames\";\nimport { copyToClipboard } from \"neetocommons/utils/general\";\nimport { Copy, Check } from \"neetoicons\";\nimport { Button } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeAll } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES } from \"./constants\";\nimport \"./copyToClipboard.scss\";\n\nconst CopyToClipboardButton = ({\n className,\n icon = Copy,\n label = \"\",\n successLabel,\n tooltipContent,\n successTooltipContent,\n value,\n style,\n tooltipProps,\n onClick,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n\n const [isChecked, setIsChecked] = useState(false);\n\n const ref = useRef();\n\n const onHandleClick = event => {\n event.preventDefault();\n event.stopPropagation();\n\n if (onClick) onClick(event);\n else copyToClipboard(value, { showToastr: false });\n\n setIsChecked(true);\n setTimeout(() => {\n setIsChecked(false);\n }, TIME_OUT); // Reset copied state after 2 seconds\n };\n\n useEffect(() => {\n if (!ref.current) return;\n const buttonWidth = ref.current.clientWidth;\n ref.current.style.minWidth = `${buttonWidth}px`;\n }, []);\n\n const tooltipOptions = label\n ? null\n : mergeAll([\n TOOLTIP_CONFIG,\n {\n content: isChecked\n ? successTooltipContent || t(\"neetoMolecules.common.copied\")\n : tooltipContent || t(\"neetoMolecules.common.copyToClipboard\"),\n },\n tooltipProps,\n ]);\n\n const buttonLabel =\n isChecked && label\n ? successLabel || t(\"neetoMolecules.common.copied\")\n : label;\n const buttonIcon = isChecked ? Check : icon;\n\n return (\n <Button\n {...{ ref, style }}\n data-cy=\"copy-to-clipboard-button\"\n data-testid=\"copy-button\"\n icon={buttonIcon}\n label={buttonLabel}\n tooltipProps={tooltipOptions}\n className={classnames(\"neeto-molecules-copy-button\", {\n [className]: className,\n \"neeto-molecules-copy-button--active\": isChecked,\n })}\n onClick={onHandleClick}\n {...otherProps}\n />\n );\n};\n\nCopyToClipboardButton.propTypes = {\n /**\n * To provide additional classnames to the button.\n */\n className: PropTypes.string,\n /**\n * To provide the icon to be passed to the button. Defaults to the Copy icon.\n */\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),\n /**\n * To provide the label to the button. By default there is no label.\n */\n label: PropTypes.string,\n /**\n * The label of button when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successLabel: PropTypes.string,\n /**\n * The value to be copied to clipboard. (required)\n */\n value: PropTypes.string,\n /**\n * To specify the style of the Button.\n */\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copy to clipboard'.\n */\n tooltipContent: PropTypes.string,\n /**\n * The content of the tooltip when the value is copied to clipboard. Defaults to 'Copied'.\n */\n successTooltipContent: PropTypes.string,\n};\n\nexport default CopyToClipboardButton;\n"],"names":["TIME_OUT","TOOLTIP_CONFIG","trigger","hideAfter","position","CopyToClipboardButton","_ref","className","_ref$icon","icon","Copy","_ref$label","label","successLabel","tooltipContent","successTooltipContent","value","style","tooltipProps","onClick","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isChecked","setIsChecked","ref","useRef","onHandleClick","event","preventDefault","stopPropagation","copyToClipboard","showToastr","setTimeout","useEffect","current","buttonWidth","clientWidth","minWidth","concat","tooltipOptions","mergeAll","content","buttonLabel","buttonIcon","Check","_jsx","Button","_objectSpread","classnames","_defineProperty"],"mappings":";;;;;;;;;;;;;;AAAA,IAAMA,QAAQ,GAAG,IAAI,CAAA;AAErB,IAAMC,cAAc,GAAG;AACrBC,EAAAA,OAAO,EAAE,kBAAkB;AAC3BC,EAAAA,SAAS,EAAEH,QAAQ;AACnBI,EAAAA,QAAQ,EAAE,KAAA;AACZ,CAAC;;;;;;;;ACOD,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAYrB;AAAA,EAAA,IAXJC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAAC,SAAA,GAAAF,IAAA,CAC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BAA6B,EAAAC,eAAA,CAAAA,eAAA,CAChDlD,EAAAA,EAAAA,SAAS,EAAGA,SAAS,CAAA,EACtB,qCAAqC,EAAEuB,SAAS,CACjD,CAAE;AACHX,IAAAA,OAAO,EAAEe,aAAAA;GACLd,EAAAA,UAAU,CACf,CAAC,CAAA;AAEN;;;;"}
|
package/dist/IpRestriction.js
CHANGED
|
@@ -3283,6 +3283,7 @@ var AllowedIpRange = withT(function (_ref) {
|
|
|
3283
3283
|
className: "col-span-1 flex items-start sm:col-span-2 sm:justify-center",
|
|
3284
3284
|
children: /*#__PURE__*/jsx(Button, {
|
|
3285
3285
|
className: "mt-auto sm:mt-0",
|
|
3286
|
+
"data-cy": "allowed-ip-range-delete-button",
|
|
3286
3287
|
"data-testid": "allowed-ip-range-delete-btn",
|
|
3287
3288
|
icon: Delete,
|
|
3288
3289
|
style: "text",
|