@ballistix.digital/react-components 0.4.117 → 0.4.119
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/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -755,7 +755,6 @@ var DividerLayout = function (props) {
|
|
|
755
755
|
return result;
|
|
756
756
|
};
|
|
757
757
|
var styles = handleGenerateStyle();
|
|
758
|
-
console.log(styles.body);
|
|
759
758
|
return (jsxRuntime.jsxs("div", { className: styles.container, children: [jsxRuntime.jsx("div", { className: styles.head, "aria-hidden": "true", children: jsxRuntime.jsx("div", { className: styles.line }) }), jsxRuntime.jsx("div", { className: styles.body, children: jsxRuntime.jsx("div", { className: styles.content, children: children }) })] }));
|
|
760
759
|
};
|
|
761
760
|
|
|
@@ -4484,9 +4483,9 @@ function reducer(state, action) {
|
|
|
4484
4483
|
function noop() {}
|
|
4485
4484
|
|
|
4486
4485
|
var FileInputGroupForm = function (props) {
|
|
4487
|
-
var _a = props.name, name = _a === void 0 ? 'multiple-file-input' : _a, label = props.label, description = props.description, required = props.required, value = props.value,
|
|
4486
|
+
var _a = props.name, name = _a === void 0 ? 'multiple-file-input' : _a, label = props.label, description = props.description, required = props.required, value = props.value, max = props.max, error = props.error, isDisabled = props.isDisabled, _b = props.isRequired, isRequired = _b === void 0 ? false : _b, _c = props.isTouched, isTouched = _c === void 0 ? false : _c, children = props.children, onChange = props.onChange, onBlur = props.onBlur, stylesOverrides = props.styles;
|
|
4488
4487
|
var isValid = error === undefined;
|
|
4489
|
-
var
|
|
4488
|
+
var _d = React.useState(false), isDragging = _d[0], setIsDragging = _d[1];
|
|
4490
4489
|
var handleChangeInput = React.useCallback(function (file) {
|
|
4491
4490
|
var reader = new FileReader();
|
|
4492
4491
|
reader === null || reader === void 0 ? void 0 : reader.readAsDataURL(file);
|
|
@@ -4498,7 +4497,8 @@ var FileInputGroupForm = function (props) {
|
|
|
4498
4497
|
blob: reader === null || reader === void 0 ? void 0 : reader.result,
|
|
4499
4498
|
file: file,
|
|
4500
4499
|
};
|
|
4501
|
-
|
|
4500
|
+
// eg. 10 * 1024 * 1024
|
|
4501
|
+
if (max && max * 1024 * 1024 < result.size) {
|
|
4502
4502
|
return;
|
|
4503
4503
|
}
|
|
4504
4504
|
onChange(result);
|
|
@@ -4508,7 +4508,7 @@ var FileInputGroupForm = function (props) {
|
|
|
4508
4508
|
setIsDragging(false);
|
|
4509
4509
|
handleChangeInput(files[0]);
|
|
4510
4510
|
}, [handleChangeInput]);
|
|
4511
|
-
var
|
|
4511
|
+
var _e = useDropzone({
|
|
4512
4512
|
onDrop: onDrop,
|
|
4513
4513
|
multiple: false,
|
|
4514
4514
|
onError: function () {
|
|
@@ -4521,7 +4521,7 @@ var FileInputGroupForm = function (props) {
|
|
|
4521
4521
|
onDragLeave: function () {
|
|
4522
4522
|
setIsDragging(false);
|
|
4523
4523
|
},
|
|
4524
|
-
}), getRootProps =
|
|
4524
|
+
}), getRootProps = _e.getRootProps, getInputProps = _e.getInputProps;
|
|
4525
4525
|
var handleGenerateStyle = function () {
|
|
4526
4526
|
var result = deepCopyObject(styles.base);
|
|
4527
4527
|
var keys = calculateNestedKeys(styles.base);
|