@bigbinary/neeto-molecules 1.15.16 → 1.15.18

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.
Files changed (42) hide show
  1. package/dist/Codeblock.js +2 -0
  2. package/dist/Codeblock.js.map +1 -1
  3. package/dist/CopyToClipboardButton.js +8 -3
  4. package/dist/CopyToClipboardButton.js.map +1 -1
  5. package/dist/CustomDomain.js +2 -2
  6. package/dist/CustomDomainDashboard.js +1 -1
  7. package/dist/HelpPopover.js +14 -14
  8. package/dist/HelpPopover.js.map +1 -1
  9. package/dist/MoreDropdown.js +19 -10
  10. package/dist/MoreDropdown.js.map +1 -1
  11. package/dist/Rename.js +3 -2
  12. package/dist/Rename.js.map +1 -1
  13. package/dist/Schedule.js +1 -1
  14. package/dist/SuffixedInput.js +1 -0
  15. package/dist/SuffixedInput.js.map +1 -1
  16. package/dist/cjs/Codeblock.js +2 -0
  17. package/dist/cjs/Codeblock.js.map +1 -1
  18. package/dist/cjs/CopyToClipboardButton.js +8 -3
  19. package/dist/cjs/CopyToClipboardButton.js.map +1 -1
  20. package/dist/cjs/CustomDomain.js +2 -2
  21. package/dist/cjs/CustomDomainDashboard.js +1 -1
  22. package/dist/cjs/HelpPopover.js +12 -12
  23. package/dist/cjs/HelpPopover.js.map +1 -1
  24. package/dist/cjs/MoreDropdown.js +20 -10
  25. package/dist/cjs/MoreDropdown.js.map +1 -1
  26. package/dist/cjs/Rename.js +3 -2
  27. package/dist/cjs/Rename.js.map +1 -1
  28. package/dist/cjs/Schedule.js +1 -1
  29. package/dist/cjs/SuffixedInput.js +1 -0
  30. package/dist/cjs/SuffixedInput.js.map +1 -1
  31. package/dist/cjs/{index-cd140b32.js → index-408d5262.js} +1 -1
  32. package/dist/cjs/{index-cd140b32.js.map → index-408d5262.js.map} +1 -1
  33. package/dist/{index-46f9dbca.js → index-203143d9.js} +1 -1
  34. package/dist/{index-46f9dbca.js.map → index-203143d9.js.map} +1 -1
  35. package/package.json +1 -1
  36. package/src/translations/en.json +5 -2
  37. package/types/MoreDropdown.d.ts +4 -1
  38. package/dist/AdaptiveInput.js +0 -84
  39. package/dist/AdaptiveInput.js.map +0 -1
  40. package/dist/cjs/AdaptiveInput.js +0 -94
  41. package/dist/cjs/AdaptiveInput.js.map +0 -1
  42. package/types/AdaptiveInput.d.ts +0 -51
