@chayns-components/core 5.0.0-beta.314 → 5.0.0-beta.320
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/lib/components/code-highlighter/CodeHighlighter.d.ts +27 -0
- package/lib/components/code-highlighter/CodeHighlighter.js +70 -0
- package/lib/components/code-highlighter/CodeHighlighter.js.map +1 -0
- package/lib/components/code-highlighter/CodeHighlighter.styles.d.ts +16 -0
- package/lib/components/code-highlighter/CodeHighlighter.styles.js +84 -0
- package/lib/components/code-highlighter/CodeHighlighter.styles.js.map +1 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.d.ts +8 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.js +38 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.js.map +1 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.d.ts +274 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.js +10 -0
- package/lib/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.js.map +1 -0
- package/lib/components/file-input/FileInput.d.ts +21 -0
- package/lib/components/file-input/FileInput.js +104 -0
- package/lib/components/file-input/FileInput.js.map +1 -0
- package/lib/components/file-input/FileInput.styles.d.ts +546 -0
- package/lib/components/file-input/FileInput.styles.js +35 -0
- package/lib/components/file-input/FileInput.styles.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.d.ts +9 -0
- package/lib/components/file-input/file-list/FileListItem.js +36 -0
- package/lib/components/file-input/file-list/FileListItem.js.map +1 -0
- package/lib/components/file-input/file-list/FileListItem.styles.d.ts +274 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js +10 -0
- package/lib/components/file-input/file-list/FileListItem.styles.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.d.ts +23 -0
- package/lib/components/setup-wizard/SetupWizard.js +79 -0
- package/lib/components/setup-wizard/SetupWizard.js.map +1 -0
- package/lib/components/setup-wizard/SetupWizard.styles.d.ts +274 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js +10 -0
- package/lib/components/setup-wizard/SetupWizard.styles.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.d.ts +25 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js +60 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.js.map +1 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.d.ts +546 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js +14 -0
- package/lib/components/setup-wizard/setup-wizard-item/SetupWizardItem.styles.js.map +1 -0
- package/lib/components/text-area/TextArea.styles.js +3 -3
- package/lib/components/text-area/TextArea.styles.js.map +1 -1
- package/lib/components/truncation/Truncation.d.ts +25 -0
- package/lib/components/truncation/Truncation.js +76 -0
- package/lib/components/truncation/Truncation.js.map +1 -0
- package/lib/components/truncation/Truncation.styles.d.ts +820 -0
- package/lib/components/truncation/Truncation.styles.js +18 -0
- package/lib/components/truncation/Truncation.styles.js.map +1 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.js +35 -0
- package/lib/index.js.map +1 -1
- package/lib/types/codeHighlighter.d.ts +10 -0
- package/lib/types/codeHighlighter.js +12 -0
- package/lib/types/codeHighlighter.js.map +1 -0
- package/lib/utils/file.d.ts +363 -0
- package/lib/utils/file.js +402 -0
- package/lib/utils/file.js.map +1 -0
- package/lib/utils/truncation.d.ts +1 -0
- package/lib/utils/truncation.js +34 -0
- package/lib/utils/truncation.js.map +1 -0
- package/package.json +4 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CodeHighlighterLanguage, CodeHighlighterTheme, HighlightedLines } from '../../types/codeHighlighter';
|
|
3
|
+
export type CodeHighlighterProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The code that should be displayed.
|
|
6
|
+
*/
|
|
7
|
+
code: string;
|
|
8
|
+
/**
|
|
9
|
+
* The lines of code that should be highlighted.
|
|
10
|
+
* Following lines can be highlighted: added, removed and just marked.
|
|
11
|
+
*/
|
|
12
|
+
highlightedLines?: HighlightedLines;
|
|
13
|
+
/**
|
|
14
|
+
* The language of the displayed code.
|
|
15
|
+
*/
|
|
16
|
+
language: CodeHighlighterLanguage;
|
|
17
|
+
/**
|
|
18
|
+
* Whether the line numbers should be displayed.
|
|
19
|
+
*/
|
|
20
|
+
shouldShowLineNumbers?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The theme of the code block. Decide between dark and light.
|
|
23
|
+
*/
|
|
24
|
+
theme?: CodeHighlighterTheme;
|
|
25
|
+
};
|
|
26
|
+
declare const CodeHighlighter: FC<CodeHighlighterProps>;
|
|
27
|
+
export default CodeHighlighter;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactSyntaxHighlighter = require("react-syntax-highlighter");
|
|
9
|
+
var _prism = require("react-syntax-highlighter/dist/esm/styles/prism");
|
|
10
|
+
var _codeHighlighter = require("../../types/codeHighlighter");
|
|
11
|
+
var _CodeHighlighter = require("./CodeHighlighter.styles");
|
|
12
|
+
var _CopyToClipboard = _interopRequireDefault(require("./copy-to-clipboard/CopyToClipboard"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
const CodeHighlighter = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
theme = _codeHighlighter.CodeHighlighterTheme.Dark,
|
|
19
|
+
code,
|
|
20
|
+
language,
|
|
21
|
+
highlightedLines,
|
|
22
|
+
shouldShowLineNumbers = false
|
|
23
|
+
} = _ref;
|
|
24
|
+
// function to style highlighted code
|
|
25
|
+
const lineWrapper = (0, _react.useCallback)(lineNumber => {
|
|
26
|
+
let style = {
|
|
27
|
+
backgroundColor: 'none',
|
|
28
|
+
display: 'block',
|
|
29
|
+
borderRadius: '2px'
|
|
30
|
+
};
|
|
31
|
+
if (highlightedLines?.added && highlightedLines.added.includes(lineNumber)) {
|
|
32
|
+
style = {
|
|
33
|
+
...style,
|
|
34
|
+
backgroundColor: '#2EF29930'
|
|
35
|
+
};
|
|
36
|
+
} else if (highlightedLines?.removed && highlightedLines.removed.includes(lineNumber)) {
|
|
37
|
+
style = {
|
|
38
|
+
...style,
|
|
39
|
+
backgroundColor: '#F22E5B30'
|
|
40
|
+
};
|
|
41
|
+
} else if (highlightedLines?.marked && highlightedLines.marked.includes(lineNumber)) {
|
|
42
|
+
style = {
|
|
43
|
+
...style,
|
|
44
|
+
backgroundColor: '#cccccc40'
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
return {
|
|
48
|
+
style
|
|
49
|
+
};
|
|
50
|
+
}, [highlightedLines]);
|
|
51
|
+
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_CodeHighlighter.StyledCodeHighlighter, {
|
|
52
|
+
codeTheme: theme
|
|
53
|
+
}, /*#__PURE__*/_react.default.createElement(_CodeHighlighter.StyledCodeHighlighterHeader, {
|
|
54
|
+
codeTheme: theme
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement(_CodeHighlighter.StyledCodeHighlighterFileName, {
|
|
56
|
+
codeTheme: theme
|
|
57
|
+
}, language), /*#__PURE__*/_react.default.createElement(_CopyToClipboard.default, {
|
|
58
|
+
text: code,
|
|
59
|
+
theme: theme
|
|
60
|
+
})), /*#__PURE__*/_react.default.createElement(_reactSyntaxHighlighter.PrismAsyncLight, {
|
|
61
|
+
language: language,
|
|
62
|
+
showLineNumbers: shouldShowLineNumbers,
|
|
63
|
+
style: theme === _codeHighlighter.CodeHighlighterTheme.Dark ? _prism.oneDark : _prism.oneLight,
|
|
64
|
+
wrapLines: true,
|
|
65
|
+
lineProps: lineWrapper
|
|
66
|
+
}, code)), [theme, language, code, shouldShowLineNumbers, lineWrapper]);
|
|
67
|
+
};
|
|
68
|
+
CodeHighlighter.displayName = 'CodeHighlighter';
|
|
69
|
+
var _default = exports.default = CodeHighlighter;
|
|
70
|
+
//# sourceMappingURL=CodeHighlighter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeHighlighter.js","names":["_react","_interopRequireWildcard","require","_reactSyntaxHighlighter","_prism","_codeHighlighter","_CodeHighlighter","_CopyToClipboard","_interopRequireDefault","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","CodeHighlighter","_ref","theme","CodeHighlighterTheme","Dark","code","language","highlightedLines","shouldShowLineNumbers","lineWrapper","useCallback","lineNumber","style","backgroundColor","display","borderRadius","added","includes","removed","marked","useMemo","createElement","StyledCodeHighlighter","codeTheme","StyledCodeHighlighterHeader","StyledCodeHighlighterFileName","text","PrismAsyncLight","showLineNumbers","oneDark","oneLight","wrapLines","lineProps","displayName","_default","exports"],"sources":["../../../src/components/code-highlighter/CodeHighlighter.tsx"],"sourcesContent":["import React, { FC, useCallback, useMemo } from 'react';\nimport { PrismAsyncLight as SyntaxHighlighter } from 'react-syntax-highlighter';\nimport { oneDark, oneLight } from 'react-syntax-highlighter/dist/esm/styles/prism';\nimport {\n CodeHighlighterLanguage,\n CodeHighlighterTheme,\n HighlightedLines,\n} from '../../types/codeHighlighter';\nimport {\n StyledCodeHighlighter,\n StyledCodeHighlighterFileName,\n StyledCodeHighlighterHeader,\n} from './CodeHighlighter.styles';\nimport CopyToClipboard from './copy-to-clipboard/CopyToClipboard';\n\nexport type CodeHighlighterProps = {\n /**\n * The code that should be displayed.\n */\n code: string;\n /**\n * The lines of code that should be highlighted.\n * Following lines can be highlighted: added, removed and just marked.\n */\n highlightedLines?: HighlightedLines;\n /**\n * The language of the displayed code.\n */\n language: CodeHighlighterLanguage;\n /**\n * Whether the line numbers should be displayed.\n */\n shouldShowLineNumbers?: boolean;\n /**\n * The theme of the code block. Decide between dark and light.\n */\n theme?: CodeHighlighterTheme;\n};\n\nconst CodeHighlighter: FC<CodeHighlighterProps> = ({\n theme = CodeHighlighterTheme.Dark,\n code,\n language,\n highlightedLines,\n shouldShowLineNumbers = false,\n}) => {\n // function to style highlighted code\n const lineWrapper = useCallback(\n (lineNumber: number) => {\n let style = {\n backgroundColor: 'none',\n display: 'block',\n borderRadius: '2px',\n };\n\n if (highlightedLines?.added && highlightedLines.added.includes(lineNumber)) {\n style = { ...style, backgroundColor: '#2EF29930' };\n } else if (highlightedLines?.removed && highlightedLines.removed.includes(lineNumber)) {\n style = { ...style, backgroundColor: '#F22E5B30' };\n } else if (highlightedLines?.marked && highlightedLines.marked.includes(lineNumber)) {\n style = { ...style, backgroundColor: '#cccccc40' };\n }\n\n return { style };\n },\n [highlightedLines],\n );\n\n return useMemo(\n () => (\n <StyledCodeHighlighter codeTheme={theme}>\n <StyledCodeHighlighterHeader codeTheme={theme}>\n <StyledCodeHighlighterFileName codeTheme={theme}>\n {language}\n </StyledCodeHighlighterFileName>\n <CopyToClipboard text={code} theme={theme} />\n </StyledCodeHighlighterHeader>\n <SyntaxHighlighter\n language={language}\n showLineNumbers={shouldShowLineNumbers}\n style={theme === CodeHighlighterTheme.Dark ? oneDark : oneLight}\n wrapLines\n lineProps={lineWrapper}\n >\n {code}\n </SyntaxHighlighter>\n </StyledCodeHighlighter>\n ),\n [theme, language, code, shouldShowLineNumbers, lineWrapper],\n );\n};\n\nCodeHighlighter.displayName = 'CodeHighlighter';\n\nexport default CodeHighlighter;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,uBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAKA,IAAAI,gBAAA,GAAAJ,OAAA;AAKA,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAkE,SAAAM,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,OAAAM,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC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0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CodeHighlighterTheme } from '../../types/codeHighlighter';
|
|
3
|
+
import type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';
|
|
4
|
+
type StyledCodeHighlighterProps = WithTheme<{
|
|
5
|
+
codeTheme: CodeHighlighterTheme;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const StyledCodeHighlighter: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledCodeHighlighterProps>>;
|
|
8
|
+
type StyledCodeHighlighterHeaderProps = WithTheme<{
|
|
9
|
+
codeTheme: CodeHighlighterTheme;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const StyledCodeHighlighterHeader: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledCodeHighlighterHeaderProps>>;
|
|
12
|
+
type StyledCodeHighlighterFileNameProps = WithTheme<{
|
|
13
|
+
codeTheme: CodeHighlighterTheme;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const StyledCodeHighlighterFileName: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, StyledCodeHighlighterFileNameProps>>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledCodeHighlighterHeader = exports.StyledCodeHighlighterFileName = exports.StyledCodeHighlighter = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
var _codeHighlighter = require("../../types/codeHighlighter");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const StyledCodeHighlighter = exports.StyledCodeHighlighter = _styledComponents.default.div`
|
|
11
|
+
background-color: ${_ref => {
|
|
12
|
+
let {
|
|
13
|
+
codeTheme
|
|
14
|
+
} = _ref;
|
|
15
|
+
return codeTheme === _codeHighlighter.CodeHighlighterTheme.Dark ? '#282c34' : '#fafafa';
|
|
16
|
+
}};
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
padding-bottom: 6px;
|
|
19
|
+
|
|
20
|
+
pre {
|
|
21
|
+
margin: 0 !important;
|
|
22
|
+
|
|
23
|
+
// Styles for custom scrollbar
|
|
24
|
+
&::-webkit-scrollbar {
|
|
25
|
+
height: 5px;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&::-webkit-scrollbar-track {
|
|
29
|
+
background-color: transparent;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&::-webkit-scrollbar-button {
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
height: 2px;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&::-webkit-scrollbar-thumb {
|
|
38
|
+
|
|
39
|
+
background-color: rgba(${_ref2 => {
|
|
40
|
+
let {
|
|
41
|
+
codeTheme
|
|
42
|
+
} = _ref2;
|
|
43
|
+
return codeTheme === _codeHighlighter.CodeHighlighterTheme.Dark ? '229, 229, 229' : '153, 153, 153';
|
|
44
|
+
}},
|
|
45
|
+
1);
|
|
46
|
+
border-radius: 20px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Scrollbar styles for Firefox. The above styles are not supported in Firefox, these styles are
|
|
50
|
+
// only supported in Firefox:
|
|
51
|
+
* {
|
|
52
|
+
scrollbar-color: rgba(${_ref3 => {
|
|
53
|
+
let {
|
|
54
|
+
codeTheme
|
|
55
|
+
} = _ref3;
|
|
56
|
+
return codeTheme === _codeHighlighter.CodeHighlighterTheme.Dark ? '229, 229, 229' : '153, 153, 153';
|
|
57
|
+
}},
|
|
58
|
+
1);)transparent;
|
|
59
|
+
scrollbar-width: thin;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
`;
|
|
63
|
+
const StyledCodeHighlighterHeader = exports.StyledCodeHighlighterHeader = _styledComponents.default.div`
|
|
64
|
+
display: flex;
|
|
65
|
+
align-items: center;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
border-bottom: 1px solid
|
|
68
|
+
${_ref4 => {
|
|
69
|
+
let {
|
|
70
|
+
codeTheme
|
|
71
|
+
} = _ref4;
|
|
72
|
+
return codeTheme === _codeHighlighter.CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999';
|
|
73
|
+
}};
|
|
74
|
+
padding: 4px 12px;
|
|
75
|
+
`;
|
|
76
|
+
const StyledCodeHighlighterFileName = exports.StyledCodeHighlighterFileName = _styledComponents.default.span`
|
|
77
|
+
color: ${_ref5 => {
|
|
78
|
+
let {
|
|
79
|
+
codeTheme
|
|
80
|
+
} = _ref5;
|
|
81
|
+
return codeTheme === _codeHighlighter.CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999';
|
|
82
|
+
}};
|
|
83
|
+
`;
|
|
84
|
+
//# sourceMappingURL=CodeHighlighter.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeHighlighter.styles.js","names":["_styledComponents","_interopRequireDefault","require","_codeHighlighter","obj","__esModule","default","StyledCodeHighlighter","exports","styled","div","_ref","codeTheme","CodeHighlighterTheme","Dark","_ref2","_ref3","StyledCodeHighlighterHeader","_ref4","StyledCodeHighlighterFileName","span","_ref5"],"sources":["../../../src/components/code-highlighter/CodeHighlighter.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { CodeHighlighterTheme } from '../../types/codeHighlighter';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledCodeHighlighterProps = WithTheme<{\n codeTheme: CodeHighlighterTheme;\n}>;\n\nexport const StyledCodeHighlighter = styled.div<StyledCodeHighlighterProps>`\n background-color: ${({ codeTheme }) =>\n codeTheme === CodeHighlighterTheme.Dark ? '#282c34' : '#fafafa'};\n border-radius: 8px;\n padding-bottom: 6px;\n\n pre {\n margin: 0 !important;\n\n // Styles for custom scrollbar\n &::-webkit-scrollbar {\n height: 5px;\n }\n\n &::-webkit-scrollbar-track {\n background-color: transparent;\n }\n\n &::-webkit-scrollbar-button {\n background-color: transparent;\n height: 2px;\n }\n\n &::-webkit-scrollbar-thumb {\n\n background-color: rgba(${({ codeTheme }) =>\n codeTheme === CodeHighlighterTheme.Dark ? '229, 229, 229' : '153, 153, 153'},\n 1);\n border-radius: 20px;\n }\n\n // Scrollbar styles for Firefox. The above styles are not supported in Firefox, these styles are\n // only supported in Firefox:\n * {\n scrollbar-color: rgba(${({ codeTheme }) =>\n codeTheme === CodeHighlighterTheme.Dark ? '229, 229, 229' : '153, 153, 153'},\n 1);)transparent;\n scrollbar-width: thin;\n }\n }\n`;\n\ntype StyledCodeHighlighterHeaderProps = WithTheme<{\n codeTheme: CodeHighlighterTheme;\n}>;\n\nexport const StyledCodeHighlighterHeader = styled.div<StyledCodeHighlighterHeaderProps>`\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid\n ${({ codeTheme }) => (codeTheme === CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999')};\n padding: 4px 12px;\n`;\n\ntype StyledCodeHighlighterFileNameProps = WithTheme<{\n codeTheme: CodeHighlighterTheme;\n}>;\n\nexport const StyledCodeHighlighterFileName = styled.span<StyledCodeHighlighterFileNameProps>`\n color: ${({ codeTheme }) => (codeTheme === CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999')};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AAAmE,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,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,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { CodeHighlighterTheme } from '../../../types/codeHighlighter';
|
|
3
|
+
export type CopyToClipboardProps = {
|
|
4
|
+
text: string;
|
|
5
|
+
theme: CodeHighlighterTheme;
|
|
6
|
+
};
|
|
7
|
+
declare const CopyToClipboard: FC<CopyToClipboardProps>;
|
|
8
|
+
export default CopyToClipboard;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _codeHighlighter = require("../../../types/codeHighlighter");
|
|
9
|
+
var _Icon = _interopRequireDefault(require("../../icon/Icon"));
|
|
10
|
+
var _Popup = _interopRequireDefault(require("../../popup/Popup"));
|
|
11
|
+
var _CopyToClipboard = require("./CopyToClipboard.styles");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
const CopyToClipboard = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
text,
|
|
16
|
+
theme
|
|
17
|
+
} = _ref;
|
|
18
|
+
const handleClick = () => {
|
|
19
|
+
void navigator.clipboard.writeText(text);
|
|
20
|
+
};
|
|
21
|
+
const popupContent = /*#__PURE__*/_react.default.createElement("span", {
|
|
22
|
+
style: {
|
|
23
|
+
display: 'block',
|
|
24
|
+
padding: '5px'
|
|
25
|
+
}
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement("p", null, "Kopiert!"));
|
|
27
|
+
return /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
28
|
+
content: popupContent
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement(_CopyToClipboard.StyledCopyToClipboard, {
|
|
30
|
+
onClick: handleClick
|
|
31
|
+
}, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
32
|
+
icons: ['fa-light fa-clipboard'],
|
|
33
|
+
color: theme === _codeHighlighter.CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999'
|
|
34
|
+
})));
|
|
35
|
+
};
|
|
36
|
+
CopyToClipboard.displayName = 'CopyToClipboard';
|
|
37
|
+
var _default = exports.default = CopyToClipboard;
|
|
38
|
+
//# sourceMappingURL=CopyToClipboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.js","names":["_react","_interopRequireDefault","require","_codeHighlighter","_Icon","_Popup","_CopyToClipboard","obj","__esModule","default","CopyToClipboard","_ref","text","theme","handleClick","navigator","clipboard","writeText","popupContent","createElement","style","display","padding","content","StyledCopyToClipboard","onClick","icons","color","CodeHighlighterTheme","Dark","displayName","_default","exports"],"sources":["../../../../src/components/code-highlighter/copy-to-clipboard/CopyToClipboard.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { CodeHighlighterTheme } from '../../../types/codeHighlighter';\nimport Icon from '../../icon/Icon';\nimport Popup from '../../popup/Popup';\nimport { StyledCopyToClipboard } from './CopyToClipboard.styles';\n\nexport type CopyToClipboardProps = {\n text: string;\n theme: CodeHighlighterTheme;\n};\n\nconst CopyToClipboard: FC<CopyToClipboardProps> = ({ text, theme }) => {\n const handleClick = () => {\n void navigator.clipboard.writeText(text);\n };\n\n const popupContent = (\n <span style={{ display: 'block', padding: '5px' }}>\n <p>Kopiert!</p>\n </span>\n );\n\n return (\n <Popup content={popupContent}>\n <StyledCopyToClipboard onClick={handleClick}>\n <Icon\n icons={['fa-light fa-clipboard']}\n color={theme === CodeHighlighterTheme.Dark ? '#e5e5e5' : '#999999'}\n />\n </StyledCopyToClipboard>\n </Popup>\n );\n};\n\nCopyToClipboard.displayName = 'CopyToClipboard';\n\nexport default CopyToClipboard;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAA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="react" />
|
|
3
|
+
export declare const StyledCopyToClipboard: import("styled-components").IStyledComponent<"web", {
|
|
4
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
5
|
+
key?: import("react").Key | null | undefined;
|
|
6
|
+
defaultChecked?: boolean | undefined;
|
|
7
|
+
defaultValue?: string | number | readonly string[] | undefined;
|
|
8
|
+
suppressContentEditableWarning?: boolean | undefined;
|
|
9
|
+
suppressHydrationWarning?: boolean | undefined;
|
|
10
|
+
accessKey?: string | undefined;
|
|
11
|
+
autoFocus?: boolean | undefined;
|
|
12
|
+
className?: string | undefined;
|
|
13
|
+
contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
|
|
14
|
+
contextMenu?: string | undefined;
|
|
15
|
+
dir?: string | undefined;
|
|
16
|
+
draggable?: (boolean | "true" | "false") | undefined;
|
|
17
|
+
hidden?: boolean | undefined;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
lang?: string | undefined;
|
|
20
|
+
nonce?: string | undefined;
|
|
21
|
+
placeholder?: string | undefined;
|
|
22
|
+
slot?: string | undefined;
|
|
23
|
+
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
24
|
+
style?: import("react").CSSProperties | undefined;
|
|
25
|
+
tabIndex?: number | undefined;
|
|
26
|
+
title?: string | undefined;
|
|
27
|
+
translate?: "yes" | "no" | undefined;
|
|
28
|
+
radioGroup?: string | undefined;
|
|
29
|
+
role?: import("react").AriaRole | undefined;
|
|
30
|
+
about?: string | undefined;
|
|
31
|
+
content?: string | undefined;
|
|
32
|
+
datatype?: string | undefined;
|
|
33
|
+
inlist?: any;
|
|
34
|
+
prefix?: string | undefined;
|
|
35
|
+
property?: string | undefined;
|
|
36
|
+
rel?: string | undefined;
|
|
37
|
+
resource?: string | undefined;
|
|
38
|
+
rev?: string | undefined;
|
|
39
|
+
typeof?: string | undefined;
|
|
40
|
+
vocab?: string | undefined;
|
|
41
|
+
autoCapitalize?: string | undefined;
|
|
42
|
+
autoCorrect?: string | undefined;
|
|
43
|
+
autoSave?: string | undefined;
|
|
44
|
+
color?: string | undefined;
|
|
45
|
+
itemProp?: string | undefined;
|
|
46
|
+
itemScope?: boolean | undefined;
|
|
47
|
+
itemType?: string | undefined;
|
|
48
|
+
itemID?: string | undefined;
|
|
49
|
+
itemRef?: string | undefined;
|
|
50
|
+
results?: number | undefined;
|
|
51
|
+
security?: string | undefined;
|
|
52
|
+
unselectable?: "on" | "off" | undefined;
|
|
53
|
+
inputMode?: "search" | "text" | "none" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
54
|
+
is?: string | undefined;
|
|
55
|
+
"aria-activedescendant"?: string | undefined;
|
|
56
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
57
|
+
"aria-autocomplete"?: "list" | "none" | "both" | "inline" | undefined;
|
|
58
|
+
"aria-braillelabel"?: string | undefined;
|
|
59
|
+
"aria-brailleroledescription"?: string | undefined;
|
|
60
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
61
|
+
"aria-checked"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
62
|
+
"aria-colcount"?: number | undefined;
|
|
63
|
+
"aria-colindex"?: number | undefined;
|
|
64
|
+
"aria-colindextext"?: string | undefined;
|
|
65
|
+
"aria-colspan"?: number | undefined;
|
|
66
|
+
"aria-controls"?: string | undefined;
|
|
67
|
+
"aria-current"?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
|
|
68
|
+
"aria-describedby"?: string | undefined;
|
|
69
|
+
"aria-description"?: string | undefined;
|
|
70
|
+
"aria-details"?: string | undefined;
|
|
71
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
72
|
+
"aria-dropeffect"?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
|
|
73
|
+
"aria-errormessage"?: string | undefined;
|
|
74
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
75
|
+
"aria-flowto"?: string | undefined;
|
|
76
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
77
|
+
"aria-haspopup"?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
|
|
78
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
79
|
+
"aria-invalid"?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
|
|
80
|
+
"aria-keyshortcuts"?: string | undefined;
|
|
81
|
+
"aria-label"?: string | undefined;
|
|
82
|
+
"aria-labelledby"?: string | undefined;
|
|
83
|
+
"aria-level"?: number | undefined;
|
|
84
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
85
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
86
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
87
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
88
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
89
|
+
"aria-owns"?: string | undefined;
|
|
90
|
+
"aria-placeholder"?: string | undefined;
|
|
91
|
+
"aria-posinset"?: number | undefined;
|
|
92
|
+
"aria-pressed"?: boolean | "true" | "false" | "mixed" | undefined;
|
|
93
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
94
|
+
"aria-relevant"?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
|
|
95
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
96
|
+
"aria-roledescription"?: string | undefined;
|
|
97
|
+
"aria-rowcount"?: number | undefined;
|
|
98
|
+
"aria-rowindex"?: number | undefined;
|
|
99
|
+
"aria-rowindextext"?: string | undefined;
|
|
100
|
+
"aria-rowspan"?: number | undefined;
|
|
101
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
102
|
+
"aria-setsize"?: number | undefined;
|
|
103
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
104
|
+
"aria-valuemax"?: number | undefined;
|
|
105
|
+
"aria-valuemin"?: number | undefined;
|
|
106
|
+
"aria-valuenow"?: number | undefined;
|
|
107
|
+
"aria-valuetext"?: string | undefined;
|
|
108
|
+
children?: import("react").ReactNode;
|
|
109
|
+
dangerouslySetInnerHTML?: {
|
|
110
|
+
__html: string | TrustedHTML;
|
|
111
|
+
} | undefined;
|
|
112
|
+
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
113
|
+
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
114
|
+
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
115
|
+
onCutCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
116
|
+
onPaste?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
117
|
+
onPasteCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
118
|
+
onCompositionEnd?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
119
|
+
onCompositionEndCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
120
|
+
onCompositionStart?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
121
|
+
onCompositionStartCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
122
|
+
onCompositionUpdate?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
123
|
+
onCompositionUpdateCapture?: import("react").CompositionEventHandler<HTMLDivElement> | undefined;
|
|
124
|
+
onFocus?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
125
|
+
onFocusCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
126
|
+
onBlur?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
127
|
+
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
128
|
+
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
129
|
+
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
130
|
+
onBeforeInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
131
|
+
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
132
|
+
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
133
|
+
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
134
|
+
onReset?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
135
|
+
onResetCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
136
|
+
onSubmit?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
137
|
+
onSubmitCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
138
|
+
onInvalid?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
139
|
+
onInvalidCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
140
|
+
onLoad?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
141
|
+
onLoadCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
142
|
+
onError?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
143
|
+
onErrorCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
144
|
+
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
145
|
+
onKeyDownCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
146
|
+
onKeyPress?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
147
|
+
onKeyPressCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
148
|
+
onKeyUp?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
149
|
+
onKeyUpCapture?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
150
|
+
onAbort?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
151
|
+
onAbortCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
152
|
+
onCanPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
153
|
+
onCanPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
154
|
+
onCanPlayThrough?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
155
|
+
onCanPlayThroughCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
156
|
+
onDurationChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
157
|
+
onDurationChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
158
|
+
onEmptied?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
159
|
+
onEmptiedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
160
|
+
onEncrypted?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
161
|
+
onEncryptedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
162
|
+
onEnded?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
163
|
+
onEndedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
164
|
+
onLoadedData?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
165
|
+
onLoadedDataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
166
|
+
onLoadedMetadata?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
167
|
+
onLoadedMetadataCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
168
|
+
onLoadStart?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
169
|
+
onLoadStartCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
170
|
+
onPause?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
171
|
+
onPauseCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
172
|
+
onPlay?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
173
|
+
onPlayCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
174
|
+
onPlaying?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
175
|
+
onPlayingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
176
|
+
onProgress?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
177
|
+
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
178
|
+
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
179
|
+
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
180
|
+
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
181
|
+
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
182
|
+
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
183
|
+
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
184
|
+
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
185
|
+
onSeekingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
186
|
+
onStalled?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
187
|
+
onStalledCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
188
|
+
onSuspend?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
189
|
+
onSuspendCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
|
+
onTimeUpdate?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
|
+
onTimeUpdateCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
+
onVolumeChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
+
onVolumeChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
|
+
onWaiting?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
195
|
+
onWaitingCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
196
|
+
onAuxClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
197
|
+
onAuxClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
198
|
+
onClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
199
|
+
onClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
200
|
+
onContextMenu?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
201
|
+
onContextMenuCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
202
|
+
onDoubleClick?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
203
|
+
onDoubleClickCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
204
|
+
onDrag?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
205
|
+
onDragCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
206
|
+
onDragEnd?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
207
|
+
onDragEndCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
208
|
+
onDragEnter?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
209
|
+
onDragEnterCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
210
|
+
onDragExit?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
211
|
+
onDragExitCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
212
|
+
onDragLeave?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
213
|
+
onDragLeaveCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
214
|
+
onDragOver?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
215
|
+
onDragOverCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
216
|
+
onDragStart?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
217
|
+
onDragStartCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
218
|
+
onDrop?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
219
|
+
onDropCapture?: import("react").DragEventHandler<HTMLDivElement> | undefined;
|
|
220
|
+
onMouseDown?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
221
|
+
onMouseDownCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
222
|
+
onMouseEnter?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
223
|
+
onMouseLeave?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
224
|
+
onMouseMove?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
225
|
+
onMouseMoveCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
226
|
+
onMouseOut?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
227
|
+
onMouseOutCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
228
|
+
onMouseOver?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
229
|
+
onMouseOverCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
230
|
+
onMouseUp?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
231
|
+
onMouseUpCapture?: import("react").MouseEventHandler<HTMLDivElement> | undefined;
|
|
232
|
+
onSelect?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
233
|
+
onSelectCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
234
|
+
onTouchCancel?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
235
|
+
onTouchCancelCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
236
|
+
onTouchEnd?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
237
|
+
onTouchEndCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
238
|
+
onTouchMove?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
239
|
+
onTouchMoveCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
240
|
+
onTouchStart?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
241
|
+
onTouchStartCapture?: import("react").TouchEventHandler<HTMLDivElement> | undefined;
|
|
242
|
+
onPointerDown?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
243
|
+
onPointerDownCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
244
|
+
onPointerMove?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
245
|
+
onPointerMoveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
246
|
+
onPointerUp?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
247
|
+
onPointerUpCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
248
|
+
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
249
|
+
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
250
|
+
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
251
|
+
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
252
|
+
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
253
|
+
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
254
|
+
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
255
|
+
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
256
|
+
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
257
|
+
onPointerOutCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
258
|
+
onGotPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
259
|
+
onGotPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
260
|
+
onLostPointerCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
261
|
+
onLostPointerCaptureCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
262
|
+
onScroll?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
263
|
+
onScrollCapture?: import("react").UIEventHandler<HTMLDivElement> | undefined;
|
|
264
|
+
onWheel?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
265
|
+
onWheelCapture?: import("react").WheelEventHandler<HTMLDivElement> | undefined;
|
|
266
|
+
onAnimationStart?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
267
|
+
onAnimationStartCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
268
|
+
onAnimationEnd?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
269
|
+
onAnimationEndCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
270
|
+
onAnimationIteration?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
271
|
+
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
272
|
+
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
273
|
+
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
274
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.StyledCopyToClipboard = void 0;
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
const StyledCopyToClipboard = exports.StyledCopyToClipboard = _styledComponents.default.div``;
|
|
10
|
+
//# sourceMappingURL=CopyToClipboard.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledCopyToClipboard","exports","styled","div"],"sources":["../../../../src/components/code-highlighter/copy-to-clipboard/CopyToClipboard.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledCopyToClipboard = styled.div``;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAGE,yBAAM,CAACC,GAAI,EAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
export type FileInputProps = {
|
|
3
|
+
/**
|
|
4
|
+
* An array of icons that should be displayed inside the FileInput
|
|
5
|
+
*/
|
|
6
|
+
icons?: string[];
|
|
7
|
+
/**
|
|
8
|
+
* A function to be executed when files are added.
|
|
9
|
+
*/
|
|
10
|
+
onAdd?: (files: File[]) => void;
|
|
11
|
+
/**
|
|
12
|
+
* A function to be executed when a file is removed.
|
|
13
|
+
*/
|
|
14
|
+
onRemove?: (file: File) => void;
|
|
15
|
+
/**
|
|
16
|
+
* The text that should be displayed inside the FileInput
|
|
17
|
+
*/
|
|
18
|
+
placeholder?: string;
|
|
19
|
+
};
|
|
20
|
+
declare const FileInput: FC<FileInputProps>;
|
|
21
|
+
export default FileInput;
|