@linzjs/lui 17.21.0 → 17.22.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/dist/lui.esm.js CHANGED
@@ -28195,7 +28195,13 @@ var LuiModal = function (props) {
28195
28195
  })),
28196
28196
  React__default.createElement("div", { ref: node, className: clsx('lui-modal lui-box-shadow', props.maxWidth && 'lui-max-width', props.headingText && 'lui-modal-no-padding', props.className) },
28197
28197
  props.headingText && (React__default.createElement(LuiModalHeader, { headingText: props.headingText, onClose: props.onClose })),
28198
- React__default.createElement("div", { className: clsx(props.headingText && 'lui-modal-container') }, props.children))));
28198
+ React__default.createElement("div", { className: clsx(props.headingText && 'lui-modal-container'), ref: function (element) {
28199
+ if (element &&
28200
+ !element.contains(element.ownerDocument.activeElement)) {
28201
+ var firstFocusableElement = element.querySelector('input,button');
28202
+ firstFocusableElement === null || firstFocusableElement === void 0 ? void 0 : firstFocusableElement.focus();
28203
+ }
28204
+ } }, props.children))));
28199
28205
  };
28200
28206
  var LuiAlertModal = function (props) {
28201
28207
  var materialIcon = getMaterialIconForLevel(props.level);
@@ -33085,6 +33091,11 @@ var LuiSidePanel = function (_a) {
33085
33091
  };
33086
33092
  var LuiSidePanelContainer = function (props) {
33087
33093
  var _a = props !== null && props !== void 0 ? props : {}, children = _a.children, onClose = _a.onClose, _b = _a.width, width = _b === void 0 ? '50%' : _b, _c = _a.top, top = _c === void 0 ? 60 : _c, _d = _a.closeBtnTitleAttr, closeBtnTitleAttr = _d === void 0 ? 'Close panel' : _d;
33094
+ useEscapeFunction(function () {
33095
+ if (onClose) {
33096
+ onClose();
33097
+ }
33098
+ });
33088
33099
  return (React__default.createElement("section", { style: {
33089
33100
  position: 'fixed',
33090
33101
  right: 0,