@@ -1 +1 @@
1
- {"version":3,"file":"SuffixedInput.js","sources":["../src/components/SuffixedInput/constants.js","../src/components/SuffixedInput/index.jsx"],"sourcesContent":["export const INPUT_FIELD_MIN_WIDTH = 60;\n","import React, { useEffect, useRef, useState } from \"react\";\n\nimport { isPresent, isNotPresent } from \"neetocist\";\nimport { Info } from \"neetoicons\";\nimport { Input } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport CopyToClipboardButton from \"components/CopyToClipboardButton\";\n\nimport { INPUT_FIELD_MIN_WIDTH } from \"./constants\";\nimport \"./suffixed-input.scss\";\n\nconst SuffixedInput = ({\n placeholder,\n helpUrl,\n helpIconTooltipContent,\n label,\n value,\n getInputRef,\n suffix,\n isCopyToClipboardEnabled = false,\n name = \"email\",\n inputProps = {},\n}) => {\n const [initialInputWidth, setInitialInputWidth] = useState(\n INPUT_FIELD_MIN_WIDTH\n );\n const inputRef = useRef(null);\n const placeholderRef = useRef(null);\n\n const setInputRef = ref => {\n inputRef.current = ref;\n getInputRef?.(ref);\n };\n\n useEffect(() => {\n //To handle the input width on initial render.\n const placeholderSpanWidth = placeholderRef.current?.offsetWidth;\n setInitialInputWidth(placeholderSpanWidth);\n }, []);\n\n return (\n <>\n <span // Dummy element to calculate the width to be set for the input. Do not remove.\n className=\"pointer-events-none invisible absolute pl-2\"\n ref={placeholderRef}\n >\n {value || placeholder}\n </span>\n <div className=\"inline-flex max-w-full items-end gap-2\">\n <Input\n {...{ label, name, placeholder, ...inputProps }}\n className=\"nm-suffixed-input-field\"\n ref={setInputRef}\n type=\"text\"\n labelProps={{\n helpIconProps: isPresent(helpUrl) && {\n icon: Info,\n className:\n \"cursor-pointer opacity-75 hover:opacity-100 transition-opacity duration-300 ease-in-out\",\n onClick: () => window.open(helpUrl, \"_blank\"),\n tooltipProps: {\n content: helpIconTooltipContent,\n position: \"right\",\n disabled: isNotPresent(helpUrl),\n },\n },\n }}\n style={{\n minWidth: isEmpty(value) ? INPUT_FIELD_MIN_WIDTH : 0,\n width: placeholderRef.current?.offsetWidth ?? initialInputWidth, // Additional 2px to act as a buffer.\n }}\n suffix={\n // Added onClick to focus the input even when the suffix part is clicked.\n <span onClick={() => inputRef.current?.focus()}>{suffix}</span>\n }\n />\n {isCopyToClipboardEnabled && (\n <CopyToClipboardButton\n disabled={isEmpty(value)}\n style=\"text\"\n value={`${value}${suffix}`}\n />\n )}\n </div>\n </>\n );\n};\n\nSuffixedInput.propTypes = {\n /**\n * Placeholder of the input field.\n */\n placeholder: PropTypes.string,\n /**\n * A help icon will be displayed next to the label if helpUrl is present. On clicking the icon will take the user to the URL.\n */\n helpUrl: PropTypes.string,\n /**\n * Text to be displayed inside the tooltip of the help icon.\n */\n helpIconTooltipContent: PropTypes.string,\n /**\n * Label of the input field.\n */\n label: PropTypes.string,\n /**\n * The value entered by the user, eg: email.\n */\n value: PropTypes.string,\n /**\n * A method to get the ref of the input field.\n */\n getInputRef: PropTypes.func,\n /**\n * Domain name to be rendered next to the input field.\n */\n suffix: PropTypes.string,\n /**\n * Whether to show the copy to clipboard button.\n */\n isCopyToClipboardEnabled: PropTypes.bool,\n /**\n * Formik field name of the input field.\n */\n name: PropTypes.string,\n /**\n * This will be passed down to the `Input` component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default SuffixedInput;\n"],"names":["INPUT_FIELD_MIN_WIDTH","SuffixedInput","_ref","_placeholderRef$curre2","_placeholderRef$curre3","placeholder","helpUrl","helpIconTooltipContent","label","value","getInputRef","suffix","_ref$isCopyToClipboar","isCopyToClipboardEnabled","_ref$name","name","_ref$inputProps","inputProps","_useState","useState","_useState2","_slicedToArray","initialInputWidth","setInitialInputWidth","inputRef","useRef","placeholderRef","setInputRef","ref","current","useEffect","_placeholderRef$curre","placeholderSpanWidth","offsetWidth","React","createElement","Fragment","className","Input","_extends","_objectSpread","type","labelProps","helpIconProps","isPresent","icon","Info","onClick","window","open","tooltipProps","content","position","disabled","isNotPresent","style","minWidth","isEmpty","width","_inputRef$current","focus","CopyToClipboardButton","concat"],"mappings":";;;;;;;;;;;;;;;AAAO,IAAMA,qBAAqB,GAAG,EAAE;;;;;;;ACavC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAWb;EAAA,IAAAC,sBAAA,EAAAC,sBAAA,CAAA;AAAA,EAAA,IAVJC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IACPC,sBAAsB,GAAAL,IAAA,CAAtBK,sBAAsB;IACtBC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,KAAK,GAAAP,IAAA,CAALO,KAAK;IACLC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IACXC,MAAM,GAAAT,IAAA,CAANS,MAAM;IAAAC,qBAAA,GAAAV,IAAA,CACNW,wBAAwB;AAAxBA,IAAAA,wBAAwB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAAAE,SAAA,GAAAZ,IAAA,CAChCa,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IAAAE,eAAA,GAAAd,IAAA,CACde,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,eAAA,CAAA;AAEf,EAAA,IAAAE,SAAA,GAAkDC,QAAQ,CACxDnB,qBACF,CAAC;IAAAoB,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAFMI,IAAAA,iBAAiB,GAAAF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,EAAE,CAAA;AAAA,OAAA;AAAC,KAAA,EAAEjD,MAAa,CAAA;GAEjE,CAAA,CAAC,EACDE,wBAAwB,iBACvBqB,cAAA,CAAAC,aAAA,CAAC0B,qBAAqB,EAAA;AACpBR,IAAAA,QAAQ,EAAEI,OAAO,CAAChD,KAAK,CAAE;AACzB8C,IAAAA,KAAK,EAAC,MAAM;AACZ9C,IAAAA,KAAK,KAAAqD,MAAA,CAAKrD,KAAK,CAAAqD,CAAAA,MAAA,CAAGnD,MAAM,CAAA;GACzB,CAEA,CACL,CAAC,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"SuffixedInput.js","sources":["../src/components/SuffixedInput/constants.js","../src/components/SuffixedInput/index.jsx"],"sourcesContent":["export const INPUT_FIELD_MIN_WIDTH = 60;\n","import React, { useEffect, useRef, useState } from \"react\";\n\nimport { isPresent, isNotPresent } from \"neetocist\";\nimport { Info } from \"neetoicons\";\nimport { Input } from \"neetoui/formik\";\nimport PropTypes from \"prop-types\";\nimport { isEmpty } from \"ramda\";\n\nimport CopyToClipboardButton from \"components/CopyToClipboardButton\";\n\nimport { INPUT_FIELD_MIN_WIDTH } from \"./constants\";\nimport \"./suffixed-input.scss\";\n\nconst SuffixedInput = ({\n placeholder,\n helpUrl,\n helpIconTooltipContent,\n label,\n value,\n getInputRef,\n suffix,\n isCopyToClipboardEnabled = false,\n name = \"email\",\n inputProps = {},\n}) => {\n const [initialInputWidth, setInitialInputWidth] = useState(\n INPUT_FIELD_MIN_WIDTH\n );\n const inputRef = useRef(null);\n const placeholderRef = useRef(null);\n\n const setInputRef = ref => {\n inputRef.current = ref;\n getInputRef?.(ref);\n };\n\n useEffect(() => {\n //To handle the input width on initial render.\n const placeholderSpanWidth = placeholderRef.current?.offsetWidth;\n setInitialInputWidth(placeholderSpanWidth);\n }, []);\n\n return (\n <>\n <span // Dummy element to calculate the width to be set for the input. Do not remove.\n className=\"pointer-events-none invisible absolute pl-2\"\n ref={placeholderRef}\n >\n {value || placeholder}\n </span>\n <div className=\"inline-flex max-w-full items-end gap-2\">\n <Input\n {...{ label, name, placeholder, ...inputProps }}\n className=\"nm-suffixed-input-field\"\n ref={setInputRef}\n type=\"text\"\n labelProps={{\n helpIconProps: isPresent(helpUrl) && {\n icon: Info,\n className:\n \"cursor-pointer opacity-75 hover:opacity-100 transition-opacity duration-300 ease-in-out\",\n onClick: () => window.open(helpUrl, \"_blank\"),\n tooltipProps: {\n content: helpIconTooltipContent,\n position: \"right\",\n disabled: isNotPresent(helpUrl),\n },\n },\n }}\n style={{\n minWidth: isEmpty(value) ? INPUT_FIELD_MIN_WIDTH : 0,\n width: placeholderRef.current?.offsetWidth ?? initialInputWidth, // Additional 2px to act as a buffer.\n }}\n suffix={\n // Added onClick to focus the input even when the suffix part is clicked.\n <span onClick={() => inputRef.current?.focus()}>{suffix}</span>\n }\n />\n {isCopyToClipboardEnabled && (\n <CopyToClipboardButton\n disabled={isEmpty(value)}\n style=\"text\"\n value={`${value}${suffix}`}\n />\n )}\n </div>\n </>\n );\n};\n\nSuffixedInput.propTypes = {\n /**\n * Placeholder of the input field.\n */\n placeholder: PropTypes.string,\n /**\n * A help icon will be displayed next to the label if helpUrl is present. On clicking the icon will take the user to the URL.\n */\n helpUrl: PropTypes.string,\n /**\n * Text to be displayed inside the tooltip of the help icon.\n */\n helpIconTooltipContent: PropTypes.string,\n /**\n * Label of the input field.\n */\n label: PropTypes.string,\n /**\n * The value entered by the user, eg: email.\n */\n value: PropTypes.string,\n /**\n * A method to get the ref of the input field.\n */\n getInputRef: PropTypes.func,\n /**\n * Domain name to be rendered next to the input field.\n */\n suffix: PropTypes.string,\n /**\n * Whether to show the copy to clipboard button.\n */\n isCopyToClipboardEnabled: PropTypes.bool,\n /**\n * Formik field name of the input field.\n */\n name: PropTypes.string,\n /**\n * This will be passed down to the `Input` component.\n */\n inputProps: PropTypes.object,\n};\n\nexport default SuffixedInput;\n"],"names":["INPUT_FIELD_MIN_WIDTH","SuffixedInput","_ref","_placeholderRef$curre2","_placeholderRef$curre3","placeholder","helpUrl","helpIconTooltipContent","label","value","getInputRef","suffix","_ref$isCopyToClipboar","isCopyToClipboardEnabled","_ref$name","name","_ref$inputProps","inputProps","_useState","useState","_useState2","_slicedToArray","initialInputWidth","setInitialInputWidth","inputRef","useRef","placeholderRef","setInputRef","ref","current","useEffect","_placeholderRef$curre","placeholderSpanWidth","offsetWidth","React","createElement","Fragment","className","Input","_extends","_objectSpread","type","labelProps","helpIconProps","isPresent","icon","Info","onClick","window","open","tooltipProps","content","position","disabled","isNotPresent","style","minWidth","isEmpty","width","_inputRef$current","focus","CopyToClipboardButton","concat"],"mappings":";;;;;;;;;;;;;;;;AAAO,IAAMA,qBAAqB,GAAG,EAAE;;;;;;;ACavC,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAAC,IAAA,EAWb;EAAA,IAAAC,sBAAA,EAAAC,sBAAA,CAAA;AAAA,EAAA,IAVJC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IACPC,sBAAsB,GAAAL,IAAA,CAAtBK,sBAAsB;IACtBC,KAAK,GAAAN,IAAA,CAALM,KAAK;IACLC,KAAK,GAAAP,IAAA,CAALO,KAAK;IACLC,WAAW,GAAAR,IAAA,CAAXQ,WAAW;IACXC,MAAM,GAAAT,IAAA,CAANS,MAAM;IAAAC,qBAAA,GAAAV,IAAA,CACNW,wBAAwB;AAAxBA,IAAAA,wBAAwB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAAAE,SAAA,GAAAZ,IAAA,CAChCa,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,OAAO,GAAAA,SAAA;IAAAE,eAAA,GAAAd,IAAA,CACde,UAAU;AAAVA,IAAAA,UAAU,GAAAD,eAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,eAAA,CAAA;AAEf,EAAA,IAAAE,S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,iBAAA,GAAMnC,QAAQ,CAACK,OAAO,MAAA,IAAA,IAAA8B,iBAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAhBA,iBAAA,CAAkBC,KAAK,EAAE,CAAA;AAAA,OAAA;AAAC,KAAA,EAAEjD,MAAa,CAAA;GAEjE,CAAA,CAAC,EACDE,wBAAwB,iBACvBqB,cAAA,CAAAC,aAAA,CAAC0B,qBAAqB,EAAA;AACpBR,IAAAA,QAAQ,EAAEI,OAAO,CAAChD,KAAK,CAAE;AACzB8C,IAAAA,KAAK,EAAC,MAAM;AACZ9C,IAAAA,KAAK,KAAAqD,MAAA,CAAKrD,KAAK,CAAAqD,CAAAA,MAAA,CAAGnD,MAAM,CAAA;GACzB,CAEA,CACL,CAAC,CAAA;AAEP;;;;"}
@@ -12,6 +12,8 @@ require('classnames');
12
12
  require('@bigbinary/neeto-commons-frontend/utils/general');
13
13
  require('@bigbinary/neeto-icons');
14
14
  require('@bigbinary/neetoui');
15
+ require('ramda');
16
+ require('react-i18next');
15
17
  require('./inject-css-80a5faa3.js');
16
18
 
