@linzjs/lui 18.6.0 → 18.7.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 +14 -0
- package/dist/components/LuiFormElements/LuiSelectInput/LuiSelectInput.d.ts +1 -0
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/lui.css +20 -5
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +6 -3
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiFormElements/LuiSelectInput/LuiSelectInput.scss +35 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [18.7.0](https://github.com/linz/lui/compare/v18.6.1...v18.7.0) (2023-08-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add warning style for select input ([#986](https://github.com/linz/lui/issues/986)) ([5fa14af](https://github.com/linz/lui/commit/5fa14afa4bcb78c6486cfb580961648941d3ecce))
|
|
7
|
+
|
|
8
|
+
## [18.6.1](https://github.com/linz/lui/compare/v18.6.0...v18.6.1) (2023-08-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **LuiMultiSwitch:** Fix controlled props warning for read-only text input ([#985](https://github.com/linz/lui/issues/985)) ([ac718ee](https://github.com/linz/lui/commit/ac718eeaf08f1e58107098d44ed7497c6b42963b))
|
|
14
|
+
|
|
1
15
|
# [18.6.0](https://github.com/linz/lui/compare/v18.5.1...v18.6.0) (2023-08-14)
|
|
2
16
|
|
|
3
17
|
|
package/dist/index.js
CHANGED
|
@@ -28393,7 +28393,7 @@ var extensionsAsHumanReadableList = function (extensions) {
|
|
|
28393
28393
|
var LuiSelectInput = function (props) {
|
|
28394
28394
|
var _a, _b;
|
|
28395
28395
|
var id = useGenerateOrDefaultId((_a = props.selectProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
28396
|
-
return (React__default["default"].createElement("div", { className: clsx('LuiSelect', ((_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.disabled) ? 'isDisabled' : '', props.error ? 'hasError' : '') },
|
|
28396
|
+
return (React__default["default"].createElement("div", { className: clsx('LuiSelect', ((_b = props.selectProps) === null || _b === void 0 ? void 0 : _b.disabled) ? 'isDisabled' : '', props.error ? 'hasError' : '', props.warning ? 'hasWarning' : '') },
|
|
28397
28397
|
React__default["default"].createElement("label", { htmlFor: id, className: "LuiSelect-label" },
|
|
28398
28398
|
props.mandatory && React__default["default"].createElement("span", { className: "LuiSelect-mandatory" }, "*"),
|
|
28399
28399
|
React__default["default"].createElement("span", { className: clsx('LuiSelect-label-text', props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
|
|
@@ -28407,7 +28407,10 @@ var LuiSelectInput = function (props) {
|
|
|
28407
28407
|
React__default["default"].createElement(LuiIcon, { alt: 'Error', name: "ic_keyboard_arrow_down", className: "LuiSelect-chevron-icon", size: "md" })),
|
|
28408
28408
|
props.error && (React__default["default"].createElement("span", { className: "LuiSelect-error" },
|
|
28409
28409
|
React__default["default"].createElement(LuiIcon, { alt: 'Error', name: "ic_error", className: "LuiSelect-error-icon", size: "sm", status: "error" }),
|
|
28410
|
-
props.error))
|
|
28410
|
+
props.error)),
|
|
28411
|
+
props.warning && (React__default["default"].createElement("span", { className: "LuiSelect-warning" },
|
|
28412
|
+
React__default["default"].createElement(LuiIcon, { alt: 'Warning', name: "ic_warning", className: "LuiSelect-warning-icon", size: "sm", status: "warning" }),
|
|
28413
|
+
props.warning)))));
|
|
28411
28414
|
};
|
|
28412
28415
|
|
|
28413
28416
|
var LuiTextAreaInput = function (props) {
|
|
@@ -67865,7 +67868,7 @@ var LuiMultiSwitch = function (_a) {
|
|
|
67865
67868
|
select(newSelectedIndex).then();
|
|
67866
67869
|
};
|
|
67867
67870
|
return (React__default["default"].createElement("div", { className: clsx('LuiMultiSwitch', className), role: 'radiogroup', "data-testid": props['data-testid'] },
|
|
67868
|
-
React__default["default"].createElement("input", { ref: inputRef, name: id.current, type: 'text', value: selectedIndex, autoFocus: autoFocus, onKeyUp: function (e) {
|
|
67871
|
+
React__default["default"].createElement("input", { ref: inputRef, readOnly: true, name: id.current, type: 'text', value: selectedIndex, autoFocus: autoFocus, onKeyUp: function (e) {
|
|
67869
67872
|
e.key === 'ArrowLeft' && selectOffset(-1);
|
|
67870
67873
|
e.key === 'ArrowRight' && selectOffset(1);
|
|
67871
67874
|
e.key === ' ' && selectOffset(1, true);
|