acsi-core 0.1.21 → 0.1.22
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/dist/components/CoreTextArea/index.d.ts +6 -6
- package/dist/index.css +32 -19
- package/dist/index.js +36 -56
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +37 -57
- package/dist/index.modern.js.map +1 -1
- package/package.json +3 -1
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
interface IProps {
|
|
3
|
-
name
|
|
3
|
+
name?: string;
|
|
4
4
|
value: string;
|
|
5
5
|
onChange: (name: string, value: string) => void;
|
|
6
6
|
placeholder?: string;
|
|
7
|
+
error?: boolean;
|
|
7
8
|
label?: string;
|
|
8
|
-
cols?: number;
|
|
9
|
-
rows?: number;
|
|
10
|
-
width?: number;
|
|
11
|
-
tooltip?: string;
|
|
12
9
|
isOptional?: boolean;
|
|
13
|
-
|
|
10
|
+
tooltip?: string;
|
|
11
|
+
noBorder?: boolean;
|
|
12
|
+
smallHeight?: boolean;
|
|
13
|
+
hideToolbar?: boolean;
|
|
14
14
|
}
|
|
15
15
|
declare const CoreTextArea: (props: IProps) => React.JSX.Element;
|
|
16
16
|
export default CoreTextArea;
|
package/dist/index.css
CHANGED
|
@@ -292,34 +292,47 @@
|
|
|
292
292
|
font-weight: 600;
|
|
293
293
|
margin-bottom: 4px; }
|
|
294
294
|
|
|
295
|
-
.
|
|
296
|
-
|
|
295
|
+
._3TUh3 > div {
|
|
296
|
+
padding: 8px 12px;
|
|
297
297
|
outline: none;
|
|
298
|
-
border-radius: 8px;
|
|
299
298
|
border: 1px solid #e6e6eb;
|
|
300
|
-
|
|
299
|
+
border-radius: 8px;
|
|
300
|
+
font-family: Nunito;
|
|
301
301
|
font-size: 14px;
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
.
|
|
302
|
+
color: #212126;
|
|
303
|
+
min-height: 73px; }
|
|
304
|
+
._3TUh3 > div:hover {
|
|
305
305
|
background-color: #e5f9ff; }
|
|
306
|
-
.
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
306
|
+
._3TUh3 > div::before {
|
|
307
|
+
left: 12px !important;
|
|
308
|
+
color: #a6a6ad !important; }
|
|
309
|
+
|
|
310
|
+
._3TUh3 p {
|
|
311
|
+
margin: 0; }
|
|
310
312
|
|
|
311
|
-
.
|
|
313
|
+
._3TUh3 ._15n2K {
|
|
314
|
+
display: flex;
|
|
315
|
+
align-items: center;
|
|
316
|
+
gap: 4px;
|
|
312
317
|
font-size: 14px;
|
|
313
318
|
font-weight: 400;
|
|
314
|
-
margin-bottom: 4px;
|
|
315
319
|
color: #585869;
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
gap: 2px; }
|
|
319
|
-
._1b_C3 ._15n2K ._1fHZB {
|
|
320
|
+
margin-bottom: 8px; }
|
|
321
|
+
._3TUh3 ._15n2K ._1fHZB {
|
|
320
322
|
color: #a6a6ad; }
|
|
321
|
-
.
|
|
322
|
-
cursor: pointer;
|
|
323
|
+
._3TUh3 ._15n2K ._38AfS {
|
|
324
|
+
cursor: pointer;
|
|
325
|
+
display: flex;
|
|
326
|
+
align-items: center; }
|
|
327
|
+
|
|
328
|
+
._DaofN > div {
|
|
329
|
+
background-color: #fff5ce; }
|
|
330
|
+
|
|
331
|
+
._2JOcF > div {
|
|
332
|
+
border: none; }
|
|
333
|
+
|
|
334
|
+
._1EXev > div {
|
|
335
|
+
min-height: 54px; }
|
|
323
336
|
|
|
324
337
|
._wyI1K {
|
|
325
338
|
height: 32px;
|
package/dist/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var material = require('@mui/material');
|
|
|
16
16
|
var reactToastify = require('react-toastify');
|
|
17
17
|
var ReactSelect = require('react-select');
|
|
18
18
|
var ReactSelect__default = _interopDefault(ReactSelect);
|
|
19
|
+
var tinymceReact = require('@tinymce/tinymce-react');
|
|
19
20
|
var fa = require('react-icons/fa');
|
|
20
21
|
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
|
21
22
|
|
|
@@ -1400,7 +1401,7 @@ var CoreRange = function CoreRange(props) {
|
|
|
1400
1401
|
}));
|
|
1401
1402
|
};
|
|
1402
1403
|
|
|
1403
|
-
var styles$8 = {"
|
|
1404
|
+
var styles$8 = {"editor":"_3TUh3","label":"_15n2K","optional":"_1fHZB","icon":"_38AfS","error":"_DaofN","no-border":"_2JOcF","small-height":"_1EXev"};
|
|
1404
1405
|
|
|
1405
1406
|
var Search = function Search(props) {
|
|
1406
1407
|
var _props$size = props.size,
|
|
@@ -1488,78 +1489,57 @@ var Info = function Info() {
|
|
|
1488
1489
|
};
|
|
1489
1490
|
|
|
1490
1491
|
var CoreTextArea = function CoreTextArea(props) {
|
|
1491
|
-
var name = props.name,
|
|
1492
|
-
|
|
1492
|
+
var _props$name = props.name,
|
|
1493
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1493
1494
|
value = props.value,
|
|
1494
|
-
|
|
1495
|
-
cols = _props$cols === void 0 ? 0 : _props$cols,
|
|
1496
|
-
label = props.label,
|
|
1497
|
-
_props$rows = props.rows,
|
|
1498
|
-
rows = _props$rows === void 0 ? 2 : _props$rows,
|
|
1495
|
+
onChange = props.onChange,
|
|
1499
1496
|
_props$placeholder = props.placeholder,
|
|
1500
|
-
placeholder = _props$placeholder === void 0 ? "Type here" : _props$placeholder,
|
|
1501
|
-
|
|
1502
|
-
_props$
|
|
1503
|
-
|
|
1497
|
+
placeholder = _props$placeholder === void 0 ? "Type here..." : _props$placeholder,
|
|
1498
|
+
_props$error = props.error,
|
|
1499
|
+
error = _props$error === void 0 ? false : _props$error,
|
|
1500
|
+
label = props.label,
|
|
1504
1501
|
_props$isOptional = props.isOptional,
|
|
1505
1502
|
isOptional = _props$isOptional === void 0 ? false : _props$isOptional,
|
|
1506
|
-
|
|
1507
|
-
|
|
1503
|
+
tooltip = props.tooltip,
|
|
1504
|
+
_props$noBorder = props.noBorder,
|
|
1505
|
+
noBorder = _props$noBorder === void 0 ? false : _props$noBorder,
|
|
1506
|
+
_props$smallHeight = props.smallHeight,
|
|
1507
|
+
smallHeight = _props$smallHeight === void 0 ? false : _props$smallHeight,
|
|
1508
|
+
_props$hideToolbar = props.hideToolbar,
|
|
1509
|
+
hideToolbar = _props$hideToolbar === void 0 ? false : _props$hideToolbar;
|
|
1508
1510
|
var _useState = React.useState(false),
|
|
1509
1511
|
isOpenTooltip = _useState[0],
|
|
1510
1512
|
setIsOpenTooltip = _useState[1];
|
|
1511
1513
|
var toggleTooltip = function toggleTooltip() {
|
|
1512
1514
|
return setIsOpenTooltip(!isOpenTooltip);
|
|
1513
1515
|
};
|
|
1514
|
-
React.useEffect(function () {
|
|
1515
|
-
var _textareaRef$current2;
|
|
1516
|
-
if (textareaRef.current) {
|
|
1517
|
-
var _textareaRef$current;
|
|
1518
|
-
textareaRef.current.style.height = "auto";
|
|
1519
|
-
textareaRef.current.style.height = ((_textareaRef$current = textareaRef.current) === null || _textareaRef$current === void 0 ? void 0 : _textareaRef$current.scrollHeight) + "px";
|
|
1520
|
-
}
|
|
1521
|
-
if (((_textareaRef$current2 = textareaRef.current) === null || _textareaRef$current2 === void 0 ? void 0 : _textareaRef$current2.scrollHeight) == 0 && value.length > 0) {
|
|
1522
|
-
setTimeout(function () {
|
|
1523
|
-
if (textareaRef.current) {
|
|
1524
|
-
var _textareaRef$current3;
|
|
1525
|
-
textareaRef.current.style.height = ((_textareaRef$current3 = textareaRef.current) === null || _textareaRef$current3 === void 0 ? void 0 : _textareaRef$current3.scrollHeight) + "px";
|
|
1526
|
-
}
|
|
1527
|
-
}, 0);
|
|
1528
|
-
}
|
|
1529
|
-
}, [value]);
|
|
1530
1516
|
return React__default.createElement("div", {
|
|
1531
|
-
className: styles$8["
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
}
|
|
1535
|
-
}, label && React__default.createElement("div", {
|
|
1536
|
-
className: styles$8['label']
|
|
1517
|
+
className: styles$8["editor"] + " " + (error ? styles$8["error"] : "") + " " + (noBorder ? styles$8["no-border"] : "") + " " + (smallHeight ? styles$8["small-height"] : "")
|
|
1518
|
+
}, label && React__default.createElement("span", {
|
|
1519
|
+
className: styles$8["label"]
|
|
1537
1520
|
}, React__default.createElement("div", {
|
|
1538
|
-
className: styles$8[
|
|
1521
|
+
className: styles$8["label-content"]
|
|
1539
1522
|
}, label), isOptional && React__default.createElement("div", {
|
|
1540
|
-
className: styles$8[
|
|
1541
|
-
}, "(optional)"), React__default.createElement("div", {
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
}, React__default.createElement(Info, null)
|
|
1523
|
+
className: styles$8["optional"]
|
|
1524
|
+
}, "(optional)"), tooltip && React__default.createElement("div", {
|
|
1525
|
+
id: name,
|
|
1526
|
+
className: styles$8["icon"]
|
|
1527
|
+
}, React__default.createElement(Info, null), React__default.createElement(reactstrap.Tooltip, {
|
|
1545
1528
|
target: name,
|
|
1546
1529
|
isOpen: isOpenTooltip,
|
|
1547
1530
|
toggle: toggleTooltip
|
|
1548
|
-
}, tooltip)
|
|
1549
|
-
|
|
1550
|
-
placeholder: placeholder,
|
|
1551
|
-
style: {
|
|
1552
|
-
whiteSpace: "pre-wrap",
|
|
1553
|
-
width: "100%",
|
|
1554
|
-
minHeight: minHeight ? minHeight : "123px",
|
|
1555
|
-
resize: "none",
|
|
1556
|
-
overflow: "hidden"
|
|
1557
|
-
},
|
|
1531
|
+
}, tooltip))), React__default.createElement(tinymceReact.Editor, {
|
|
1532
|
+
apiKey: "xu4ccvi83xlprx56l8lwwme1q8vstxn0abjzvyqm1t9mabv7",
|
|
1558
1533
|
value: value,
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1534
|
+
onEditorChange: function onEditorChange(value) {
|
|
1535
|
+
return onChange(name, value);
|
|
1536
|
+
},
|
|
1537
|
+
init: {
|
|
1538
|
+
menubar: false,
|
|
1539
|
+
inline: true,
|
|
1540
|
+
plugins: ["lists", "table", "link", "image", "advlist"],
|
|
1541
|
+
toolbar: hideToolbar ? '' : "undo redo | styleselect | bold italic forecolor backcolor | \n table link image | \n alignleft aligncenter alignright bullist numlist",
|
|
1542
|
+
placeholder: placeholder
|
|
1563
1543
|
}
|
|
1564
1544
|
}));
|
|
1565
1545
|
};
|