@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.esm.js
CHANGED
|
@@ -12577,14 +12577,17 @@ var SelectableButton = function SelectableButton(_ref) {
|
|
|
12577
12577
|
}, rest), /*#__PURE__*/React__default.createElement("span", null, children));
|
|
12578
12578
|
};
|
|
12579
12579
|
|
|
12580
|
-
var _excluded$5 = ["className", "title", "visible", "children", "onClose"];
|
|
12580
|
+
var _excluded$5 = ["className", "title", "visible", "children", "onClose", "autoFocus"];
|
|
12581
12581
|
var SlidingPane = function SlidingPane(_ref) {
|
|
12582
12582
|
var className = _ref.className,
|
|
12583
12583
|
title = _ref.title,
|
|
12584
12584
|
visible = _ref.visible,
|
|
12585
12585
|
children = _ref.children,
|
|
12586
12586
|
onClose = _ref.onClose,
|
|
12587
|
+
_ref$autoFocus = _ref.autoFocus,
|
|
12588
|
+
autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,
|
|
12587
12589
|
rest = _objectWithoutProperties(_ref, _excluded$5);
|
|
12590
|
+
var titleId = useId();
|
|
12588
12591
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
12589
12592
|
className: classNames('SlidingPane__overlay', {
|
|
12590
12593
|
'SlidingPane__overlay--active': visible
|
|
@@ -12592,9 +12595,13 @@ var SlidingPane = function SlidingPane(_ref) {
|
|
|
12592
12595
|
onClick: onClose
|
|
12593
12596
|
}), /*#__PURE__*/React__default.createElement(FocusOn, {
|
|
12594
12597
|
enabled: visible,
|
|
12598
|
+
autoFocus: autoFocus,
|
|
12595
12599
|
onClickOutside: onClose,
|
|
12596
12600
|
onEscapeKey: onClose
|
|
12597
12601
|
}, /*#__PURE__*/React__default.createElement("div", _extends$1({
|
|
12602
|
+
role: "dialog",
|
|
12603
|
+
"aria-modal": "true",
|
|
12604
|
+
"aria-labelledby": titleId,
|
|
12598
12605
|
className: classNames('SlidingPane', className, {
|
|
12599
12606
|
'SlidingPane--active': visible
|
|
12600
12607
|
})
|
|
@@ -12604,6 +12611,7 @@ var SlidingPane = function SlidingPane(_ref) {
|
|
|
12604
12611
|
direction: "horizontal",
|
|
12605
12612
|
className: "SlidingPane__top"
|
|
12606
12613
|
}, /*#__PURE__*/React__default.createElement(Text, {
|
|
12614
|
+
id: titleId,
|
|
12607
12615
|
treatment: "h5",
|
|
12608
12616
|
family: "serif"
|
|
12609
12617
|
}, title), /*#__PURE__*/React__default.createElement(Clickable, {
|