@linzjs/lui 23.6.0 → 23.6.1
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 +7 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +38 -1
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [23.6.1](https://github.com/linz/lui/compare/v23.6.0...v23.6.1) (2025-07-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* missed export ([#1236](https://github.com/linz/lui/issues/1236)) ([5cb08c0](https://github.com/linz/lui/commit/5cb08c048f85a5a994cf0029dbeb6e8fec3cf90d))
|
|
7
|
+
|
|
1
8
|
# [23.6.0](https://github.com/linz/lui/compare/v23.5.0...v23.6.0) (2025-07-07)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ export { LuiCheckboxInput } from './components/LuiFormElements/LuiCheckboxInput/
|
|
|
20
20
|
export { LuiFileInputBox } from './components/LuiFormElements/LuiFileInputBox/LuiFileInputBox';
|
|
21
21
|
export { LuiSelectInput } from './components/LuiFormElements/LuiSelectInput/LuiSelectInput';
|
|
22
22
|
export { LuiTextAreaInput } from './components/LuiFormElements/LuiTextAreaInput/LuiTextAreaInput';
|
|
23
|
+
export { LuiAutoExpandTextAreaInput } from './components/LuiFormElements/LuiTextAreaInput/LuiAutoExpandTextAreaInput';
|
|
23
24
|
export { LuiTextInput } from './components/LuiFormElements/LuiTextInput/LuiTextInput';
|
|
24
25
|
export { LuiDateInput } from './components/LuiFormElements/LuiDateInput/LuiDateInput';
|
|
25
26
|
export { LuiMoneyInput } from './components/LuiFormElements/LuiMoneyInput/LuiMoneyInput';
|
package/dist/index.js
CHANGED
|
@@ -7217,6 +7217,43 @@ var LuiTextAreaInput = React__default["default"].forwardRef(function (props, ref
|
|
|
7217
7217
|
props.warning))));
|
|
7218
7218
|
});
|
|
7219
7219
|
|
|
7220
|
+
// Example taken from https://codesandbox.io/p/github/philals/auto-size-input/main?file=%2Fsrc%2FApp.tsx%3A54%2C53&import=true&workspaceId=ws_HCohVkSSrGceH2wAjz2JrW
|
|
7221
|
+
// Note soon this can be replaced by the new CSS class field-sizing (https://developer.mozilla.org/en-US/docs/Web/CSS/field-sizing)h
|
|
7222
|
+
var LuiAutoExpandTextAreaInput = function (props) {
|
|
7223
|
+
var _a;
|
|
7224
|
+
var handleInputChange = function (e) {
|
|
7225
|
+
if (props.onChange) {
|
|
7226
|
+
props.onChange(e);
|
|
7227
|
+
}
|
|
7228
|
+
adjustHeight(e.target);
|
|
7229
|
+
};
|
|
7230
|
+
var ref = React.useRef(null);
|
|
7231
|
+
var adjustHeight = React.useCallback(function (element) {
|
|
7232
|
+
// Reset height to auto to get proper scrollHeight
|
|
7233
|
+
element.style.height = 'auto';
|
|
7234
|
+
var height = "".concat(element.scrollHeight, "px");
|
|
7235
|
+
// Set the height to match content
|
|
7236
|
+
element.style.height = height;
|
|
7237
|
+
}, []);
|
|
7238
|
+
React.useEffect(function () {
|
|
7239
|
+
if (ref.current) {
|
|
7240
|
+
adjustHeight(ref.current);
|
|
7241
|
+
}
|
|
7242
|
+
}, [props.value, adjustHeight]); // Re-run when value changes
|
|
7243
|
+
// Since we can't directly use refs, we'll use a custom render approach
|
|
7244
|
+
// We'll handle the auto-resize via the onChange and onKeyUp events
|
|
7245
|
+
var customInputProps = __assign(__assign({}, props.inputProps), { onKeyUp: function (e) {
|
|
7246
|
+
var _a;
|
|
7247
|
+
adjustHeight(e.currentTarget);
|
|
7248
|
+
if ((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.onKeyUp) {
|
|
7249
|
+
props.inputProps.onKeyUp(e);
|
|
7250
|
+
}
|
|
7251
|
+
}, style: __assign({ resize: 'none', overflow: 'hidden', maxHeight: '500px',
|
|
7252
|
+
// boxSizing: 'border-box',
|
|
7253
|
+
minHeight: '1px' }, (_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.style) });
|
|
7254
|
+
return (React__default["default"].createElement(LuiTextAreaInput, __assign({}, props, { rows: 1, onChange: handleInputChange, inputProps: customInputProps, ref: ref })));
|
|
7255
|
+
};
|
|
7256
|
+
|
|
7220
7257
|
var LuiDateInput = React__default["default"].forwardRef(function (_a, ref) {
|
|
7221
7258
|
var inputProps = _a.inputProps, rest = __rest(_a, ["inputProps"]);
|
|
7222
7259
|
var mapped = __assign({ inputProps: __assign(__assign({}, inputProps), { type: 'date' }) }, rest);
|
|
@@ -35359,6 +35396,7 @@ exports.LuiAlertModal = LuiAlertModal;
|
|
|
35359
35396
|
exports.LuiAlertModalButtons = LuiAlertModalButtons;
|
|
35360
35397
|
exports.LuiAlertModalV2 = LuiAlertModalV2;
|
|
35361
35398
|
exports.LuiAppFooterSml = LuiAppFooterSml;
|
|
35399
|
+
exports.LuiAutoExpandTextAreaInput = LuiAutoExpandTextAreaInput;
|
|
35362
35400
|
exports.LuiBadge = LuiBadge;
|
|
35363
35401
|
exports.LuiBanner = LuiBanner;
|
|
35364
35402
|
exports.LuiBannerContent = LuiBannerContent;
|