@kakadu/components 2.2.0 → 2.2.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});async function a(t){try{await window.navigator.clipboard.writeText(t);return}catch{}const e=document.createElement("textarea");e.style.background="transparent",e.style.width="1px",e.style.height="1px",e.style.fontSize="12pt",e.style.padding="0",e.style.border="none",e.style.outline="none",e.style.appearance="none",e.style.position="fixed",e.style.bottom="0",e.style.right="0",e.setAttribute("readonly","false"),e.setAttribute("contenteditable","true"),e.setAttribute("aria-hidden","true"),document.body.append(e),e.value=t;try{e.select();try{const o=document.createRange();o.selectNodeContents(e);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(o)),e.setSelectionRange(0,t.length)}catch{}if(!document.execCommand("copy"))throw new Error("Unable to copy text.")}catch{throw new Error("Could not copy text.")}}exports.default=a;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});async function a(t){try{await window.navigator.clipboard.writeText(t);return}catch{}const e=document.createElement("textarea");e.style.background="transparent",e.style.width="1px",e.style.height="1px",e.style.fontSize="12pt",e.style.padding="0",e.style.border="none",e.style.outline="none",e.style.appearance="none",e.style.position="fixed",e.style.bottom="0",e.style.right="0",e.setAttribute("readonly","false"),e.setAttribute("contenteditable","true"),e.setAttribute("aria-hidden","true"),document.body.append(e),e.value=t;try{e.select();try{const o=document.createRange();o.selectNodeContents(e);const n=window.getSelection();n&&(n.removeAllRanges(),n.addRange(o)),e.setSelectionRange(0,t.length)}catch{}if(!document.execCommand("copy"))throw new Error("Unable to copy text.")}catch{throw new Error("Could not copy text.")}finally{e.remove()}}exports.default=a;
|