@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.esm.js
CHANGED
|
@@ -753,7 +753,6 @@ var DividerLayout = function (props) {
|
|
|
753
753
|
return result;
|
|
754
754
|
};
|
|
755
755
|
var styles = handleGenerateStyle();
|
|
756
|
-
console.log(styles.body);
|
|
757
756
|
return (jsxs("div", { className: styles.container, children: [jsx("div", { className: styles.head, "aria-hidden": "true", children: jsx("div", { className: styles.line }) }), jsx("div", { className: styles.body, children: jsx("div", { className: styles.content, children: children }) })] }));
|
|
758
757
|
};
|
|
759
758
|
|
|
@@ -4482,9 +4481,9 @@ function reducer(state, action) {
|
|
|
4482
4481
|
function noop() {}
|
|
4483
4482
|
|
|
4484
4483
|
var FileInputGroupForm = function (props) {
|
|
4485
|
-
var _a = props.name, name = _a === void 0 ? 'multiple-file-input' : _a, label = props.label, description = props.description, required = props.required, value = props.value,
|
|
4484
|
+
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;
|
|
4486
4485
|
var isValid = error === undefined;
|
|
4487
|
-
var
|
|
4486
|
+
var _d = useState(false), isDragging = _d[0], setIsDragging = _d[1];
|
|
4488
4487
|
var handleChangeInput = useCallback(function (file) {
|
|
4489
4488
|
var reader = new FileReader();
|
|
4490
4489
|
reader === null || reader === void 0 ? void 0 : reader.readAsDataURL(file);
|
|
@@ -4496,7 +4495,8 @@ var FileInputGroupForm = function (props) {
|
|
|
4496
4495
|
blob: reader === null || reader === void 0 ? void 0 : reader.result,
|
|
4497
4496
|
file: file,
|
|
4498
4497
|
};
|
|
4499
|
-
|
|
4498
|
+
// eg. 10 * 1024 * 1024
|
|
4499
|
+
if (max && max * 1024 * 1024 < result.size) {
|
|
4500
4500
|
return;
|
|
4501
4501
|
}
|
|
4502
4502
|
onChange(result);
|
|
@@ -4506,7 +4506,7 @@ var FileInputGroupForm = function (props) {
|
|
|
4506
4506
|
setIsDragging(false);
|
|
4507
4507
|
handleChangeInput(files[0]);
|
|
4508
4508
|
}, [handleChangeInput]);
|
|
4509
|
-
var
|
|
4509
|
+
var _e = useDropzone({
|
|
4510
4510
|
onDrop: onDrop,
|
|
4511
4511
|
multiple: false,
|
|
4512
4512
|
onError: function () {
|
|
@@ -4519,7 +4519,7 @@ var FileInputGroupForm = function (props) {
|
|
|
4519
4519
|
onDragLeave: function () {
|
|
4520
4520
|
setIsDragging(false);
|
|
4521
4521
|
},
|
|
4522
|
-
}), getRootProps =
|
|
4522
|
+
}), getRootProps = _e.getRootProps, getInputProps = _e.getInputProps;
|
|
4523
4523
|
var handleGenerateStyle = function () {
|
|
4524
4524
|
var result = deepCopyObject(styles.base);
|
|
4525
4525
|
var keys = calculateNestedKeys(styles.base);
|