@linzjs/lui 23.9.0 → 23.10.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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [23.10.1](https://github.com/linz/lui/compare/v23.10.0...v23.10.1) (2025-08-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * don't resize on value change as it casues other issues ([#1245](https://github.com/linz/lui/issues/1245)) ([4cd682e](https://github.com/linz/lui/commit/4cd682e070e2d6eda3c79e3a0593100540726704))
7
+
8
+ # [23.10.0](https://github.com/linz/lui/compare/v23.9.0...v23.10.0) (2025-08-07)
9
+
10
+
11
+ ### Features
12
+
13
+ * **LuiAccordion:** expose the open state of lui accordion ([#1244](https://github.com/linz/lui/issues/1244)) ([d1f5acc](https://github.com/linz/lui/commit/d1f5accd007d250b7ed1bcdfd77b8c707e85de72))
14
+
1
15
  # [23.9.0](https://github.com/linz/lui/compare/v23.8.0...v23.9.0) (2025-08-04)
2
16
 
3
17
 
@@ -7,5 +7,6 @@ export interface ILuiAccordion {
7
7
  iconColor?: string;
8
8
  className?: string;
9
9
  style?: CSSProperties;
10
+ onToggleExpand?: (isOpen: boolean) => void;
10
11
  }
11
12
  export declare const LuiAccordion: (props: ILuiAccordion) => JSX.Element;
package/dist/index.js CHANGED
@@ -7223,11 +7223,12 @@ var LuiAutoExpandTextAreaInput = function (props) {
7223
7223
  // Set the height to match content
7224
7224
  element.style.height = height;
7225
7225
  }, []);
7226
+ // This is for when the cmoponent mounts, to make sure it's big when lots of test
7226
7227
  React.useEffect(function () {
7227
7228
  if (ref.current) {
7228
7229
  adjustHeight(ref.current);
7229
7230
  }
7230
- }, [props.value, adjustHeight]); // Re-run when value changes
7231
+ }, [adjustHeight]);
7231
7232
  // Since we can't directly use refs, we'll use a custom render approach
7232
7233
  // We'll handle the auto-resize via the onChange and onKeyUp events
7233
7234
  var customInputProps = __assign(__assign({}, props.inputProps), { onKeyUp: function (e) {
@@ -30052,7 +30053,7 @@ var css_248z$j = "/**\n @deprecated\n */\n/**\n @deprecated\n */\n/**\n @depr
30052
30053
  styleInject(css_248z$j);
30053
30054
 
30054
30055
  var LuiAccordion = function (props) {
30055
- var _a = props.expanded, expanded = _a === void 0 ? false : _a, heading = props.heading, children = props.children, _b = props.iconColor, iconColor = _b === void 0 ? '#017A76' : _b, className = props.className, _c = props.style, style = _c === void 0 ? {} : _c;
30056
+ var _a = props.expanded, expanded = _a === void 0 ? false : _a, heading = props.heading, children = props.children, _b = props.iconColor, iconColor = _b === void 0 ? '#017A76' : _b, className = props.className, _c = props.style, style = _c === void 0 ? {} : _c, onToggleExpand = props.onToggleExpand;
30056
30057
  var _d = React.useState(expanded), open = _d[0], setOpen = _d[1];
30057
30058
  React__default["default"].useEffect(function () {
30058
30059
  setOpen(expanded);
@@ -30061,6 +30062,9 @@ var LuiAccordion = function (props) {
30061
30062
  //Reason for event.preventDefault() : https://github.com/facebook/react/issues/15486
30062
30063
  event.preventDefault();
30063
30064
  setOpen(!open);
30065
+ if (onToggleExpand) {
30066
+ onToggleExpand(!open);
30067
+ }
30064
30068
  };
30065
30069
  return (React__default["default"].createElement("details", { style: style, className: clsx('lui-accordion', className), open: open },
30066
30070
  React__default["default"].createElement("summary", { onClick: toggle, "data-testid": "lui-accordion-summary-".concat(open) },