{"version":3,"file":"Copyable.mjs","sourceRoot":"","sources":["../../../src/jsx/components/Copyable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,yBAAqB;AAgBnD,MAAM,IAAI,GAAG,UAAU,CAAC;AAExB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,mBAAmB,CAA6B,IAAI,CAAC,CAAC","sourcesContent":["import { createSnapComponent } from '../component';\n\n/**\n * The props of the {@link Copyable} component.\n *\n * @property value - The value to copy when the user clicks on the copyable\n * element.\n * @property sensitive - Whether the value is sensitive. If `true`, the value\n * will be hidden when the user is not interacting with the copyable element.\n * @category Component Props\n */\nexport type CopyableProps = {\n  value: string;\n  sensitive?: boolean | undefined;\n};\n\nconst TYPE = 'Copyable';\n\n/**\n * A copyable component, which is used to display text that can be copied by the\n * user.\n *\n * @param props - The props of the component.\n * @param props.value - The value to copy when the user clicks on the copyable\n * element.\n * @param props.sensitive - Whether the value is sensitive. If `true`, the value\n * will be hidden when the user is not interacting with the copyable element.\n * @example\n * <Copyable value=\"0x1234567890123456789012345678901234567890\" />\n * <Copyable value=\"0x1234567890123456789012345678901234567890\" sensitive />\n * @category Components\n */\nexport const Copyable = createSnapComponent<CopyableProps, typeof TYPE>(TYPE);\n\n/**\n * A copyable element.\n *\n * @see {@link Copyable}\n * @category Elements\n */\nexport type CopyableElement = ReturnType<typeof Copyable>;\n"]}