@moda/om 21.6.12 → 21.7.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/dist/index.cjs.js CHANGED
@@ -12597,14 +12597,17 @@ var SelectableButton = function SelectableButton(_ref) {
12597
12597
  }, rest), /*#__PURE__*/React.createElement("span", null, children));
12598
12598
  };
12599
12599
 
12600
- var _excluded$5 = ["className", "title", "visible", "children", "onClose"];
12600
+ var _excluded$5 = ["className", "title", "visible", "children", "onClose", "autoFocus"];
12601
12601
  var SlidingPane = function SlidingPane(_ref) {
12602
12602
  var className = _ref.className,
12603
12603
  title = _ref.title,
12604
12604
  visible = _ref.visible,
12605
12605
  children = _ref.children,
12606
12606
  onClose = _ref.onClose,
12607
+ _ref$autoFocus = _ref.autoFocus,
12608
+ autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
12607
12609
  rest = _objectWithoutProperties(_ref, _excluded$5);
12610
+ var titleId = React.useId();
12608
12611
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
12609
12612
  className: classNames('SlidingPane__overlay', {
12610
12613
  'SlidingPane__overlay--active': visible
@@ -12612,9 +12615,13 @@ var SlidingPane = function SlidingPane(_ref) {
12612
12615
  onClick: onClose
12613
12616
  }), /*#__PURE__*/React.createElement(FocusOn, {
12614
12617
  enabled: visible,
12618
+ autoFocus: autoFocus,
12615
12619
  onClickOutside: onClose,
12616
12620
  onEscapeKey: onClose
12617
12621
  }, /*#__PURE__*/React.createElement("div", _extends$1({
12622
+ role: "dialog",
12623
+ "aria-modal": "true",
12624
+ "aria-labelledby": titleId,
12618
12625
  className: classNames('SlidingPane', className, {
12619
12626
  'SlidingPane--active': visible
12620
12627
  })
@@ -12624,6 +12631,7 @@ var SlidingPane = function SlidingPane(_ref) {
12624
12631
  direction: "horizontal",
12625
12632
  className: "SlidingPane__top"
12626
12633
  }, /*#__PURE__*/React.createElement(Text, {
12634
+ id: titleId,
12627
12635
  treatment: "h5",
12628
12636
  family: "serif"
12629
12637
  }, title), /*#__PURE__*/React.createElement(Clickable, {