@deque/cauldron-react 6.20.2-canary.25b5a899 → 6.20.2-canary.72846ff6
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/lib/index.js +11 -11
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -4623,25 +4623,25 @@ var Popover = React.forwardRef(function (_a, ref) {
|
|
|
4623
4623
|
targetElement === null || targetElement === void 0 ? void 0 : targetElement.setAttribute('aria-haspopup', 'true');
|
|
4624
4624
|
}
|
|
4625
4625
|
}, [targetElement, id, show]);
|
|
4626
|
-
var
|
|
4626
|
+
var handleClosePopover = function () {
|
|
4627
|
+
isolator === null || isolator === void 0 ? void 0 : isolator.deactivate();
|
|
4628
|
+
if (show) {
|
|
4629
|
+
onClose();
|
|
4630
|
+
}
|
|
4631
|
+
};
|
|
4632
|
+
var handleClickOutside = React.useCallback(function (e) {
|
|
4627
4633
|
if (e.target === targetElement) {
|
|
4628
4634
|
return;
|
|
4629
4635
|
}
|
|
4630
4636
|
if (show) {
|
|
4631
4637
|
handleClosePopover();
|
|
4632
4638
|
}
|
|
4633
|
-
};
|
|
4639
|
+
}, [show, targetElement, handleClosePopover]);
|
|
4634
4640
|
var attachIsolator = function () {
|
|
4635
4641
|
if (popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current) {
|
|
4636
4642
|
setIsolator(new AriaIsolate(popoverRef === null || popoverRef === void 0 ? void 0 : popoverRef.current));
|
|
4637
4643
|
}
|
|
4638
4644
|
};
|
|
4639
|
-
var handleClosePopover = function () {
|
|
4640
|
-
isolator === null || isolator === void 0 ? void 0 : isolator.deactivate();
|
|
4641
|
-
if (show) {
|
|
4642
|
-
onClose();
|
|
4643
|
-
}
|
|
4644
|
-
};
|
|
4645
4645
|
useEscapeKey({
|
|
4646
4646
|
callback: handleClosePopover,
|
|
4647
4647
|
active: show
|
|
@@ -5056,10 +5056,10 @@ var ActionListSeparator = React.forwardRef(function (_a, ref) {
|
|
|
5056
5056
|
ActionListSeparator.displayName = 'ActionListSeparator';
|
|
5057
5057
|
|
|
5058
5058
|
var ActionListLinkItem = React.forwardRef(function (_a, ref) {
|
|
5059
|
-
var
|
|
5059
|
+
var className = _a.className;
|
|
5060
5060
|
// ActionListLinkItem should not be able to be "selected"
|
|
5061
5061
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
5062
|
-
_a.selected; var props = tslib.__rest(_a, ["
|
|
5062
|
+
_a.selected; var props = tslib.__rest(_a, ["className", "selected"]);
|
|
5063
5063
|
var contextRole = useActionListContext().role;
|
|
5064
5064
|
var listItemRole = React.useMemo(function () {
|
|
5065
5065
|
if (contextRole === 'menu') {
|
|
@@ -5071,7 +5071,7 @@ var ActionListLinkItem = React.forwardRef(function (_a, ref) {
|
|
|
5071
5071
|
}
|
|
5072
5072
|
return undefined;
|
|
5073
5073
|
}, [contextRole]);
|
|
5074
|
-
return (React__default["default"].createElement(ActionListItem, tslib.__assign({
|
|
5074
|
+
return (React__default["default"].createElement(ActionListItem, tslib.__assign({ ref: ref, className: classNames__default["default"]('Link ActionListLinkItem', className), as: "a", role: listItemRole, tabIndex: listItemRole === 'menuitem' ? -1 : undefined }, props)));
|
|
5075
5075
|
});
|
|
5076
5076
|
ActionListLinkItem.displayName = 'ActionListLinkItem';
|
|
5077
5077
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deque/cauldron-react",
|
|
3
|
-
"version": "6.20.2-canary.
|
|
3
|
+
"version": "6.20.2-canary.72846ff6",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "Fully accessible react components library for Deque Cauldron",
|
|
6
6
|
"homepage": "https://cauldron.dequelabs.com/",
|