@linzjs/lui 16.2.9 → 16.5.0
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/CHANGELOG.md +21 -0
- package/dist/components/LuiBearingInput/LuiBearingInput.d.ts +4 -0
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +1 -0
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +5 -4
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -873,8 +873,7 @@ var LuiCheckboxInput = function (props) {
|
|
|
873
873
|
React__default.createElement("input", __assign({ className: clsx('LuiCheckboxInput-input'), id: id, type: "checkbox", value: props.value, onChange: props.onChange, checked: props.isChecked, disabled: props.isDisabled }, props.inputProps)),
|
|
874
874
|
React__default.createElement("span", { className: "LuiCheckboxInput-label" },
|
|
875
875
|
props.label,
|
|
876
|
-
' ',
|
|
877
|
-
React__default.createElement(LuiIcon, { name: "ic_check", size: "md", alt: "Check", className: "LuiCheckboxInput-labelCheck" }))),
|
|
876
|
+
React__default.createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck" }))),
|
|
878
877
|
props.error && (React__default.createElement(LuiError, { className: "LuiCheckboxInput", error: props.error }))));
|
|
879
878
|
};
|
|
880
879
|
|
|
@@ -1321,7 +1320,9 @@ var LuiBearingInput = function (props) {
|
|
|
1321
1320
|
}
|
|
1322
1321
|
var parsedBearing = parseBearing(props.value);
|
|
1323
1322
|
var internalError = validateBearing(parsedBearing);
|
|
1324
|
-
var error =
|
|
1323
|
+
var error = props.preferValidationError
|
|
1324
|
+
? props.validationError || internalError || null
|
|
1325
|
+
: internalError || props.validationError || null;
|
|
1325
1326
|
var showError = error !== null;
|
|
1326
1327
|
props.onValidate && props.onValidate(internalError);
|
|
1327
1328
|
return (React__default.createElement(React__default.Fragment, null,
|
|
@@ -1345,7 +1346,7 @@ var LuiBearingFormikInput = function (props) {
|
|
|
1345
1346
|
}
|
|
1346
1347
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1347
1348
|
React__default.createElement(Field, { name: props.name, validate: validateBearing }, function (renderProps) {
|
|
1348
|
-
return (React__default.createElement(LuiBearingInput, __assign({ name: props.name }, renderProps.field, { validationError: getIn(ctx === null || ctx === void 0 ? void 0 : ctx.errors, props.name), required: true, onValidate: onValidate, inputProps: props.inputProps })));
|
|
1349
|
+
return (React__default.createElement(LuiBearingInput, __assign({ name: props.name }, renderProps.field, { validationError: getIn(ctx === null || ctx === void 0 ? void 0 : ctx.errors, props.name), required: true, onValidate: onValidate, inputProps: props.inputProps, preferValidationError: props.preferValidationError })));
|
|
1349
1350
|
})));
|
|
1350
1351
|
};
|
|
1351
1352
|
|