@linzjs/lui 16.2.8 → 16.4.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 +2 -0
- package/dist/components/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +5 -3
- 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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,24 @@
|
|
|
1
|
+
# [16.4.0](https://github.com/linz/lui/compare/v16.3.0...v16.4.0) (2022-05-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **LuiBearingInput:** Allow validationError prop to optionally override internalError ([#659](https://github.com/linz/lui/issues/659)) ([55e016c](https://github.com/linz/lui/commit/55e016c568997b663e4d7b95708198bf648fd3bb))
|
|
7
|
+
|
|
8
|
+
# [16.3.0](https://github.com/linz/lui/compare/v16.2.9...v16.3.0) (2022-05-01)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **LuiCheckboxInput:** Adds indeterminate state for checkbox ([#656](https://github.com/linz/lui/issues/656)) ([e55d806](https://github.com/linz/lui/commit/e55d8061e2d9e04fdde1c80fadca3c77bf9d7436))
|
|
14
|
+
|
|
15
|
+
## [16.2.9](https://github.com/linz/lui/compare/v16.2.8...v16.2.9) (2022-04-25)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* **LuiShadow:** LuiShadow will be exported in the index.tsx ([#654](https://github.com/linz/lui/issues/654)) ([b188613](https://github.com/linz/lui/commit/b18861316e693138880177b0a1311b9effd7e3c4))
|
|
21
|
+
|
|
1
22
|
## [16.2.8](https://github.com/linz/lui/compare/v16.2.7...v16.2.8) (2022-04-13)
|
|
2
23
|
|
|
3
24
|
|
|
@@ -9,6 +9,8 @@ interface LuiBearingInputProps {
|
|
|
9
9
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
10
|
validationError?: string;
|
|
11
11
|
onValidate?: (error: string | null) => void;
|
|
12
|
+
/** If true, validationError prop takes precedence over the internalError value. */
|
|
13
|
+
preferValidationError?: boolean;
|
|
12
14
|
}
|
|
13
15
|
export declare const LuiBearingInput: React.FC<LuiBearingInputProps & LuiCommonInputProps>;
|
|
14
16
|
interface LuiBearingFormikInputProps {
|
|
@@ -5,6 +5,7 @@ export interface LuiCheckboxProps {
|
|
|
5
5
|
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
6
|
isChecked: boolean;
|
|
7
7
|
isDisabled?: boolean;
|
|
8
|
+
isIndeterminate?: boolean;
|
|
8
9
|
error?: string;
|
|
9
10
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
10
11
|
className?: string;
|
package/dist/index.d.ts
CHANGED
|
@@ -49,3 +49,4 @@ export { LOLCommonDrawerMenu, LOLCommonDrawerMenuAfterLinks, LOLDrawerMenu, } fr
|
|
|
49
49
|
export { LuiTooltip, ILuiTooltipProperties, } from './components/LuiTooltip/LuiTooltip';
|
|
50
50
|
export * from './hooks';
|
|
51
51
|
export { LuiBadge } from './components/LuiBadge/LuiBadge';
|
|
52
|
+
export { LuiShadow } from './components/LuiShadow/LuiShadow';
|
package/dist/index.js
CHANGED
|
@@ -900,8 +900,7 @@ var LuiCheckboxInput = function (props) {
|
|
|
900
900
|
React__default["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)),
|
|
901
901
|
React__default["default"].createElement("span", { className: "LuiCheckboxInput-label" },
|
|
902
902
|
props.label,
|
|
903
|
-
' ',
|
|
904
|
-
React__default["default"].createElement(LuiIcon, { name: "ic_check", size: "md", alt: "Check", className: "LuiCheckboxInput-labelCheck" }))),
|
|
903
|
+
React__default["default"].createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck" }))),
|
|
905
904
|
props.error && (React__default["default"].createElement(LuiError, { className: "LuiCheckboxInput", error: props.error }))));
|
|
906
905
|
};
|
|
907
906
|
|
|
@@ -1348,7 +1347,9 @@ var LuiBearingInput = function (props) {
|
|
|
1348
1347
|
}
|
|
1349
1348
|
var parsedBearing = parseBearing(props.value);
|
|
1350
1349
|
var internalError = validateBearing(parsedBearing);
|
|
1351
|
-
var error =
|
|
1350
|
+
var error = props.preferValidationError
|
|
1351
|
+
? props.validationError || internalError || null
|
|
1352
|
+
: internalError || props.validationError || null;
|
|
1352
1353
|
var showError = error !== null;
|
|
1353
1354
|
props.onValidate && props.onValidate(internalError);
|
|
1354
1355
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
@@ -59894,6 +59895,7 @@ exports.LuiMiniSpinner = LuiMiniSpinner;
|
|
|
59894
59895
|
exports.LuiModal = LuiModal;
|
|
59895
59896
|
exports.LuiRadioInput = LuiRadioInput;
|
|
59896
59897
|
exports.LuiSelectInput = LuiSelectInput;
|
|
59898
|
+
exports.LuiShadow = LuiShadow;
|
|
59897
59899
|
exports.LuiStaticMessage = LuiStaticMessage;
|
|
59898
59900
|
exports.LuiStatusSpinner = LuiStatusSpinner;
|
|
59899
59901
|
exports.LuiTab = LuiTab;
|