acsi-core 0.1.7 → 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 +115 -16
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +115 -17
- 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
package/dist/index.modern.js
CHANGED
|
@@ -1019,7 +1019,8 @@ var CoreInput = function CoreInput(props) {
|
|
|
1019
1019
|
fontSize = props.fontSize,
|
|
1020
1020
|
fontWeight = props.fontWeight,
|
|
1021
1021
|
_onKeyDown = props.onKeyDown,
|
|
1022
|
-
ref = props.ref
|
|
1022
|
+
ref = props.ref,
|
|
1023
|
+
maxLength = props.maxLength;
|
|
1023
1024
|
return React.createElement("div", {
|
|
1024
1025
|
className: styles$1["core-input"] + " " + styles$1[type] + " " + (error ? styles$1["error"] : ""),
|
|
1025
1026
|
style: {
|
|
@@ -1040,7 +1041,9 @@ var CoreInput = function CoreInput(props) {
|
|
|
1040
1041
|
onKeyDown: function onKeyDown(e) {
|
|
1041
1042
|
return _onKeyDown === null || _onKeyDown === void 0 ? void 0 : _onKeyDown(e);
|
|
1042
1043
|
}
|
|
1043
|
-
}, ref
|
|
1044
|
+
}, ref, {
|
|
1045
|
+
maxLength: maxLength
|
|
1046
|
+
})), error && React.createElement(CoreError, {
|
|
1044
1047
|
message: errorMessage
|
|
1045
1048
|
}));
|
|
1046
1049
|
};
|
|
@@ -1143,9 +1146,7 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1143
1146
|
};
|
|
1144
1147
|
var placeholderStyles = function placeholderStyles(base) {
|
|
1145
1148
|
var styles = _extends({}, base, {
|
|
1146
|
-
color: COLORS.lightGray
|
|
1147
|
-
position: "relative",
|
|
1148
|
-
top: "-4px"
|
|
1149
|
+
color: COLORS.lightGray
|
|
1149
1150
|
});
|
|
1150
1151
|
return styles;
|
|
1151
1152
|
};
|
|
@@ -1159,15 +1160,14 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
1159
1160
|
};
|
|
1160
1161
|
var valueContainerStyles = function valueContainerStyles(base) {
|
|
1161
1162
|
var styles = _extends({}, base, {
|
|
1162
|
-
height: isMulti ? undefined : "32px"
|
|
1163
|
+
height: isMulti ? undefined : "32px",
|
|
1164
|
+
position: "relative",
|
|
1165
|
+
top: "-3px"
|
|
1163
1166
|
});
|
|
1164
1167
|
return styles;
|
|
1165
1168
|
};
|
|
1166
1169
|
var singleValueStyles = function singleValueStyles(base) {
|
|
1167
|
-
var styles = _extends({}, base
|
|
1168
|
-
position: "relative",
|
|
1169
|
-
top: "-4px"
|
|
1170
|
-
});
|
|
1170
|
+
var styles = _extends({}, base);
|
|
1171
1171
|
return styles;
|
|
1172
1172
|
};
|
|
1173
1173
|
var optionStyles = function optionStyles(base, state) {
|
|
@@ -1325,7 +1325,7 @@ var CoreRadio = function CoreRadio(props) {
|
|
|
1325
1325
|
})));
|
|
1326
1326
|
};
|
|
1327
1327
|
|
|
1328
|
-
var styles$6 = {"core-modal-header":"_2y5ln"
|
|
1328
|
+
var styles$6 = {"core-modal-header":"_2y5ln"};
|
|
1329
1329
|
|
|
1330
1330
|
var CoreModal = function CoreModal(props) {
|
|
1331
1331
|
var open = props.open,
|
|
@@ -1334,19 +1334,23 @@ var CoreModal = function CoreModal(props) {
|
|
|
1334
1334
|
title = props.title,
|
|
1335
1335
|
footer = props.footer,
|
|
1336
1336
|
handleSubmit = props.handleSubmit,
|
|
1337
|
-
onSubmit = props.onSubmit
|
|
1337
|
+
onSubmit = props.onSubmit,
|
|
1338
|
+
_props$bodyPadding = props.bodyPadding,
|
|
1339
|
+
bodyPadding = _props$bodyPadding === void 0 ? "24px" : _props$bodyPadding;
|
|
1338
1340
|
return React.createElement(Modal, {
|
|
1339
1341
|
isOpen: open,
|
|
1340
1342
|
toggle: onClose,
|
|
1341
|
-
centered: true
|
|
1342
|
-
className: styles$6["core-modal"]
|
|
1343
|
+
centered: true
|
|
1343
1344
|
}, React.createElement("form", {
|
|
1344
|
-
onSubmit: onSubmit ? handleSubmit(onSubmit) : undefined
|
|
1345
|
+
onSubmit: onSubmit ? handleSubmit(onSubmit) : undefined,
|
|
1346
|
+
className: styles$6["core-modal-container"]
|
|
1345
1347
|
}, React.createElement(ModalHeader, {
|
|
1346
1348
|
toggle: onClose,
|
|
1347
1349
|
className: styles$6["core-modal-header"]
|
|
1348
1350
|
}, title), React.createElement(ModalBody, {
|
|
1349
|
-
|
|
1351
|
+
style: {
|
|
1352
|
+
padding: bodyPadding
|
|
1353
|
+
}
|
|
1350
1354
|
}, children), footer && React.createElement(ModalFooter, null, footer)));
|
|
1351
1355
|
};
|
|
1352
1356
|
|
|
@@ -1412,6 +1416,100 @@ var CoreTextArea = function CoreTextArea(props) {
|
|
|
1412
1416
|
}));
|
|
1413
1417
|
};
|
|
1414
1418
|
|
|
1419
|
+
var styles$9 = {"core-search":"_wyI1K","input":"_9XW-D","clear":"_1nhXy"};
|
|
1420
|
+
|
|
1421
|
+
var Search = function Search(props) {
|
|
1422
|
+
var _props$size = props.size,
|
|
1423
|
+
size = _props$size === void 0 ? 16 : _props$size,
|
|
1424
|
+
_props$color = props.color,
|
|
1425
|
+
color = _props$color === void 0 ? "#A6A6AD" : _props$color;
|
|
1426
|
+
return React.createElement("svg", {
|
|
1427
|
+
width: size,
|
|
1428
|
+
height: size,
|
|
1429
|
+
viewBox: "0 0 16 16",
|
|
1430
|
+
fill: "none",
|
|
1431
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1432
|
+
}, React.createElement("path", {
|
|
1433
|
+
"fill-rule": "evenodd",
|
|
1434
|
+
"clip-rule": "evenodd",
|
|
1435
|
+
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",
|
|
1436
|
+
fill: color
|
|
1437
|
+
}), React.createElement("path", {
|
|
1438
|
+
"fill-rule": "evenodd",
|
|
1439
|
+
"clip-rule": "evenodd",
|
|
1440
|
+
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",
|
|
1441
|
+
fill: color
|
|
1442
|
+
}));
|
|
1443
|
+
};
|
|
1444
|
+
|
|
1445
|
+
var Close = function Close(props) {
|
|
1446
|
+
var _props$color = props.color,
|
|
1447
|
+
color = _props$color === void 0 ? "#A6A6AD" : _props$color,
|
|
1448
|
+
_props$size = props.size,
|
|
1449
|
+
size = _props$size === void 0 ? 16 : _props$size;
|
|
1450
|
+
return React.createElement("svg", {
|
|
1451
|
+
width: size,
|
|
1452
|
+
height: size,
|
|
1453
|
+
viewBox: "0 0 16 16",
|
|
1454
|
+
fill: "none",
|
|
1455
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1456
|
+
}, React.createElement("g", {
|
|
1457
|
+
"clip-path": "url(#clip0_1060_48455)"
|
|
1458
|
+
}, React.createElement("rect", {
|
|
1459
|
+
x: "2.48438",
|
|
1460
|
+
y: "3.61597",
|
|
1461
|
+
width: "1.6",
|
|
1462
|
+
height: "14",
|
|
1463
|
+
rx: "0.8",
|
|
1464
|
+
transform: "rotate(-45 2.48438 3.61597)",
|
|
1465
|
+
fill: color
|
|
1466
|
+
}), React.createElement("rect", {
|
|
1467
|
+
x: "12.2427",
|
|
1468
|
+
y: "2.34326",
|
|
1469
|
+
width: "1.6",
|
|
1470
|
+
height: "14",
|
|
1471
|
+
rx: "0.8",
|
|
1472
|
+
transform: "rotate(45 12.2427 2.34326)",
|
|
1473
|
+
fill: color
|
|
1474
|
+
})), React.createElement("defs", null, React.createElement("clipPath", {
|
|
1475
|
+
id: "clip0_1060_48455"
|
|
1476
|
+
}, React.createElement("rect", {
|
|
1477
|
+
width: "16",
|
|
1478
|
+
height: "16",
|
|
1479
|
+
fill: "white"
|
|
1480
|
+
}))));
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
var CoreSearch = function CoreSearch(props) {
|
|
1484
|
+
var _props$name = props.name,
|
|
1485
|
+
name = _props$name === void 0 ? "" : _props$name,
|
|
1486
|
+
value = props.value,
|
|
1487
|
+
_onChange = props.onChange,
|
|
1488
|
+
width = props.width;
|
|
1489
|
+
var handleClear = function handleClear() {
|
|
1490
|
+
_onChange(name, "");
|
|
1491
|
+
};
|
|
1492
|
+
return React.createElement("div", {
|
|
1493
|
+
className: styles$9["core-search"],
|
|
1494
|
+
style: {
|
|
1495
|
+
width: width != null ? width : "100%"
|
|
1496
|
+
},
|
|
1497
|
+
tabIndex: 1
|
|
1498
|
+
}, React.createElement("div", {
|
|
1499
|
+
className: styles$9["icon"]
|
|
1500
|
+
}, React.createElement(Search, null)), React.createElement("input", {
|
|
1501
|
+
className: styles$9["input"],
|
|
1502
|
+
value: value,
|
|
1503
|
+
onChange: function onChange(e) {
|
|
1504
|
+
return _onChange(name, e.target.value);
|
|
1505
|
+
},
|
|
1506
|
+
placeholder: "Search..."
|
|
1507
|
+
}), value.length ? React.createElement("div", {
|
|
1508
|
+
className: styles$9["clear"],
|
|
1509
|
+
onClick: handleClear
|
|
1510
|
+
}, React.createElement(Close, null)) : null);
|
|
1511
|
+
};
|
|
1512
|
+
|
|
1415
1513
|
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
1416
1514
|
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
|
1417
1515
|
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;
|
|
@@ -1614,5 +1712,5 @@ var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
|
1614
1712
|
|
|
1615
1713
|
var historyCore = createBrowserHistory();
|
|
1616
1714
|
|
|
1617
|
-
export { ACCESS_TOKEN, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreModal, CoreRadio, CoreRange, CoreSelect, CoreTextArea, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_TIME_MIN_VALUE, LayoutContext, Loading, Login, NotFound, Role, api$1 as api, apiUpload$1 as apiUpload, getErrorMessage, historyCore, setAlert, setLoading, setMenuCollapse, setUser, store, useGoogleSignOut };
|
|
1715
|
+
export { ACCESS_TOKEN, BASE_URL, CommonDialog, ConfirmDialog, CoreButton, CoreInput$1 as CoreCheckbox, CoreError, CoreInput, CoreModal, CoreRadio, CoreRange, CoreSearch, CoreSelect, CoreTextArea, CustomAsyncSelect, CustomCreatable, CustomPagination, CustomSelect, CustomSelectOption, DATE_TIME_MIN_VALUE, LayoutContext, Loading, Login, NotFound, Role, api$1 as api, apiUpload$1 as apiUpload, getErrorMessage, historyCore, setAlert, setLoading, setMenuCollapse, setUser, store, useGoogleSignOut };
|
|
1618
1716
|
//# sourceMappingURL=index.modern.js.map
|