17
19
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -1 +1 @@
1
- {"version":3,"file":"Codeblock.js","sources":["../../src/components/Codeblock.jsx"],"sourcesContent":["import React from \"react\";\n\nimport PropTypes from \"prop-types\";\nimport { PrismLight as CodeBlock } from \"react-syntax-highlighter\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-cy\": \"code-block-content\" }}\n data-cy=\"code-block\"\n data-testid=\"codeblock-react-highlighter\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute top-2 right-2\"\n data-cy=\"copy-button\"\n data-testid=\"codeblock-copy-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","React","createElement","className","CodeBlock","_extends","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJJC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,mBAAA,GAAAF,IAAA,CACJG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IACrBE,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAAC,oBAAA,GAAAL,IAAA,CACdM,eAAe;IAAfA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA;AAAEE,MAAAA,KAAK,EAAE,MAAA;AAAO,KAAC,GAAAF,oBAAA,CAAA;AAEnC,EAAA,IAAMG,cAAc,GAAGC,MAAM,CAACC,UAAU,GAAG,GAAG,CAAA;EAE9C,oBACEC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,UAAA;AAAU,GAAA,eACvBF,yBAAA,CAAAC,aAAA,CAACE,iCAAS,EAAAC,iBAAA,CAAA;IACRC,SAAS,EAAA,IAAA;AACTH,IAAAA,SAAS,EAAC,mBAAmB;AAC7BI,IAAAA,YAAY,EAAE;AAAE,MAAA,SAAS,EAAE,oBAAA;KAAuB;AAClD,IAAA,SAAA,EAAQ,YAAY;AACpB,IAAA,aAAA,EAAY,6BAA6B;AACzCC,IAAAA,QAAQ,EAAC,YAAY;AACrBC,IAAAA,KAAK,EAAEC,aAAAA;AAAQ,GAAA,EACXhB,cAAc,CAAA,EAEjBH,IACQ,CAAC,EACXE,cAAc,iBACbQ,yBAAA,CAAAC,aAAA,CAACS,qBAAQ,EAAAN,iBAAA,CAAA;AACPF,IAAAA,SAAS,EAAC,wBAAwB;AAClC,IAAA,SAAA,EAAQ,aAAa;AACrB,IAAA,aAAA,EAAY,uBAAuB;AACnCS,IAAAA,IAAI,EAAC,OAAO;AACZH,IAAAA,KAAK,EAAC,WAAW;AACjBI,IAAAA,KAAK,EAAEtB,IAAAA;AAAK,GAAA,EACRK,eAAe,EAAA;AACnBC,IAAAA,KAAK,EAAEC,cAAc,GAAGF,eAAe,CAACC,KAAK,GAAG,EAAA;AAAG,GAAA,CACpD,CAEA,CAAC,CAAA;AAEV;;;;"}
1
+ {"version":3,"file":"Codeblock.js","sources":["../../src/components/Codeblock.jsx"],"sourcesContent":["import React from \"react\";\n\nimport PropTypes from \"prop-types\";\nimport { PrismLight as CodeBlock } from \"react-syntax-highlighter\";\nimport { dracula } from \"react-syntax-highlighter/dist/esm/styles/prism\";\n\nimport CopyCode from \"components/CopyToClipboardButton\";\n\nconst Codeblock = ({\n code,\n showCopyButton = true,\n codeblockProps,\n copyButtonProps = { label: \"Copy\" },\n}) => {\n const isLargerScreen = window.innerWidth > 768;\n\n return (\n <div className=\"relative\">\n <CodeBlock\n wrapLines\n className=\"p-4 pr-12 md:pr-4\"\n codeTagProps={{ \"data-cy\": \"code-block-content\" }}\n data-cy=\"code-block\"\n data-testid=\"codeblock-react-highlighter\"\n language=\"javascript\"\n style={dracula}\n {...codeblockProps}\n >\n {code}\n </CodeBlock>\n {showCopyButton && (\n <CopyCode\n className=\"absolute top-2 right-2\"\n data-cy=\"copy-button\"\n data-testid=\"codeblock-copy-button\"\n size=\"small\"\n style=\"secondary\"\n value={code}\n {...copyButtonProps}\n label={isLargerScreen ? copyButtonProps.label : \"\"}\n />\n )}\n </div>\n );\n};\n\nCodeblock.propTypes = {\n /**\n * The code to be displayed.\n */\n code: PropTypes.string,\n /**\n * Flag to determine whether the 'Copy' button is displayed.\n */\n showCopyButton: PropTypes.bool,\n /**\n * Additional props that can be passed on to the 'PrismLight' component from 'react-syntax-highlighter'.\n */\n codeblockProps: PropTypes.object,\n /**\n * Additional props that can be passed on to the 'CopyToClipboardButton' component from 'neeto-molecules'.\n */\n copyButtonProps: PropTypes.object,\n};\n\nexport default Codeblock;\n"],"names":["Codeblock","_ref","code","_ref$showCopyButton","showCopyButton","codeblockProps","_ref$copyButtonProps","copyButtonProps","label","isLargerScreen","window","innerWidth","React","createElement","className","CodeBlock","_extends","wrapLines","codeTagProps","language","style","dracula","CopyCode","size","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAQA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAAC,IAAA,EAKT;AAAA,EAAA,IAJJC,IAAI,GAAAD,IAAA,CAAJC,IAAI;IAAAC,mBAAA,GAAAF,IAAA,CACJG,cAAc;AAAdA,IAAAA,cAAc,GAAAD,mBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,mBAAA;IACrBE,cAAc,GAAAJ,IAAA,CAAdI,cAAc;IAAAC,oBAAA,GAAAL,IAAA,CACdM,eAAe;IAAfA,eAAe,GAAAD,oBAAA,KAAG,KAAA,CAAA,GAAA;AAAEE,MAAAA,KAAK,EAAE,MAAA;AAAO,KAAC,GAAAF,oBAAA,CAAA;AAEnC,EAAA,IAAMG,cAAc,GAAGC,MAAM,CAACC,UAAU,GAAG,GAAG,CAAA;EAE9C,oBACEC,yBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AAAKC,IAAAA,SAAS,EAAC,UAAA;AAAU,GAAA,eACvBF,yBAAA,CAAAC,aAAA,CAACE,iCAAS,EAAAC,iBAAA,CAAA;IACRC,SAAS,EAAA,IAAA;AACTH,IAAAA,SAAS,EAAC,mBAAmB;AAC7BI,IAAAA,YAAY,EAAE;AAAE,MAAA,SAAS,EAAE,oBAAA;KAAuB;AAClD,IAAA,SAAA,EAAQ,YAAY;AACpB,IAAA,aAAA,EAAY,6BAA6B;AACzCC,IAAAA,QAAQ,EAAC,YAAY;AACrBC,IAAAA,KAAK,EAAEC,aAAAA;AAAQ,GAAA,EACXhB,cAAc,CAAA,EAEjBH,IACQ,CAAC,EACXE,cAAc,iBACbQ,yBAAA,CAAAC,aAAA,CAACS,qBAAQ,EAAAN,iBAAA,CAAA;AACPF,IAAAA,SAAS,EAAC,wBAAwB;AAClC,IAAA,SAAA,EAAQ,aAAa;AACrB,IAAA,aAAA,EAAY,uBAAuB;AACnCS,IAAAA,IAAI,EAAC,OAAO;AACZH,IAAAA,KAAK,EAAC,WAAW;AACjBI,IAAAA,KAAK,EAAEtB,IAAAA;AAAK,GAAA,EACRK,eAAe,EAAA;AACnBC,IAAAA,KAAK,EAAEC,cAAc,GAAGF,eAAe,CAACC,KAAK,GAAG,EAAA;AAAG,GAAA,CACpD,CAEA,CAAC,CAAA;AAEV;;;;"}
@@ -9,6 +9,8 @@ var classnames = require('classnames');
9
9
  var general = require('@bigbinary/neeto-commons-frontend/utils/general');
10
10
  var neetoIcons = require('@bigbinary/neeto-icons');
11
11
  var neetoui = require('@bigbinary/neetoui');
12
+ var ramda = require('ramda');
13
+ var reactI18next = require('react-i18next');
12
14
  var injectCss = require('./inject-css-80a5faa3.js');
13
15
 
14
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -18,8 +20,7 @@ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
18
20
 
19
21
  var TIME_OUT = 2000;
20
22
  var TOOLTIP_CONFIG = {
21
- content: "Copied",
22
- trigger: "click",
23
+ trigger: "click mouseenter",
23
24
  hideAfter: TIME_OUT,
24
25
  position: "top"
25
26
  };
@@ -37,6 +38,8 @@ var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
37
38
  value = _ref.value,
38
39
  style = _ref.style,
39
40
  otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
41
+ var _useTranslation = reactI18next.useTranslation(),
42
+ t = _useTranslation.t;
40
43
  var _useState = React.useState(false),
41
44
  _useState2 = slicedToArray._slicedToArray(_useState, 2),
42
45
  isChecked = _useState2[0],
@@ -58,7 +61,9 @@ var CopyToClipboardButton = function CopyToClipboardButton(_ref) {
58
61
  var buttonWidth = ref.current.clientWidth;
59
62
  ref.current.style.minWidth = "".concat(buttonWidth, "px");
60
63
  }, []);
61
- var tooltipProps = label ? null : TOOLTIP_CONFIG;
64
+ var tooltipProps = label ? null : ramda.mergeRight(TOOLTIP_CONFIG, {
65
+ content: isChecked ? t("neetoMolecules.common.copied") : t("neetoMolecules.common.copyToClipboard")
66
+ });
62
67
  var buttonLabel = isChecked && label ? "Copied" : label;
63
68
  var buttonIcon = isChecked ? neetoIcons.Check : icon;
64
69
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends._extends({
@@ -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 content: \"Copied\",\n trigger: \"click\",\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 React, { 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\";\n\nimport { TOOLTIP_CONFIG, TIME_OUT, BUTTON_STYLES } from \"./constants\";\nimport \"./copyToClipboard.scss\";\n\nconst CopyToClipboardButton = ({\n className,\n icon = Copy,\n label = \"\",\n value,\n style,\n ...otherProps\n}) => {\n const [isChecked, setIsChecked] = useState(false);\n const ref = useRef();\n\n const onHandleClick = event => {\n event.preventDefault();\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 tooltipProps = label ? null : TOOLTIP_CONFIG;\n const buttonLabel = isChecked && label ? \"Copied\" : label;\n const buttonIcon = isChecked ? Check : icon;\n\n return (\n <Button\n {...{ ref, style, tooltipProps }}\n data-testid=\"copy-button\"\n icon={buttonIcon}\n label={buttonLabel}\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 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\nexport default CopyToClipboardButton;\n"],"names":["TIME_OUT","TOOLTIP_CONFIG","content","trigger","hideAfter","position","CopyToClipboardButton","_ref","className","_ref$icon","icon","Copy","_ref$label","label","value","style","otherProps","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","isChecked","setIsChecked","ref","useRef","onHandleClick","event","preventDefault","copyToClipboard","showToastr","setTimeout","useEffect","current","buttonWidth","clientWidth","minWidth","concat","tooltipProps","buttonLabel","buttonIcon","Check","React","createElement","Button","_extends","classnames","_defineProperty","onClick"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,IAAMA,QAAQ,GAAG,IAAI,CAAA;AAErB,IAAMC,cAAc,GAAG;AACrBC,EAAAA,OAAO,EAAE,QAAQ;AACjBC,EAAAA,OAAO,EAAE,OAAO;AAChBC,EAAAA,SAAS,EAAEJ,QAAQ;AACnBK,EAAAA,QAAQ,EAAE,KAAA;AACZ,CAAC;;;;;;ACID,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAAC,IAAA,EAOrB;AAAA,EAAA,IANJC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAAC,SAAA,GAAAF,IAAA,CACTG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAGE,KAAAA,CAAAA,GAAAA,eAAI,GAAAF,SAAA;IAAAG,UAAA,GAAAL,IAAA,CACXM,KAAK;AAALA,IAAAA,KAAK,GAAAD,UAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,UAAA;IACVE,KAAK,GAAAP,IAAA,CAALO,KAAK;IACLC,KAAK,GAAAR,IAAA,CAALQ,KAAK;AACFC,IAAAA,UAAU,GAAAC,gDAAA,CAAAV,IAAA,EAAAW,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,SAAA,GAAkCC,cAAQ,CAAC,KAAK,CAAC;IAAAC,UAAA,GAAAC,4BAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAA1CI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG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AAW;AACjB5B,IAAAA,KAAK,EAAE2B,WAAY;AACnBhC,IAAAA,SAAS,EAAEuC,8BAAU,CAAC,6BAA6B,EAAAC,8BAAA,CAAAA,8BAAA,CAChDxC,EAAAA,EAAAA,SAAS,EAAGA,SAAS,CAAA,EACtB,qCAAqC,EAAEe,SAAS,CACjD,CAAE;AACH0B,IAAAA,OAAO,EAAEtB,aAAAA;GACLX,EAAAA,UAAU,CACf,CAAC,CAAA;AAEN;;;;"}
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 React, { 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 { mergeRight } 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 value,\n style,\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 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 tooltipProps = label\n ? null\n : mergeRight(TOOLTIP_CONFIG, {\n content: isChecked\n ? t(\"neetoMolecules.common.copied\")\n : t(\"neetoMolecules.common.copyToClipboard\"),\n });\n const buttonLabel = isChecked && label ? \"Copied\" : label;\n const buttonIcon = isChecked ? Check : icon;\n\n return (\n <Button\n {...{ ref, style, tooltipProps }}\n data-testid=\"copy-button\"\n icon={buttonIcon}\n label={buttonLabel}\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 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\nexport default CopyToClipboardButton;\n"],"names":["TIME_OUT","TOOLTIP_CONFIG","trigger","hideAfter","position","CopyToClipboardButton","_ref","className","_ref$icon","icon","Copy","_ref$label","label","value","style","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","_useState","useState","_useState2","_slicedToArray","isChecked","setIsChecked","ref","useRef","onHandleClick","event","preventDefault","copyToClipboard","showToastr","setTimeout","useEffect","current","buttonWidth","clientWidth","minWidth","concat","tooltipProps","mergeRight","content","buttonLabel","buttonIcon","Check","React","createElement","Button","_extends","classnames","_defineProperty","onClick"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAMA,QAAQ,GAAG,IAAI,CAAA;AAErB,IAAMC,cAAc,GAAG;AACrBC,EAAAA,OAAO,EAAE,kBAAkB;AAC3BC,EAAAA,SAAS,EAAEH,QAAQ;AACnBI,EAAA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8,7 +8,7 @@ var general = require('@bigbinary/neeto-commons-frontend/utils/general');
8
8
  var neetoIcons = require('@bigbinary/neeto-icons');
9
9
  var neetoui = require('@bigbinary/neetoui');
10
10
  var reactI18next = require('react-i18next');
11
- var index = require('./index-cd140b32.js');
11
+ var index = require('./index-408d5262.js');
12
12
  var MoreDropdown = require('./MoreDropdown.js');
13
13
  require('formik');
14
14
  require('@bigbinary/neeto-hotkeys');
@@ -20,11 +20,11 @@ require('./extends-1b35a664.js');
20
20
  require('./defineProperty-886ed289.js');
21
21
  require('./objectWithoutProperties-2fed2d7d.js');
22
22
  require('classnames');
23
+ require('ramda');
23
24
  require('./inject-css-80a5faa3.js');
24
25
  require('@bigbinary/neeto-commons-frontend/react-utils/useMutationWithInvalidation');
25
26
  require('react-query');
26
27
  require('axios');
27
- require('ramda');
28
28
 
29
29
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
30
30
 
@@ -9,7 +9,7 @@ var reactI18next = require('react-i18next');
9
9
  var Container = require('./Container.js');
10
10
  var PageLoader = require('./PageLoader.js');
11
11
  var SubHeader = require('./SubHeader.js');
12
- var index = require('./index-cd140b32.js');
12
+ var index = require('./index-408d5262.js');
13
13
  var _extends = require('./extends-1b35a664.js');
14
14
  var constants = require('@bigbinary/neeto-commons-frontend/constants');
15
15
  var withT = require('@bigbinary/neeto-commons-frontend/react-utils/withT');
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var defineProperty = require('./defineProperty-886ed289.js');
4
3
  var _extends = require('./extends-1b35a664.js');
4
+ var defineProperty = require('./defineProperty-886ed289.js');
5
5
  var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
6
6
  var React = require('react');
7
7
  var classnames = require('classnames');
8
8
  var neetoCist = require('@bigbinary/neeto-cist');
9
9
  var neetoIcons = require('@bigbinary/neeto-icons');
10
10
  var neetoui = require('@bigbinary/neetoui');
11
+ var reactI18next = require('react-i18next');
11
12
 
12
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
14
 
@@ -34,7 +35,8 @@ var HelpPopover = function HelpPopover(_ref) {
34
35
  _ref$icon = _ref.icon,
35
36
  icon = _ref$icon === void 0 ? neetoIcons.Help : _ref$icon,
36
37
  otherProps = objectWithoutProperties._objectWithoutProperties(_ref, _excluded);
37
- var helpIconRef = React.useRef();
38
+ var _useTranslation = reactI18next.useTranslation(),
39
+ t = _useTranslation.t;
38
40
  var isCompact = neetoCist.isNotPresent(title) && neetoCist.isNotPresent(helpLinkProps);
39
41
  var Icon = function Icon() {
40
42
  var Component = icon;
@@ -43,14 +45,7 @@ var HelpPopover = function HelpPopover(_ref) {
43
45
  size: SIZE[size]
44
46
  });
45
47
  };
46
- return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends._extends({}, otherProps, {
47
- "data-cy": "help-popover-button",
48
- "data-testid": "help-popover-button",
49
- icon: Icon,
50
- ref: helpIconRef,
51
- style: "text",
52
- className: classnames__default["default"]("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
53
- })), /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends._extends({
48
+ return /*#__PURE__*/React__default["default"].createElement(neetoui.Tooltip, _extends._extends({
54
49
  appendTo: function appendTo() {
55
50
  return document.body;
56
51
  }
@@ -58,7 +53,6 @@ var HelpPopover = function HelpPopover(_ref) {
58
53
  interactive: true,
59
54
  arrow: isCompact ? undefined : true,
60
55
  className: classnames__default["default"](defineProperty._defineProperty({}, "neeto-ui-popover", !isCompact)),
61
- reference: helpIconRef,
62
56
  role: "tooltip",
63
57
  theme: isCompact ? "dark" : "light",
64
58
  content: /*#__PURE__*/React__default["default"].createElement("div", {
@@ -74,13 +68,19 @@ var HelpPopover = function HelpPopover(_ref) {
74
68
  }, description) : description, helpLinkProps && /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends._extends({
75
69
  className: "neeto-ui-mt-3",
76
70
  "data-cy": "help-popover-link-button",
77
- label: "View help article",
71
+ label: t("neetoMolecules.common.viewHelpArticle"),
78
72
  size: "small"
79
73
  }, helpLinkProps, {
80
74
  "data-testid": "help-popover-link-button",
81
75
  style: "link",
82
76
  target: "_blank"
83
77
  })))
78
+ }), /*#__PURE__*/React__default["default"].createElement(neetoui.Button, _extends._extends({}, otherProps, {
79
+ "data-cy": "help-popover-button",
80
+ "data-testid": "help-popover-button",
81
+ icon: Icon,
82
+ style: "text",
83
+ className: classnames__default["default"]("neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0", className)
84
84
  })));
85
85
  };
86
86
 
@@ -1 +1 @@
1
- {"version":3,"file":"HelpPopover.js","sources":["../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import React, { useRef } from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"#1f1f1f\",\n icon = Help,\n ...otherProps\n}) => {\n const helpIconRef = useRef();\n\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n const Icon = () => {\n const Component = icon;\n\n return <Component color={iconColor} size={SIZE[size]} />;\n };\n\n return (\n <>\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={Icon}\n ref={helpIconRef}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n <Tooltip\n appendTo={() => document.body}\n {...popoverProps}\n interactive\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n reference={helpIconRef}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n label=\"View help article\"\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n />\n </>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","Help","otherProps","_objectWithoutProperties","_excluded","helpIconRef","useRef","isCompact","isNotPresent","Icon","Component","React","createElement","color","Fragment","Button","_extends","ref","style","classNames","Tooltip","appendTo","document","body","interactive","arrow","undefined","_defineProperty","reference","role","theme","content","Typography","lineHeight","label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W,KAAK,QAAQ,IAAI,CAACc,SAAS,gBAC5CI,yBAAA,CAAAC,aAAA,CAACoB,kBAAU,EAAA;AACT,MAAA,SAAA,EAAQ,0BAA0B;AAClC,MAAA,aAAA,EAAY,0BAA0B;AACtCC,MAAAA,UAAU,EAAC,QAAQ;AACnBf,MAAAA,KAAK,EAAC,OAAA;AAAO,KAAA,EAEZzB,WACS,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZiB,yBAAA,CAAAC,aAAA,CAACG,cAAM,EAAAC,iBAAA,CAAA;AACLpB,MAAAA,SAAS,EAAC,eAAe;AACzB,MAAA,SAAA,EAAQ,0BAA0B;AAClCsC,MAAAA,KAAK,EAAC,mBAAmB;AACzB1C,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAA,EACRE,aAAa,EAAA;AACjB,MAAA,aAAA,EAAY,0BAA0B;AACtCwB,MAAAA,KAAK,EAAC,MAAM;AACZiB,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,CAChB,CAEA,CAAA;AACN,GAAA,CACF,CACD,CAAC,CAAA;AAEP;;;;"}
1
+ {"version":3,"file":"HelpPopover.js","sources":["../../src/components/HelpPopover/constants.js","../../src/components/HelpPopover/index.jsx"],"sourcesContent":["export const SIZE = { default: 16, large: 20 };\n","import React from \"react\";\n\nimport classNames from \"classnames\";\nimport { isNotPresent } from \"neetocist\";\nimport { Help } from \"neetoicons\";\nimport { Button, Popover, Tooltip, Typography } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { SIZE } from \"./constants\";\n\nconst { Title } = Popover;\n\nconst HelpPopover = ({\n title,\n size = \"default\",\n description,\n helpLinkProps,\n popoverProps,\n className,\n iconColor = \"#1f1f1f\",\n icon = Help,\n ...otherProps\n}) => {\n const { t } = useTranslation();\n const isCompact = isNotPresent(title) && isNotPresent(helpLinkProps);\n\n const Icon = () => {\n const Component = icon;\n\n return <Component color={iconColor} size={SIZE[size]} />;\n };\n\n return (\n <Tooltip\n appendTo={() => document.body}\n {...popoverProps}\n interactive\n arrow={isCompact ? undefined : true}\n className={classNames({ [\"neeto-ui-popover\"]: !isCompact })}\n role=\"tooltip\"\n theme={isCompact ? \"dark\" : \"light\"}\n content={\n <div className=\"flex flex-col\">\n {title && (\n <Title\n data-cy=\"help-popover-title\"\n data-testid=\"help-popover-title\"\n >\n {title}\n </Title>\n )}\n {typeof description === \"string\" && !isCompact ? (\n <Typography\n data-cy=\"help-popover-description\"\n data-testid=\"help-popover-description\"\n lineHeight=\"normal\"\n style=\"body2\"\n >\n {description}\n </Typography>\n ) : (\n description\n )}\n {helpLinkProps && (\n <Button\n className=\"neeto-ui-mt-3\"\n data-cy=\"help-popover-link-button\"\n label={t(\"neetoMolecules.common.viewHelpArticle\")}\n size=\"small\"\n {...helpLinkProps}\n data-testid=\"help-popover-link-button\"\n style=\"link\"\n target=\"_blank\"\n />\n )}\n </div>\n }\n >\n <Button\n {...otherProps}\n data-cy=\"help-popover-button\"\n data-testid=\"help-popover-button\"\n icon={Icon}\n style=\"text\"\n className={classNames(\n \"neeto-molecule-help-popover-trigger neeto-ui-rounded-full bg-transparent p-0\",\n className\n )}\n />\n </Tooltip>\n );\n};\n\nHelpPopover.propTypes = {\n /**\n * To set the title of the help popover.\n */\n title: PropTypes.string,\n /**\n * To set the size of the popover help icon.\n */\n size: PropTypes.oneOf([\"default\", \"large\"]),\n /**\n * To set the description of the popover, this can be a string or a custom component.\n */\n description: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n /**\n * To set the props of the help link which is displayed below the description.\n */\n helpLinkProps: PropTypes.object,\n /**\n * To set the props of the popover to customize it further.\n */\n popoverProps: PropTypes.object,\n /**\n * Additional classes passed on to the help button element.\n */\n className: PropTypes.string,\n /**\n * To set the default icon color of the help icon.\n */\n iconColor: PropTypes.string,\n /**\n * To customize the icon of the help popover.\n */\n icon: PropTypes.node,\n};\n\nexport default HelpPopover;\n"],"names":["SIZE","large","Title","Popover","HelpPopover","_ref","title","_ref$size","size","description","helpLinkProps","popoverProps","className","_ref$iconColor","iconColor","_ref$icon","icon","Help","otherProps","_objectWithoutProperties","_excluded","_useTranslation","useTranslation","t","isCompact","isNotPresent","Icon","Component","React","createElement","color","Tooltip","_extends","appendTo","document","body","interactive","arrow","undefined","classNames","_defineProperty","role","theme","content","Typography","lineHeight","style","Button","label","target"],"mappings":";;;;;;;;;;;;;;;;;AAAO,IAAMA,IAAI,GAAG;AAAE,EAAA,SAAA,EAAS,EAAE;AAAEC,EAAAA,KAAK,EAAE,EAAA;AAAG,CAAC;;;ACW9C,IAAQC,KAAK,GAAKC,eAAO,CAAjBD,KAAK,CAAA;AAEb,IAAME,WAAW,GAAG,SAAdA,WAAWA,CAAAC,IAAA,EAUX;AAAA,EAAA,IATJC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAAC,SAAA,GAAAF,IAAA,CACLG,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,SAAA;IAChBE,WAAW,GAAAJ,IAAA,CAAXI,WAAW;IACXC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IACbC,YAAY,GAAAN,IAAA,CAAZM,YAAY;IACZC,SAAS,GAAAP,IAAA,CAATO,SAAS;IAAAC,cAAA,GAAAR,IAAA,CACTS,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,SAAS,GAAAA,cAAA;IAAAE,SAAA,GAAAV,IAAA,CACrBW,IAAI;AAAJA,IAAAA,IAAI,GAAAD,SAAA,KAAGE,KAAAA,CAAAA,GAAAA,eAAI,GAAAF,SAAA;AACRG,IAAAA,UAAU,GAAAC,gDAAA,CAAAd,IAAA,EAAAe,SAAA,CAAA,CAAA;AAEb,EAAA,IAAAC,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;EACT,IAAMC,SAAS,GAAGC,sBAAY,CAACnB,KAAK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C,QAAQ;AACnBC,MAAAA,KAAK,EAAC,OAAA;AAAO,KAAA,EAEZrC,WACS,CAAC,GAEbA,WACD,EACAC,aAAa,iBACZkB,yBAAA,CAAAC,aAAA,CAACkB,cAAM,EAAAf,iBAAA,CAAA;AACLpB,MAAAA,SAAS,EAAC,eAAe;AACzB,MAAA,SAAA,EAAQ,0BAA0B;AAClCoC,MAAAA,KAAK,EAAEzB,CAAC,CAAC,uCAAuC,CAAE;AAClDf,MAAAA,IAAI,EAAC,OAAA;AAAO,KAAA,EACRE,aAAa,EAAA;AACjB,MAAA,aAAA,EAAY,0BAA0B;AACtCoC,MAAAA,KAAK,EAAC,MAAM;AACZG,MAAAA,MAAM,EAAC,QAAA;AAAQ,KAAA,CAChB,CAEA,CAAA;GAGPrB,CAAAA,eAAAA,yBAAA,CAAAC,aAAA,CAACkB,cAAM,EAAAf,iBAAA,KACDd,UAAU,EAAA;AACd,IAAA,SAAA,EAAQ,qBAAqB;AAC7B,IAAA,aAAA,EAAY,qBAAqB;AACjCF,IAAAA,IAAI,EAAEU,IAAK;AACXoB,IAAAA,KAAK,EAAC,MAAM;AACZlC,IAAAA,SAAS,EAAE2B,8BAAU,CACnB,8EAA8E,EAC9E3B,SACF,CAAA;AAAE,GAAA,CACH,CACM,CAAC,CAAA;AAEd;;;;"}
@@ -1,9 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
4
3
  var defineProperty = require('./defineProperty-886ed289.js');
5
4
  var _extends = require('./extends-1b35a664.js');
5
+ var objectWithoutProperties = require('./objectWithoutProperties-2fed2d7d.js');
6
6
  var React = require('react');
7
+ var classnames = require('classnames');
7
8
  var neetoCist = require('@bigbinary/neeto-cist');
8
9
  var neetoIcons = require('@bigbinary/neeto-icons');
9
10
  var neetoui = require('@bigbinary/neetoui');
@@ -14,6 +15,7 @@ var injectCss = require('./inject-css-80a5faa3.js');
14
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
15
16
 
16
17
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
18
+ var classnames__default = /*#__PURE__*/_interopDefaultLegacy(classnames);
17
19
 
18
20
  var MENU_ITEM_TYPES = {
19
21
  menuItem: "menuItem",
@@ -25,7 +27,7 @@ var DEFAULT_TOOLTIP_PROPS = {
25
27
  };
26
28
 
27
29
  var _excluded$2 = ["label", "key"],
28
- _excluded2 = ["isVisible", "key"];
30
+ _excluded2$1 = ["isVisible", "key"];
29
31
  var MenuItem$1 = neetoui.Dropdown.MenuItem,
30
32
  Menu$1 = neetoui.Dropdown.Menu;
31
33
  var Submenu = function Submenu(_ref) {
@@ -41,7 +43,7 @@ var Submenu = function Submenu(_ref) {
41
43
  var _ref2$isVisible = _ref2.isVisible,
42
44
  isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
43
45
  key = _ref2.key,
44
- menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2);
46
+ menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2$1);
45
47
  if (!isVisible) return null;
46
48
  return /*#__PURE__*/React__default["default"].createElement(MoreDropdownMenuItem, _extends._extends({
47
49
  key: key
@@ -75,10 +77,11 @@ var MoreDropdownMenuItem = function MoreDropdownMenuItem(_ref) {
75
77
  }, menuItemProps), label);
76
78
  };
77
79
 
78
- var css = ".neeto-ui-btn.neeto-ui-btn--icon-only[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:20px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:28px;justify-content:center;width:28px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:24px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:32px;justify-content:center;width:32px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:30px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:40px;justify-content:center;width:40px}";
80
+ var css = ".neeto-ui-btn.neeto-ui-btn--icon-only[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:20px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:28px;justify-content:center;width:28px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-medium[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:24px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:32px;justify-content:center;width:32px}.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-dropdown-button-style=more-dropdown],.neeto-ui-btn.neeto-ui-btn--icon-only.neeto-ui-btn--size-large[data-testid=column-menu-button]{--neeto-ui-btn-icon-size:30px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;height:40px;justify-content:center;width:40px}.neeto-ui-btn.neeto-molecule-moredropdown--rounded[data-dropdown-button-style=more-dropdown]{border-radius:100%}";
79
81
  injectCss.n(css,{});
80
82
 
81
- var _excluded = ["isVisible", "key"];
83
+ var _excluded = ["isRounded"],
84
+ _excluded2 = ["isVisible", "key"];
82
85
  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; }
83
86
  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._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; }
84
87
  var Menu = neetoui.Dropdown.Menu;
@@ -97,6 +100,8 @@ var MoreDropdown = function MoreDropdown(_ref) {
97
100
  menuItems = _ref$menuItems === void 0 ? [] : _ref$menuItems;
98
101
  var _useTranslation = reactI18next.useTranslation(),
99
102
  t = _useTranslation.t;
103
+ var isRoundedButton = dropdownButtonProps.isRounded,
104
+ buttonProps = objectWithoutProperties._objectWithoutProperties(dropdownButtonProps, _excluded);
100
105
  var tooltipProps = ramda.mergeRight(DEFAULT_TOOLTIP_PROPS, dropdownButtonProps.tooltipProps);
101
106
  var targetIcon = isVertical ? neetoIcons.MenuVertical : neetoIcons.MenuHorizontal;
102
107
  var isDropdownDisabled = isDisabled || dropdownProps.disabled;
@@ -109,8 +114,11 @@ var MoreDropdown = function MoreDropdown(_ref) {
109
114
  icon: targetIcon,
110
115
  iconPosition: "right",
111
116
  size: "medium",
112
- style: "text"
113
- }, dropdownButtonProps))));
117
+ style: "text",
118
+ className: classnames__default["default"]({
119
+ "neeto-molecule-moredropdown--rounded": isRoundedButton
120
+ })
121
+ }, buttonProps))));
114
122
  }
