carbon-react 118.2.1 → 118.3.0
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/esm/components/button-minor/button-minor.component.d.ts +5 -1
- package/esm/components/button-minor/button-minor.component.js +4 -1
- package/esm/components/button-minor/button-minor.style.d.ts +2 -1
- package/esm/components/button-minor/button-minor.style.js +17 -0
- package/esm/components/button-minor/index.d.ts +1 -1
- package/esm/components/i18n-provider/i18n-provider.component.js +4 -0
- package/esm/components/password/index.d.ts +2 -0
- package/esm/components/password/index.js +1 -0
- package/esm/components/password/password.component.d.ts +9 -0
- package/esm/components/password/password.component.js +580 -0
- package/esm/components/password/password.style.d.ts +5 -0
- package/esm/components/password/password.style.js +8 -0
- package/esm/components/text-editor/__internal__/decorators/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -6
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.component.d.ts +15 -0
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.component.js +5 -15
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.style.d.ts +5 -0
- package/esm/components/text-editor/__internal__/editor-counter/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.d.ts +9 -0
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.js +3 -4
- package/esm/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +3 -0
- package/esm/components/text-editor/__internal__/editor-link/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/label-wrapper/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.component.d.ts +12 -0
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +4 -3
- package/esm/components/text-editor/__internal__/toolbar/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/index.d.ts +2 -2
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.d.ts +25 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +12 -23
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.d.ts +6 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar.component.d.ts +16 -0
- package/esm/components/text-editor/__internal__/toolbar/toolbar.component.js +40 -36
- package/esm/components/text-editor/__internal__/toolbar/toolbar.style.d.ts +4 -0
- package/esm/components/text-editor/__internal__/utils/index.d.ts +1 -1
- package/esm/components/text-editor/__internal__/utils/utils.d.ts +27 -26
- package/esm/components/text-editor/__internal__/utils/utils.js +9 -10
- package/esm/components/text-editor/index.d.ts +2 -2
- package/esm/components/text-editor/text-editor.component.d.ts +36 -7
- package/esm/components/text-editor/text-editor.component.js +230 -87
- package/esm/components/text-editor/text-editor.style.d.ts +11 -3
- package/esm/components/text-editor/text-editor.style.js +1 -2
- package/esm/components/text-editor/types.d.ts +6 -0
- package/esm/components/text-editor/types.js +4 -0
- package/esm/components/textbox/textbox.component.js +1 -1
- package/esm/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.js +1 -1
- package/esm/locales/en-gb.js +4 -0
- package/esm/locales/locale.d.ts +4 -0
- package/esm/locales/pl-pl.js +4 -0
- package/lib/components/button-minor/button-minor.component.d.ts +5 -1
- package/lib/components/button-minor/button-minor.component.js +4 -1
- package/lib/components/button-minor/button-minor.style.d.ts +2 -1
- package/lib/components/button-minor/button-minor.style.js +17 -0
- package/lib/components/button-minor/index.d.ts +1 -1
- package/lib/components/i18n-provider/i18n-provider.component.js +4 -0
- package/lib/components/password/index.d.ts +2 -0
- package/lib/components/password/index.js +15 -0
- package/lib/components/password/package.json +6 -0
- package/lib/components/password/password.component.d.ts +9 -0
- package/lib/components/password/password.component.js +600 -0
- package/lib/components/password/password.style.d.ts +5 -0
- package/lib/components/password/password.style.js +21 -0
- package/lib/components/text-editor/__internal__/decorators/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/decorators/link-decorator.d.ts +7 -6
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.component.d.ts +15 -0
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.component.js +5 -15
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.style.d.ts +5 -0
- package/lib/components/text-editor/__internal__/editor-counter/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.d.ts +9 -0
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +3 -4
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +3 -0
- package/lib/components/text-editor/__internal__/editor-link/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/label-wrapper/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.component.d.ts +12 -0
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.component.js +2 -8
- package/lib/components/text-editor/__internal__/toolbar/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/index.d.ts +2 -2
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.d.ts +25 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +13 -24
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.style.d.ts +6 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar.component.d.ts +16 -0
- package/lib/components/text-editor/__internal__/toolbar/toolbar.component.js +50 -46
- package/lib/components/text-editor/__internal__/toolbar/toolbar.style.d.ts +4 -0
- package/lib/components/text-editor/__internal__/utils/index.d.ts +1 -1
- package/lib/components/text-editor/__internal__/utils/utils.d.ts +27 -26
- package/lib/components/text-editor/__internal__/utils/utils.js +10 -11
- package/lib/components/text-editor/index.d.ts +2 -2
- package/lib/components/text-editor/text-editor.component.d.ts +36 -7
- package/lib/components/text-editor/text-editor.component.js +231 -88
- package/lib/components/text-editor/text-editor.style.d.ts +11 -3
- package/lib/components/text-editor/text-editor.style.js +1 -2
- package/lib/components/text-editor/types.d.ts +6 -0
- package/lib/components/text-editor/types.js +14 -0
- package/lib/components/textbox/textbox.component.js +1 -1
- package/lib/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.js +1 -1
- package/lib/hooks/__internal__/useUniqueId/package.json +6 -0
- package/lib/locales/en-gb.js +4 -0
- package/lib/locales/locale.d.ts +4 -0
- package/lib/locales/pl-pl.js +4 -0
- package/package.json +4 -4
- package/esm/__internal__/DeprecationWarning.js +0 -20
- package/esm/__internal__/utils/storybook/partial-action.d.ts +0 -3
- package/esm/__internal__/utils/storybook/partial-action.js +0 -13
- package/esm/components/text-editor/__internal__/editor-counter/editor-counter.d.ts +0 -11
- package/esm/components/text-editor/__internal__/editor-link/editor-link.d.ts +0 -11
- package/esm/components/text-editor/__internal__/label-wrapper/label-wrapper.d.ts +0 -10
- package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.d.ts +0 -20
- package/esm/components/text-editor/__internal__/toolbar/toolbar.d.ts +0 -13
- package/esm/components/text-editor/text-editor.d.ts +0 -40
- package/lib/__internal__/DeprecationWarning.js +0 -31
- package/lib/__internal__/utils/helpers/useUniqueId/package.json +0 -6
- package/lib/__internal__/utils/storybook/partial-action.d.ts +0 -3
- package/lib/__internal__/utils/storybook/partial-action.js +0 -21
- package/lib/components/text-editor/__internal__/editor-counter/editor-counter.d.ts +0 -11
- package/lib/components/text-editor/__internal__/editor-link/editor-link.d.ts +0 -11
- package/lib/components/text-editor/__internal__/label-wrapper/label-wrapper.d.ts +0 -10
- package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.d.ts +0 -20
- package/lib/components/text-editor/__internal__/toolbar/toolbar.d.ts +0 -13
- package/lib/components/text-editor/text-editor.d.ts +0 -40
- /package/esm/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.d.ts +0 -0
- /package/lib/{__internal__/utils/helpers → hooks/__internal__}/useUniqueId/index.d.ts +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "118.
|
|
3
|
+
"version": "118.3.0",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"files": [
|
|
6
6
|
"lib",
|
|
@@ -13,8 +13,7 @@
|
|
|
13
13
|
"start:debug-theme": "cross-env STORYBOOK_DEBUG_THEME=true npm run start",
|
|
14
14
|
"test": "jest --config=./jest.config.json",
|
|
15
15
|
"test-update": "jest --config=./jest.config.json --updateSnapshot",
|
|
16
|
-
"
|
|
17
|
-
"cypress:react": "npx cypress open --component",
|
|
16
|
+
"cypress:react": "npx cypress open --component --browser chrome",
|
|
18
17
|
"format": "prettier --write './src/**/*.{js,jsx,ts,tsx}'",
|
|
19
18
|
"lint": "eslint ./src",
|
|
20
19
|
"build": "node ./scripts/build.js",
|
|
@@ -63,6 +62,7 @@
|
|
|
63
62
|
"@babel/types": "^7.16.0",
|
|
64
63
|
"@commitlint/cli": "^11.0.0",
|
|
65
64
|
"@commitlint/config-conventional": "^11.0.0",
|
|
65
|
+
"@dlgshi/cypress-plugin-designtokens": "^0.0.1-development",
|
|
66
66
|
"@sage/design-tokens": "^2.65.0",
|
|
67
67
|
"@semantic-release/changelog": "^6.0.1",
|
|
68
68
|
"@semantic-release/exec": "^6.0.2",
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"css-loader": "4.0.0",
|
|
117
117
|
"cypress": "^12.7.0",
|
|
118
118
|
"cypress-axe": "^1.4.0",
|
|
119
|
-
"cypress-each": "^1.13.
|
|
119
|
+
"cypress-each": "^1.13.3",
|
|
120
120
|
"cypress-plugin-tab": "^1.0.5",
|
|
121
121
|
"cypress-real-events": "^1.7.6",
|
|
122
122
|
"cz-conventional-changelog": "^3.3.0",
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
|
|
4
|
-
const DeprecationWarning = ({
|
|
5
|
-
children
|
|
6
|
-
}) => /*#__PURE__*/React.createElement("div", {
|
|
7
|
-
style: {
|
|
8
|
-
backgroundColor: "red",
|
|
9
|
-
textAlign: "center",
|
|
10
|
-
color: "white",
|
|
11
|
-
padding: 20,
|
|
12
|
-
fontWeight: "bold",
|
|
13
|
-
marginBottom: 10
|
|
14
|
-
}
|
|
15
|
-
}, children);
|
|
16
|
-
|
|
17
|
-
DeprecationWarning.propTypes = {
|
|
18
|
-
children: PropTypes.node.isRequired
|
|
19
|
-
};
|
|
20
|
-
export default DeprecationWarning;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { action } from "@storybook/addon-actions";
|
|
2
|
-
|
|
3
|
-
function partialAction(actionName) {
|
|
4
|
-
return (eventObj, ...args) => {
|
|
5
|
-
action(actionName)(typeof eventObj === "string" ? {
|
|
6
|
-
view: undefined
|
|
7
|
-
} : { ...eventObj,
|
|
8
|
-
view: undefined
|
|
9
|
-
}, ...args);
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default partialAction;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface EditorLinkProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
contentState: Record<string, unknown>;
|
|
6
|
-
entityKey?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare function EditorLink(props: EditorLinkProps): JSX.Element;
|
|
10
|
-
|
|
11
|
-
export default EditorLink;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface ToolbarButtonProps {
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
activated?: boolean;
|
|
7
|
-
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
8
|
-
onMouseDown: (event: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
-
onMouseOver?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
-
onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
-
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
12
|
-
onBlur?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
13
|
-
tabbable?: boolean;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare function ToolbarButton(
|
|
17
|
-
props: ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
18
|
-
): JSX.Element;
|
|
19
|
-
|
|
20
|
-
export default ToolbarButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface ToolbarProps {
|
|
4
|
-
activeControls: Record<string, unknown>;
|
|
5
|
-
/** Additional elements to be rendered, e.g. Save and Cancel Button */
|
|
6
|
-
toolbarElements?: React.ReactNode;
|
|
7
|
-
setInlineStyle: (args: number) => any;
|
|
8
|
-
setBlockStyle: (args: number) => any;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function Toolbar(props: ToolbarProps): JSX.Element;
|
|
12
|
-
|
|
13
|
-
export default Toolbar;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
import { Editor, EditorState, ContentState } from "draft-js";
|
|
4
|
-
|
|
5
|
-
export interface TextEditorProps extends MarginProps {
|
|
6
|
-
/** The maximum characters that the input will accept */
|
|
7
|
-
characterLimit?: number;
|
|
8
|
-
/** The text for the editor's label */
|
|
9
|
-
labelText: string;
|
|
10
|
-
/** onChange callback to control value updates */
|
|
11
|
-
onChange: (event: EditorState) => void;
|
|
12
|
-
/** Additional elements to be rendered in the Editor Toolbar, e.g. Save and Cancel Button */
|
|
13
|
-
toolbarElements?: React.ReactNode;
|
|
14
|
-
/** The value of the input, this is an EditorState immutable object */
|
|
15
|
-
value: EditorState;
|
|
16
|
-
/** Flag to configure component as mandatory */
|
|
17
|
-
required?: boolean;
|
|
18
|
-
/** Message to be displayed when there is an error */
|
|
19
|
-
error?: string;
|
|
20
|
-
/** Message to be displayed when there is a warning */
|
|
21
|
-
warning?: string;
|
|
22
|
-
/** Message to be displayed when there is an info */
|
|
23
|
-
info?: string;
|
|
24
|
-
/** Number greater than 2 multiplied by line-height (21px) to override the default min-height of the editor */
|
|
25
|
-
rows?: number;
|
|
26
|
-
/** The previews to display of any links added to the Editor */
|
|
27
|
-
previews?: React.ReactNode[];
|
|
28
|
-
/** Callback to report a url when a link is added */
|
|
29
|
-
onLinkAdded?: (url: string) => void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
declare function TextEditor(
|
|
33
|
-
props: TextEditorProps & React.RefAttributes<Editor>
|
|
34
|
-
): JSX.Element;
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
EditorState as TextEditorState,
|
|
38
|
-
ContentState as TextEditorContentState,
|
|
39
|
-
};
|
|
40
|
-
export default TextEditor;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
const DeprecationWarning = ({
|
|
15
|
-
children
|
|
16
|
-
}) => /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
-
style: {
|
|
18
|
-
backgroundColor: "red",
|
|
19
|
-
textAlign: "center",
|
|
20
|
-
color: "white",
|
|
21
|
-
padding: 20,
|
|
22
|
-
fontWeight: "bold",
|
|
23
|
-
marginBottom: 10
|
|
24
|
-
}
|
|
25
|
-
}, children);
|
|
26
|
-
|
|
27
|
-
DeprecationWarning.propTypes = {
|
|
28
|
-
children: _propTypes.default.node.isRequired
|
|
29
|
-
};
|
|
30
|
-
var _default = DeprecationWarning;
|
|
31
|
-
exports.default = _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
|
|
8
|
-
var _addonActions = require("@storybook/addon-actions");
|
|
9
|
-
|
|
10
|
-
function partialAction(actionName) {
|
|
11
|
-
return (eventObj, ...args) => {
|
|
12
|
-
(0, _addonActions.action)(actionName)(typeof eventObj === "string" ? {
|
|
13
|
-
view: undefined
|
|
14
|
-
} : { ...eventObj,
|
|
15
|
-
view: undefined
|
|
16
|
-
}, ...args);
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
var _default = partialAction;
|
|
21
|
-
exports.default = _default;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface EditorLinkProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
contentState: Record<string, unknown>;
|
|
6
|
-
entityKey?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare function EditorLink(props: EditorLinkProps): JSX.Element;
|
|
10
|
-
|
|
11
|
-
export default EditorLink;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface ToolbarButtonProps {
|
|
4
|
-
ariaLabel?: string;
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
activated?: boolean;
|
|
7
|
-
onKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
|
|
8
|
-
onMouseDown: (event: React.MouseEvent<HTMLElement>) => void;
|
|
9
|
-
onMouseOver?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
-
onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
|
|
11
|
-
onFocus?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
12
|
-
onBlur?: (event: React.FocusEvent<HTMLButtonElement>) => void;
|
|
13
|
-
tabbable?: boolean;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
declare function ToolbarButton(
|
|
17
|
-
props: ToolbarButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
18
|
-
): JSX.Element;
|
|
19
|
-
|
|
20
|
-
export default ToolbarButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface ToolbarProps {
|
|
4
|
-
activeControls: Record<string, unknown>;
|
|
5
|
-
/** Additional elements to be rendered, e.g. Save and Cancel Button */
|
|
6
|
-
toolbarElements?: React.ReactNode;
|
|
7
|
-
setInlineStyle: (args: number) => any;
|
|
8
|
-
setBlockStyle: (args: number) => any;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function Toolbar(props: ToolbarProps): JSX.Element;
|
|
12
|
-
|
|
13
|
-
export default Toolbar;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
import { Editor, EditorState, ContentState } from "draft-js";
|
|
4
|
-
|
|
5
|
-
export interface TextEditorProps extends MarginProps {
|
|
6
|
-
/** The maximum characters that the input will accept */
|
|
7
|
-
characterLimit?: number;
|
|
8
|
-
/** The text for the editor's label */
|
|
9
|
-
labelText: string;
|
|
10
|
-
/** onChange callback to control value updates */
|
|
11
|
-
onChange: (event: EditorState) => void;
|
|
12
|
-
/** Additional elements to be rendered in the Editor Toolbar, e.g. Save and Cancel Button */
|
|
13
|
-
toolbarElements?: React.ReactNode;
|
|
14
|
-
/** The value of the input, this is an EditorState immutable object */
|
|
15
|
-
value: EditorState;
|
|
16
|
-
/** Flag to configure component as mandatory */
|
|
17
|
-
required?: boolean;
|
|
18
|
-
/** Message to be displayed when there is an error */
|
|
19
|
-
error?: string;
|
|
20
|
-
/** Message to be displayed when there is a warning */
|
|
21
|
-
warning?: string;
|
|
22
|
-
/** Message to be displayed when there is an info */
|
|
23
|
-
info?: string;
|
|
24
|
-
/** Number greater than 2 multiplied by line-height (21px) to override the default min-height of the editor */
|
|
25
|
-
rows?: number;
|
|
26
|
-
/** The previews to display of any links added to the Editor */
|
|
27
|
-
previews?: React.ReactNode[];
|
|
28
|
-
/** Callback to report a url when a link is added */
|
|
29
|
-
onLinkAdded?: (url: string) => void;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
declare function TextEditor(
|
|
33
|
-
props: TextEditorProps & React.RefAttributes<Editor>
|
|
34
|
-
): JSX.Element;
|
|
35
|
-
|
|
36
|
-
export {
|
|
37
|
-
EditorState as TextEditorState,
|
|
38
|
-
ContentState as TextEditorContentState,
|
|
39
|
-
};
|
|
40
|
-
export default TextEditor;
|
|
File without changes
|
|
File without changes
|