acsi-core 0.1.8 → 0.1.9
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/CoreInput/index.d.ts +1 -0
- package/dist/components/CoreModal/index.d.ts +1 -0
- package/dist/components/CoreSearch/index.d.ts +9 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.css +31 -4
- package/dist/index.d.ts +2 -2
- package/dist/index.js +110 -8
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +110 -9
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/icons/Close.d.ts +4 -0
- package/dist/utils/icons/Search.d.ts +4 -0
- package/dist/utils/icons/index.d.ts +2 -0
- package/dist/utils/types.d.ts +4 -0
- package/package.json +1 -1
|
@@ -7,3 +7,4 @@ export { default as CoreError } from "./CoreError";
|
|
|
7
7
|
export { default as CoreModal } from "./CoreModal";
|
|
8
8
|
export { default as CoreRange } from "./CoreRange";
|
|
9
9
|
export { default as CoreTextArea } from "./CoreTextArea";
|
|
10
|
+
export { default as CoreSearch } from "./CoreSearch";
|
package/dist/index.css
CHANGED
|
@@ -104,7 +104,8 @@
|
|
|
104
104
|
height: 100%; }
|
|
105
105
|
._1KLz9 ._3qndF ._JzdCr {
|
|
106
106
|
padding: 64px 56px; }
|
|
107
|
-
._1KLz9 ._3qndF ._JzdCr p,
|
|
107
|
+
._1KLz9 ._3qndF ._JzdCr p,
|
|
108
|
+
._1KLz9 ._3qndF ._JzdCr li {
|
|
108
109
|
font-size: 14px;
|
|
109
110
|
font-weight: 400; }
|
|
110
111
|
._1KLz9 ._3qndF ._19aCA {
|
|
@@ -271,9 +272,6 @@
|
|
|
271
272
|
font-size: 18px;
|
|
272
273
|
font-weight: 700; }
|
|
273
274
|
|
|
274
|
-
._2GdIt {
|
|
275
|
-
padding: 16px 24px 40px 24px !important; }
|
|
276
|
-
|
|
277
275
|
._1dzD7 {
|
|
278
276
|
display: flex;
|
|
279
277
|
flex-direction: column; }
|
|
@@ -302,3 +300,32 @@
|
|
|
302
300
|
font-size: 13px;
|
|
303
301
|
font-weight: 600;
|
|
304
302
|
margin-bottom: 4px; }
|
|
303
|
+
|
|
304
|
+
._wyI1K {
|
|
305
|
+
height: 32px;
|
|
306
|
+
border: 1px solid #e6e6eb;
|
|
307
|
+
border-radius: 8px;
|
|
308
|
+
padding-inline: 12px;
|
|
309
|
+
display: flex;
|
|
310
|
+
align-items: center;
|
|
311
|
+
gap: 2px; }
|
|
312
|
+
._wyI1K:focus-within {
|
|
313
|
+
border: 2px solid #00afda; }
|
|
314
|
+
._wyI1K::-moz-placeholder {
|
|
315
|
+
color: #a6a6ad; }
|
|
316
|
+
._wyI1K::placeholder {
|
|
317
|
+
color: #a6a6ad; }
|
|
318
|
+
._wyI1K:hover {
|
|
319
|
+
background-color: #e5f9ff; }
|
|
320
|
+
._wyI1K:hover ._9XW-D {
|
|
321
|
+
background-color: #e5f9ff; }
|
|
322
|
+
._wyI1K ._9XW-D {
|
|
323
|
+
font-size: 14px;
|
|
324
|
+
font-weight: 400;
|
|
325
|
+
flex: 1;
|
|
326
|
+
height: 18px;
|
|
327
|
+
border: none;
|
|
328
|
+
outline: none;
|
|
329
|
+
min-width: 0; }
|
|
330
|
+
._wyI1K ._1nhXy {
|
|
331
|
+
cursor: pointer; }
|
package/dist/index.d.ts
CHANGED
|
@@ -13,10 +13,10 @@ import { ToastContainer, toast } from "react-toastify";
|
|
|
13
13
|
import { Role } from "./containers/Login/configs/constants";
|
|
14
14
|
import CustomPagination from "./components/Paginations/CustomPagination";
|
|
15
15
|
import useGoogleSignOut from "./utils/hooks/useGoogleSignOut";
|
|
16
|
-
import { CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea } from "./components";
|
|
16
|
+
import { CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch } from "./components";
|
|
17
17
|
import { getErrorMessage } from "./utils/getErrorMessage";
|
|
18
18
|
import CustomSelect from "./components/Selects/CustomSelect";
|
|
19
19
|
import CustomAsyncSelect from "./components/Selects/CustomAsyncSelect";
|
|
20
20
|
import CustomCreatable from "./components/Selects/CustomCreatable";
|
|
21
21
|
import CustomSelectOption from "./components/Selects/CustomSelectOption";
|
|
22
|
-
export { setLoading, BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, Login, store, historyCore, setAlert, setUser, setMenuCollapse, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, getErrorMessage, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption };
|
|
22
|
+
export { setLoading, BASE_URL, ACCESS_TOKEN, DATE_TIME_MIN_VALUE, Login, store, historyCore, setAlert, setUser, setMenuCollapse, Loading, NotFound, LayoutContext, api, apiUpload, ConfirmDialog, CommonDialog, ToastContainer, toast, Role, CustomPagination, useGoogleSignOut, CoreButton, CoreInput, CoreSelect, CoreCheckbox, CoreRadio, CoreError, CoreModal, CoreRange, CoreTextArea, CoreSearch, getErrorMessage, CustomSelect, CustomAsyncSelect, CustomCreatable, CustomSelectOption };
|
package/dist/index.js
CHANGED
|
@@ -1022,7 +1022,8 @@ var CoreInput = function CoreInput(props) {
|
|
|
1022
1022
|
fontSize = props.fontSize,
|
|
1023
1023
|
fontWeight = props.fontWeight,
|
|
1024
1024
|
_onKeyDown = props.onKeyDown,
|
|
1025
|
-
ref = props.ref
|
|
1025
|
+
ref = props.ref,
|
|
1026
|
+
maxLength = props.maxLength;
|
|
1026
1027
|
return React__default.createElement("div", {
|
|
1027
1028
|
className: styles$1["core-input"] + " " + styles$1[type] + " " + (error ? styles$1["error"] : ""),
|
|
1028
1029
|
style: {
|
|
@@ -1043,7 +1044,9 @@ var CoreInput = function CoreInput(props) {
|
|
|
1043
1044
|
onKeyDown: function onKeyDown(e) {
|
|
1044
1045
|
return _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
|
|
1045
1046
|
}
|
|
1046
|
-
}, ref
|
|
1047
|
+
}, ref, {
|
|
1048
|
+
maxLength: maxLength
|
|
1049
|
+
})), error && React__default.createElement(CoreError, {
|
|
1047
1050
|
message: errorMessage
|
|
1048
1051
|
}));
|
|
1049
1052
|
};
|
|
@@ -1325,7 +1328,7 @@ var CoreRadio = function CoreRadio(props) {
|
|
|
1325
1328
|
})));
|
|
1326
1329
|
};
|
|
1327
1330
|
|
|
1328
|
-
var styles$6 = {"core-modal-header":"_2y5ln"
|
|
1331
|
+
var styles$6 = {"core-modal-header":"_2y5ln"};
|
|
1329
1332
|
|
|
1330
1333
|
var CoreModal = function CoreModal(props) {
|
|
1331
1334
|
var open = props.open,
|
|
@@ -1334,19 +1337,23 @@ var CoreModal = function CoreModal(props) {
|
|
|
1334
1337
|
title = props.title,
|
|
1335
1338
|
footer = props.footer,
|
|
1336
1339
|
handleSubmit = props.handleSubmit,
|
|
1337
|
-
onSubmit = props.onSubmit
|
|
1340
|
+
onSubmit = props.onSubmit,
|
|
1341
|
+
_props$bodyPadding = props.bodyPadding,
|
|
1342
|
+
bodyPadding = _props$bodyPadding === void 0 ? "24px" : _props$bodyPadding;
|
|
1338
1343
|
return React__default.createElement(reactstrap.Modal, {
|
|
1339
1344
|
isOpen: open,
|
|
1340
1345
|
toggle: onClose,
|
|
1341
|
-
centered: true
|
|
1342
|
-
className: styles$6["core-modal"]
|
|
1346
|
+
centered: true
|
|
1343
1347
|
}, React__default.createElement("form", {
|
|
1344
|
-
onSubmit: onSubmit ? handleSubmit(onSubmit) : undefined
|
|
1348
|
+
onSubmit: onSubmit ? handleSubmit(onSubmit) : undefined,
|
|
1349
|
+
className: styles$6["core-modal-container"]
|
|
1345
1350
|
}, React__default.createElement(reactstrap.ModalHeader, {
|
|
1346
1351
|
toggle: onClose,
|
|
1347
1352
|
className: styles$6["core-modal-header"]
|
|
1348
1353
|
}, title), React__default.createElement(reactstrap.ModalBody, {
|
|
1349
|
-
|
|
1354
|
+
style: {
|
|
1355
|
+
padding: bodyPadding
|
|
1356
|
+
}
|
|
1350
1357
|
}, children), footer && React__default.createElement(reactstrap.ModalFooter, null, footer)));
|
|
1351
1358
|
};
|
|
1352
1359
|
|
|
@@ -1412,6 +1419,100 @@ var CoreTextArea = function CoreTextArea(props) {
|
|
|
1412
1419
|
}));
|
|
1413
1420
|
};
|
|
1414
1421
|
|
|
1422
|
+
var styles$9 = {"core-search":"_wyI1K","input":"_9XW-D","clear":"_1nhXy"};
|
|
1423
|
+
|
|
1424
|
+
var Search = function Search(props) {
|
|
1425
|
+
var _props$size = props.size,
|
|
1426
|
+
size = _props$size === void 0 ? 16 : _props$size,
|
|
1427
|
+
_props$color = props.color,
|
|
1428
|
+
color = _props$color === void 0 ? "#A6A6AD" : _props$color;
|
|
1429
|
+
return React__default.createElement("svg", {
|
|
1430
|
+
width: size,
|
|
1431
|
+
height: size,
|
|
1432
|
+
viewBox: "0 0 16 16",
|
|
1433
|
+
fill: "none",
|
|
1434
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1435
|
+
}, React__default.createElement("path", {
|
|
1436
|
+
"fill-rule": "evenodd",
|
|
1437
|
+
"clip-rule": "evenodd",
|
|
1438
|
+
d: "M9.40376 9.40352C9.63808 9.1692 10.018 9.1692 10.2523 9.40352L13.4243 12.5755C13.6586 12.8098 13.6586 13.1897 13.4243 13.424C13.19 13.6584 12.8101 13.6584 12.5758 13.424L9.40376 10.252C9.16945 10.0177 9.16945 9.63783 9.40376 9.40352Z",
|
|
1439
|
+
fill: color
|
|
1440
|
+
}), React__default.createElement("path", {
|
|
1441
|
+
"fill-rule": "evenodd",
|
|
1442
|
+
"clip-rule": "evenodd",
|
|
1443
|
+
d: "M6.9999 3.5999C5.12213 3.5999 3.5999 5.12213 3.5999 6.9999C3.5999 8.87767 5.12213 10.3999 6.9999 10.3999C8.87767 10.3999 10.3999 8.87767 10.3999 6.9999C10.3999 5.12213 8.87767 3.5999 6.9999 3.5999ZM2.3999 6.9999C2.3999 4.45939 4.45939 2.3999 6.9999 2.3999C9.54041 2.3999 11.5999 4.45939 11.5999 6.9999C11.5999 9.54041 9.54041 11.5999 6.9999 11.5999C4.45939 11.5999 2.3999 9.54041 2.3999 6.9999Z",
|
|
1444
|
+
fill: color
|
|
1445
|
+
}));
|
|
1446
|
+
};
|
|
1447
|
+
|
|
1448
|
+
var Close = function Close(props) {
|
|
1449
|
+
var _props$color = props.color,
|
|
1450
|
+
color = _props$color === void 0 ? "#A6A6AD" : _props$color,
|
|
1451
|
+
_props$size = props.size,
|
|
1452
|
+
size = _props$size === void 0 ? 16 : _props$size;
|
|
1453
|
+
return React__default.createElement("svg", {
|
|
1454
|
+
width: size,
|
|
1455
|
+
height: size,
|
|
1456
|
+
viewBox: "0 0 16 16",
|
|
1457
|
+
fill: "none",
|
|
1458
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1459
|
+
}, React__default.createElement("g", {
|
|
1460
|
+
"clip-path": "url(#clip0_1060_48455)"
|
|
1461
|
+
}, React__default.createElement("rect", {
|
|
1462
|
+
x: "2.48438",
|
|
1463
|
+
y: "3.61597",
|
|
1464
|
+
width: "1.6",
|
|
1465
|
+
height: "14",
|
|
1466
|
+
rx: "0.8",
|
|
1467
|
+
transform: "rotate(-45 2.48438 3.61597)",
|
|
1468
|
+
fill: color
|
|
1469
|
+
}), React__default.createElement("rect", {
|
|
1470
|
+
x: "12.2427",
|
|
1471
|
+
y: "2.34326",
|
|
1472
|
+
width: "1.6",
|
|
1473
|
+
height: "14",
|
|
1474
|
+
rx: "0.8",
|
|
1475
|
+
transform: "rotate(45 12.2427 2.34326)",
|
|
1476
|
+
fill: color
|
|
1477
|
+
})), React__default.createElement("defs", null, React__default.createElement("clipPath", {
|
|
1478
|
+
id: "clip0_1060_48455"
|
|
1479
|
+
}, React__default.createElement("rect", {
|
|
1480
|
+
width: "16",
|
|
1481
|
+
height: "16",
|
|
1482
|
+
fill: "white"
|
|
1483
|
+
}))));
|
|
1484
|
+
};
|
|
1485
|
+
|
|
1486
|
+
var CoreSearch = function CoreSearch(props) {
|
|
1487
|
+
var _props$name = props.name,
|
|
1488
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1489
|
+
value = props.value,
|
|
1490
|
+
_onChange = props.onChange,
|
|
1491
|
+
width = props.width;
|
|
1492
|
+
var handleClear = function handleClear() {
|
|
1493
|
+
_onChange(name, "");
|
|
1494
|
+
};
|
|
1495
|
+
return React__default.createElement("div", {
|
|
1496
|
+
className: styles$9["core-search"],
|
|
1497
|
+
style: {
|
|
1498
|
+
width: width != null ? width : "100%"
|
|
1499
|
+
},
|
|
1500
|
+
tabIndex: 1
|
|
1501
|
+
}, React__default.createElement("div", {
|
|
1502
|
+
className: styles$9["icon"]
|
|
1503
|
+
}, React__default.createElement(Search, null)), React__default.createElement("input", {
|
|
1504
|
+
className: styles$9["input"],
|
|
1505
|
+
value: value,
|
|
1506
|
+
onChange: function onChange(e) {
|
|
1507
|
+
return _onChange(name, e.target.value);
|
|
1508
|
+
},
|
|
1509
|
+
placeholder: "Search..."
|
|
1510
|
+
}), value.length ? React__default.createElement("div", {
|
|
1511
|
+
className: styles$9["clear"],
|
|
1512
|
+
onClick: handleClear
|
|
1513
|
+
}, React__default.createElement(Close, null)) : null);
|
|
1514
|
+
};
|
|
1515
|
+
|
|
1415
1516
|
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
1416
1517
|
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
|
1417
1518
|
var errorMessage = error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.title;
|
|
@@ -1637,6 +1738,7 @@ exports.CoreInput = CoreInput;
|
|
|
1637
1738
|
exports.CoreModal = CoreModal;
|
|
1638
1739
|
exports.CoreRadio = CoreRadio;
|
|
1639
1740
|
exports.CoreRange = CoreRange;
|
|
1741
|
+
exports.CoreSearch = CoreSearch;
|
|
1640
1742
|
exports.CoreSelect = CoreSelect;
|
|
1641
1743
|
exports.CoreTextArea = CoreTextArea;
|
|
1642
1744
|
exports.CustomAsyncSelect = CustomAsyncSelect;
|