115
123
  return /*#__PURE__*/React__default["default"].createElement(neetoui.Dropdown, _extends._extends({
116
124
  autoWidth: true,
@@ -119,18 +127,20 @@ var MoreDropdown = function MoreDropdown(_ref) {
119
127
  icon: targetIcon,
120
128
  buttonProps: _objectSpread({
121
129
  "data-dropdown-button-style": "more-dropdown",
122
- className: "min-h-0 flex-shrink-0",
130
+ className: classnames__default["default"]("min-h-0 flex-shrink-0", {
131
+ "neeto-molecule-moredropdown--rounded": isRoundedButton
132
+ }),
123
133
  style: "text",
124
134
  tooltipProps: {
125
135
  content: t("neetoMolecules.moreDropdown.tooltip"),
126
136
  position: "top"
127
137
  }
128
- }, dropdownButtonProps)
138
+ }, buttonProps)
129
139
  }, dropdownProps), /*#__PURE__*/React__default["default"].createElement(Menu, null, menuTopChildren, menuItems.map(function (_ref2) {
130
140
  var _ref2$isVisible = _ref2.isVisible,
131
141
  isVisible = _ref2$isVisible === void 0 ? true : _ref2$isVisible,
132
142
  key = _ref2.key,
133
- menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded);
143
+ menuItemProps = objectWithoutProperties._objectWithoutProperties(_ref2, _excluded2);
134
144
  if (!isVisible) return null;
135
145
  return /*#__PURE__*/React__default["default"].createElement(MoreDropdownMenuItem, _extends._extends({
136
146
  key: key !== null && key !== void 0 ? key : neetoCist.hyphenate(menuItemProps.label)
@@ -1 +1 @@
1
- {"version":3,"file":"MoreDropdown.js","sources":["../../src/components/MoreDropdown/constants.js","../../src/components/MoreDropdown/Submenu.jsx","../../src/components/MoreDropdown/MenuItem.jsx","../../src/components/MoreDropdown/index.jsx"],"sourcesContent":["export const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n danger: \"danger\",\n danger_text: \"danger-text\",\n text: \"text\",\n link: \"link\",\n};\n\nexport const SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nexport const STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nexport const MENU_ITEM_TYPES = {\n menuItem: \"menuItem\",\n divider: \"divider\",\n};\n\nexport const DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n};\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport MoreDropdownMenuItem from \"./MenuItem\";\n\nconst { MenuItem, Menu } = Dropdown;\n\nconst Submenu = ({ label, key, ...menuItemProps }) => (\n <Dropdown\n customTarget={<MenuItem.Button>{label}</MenuItem.Button>}\n key={key}\n position=\"left\"\n trigger=\"hover\"\n {...menuItemProps.dropdownProps}\n >\n <Menu>\n {menuItemProps.menuItems.map(\n ({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return <MoreDropdownMenuItem key={key} {...menuItemProps} />;\n }\n )}\n </Menu>\n </Dropdown>\n);\n\nexport default Submenu;\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport { MENU_ITEM_TYPES } from \"./constants\";\nimport Submenu from \"./Submenu\";\n\nconst { MenuItem, Divider } = Dropdown;\n\nconst MoreDropdownMenuItem = ({\n onClick,\n label,\n type = MENU_ITEM_TYPES.menuItem,\n hasSubItems = false,\n ...menuItemProps\n}) => {\n if (type === MENU_ITEM_TYPES.divider) {\n return <Divider />;\n }\n\n if (hasSubItems) {\n return <Submenu {...{ label, ...menuItemProps }} />;\n }\n\n return (\n <MenuItem.Button {...{ onClick, ...menuItemProps }}>\n {label}\n </MenuItem.Button>\n );\n};\n\nexport default MoreDropdownMenuItem;\n","import React from \"react\";\n\nimport { hyphenate } from \"neetocist\";\nimport { MenuHorizontal, MenuVertical } from \"neetoicons\";\nimport { Button, Dropdown, Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n BUTTON_STYLES,\n DEFAULT_TOOLTIP_PROPS,\n MENU_ITEM_TYPES,\n SIZES,\n STRATEGY,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\nimport \"./moredropdown.scss\";\n\nconst { Menu } = Dropdown;\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const tooltipProps = mergeRight(\n DEFAULT_TOOLTIP_PROPS,\n dropdownButtonProps.tooltipProps\n );\n\n const targetIcon = isVertical ? MenuVertical : MenuHorizontal;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <Tooltip {...tooltipProps}>\n <span>\n <Button\n disabled\n data-cy=\"more-dropdown-button\"\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"nui-dropdown-button\"\n icon={targetIcon}\n iconPosition=\"right\"\n size=\"medium\"\n style=\"text\"\n {...dropdownButtonProps}\n />\n </span>\n </Tooltip>\n );\n }\n\n return (\n <Dropdown\n autoWidth\n className=\"flex\"\n disabled={isDisabled}\n icon={targetIcon}\n buttonProps={{\n \"data-dropdown-button-style\": \"more-dropdown\",\n className: \"min-h-0 flex-shrink-0\",\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.moreDropdown.tooltip\"),\n position: \"top\",\n },\n ...dropdownButtonProps,\n }}\n {...dropdownProps}\n >\n <Menu>\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label)}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </Menu>\n </Dropdown>\n );\n};\n\nMoreDropdown.propTypes = {\n /*\n * This props will be passed to the target button of the dropdown.\n */\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n }),\n /*\n * Whether to show a MenuVertical icon. By default the icon will be MenuHorizontal.\n */\n isVertical: PropTypes.bool,\n /*\n * Whether the dropdown is disabled or not.\n */\n isDisabled: PropTypes.bool,\n /*\n * This props will be passed to the dropdown.\n */\n dropdownProps: PropTypes.shape({\n strategy: PropTypes.oneOf(Object.values(STRATEGY)),\n }),\n /*\n * This children will be rendered on top of the dropdown menu.\n */\n menuTopChildren: PropTypes.node,\n /*\n * This children will be rendered on bottom of the dropdown menu.\n */\n menuBottomChildren: PropTypes.node,\n /*\n * Menu items inside the dropdown. Each item needs to have a `label`, `onClick` and `key`.\n */\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["MENU_ITEM_TYPES","menuItem","divider","DEFAULT_TOOLTIP_PROPS","disabled","position","MenuItem","Dropdown","Menu","Submenu","_ref","label","key","menuItemProps","_objectWithoutProperties","_excluded","React","createElement","_extends","customTarget","Button","trigger","dropdownProps","menuItems","map","_ref2","_ref2$isVisible","isVisible","_excluded2","MoreDropdownMenuItem","Divider","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","_objectSpread","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_ref$menuItems","_useTranslation","useTranslation","t","tooltipProps","mergeRight","targetIcon","MenuVertical","MenuHorizontal","isDropdownDisabled","Tooltip","icon","iconPosition","size","style","autoWidth","className","buttonProps","content","hyphenate"],"mappings":";;;;;;;;;;;;;;;;;AAaO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAA;AACX,CAAC,CAAA;AAEM,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,QAAQ,EAAE,QAAA;AACZ,CAAC;;;;ACfD,IAAQC,UAAQ,GAAWC,gBAAQ,CAA3BD,QAAQ;EAAEE,MAAI,GAAKD,gBAAQ,CAAjBC,IAAI,CAAA;AAEtB,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,KAAK,GAAAD,I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AAEA,GAAG,KAAA,IAAA,IAAHA,GAAG,KAAA,KAAA,CAAA,GAAHA,GAAG,GAAIsD,mBAAS,CAACrD,aAAa,CAACF,KAAK,CAAA;KACrCE,EAAAA,aAAa,CAClB,CAAC,CAAA;AAEN,GAAC,CAAC,EACDiC,kBACG,CACE,CAAC,CAAA;AAEf;;;;"}
1
+ {"version":3,"file":"MoreDropdown.js","sources":["../../src/components/MoreDropdown/constants.js","../../src/components/MoreDropdown/Submenu.jsx","../../src/components/MoreDropdown/MenuItem.jsx","../../src/components/MoreDropdown/index.jsx"],"sourcesContent":["export const BUTTON_STYLES = {\n primary: \"primary\",\n secondary: \"secondary\",\n tertiary: \"tertiary\",\n danger: \"danger\",\n danger_text: \"danger-text\",\n text: \"text\",\n link: \"link\",\n};\n\nexport const SIZES = { small: \"small\", medium: \"medium\", large: \"large\" };\n\nexport const STRATEGY = { absolute: \"absolute\", fixed: \"fixed\" };\n\nexport const MENU_ITEM_TYPES = {\n menuItem: \"menuItem\",\n divider: \"divider\",\n};\n\nexport const DEFAULT_TOOLTIP_PROPS = {\n disabled: true,\n position: \"bottom\",\n};\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport MoreDropdownMenuItem from \"./MenuItem\";\n\nconst { MenuItem, Menu } = Dropdown;\n\nconst Submenu = ({ label, key, ...menuItemProps }) => (\n <Dropdown\n customTarget={<MenuItem.Button>{label}</MenuItem.Button>}\n key={key}\n position=\"left\"\n trigger=\"hover\"\n {...menuItemProps.dropdownProps}\n >\n <Menu>\n {menuItemProps.menuItems.map(\n ({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return <MoreDropdownMenuItem key={key} {...menuItemProps} />;\n }\n )}\n </Menu>\n </Dropdown>\n);\n\nexport default Submenu;\n","import React from \"react\";\n\nimport { Dropdown } from \"neetoui\";\n\nimport { MENU_ITEM_TYPES } from \"./constants\";\nimport Submenu from \"./Submenu\";\n\nconst { MenuItem, Divider } = Dropdown;\n\nconst MoreDropdownMenuItem = ({\n onClick,\n label,\n type = MENU_ITEM_TYPES.menuItem,\n hasSubItems = false,\n ...menuItemProps\n}) => {\n if (type === MENU_ITEM_TYPES.divider) {\n return <Divider />;\n }\n\n if (hasSubItems) {\n return <Submenu {...{ label, ...menuItemProps }} />;\n }\n\n return (\n <MenuItem.Button {...{ onClick, ...menuItemProps }}>\n {label}\n </MenuItem.Button>\n );\n};\n\nexport default MoreDropdownMenuItem;\n","import React from \"react\";\n\nimport classnames from \"classnames\";\nimport { hyphenate } from \"neetocist\";\nimport { MenuHorizontal, MenuVertical } from \"neetoicons\";\nimport { Button, Dropdown, Tooltip } from \"neetoui\";\nimport PropTypes from \"prop-types\";\nimport { mergeRight } from \"ramda\";\nimport { useTranslation } from \"react-i18next\";\n\nimport {\n BUTTON_STYLES,\n DEFAULT_TOOLTIP_PROPS,\n MENU_ITEM_TYPES,\n SIZES,\n STRATEGY,\n} from \"./constants\";\nimport MenuItem from \"./MenuItem\";\nimport \"./moredropdown.scss\";\n\nconst { Menu } = Dropdown;\n\nconst MoreDropdown = ({\n dropdownButtonProps = {},\n isVertical = false,\n isDisabled = false,\n dropdownProps = {},\n menuTopChildren,\n menuBottomChildren,\n menuItems = [],\n}) => {\n const { t } = useTranslation();\n\n const { isRounded: isRoundedButton, ...buttonProps } = dropdownButtonProps;\n\n const tooltipProps = mergeRight(\n DEFAULT_TOOLTIP_PROPS,\n dropdownButtonProps.tooltipProps\n );\n\n const targetIcon = isVertical ? MenuVertical : MenuHorizontal;\n\n const isDropdownDisabled = isDisabled || dropdownProps.disabled;\n if (isDropdownDisabled && !tooltipProps.disabled) {\n return (\n <Tooltip {...tooltipProps}>\n <span>\n <Button\n disabled\n data-cy=\"more-dropdown-button\"\n data-dropdown-button-style=\"more-dropdown\"\n data-testid=\"nui-dropdown-button\"\n icon={targetIcon}\n iconPosition=\"right\"\n size=\"medium\"\n style=\"text\"\n className={classnames({\n \"neeto-molecule-moredropdown--rounded\": isRoundedButton,\n })}\n {...buttonProps}\n />\n </span>\n </Tooltip>\n );\n }\n\n return (\n <Dropdown\n autoWidth\n className=\"flex\"\n disabled={isDisabled}\n icon={targetIcon}\n buttonProps={{\n \"data-dropdown-button-style\": \"more-dropdown\",\n className: classnames(\"min-h-0 flex-shrink-0\", {\n \"neeto-molecule-moredropdown--rounded\": isRoundedButton,\n }),\n style: \"text\",\n tooltipProps: {\n content: t(\"neetoMolecules.moreDropdown.tooltip\"),\n position: \"top\",\n },\n ...buttonProps,\n }}\n {...dropdownProps}\n >\n <Menu>\n {menuTopChildren}\n {menuItems.map(({ isVisible = true, key, ...menuItemProps }) => {\n if (!isVisible) return null;\n\n return (\n <MenuItem\n key={key ?? hyphenate(menuItemProps.label)}\n {...menuItemProps}\n />\n );\n })}\n {menuBottomChildren}\n </Menu>\n </Dropdown>\n );\n};\n\nMoreDropdown.propTypes = {\n /*\n * This props will be passed to the target button of the dropdown.\n */\n dropdownButtonProps: PropTypes.shape({\n style: PropTypes.oneOf(Object.values(BUTTON_STYLES)),\n size: PropTypes.oneOf(Object.values(SIZES)),\n iconSize: PropTypes.number,\n disabled: PropTypes.bool,\n isRounded: PropTypes.bool,\n }),\n /*\n * Whether to show a MenuVertical icon. By default the icon will be MenuHorizontal.\n */\n isVertical: PropTypes.bool,\n /*\n * Whether the dropdown is disabled or not.\n */\n isDisabled: PropTypes.bool,\n /*\n * This props will be passed to the dropdown.\n */\n dropdownProps: PropTypes.shape({\n strategy: PropTypes.oneOf(Object.values(STRATEGY)),\n }),\n /*\n * This children will be rendered on top of the dropdown menu.\n */\n menuTopChildren: PropTypes.node,\n /*\n * This children will be rendered on bottom of the dropdown menu.\n */\n menuBottomChildren: PropTypes.node,\n /*\n * Menu items inside the dropdown. Each item needs to have a `label`, `onClick` and `key`.\n */\n menuItems: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func,\n key: PropTypes.string,\n type: PropTypes.oneOf(Object.values(MENU_ITEM_TYPES)),\n isVisible: PropTypes.bool,\n hasSubItems: PropTypes.bool,\n dropdownProps: PropTypes.shape({\n position: PropTypes.string,\n trigger: PropTypes.string,\n }),\n })\n ),\n};\n\nexport default MoreDropdown;\n"],"names":["MENU_ITEM_TYPES","menuItem","divider","DEFAULT_TOOLTIP_PROPS","disabled","position","MenuItem","Dropdown","Menu","Submenu","_ref","label","key","menuItemProps","_objectWithoutProperties","_excluded","React","createElement","_extends","customTarget","Button","trigger","dropdownProps","menuItems","map","_ref2","_ref2$isVisible","isVisible","_excluded2","MoreDropdownMenuItem","Divider","onClick","_ref$type","type","_ref$hasSubItems","hasSubItems","_objectSpread","MoreDropdown","_ref$dropdownButtonPr","dropdownButtonProps","_ref$isVertical","isVertical","_ref$isDisabled","isDisabled","_ref$dropdownProps","menuTopChildren","menuBottomChildren","_ref$menuItems","_useTranslation","useTranslation","t","isRoundedButton","isRounded","buttonProps","tooltipProps","mergeRight","targetIcon","MenuVertical","MenuHorizontal","isDropdownDisabled","Tooltip","icon","iconPosition","size","style","className","classnames","autoWidth","content","hyphenate"],"mappings":";;;;;;;;;;;;;;;;;;;AAcO,IAAMA,eAAe,GAAG;AAC7BC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,OAAO,EAAE,SAAA;AACX,CAAC,CAAA;AAEM,IAAMC,qBAAqB,GAAG;AACnCC,EAAAA,QAAQ,EAAE,IAAI;AACdC,EAAAA,QAAQ,EAAE,QAAA;AACZ,CAAC;;;;AChBD,IAAQC,UAAQ,GAAWC,gBAAQ,CAA3BD,QAAQ;EAAEE,MAAI,GAAKD,gBAAQ,CAAjBC,IAAI,CAAA;AAEtB,IAAMC,OAAO,GAAG,SAAVA,OAAOA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,KAAK,GAAAD,IAAA,CAALC,KAAK;IAAEC,GAAG,GAAAF,IAAA,CAAHE,GAAG;AAAKC,IAAAA,aAAa,GAAAC,gDAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA,CAAA;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AAA,CAAA,CAAA;AACvD,IAAA,IAAI,CAACD,SAAS,EAAE,OAAO,IAAI,CAAA;AAE3B,IAAA,oBACEX,yBAAA,CAAAC,aAAA,CAACX,oBAAQ,EAAAY,iBAAA,CAAA;MACPN,GAAG,EAAEA,GAAG,KAAA,IAAA,IAAHA,GAAG,KAAA,KAAA,CAAA,GAAHA,GAAG,GAAIyD,mBAAS,CAACxD,aAAa,CAACF,KAAK,CAAA;KACrCE,EAAAA,aAAa,CAClB,CAAC,CAAA;AAEN,GAAC,CAAC,EACDiC,kBACG,CACE,CAAC,CAAA;AAEf;;;;"}
@@ -107,7 +107,7 @@ var Editor = function Editor(_ref) {
107
107
  })));
108
108
  };
109
109
 
110
- var css = ":root{--neeto-molecules-rename-font-size:var(--neeto-ui-text-sm);--neeto-molecules-rename-font-weight:400;--neeto-molecules-rename-letter-spacing:0;--neeto-molecules-rename-line-height:1.2;--neeto-molecules-rename-min-width:120px}.neeto-molecules-rename-common-styles,.neeto-molecules-rename__input .neeto-ui-input input,.neeto-molecules-rename__input-width-maker,.neeto-molecules-rename__text{font-size:var(--neeto-ui-text-sm)!important;font-size:var(--neeto-molecules-rename-font-size)!important;font-weight:400;font-weight:var(--neeto-molecules-rename-font-weight);letter-spacing:0;letter-spacing:var(--neeto-molecules-rename-letter-spacing);line-height:1.2;line-height:var(--neeto-molecules-rename-line-height);margin:0}.neeto-molecules-rename__input{height:100%;margin:0;max-width:100%;min-width:0;position:relative;transition:width .2s ease-in-out;width:100%}.neeto-molecules-rename__input .neeto-ui-input{height:100%}.neeto-molecules-rename__input .neeto-ui-input .neeto-ui-input__suffix{margin-right:0!important}.neeto-molecules-rename__input .neeto-ui-input input{min-width:0}.neeto-molecules-rename__text{background-color:rgb(var(--neeto-ui-white));border:thin solid rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);cursor:pointer;max-width:448px;padding:8px;transition:var(--neeto-ui-transition)}.neeto-molecules-rename__display-text{color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-rename__display-text:hover{border:thin solid rgb(var(--neeto-ui-gray-300))}.neeto-molecules-rename__input-width-maker{background-color:rgb(var(--neeto-ui-white));border:thin solid rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);cursor:pointer;display:inline-flex;margin-right:68px;max-width:100%;min-width:120px;overflow:hidden;padding:8px;position:relative;transition:var(--neeto-ui-transition);visibility:hidden;white-space:nowrap}";
110
+ var css = ":root{--neeto-molecules-rename-font-size:var(--neeto-ui-text-sm);--neeto-molecules-rename-font-weight:400;--neeto-molecules-rename-letter-spacing:0;--neeto-molecules-rename-line-height:1.2;--neeto-molecules-rename-min-width:120px}.neeto-molecules-rename-common-styles,.neeto-molecules-rename__input .neeto-ui-input input,.neeto-molecules-rename__input-width-maker,.neeto-molecules-rename__text{font-size:var(--neeto-ui-text-sm)!important;font-size:var(--neeto-molecules-rename-font-size)!important;font-weight:400;font-weight:var(--neeto-molecules-rename-font-weight);letter-spacing:0;letter-spacing:var(--neeto-molecules-rename-letter-spacing);line-height:1.2;line-height:var(--neeto-molecules-rename-line-height);margin:0}.neeto-molecules-rename__input{height:100%;margin:0;max-width:100%;min-width:0;position:relative;transition:width .2s ease-in-out;width:100%}.neeto-molecules-rename__input .neeto-ui-input{height:100%}.neeto-molecules-rename__input .neeto-ui-input .neeto-ui-input__suffix{margin-right:0!important}.neeto-molecules-rename__input .neeto-ui-input input{min-width:0}.neeto-molecules-rename__text{background-color:rgb(var(--neeto-ui-white));border:thin solid rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);cursor:pointer;max-width:448px;padding:8px;transition:var(--neeto-ui-transition)}.neeto-molecules-rename__display-text{color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-rename__display-text:hover{border:thin solid rgb(var(--neeto-ui-gray-300))}.neeto-molecules-rename__input-width-maker{background-color:rgb(var(--neeto-ui-white));border:thin solid rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);cursor:pointer;display:inline-flex;margin-right:68px;max-width:100%;min-width:120px;overflow:hidden;padding:8px;position:relative;transition:var(--neeto-ui-transition);visibility:hidden;white-space:nowrap}.neeto-molecules-rename-breadcrumbs{margin-bottom:0}.neeto-molecules-rename-breadcrumbs .neeto-molecules-breadcrumb a{display:flex}";
111
111
  injectCss.n(css,{});
112
112
 
113
113
  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; }
@@ -305,7 +305,8 @@ var Rename = function Rename(_ref) {
305
305
  className: classnames__default["default"]("neeto-molecules-rename flex min-w-0 max-w-md flex-col items-start md:flex-row md:items-center", className)
306
306
  }, neetoCist.isNotEmpty(breadcrumbs) && /*#__PURE__*/React__default["default"].createElement(Breadcrumbs, {
307
307
  breadcrumbs: breadcrumbs,
308
- hasTrailingSeparator: true
308
+ hasTrailingSeparator: true,
309
+ className: "neeto-molecules-rename-breadcrumbs"
309
310
  }), /*#__PURE__*/React__default["default"].createElement("div", {
310
311
  className: "relative flex max-w-full items-center gap-x-2"
311
312
  }, editMode ? /*#__PURE__*/React__default["default"].createElement(Editor, editNameProps) : /*#__PURE__*/React__default["default"].createElement(ViewName, viewNameProps)));