@deque/cauldron-react 6.9.0-canary.453f7da6 → 6.9.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.
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { Component } from 'react';
2
2
  export interface OptionsMenuAlignmentProps {
3
3
  align?: 'left' | 'right';
4
4
  }
@@ -19,6 +19,21 @@ export interface OptionsMenuProps extends OptionsMenuAlignmentProps {
19
19
  show?: boolean;
20
20
  children: React.ReactNode;
21
21
  }
22
+ interface OptionsMenuState {
23
+ show: boolean;
24
+ }
22
25
  type AllOptionsMenuProps = OptionsMenuProps & React.HTMLAttributes<HTMLLIElement>;
23
- declare const OptionsMenu: ({ children, className, closeOnSelect, menuRef, trigger, align, onClose, onSelect, ...other }: AllOptionsMenuProps) => React.JSX.Element;
24
- export default OptionsMenu;
26
+ export default class OptionsMenu extends Component<AllOptionsMenuProps, OptionsMenuState> {
27
+ static defaultProps: {
28
+ onClose: () => void;
29
+ onSelect: () => void;
30
+ align: string;
31
+ };
32
+ private triggerRef;
33
+ constructor(props: AllOptionsMenuProps);
34
+ toggleMenu: (event: React.MouseEvent<HTMLButtonElement>) => void;
35
+ handleClose: () => void;
36
+ handleTriggerKeyDown: (event: React.KeyboardEvent<HTMLElement>) => void;
37
+ render(): React.JSX.Element;
38
+ }
39
+ export {};
@@ -5,5 +5,5 @@ export interface OptionsMenuItemProps extends Pick<React.HTMLAttributes<HTMLLIEl
5
5
  menuItemRef?: React.Ref<HTMLLIElement>;
6
6
  onSelect: (e: React.MouseEvent<HTMLElement>) => void;
7
7
  }
8
- declare const OptionsMenuItem: React.ForwardRefExoticComponent<OptionsMenuItemProps & React.RefAttributes<HTMLLIElement>>;
9
- export default OptionsMenuItem;
8
+ declare const _default: React.ForwardRefExoticComponent<OptionsMenuItemProps & React.RefAttributes<HTMLLIElement>>;
9
+ export default _default;
@@ -3,5 +3,24 @@ import { OptionsMenuProps } from './OptionsMenu';
3
3
  export interface OptionsMenuListProps extends Omit<OptionsMenuProps, 'trigger'> {
4
4
  className?: string;
5
5
  }
6
- declare const OptionsMenuList: ({ children, menuRef, show, className, onClose, onSelect, closeOnSelect, ...other }: OptionsMenuListProps) => React.JSX.Element;
7
- export default OptionsMenuList;
6
+ interface OptionsMenuListState {
7
+ itemIndex: number;
8
+ }
9
+ export default class OptionsMenuList extends React.Component<OptionsMenuListProps, OptionsMenuListState> {
10
+ static defaultProps: {
11
+ closeOnSelect: boolean;
12
+ onSelect: () => void;
13
+ onClose: () => void;
14
+ };
15
+ private itemRefs;
16
+ private menuRef;
17
+ constructor(props: OptionsMenuProps);
18
+ componentDidUpdate(prevProps: OptionsMenuProps, prevState: OptionsMenuListState): void;
19
+ private handleKeyDown;
20
+ private handleClick;
21
+ private handleClickOutside;
22
+ componentDidMount(): void;
23
+ componentWillUnmount(): void;
24
+ render(): React.JSX.Element;
25
+ }
26
+ export {};
package/lib/index.js CHANGED
@@ -841,14 +841,14 @@ function ClickOutsideListener(_a, ref) {
841
841
  };
842
842
  React.useEffect(function () {
843
843
  typeof mouseEvent === 'string' &&
844
- document.addEventListener(mouseEvent, handleEvent, true);
844
+ document.addEventListener(mouseEvent, handleEvent);
845
845
  typeof touchEvent === 'string' &&
846
- document.addEventListener(touchEvent, handleEvent, true);
846
+ document.addEventListener(touchEvent, handleEvent);
847
847
  return function () {
848
848
  typeof mouseEvent === 'string' &&
849
- document.removeEventListener(mouseEvent, handleEvent, true);
849
+ document.removeEventListener(mouseEvent, handleEvent);
850
850
  typeof touchEvent === 'string' &&
851
- document.removeEventListener(touchEvent, handleEvent, true);
851
+ document.removeEventListener(touchEvent, handleEvent);
852
852
  };
853
853
  }, [mouseEvent, touchEvent]);
854
854
  return !children
@@ -859,174 +859,216 @@ ClickOutsideListener.displayName = 'ClickOutsideListener';
859
859
  var ClickOutsideListener$1 = React__default["default"].forwardRef(ClickOutsideListener);
860
860
 
861
861
  var _a$2 = tslib.__read([38, 40, 9, 13, 32, 27], 6), up = _a$2[0], down$1 = _a$2[1], tab = _a$2[2], enter = _a$2[3], space = _a$2[4], esc = _a$2[5];
862
- var OptionsMenuList = function (_a) {
863
- var children = _a.children, menuRef = _a.menuRef, show = _a.show, className = _a.className, _b = _a.onClose, onClose = _b === void 0 ? function () { } : _b, // eslint-disable-line @typescript-eslint/no-empty-function
864
- _c = _a.onSelect, // eslint-disable-line @typescript-eslint/no-empty-function
865
- onSelect = _c === void 0 ? function () { } : _c, // eslint-disable-line @typescript-eslint/no-empty-function
866
- _d = _a.closeOnSelect, // eslint-disable-line @typescript-eslint/no-empty-function
867
- closeOnSelect = _d === void 0 ? true : _d, other = tslib.__rest(_a, ["children", "menuRef", "show", "className", "onClose", "onSelect", "closeOnSelect"]);
868
- var _e = tslib.__read(React.useState(0), 2), itemIndex = _e[0], setItemIndex = _e[1];
869
- var itemRefs = React.useRef([]);
870
- var menuRefInternal = React.useRef(null);
871
- var triggerRef = React.useRef(null);
872
- React.useEffect(function () {
873
- var _a;
874
- if (show && itemRefs.current.length) {
875
- // handles opens
876
- triggerRef.current = document.activeElement;
877
- (_a = itemRefs.current[0]) === null || _a === void 0 ? void 0 : _a.focus();
878
- setItemIndex(0);
879
- }
880
- if (!show) {
881
- triggerRef.current = null;
882
- }
883
- }, [show]);
884
- React.useEffect(function () {
885
- var _a;
886
- (_a = itemRefs.current[itemIndex]) === null || _a === void 0 ? void 0 : _a.focus();
887
- }, [itemIndex]);
888
- var handleKeyDown = function (e) {
889
- var which = e.which, target = e.target;
890
- switch (which) {
891
- case up:
892
- case down$1: {
893
- var itemCount = itemRefs.current.length;
894
- var newIndex = which === 38 ? itemIndex - 1 : itemIndex + 1;
895
- // circularity
896
- if (newIndex === -1) {
897
- newIndex = itemCount - 1;
862
+ var OptionsMenuList = /** @class */ (function (_super) {
863
+ tslib.__extends(OptionsMenuList, _super);
864
+ function OptionsMenuList(props) {
865
+ var _this = _super.call(this, props) || this;
866
+ _this.handleKeyDown = function (e) {
867
+ var _a = _this.props.onClose, onClose = _a === void 0 ? OptionsMenuList.defaultProps.onClose : _a;
868
+ var which = e.which, target = e.target;
869
+ switch (which) {
870
+ case up:
871
+ case down$1: {
872
+ var itemIndex = _this.state.itemIndex;
873
+ var itemCount = _this.itemRefs.length;
874
+ var newIndex = which === 38 ? itemIndex - 1 : itemIndex + 1;
875
+ // circularity
876
+ if (newIndex === -1) {
877
+ newIndex = itemCount - 1;
878
+ }
879
+ else if (newIndex === itemCount) {
880
+ newIndex = 0;
881
+ }
882
+ e.preventDefault();
883
+ _this.setState({
884
+ itemIndex: newIndex
885
+ });
886
+ break;
898
887
  }
899
- else if (newIndex === itemCount) {
900
- newIndex = 0;
888
+ case esc:
889
+ onClose();
890
+ break;
891
+ case enter:
892
+ case space:
893
+ e.preventDefault();
894
+ target.click();
895
+ break;
896
+ case tab:
897
+ e.preventDefault();
898
+ onClose();
899
+ }
900
+ };
901
+ _this.handleClick = function (e) {
902
+ var _a = _this, menuRef = _a.menuRef, props = _a.props;
903
+ var onSelect = props.onSelect, _b = props.onClose, onClose = _b === void 0 ? OptionsMenuList.defaultProps.onClose : _b;
904
+ if (menuRef && menuRef.contains(e.target)) {
905
+ if (!e.defaultPrevented && props.closeOnSelect) {
906
+ onClose();
901
907
  }
902
- e.preventDefault();
903
- setItemIndex(newIndex);
904
- break;
908
+ onSelect(e);
909
+ }
910
+ var link = e.target.querySelector('a');
911
+ if (link) {
912
+ link.click();
905
913
  }
906
- case esc:
907
- onClose();
908
- break;
909
- case enter:
910
- case space:
911
- e.preventDefault();
912
- target.click();
913
- break;
914
- case tab:
915
- e.preventDefault();
916
- onClose();
917
- }
918
- };
919
- React.useEffect(function () {
920
- var currentMenuRef = menuRefInternal.current;
921
- currentMenuRef === null || currentMenuRef === void 0 ? void 0 : currentMenuRef.addEventListener('keydown', handleKeyDown);
922
- return function () {
923
- currentMenuRef === null || currentMenuRef === void 0 ? void 0 : currentMenuRef.removeEventListener('keydown', handleKeyDown);
924
914
  };
925
- }, [handleKeyDown]);
926
- var handleClick = function (e) {
927
- if (menuRefInternal.current &&
928
- menuRefInternal.current.contains(e.target)) {
929
- if (!e.defaultPrevented && closeOnSelect) {
915
+ _this.handleClickOutside = function () {
916
+ var _a = _this.props, _b = _a.onClose, onClose = _b === void 0 ? OptionsMenuList.defaultProps.onClose : _b, show = _a.show;
917
+ if (show) {
930
918
  onClose();
931
919
  }
932
- onSelect(e);
920
+ };
921
+ _this.itemRefs = [];
922
+ _this.state = { itemIndex: 0 };
923
+ return _this;
924
+ }
925
+ OptionsMenuList.prototype.componentDidUpdate = function (prevProps, prevState) {
926
+ var _a, _b;
927
+ var itemIndex = this.state.itemIndex;
928
+ var show = this.props.show;
929
+ if (!prevProps.show && show && this.itemRefs.length) {
930
+ // handles opens
931
+ (_a = this.itemRefs[0]) === null || _a === void 0 ? void 0 : _a.focus();
932
+ this.setState({ itemIndex: 0 });
933
933
  }
934
- var link = e.target.querySelector('a');
935
- if (link) {
936
- link.click();
934
+ else if (prevState.itemIndex !== itemIndex) {
935
+ // handle up/down arrows
936
+ (_b = this.itemRefs[itemIndex]) === null || _b === void 0 ? void 0 : _b.focus();
937
937
  }
938
938
  };
939
- var handleClickOutside = function (e) {
940
- var target = e.target;
941
- var triggerElement = triggerRef.current;
942
- if (target === triggerElement || (triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.contains(target))) {
943
- return;
944
- }
945
- if (show) {
946
- e.preventDefault();
947
- onClose();
948
- }
939
+ OptionsMenuList.prototype.componentDidMount = function () {
940
+ var _a;
941
+ // see https://github.com/dequelabs/cauldron-react/issues/150
942
+ (_a = this.menuRef) === null || _a === void 0 ? void 0 : _a.addEventListener('keydown', this.handleKeyDown);
949
943
  };
950
- var items = React__default["default"].Children.toArray(children).map(function (child, i) {
951
- var _a = child.props, childClassName = _a.className, childProps = tslib.__rest(_a, ["className"]);
952
- return React__default["default"].cloneElement(child, tslib.__assign({ key: "list-item-".concat(i), className: classNames__default["default"]('OptionsMenu__list-item', childClassName), tabIndex: -1, role: 'menuitem', ref: function (el) { return (itemRefs.current[i] = el); } }, childProps));
953
- });
954
- // This allows the ClickOutsideListener to only be activated when the menu is
955
- // currently open. This prevents an obscure behavior where the activation of a
956
- // different menu would cause all menus to close
957
- var clickOutsideEventActive = !show ? false : undefined;
958
- // Key event is being handled in the useEffect above
959
- /* eslint-disable jsx-a11y/click-events-have-key-events */
960
- /* eslint-disable jsx-a11y/role-supports-aria-props */
961
- return (React__default["default"].createElement(ClickOutsideListener$1, { onClickOutside: handleClickOutside, mouseEvent: clickOutsideEventActive, touchEvent: clickOutsideEventActive },
962
- React__default["default"].createElement("ul", tslib.__assign({}, other, { className: classNames__default["default"]('OptionsMenu__list', className), "aria-expanded": show, role: "menu", onClick: handleClick, ref: function (el) {
963
- menuRefInternal.current = el;
964
- if (menuRef) {
965
- setRef(menuRef, el);
966
- }
967
- } }), items)));
968
- };
944
+ OptionsMenuList.prototype.componentWillUnmount = function () {
945
+ var _a;
946
+ (_a = this.menuRef) === null || _a === void 0 ? void 0 : _a.removeEventListener('keydown', this.handleKeyDown);
947
+ };
948
+ OptionsMenuList.prototype.render = function () {
949
+ var _this = this;
950
+ var _a = this, props = _a.props, handleClick = _a.handleClick;
951
+ /* eslint-disable @typescript-eslint/no-unused-vars */
952
+ var children = props.children, menuRef = props.menuRef, show = props.show, className = props.className; props.onClose; props.onSelect; props.closeOnSelect; var other = tslib.__rest(props, ["children", "menuRef", "show", "className", "onClose", "onSelect", "closeOnSelect"]);
953
+ /* eslint-enable @typescript-eslint/no-unused-vars */
954
+ var items = React__default["default"].Children.toArray(children).map(function (child, i) {
955
+ var _a = child.props, className = _a.className, other = tslib.__rest(_a, ["className"]);
956
+ return React__default["default"].cloneElement(child, tslib.__assign({ key: "list-item-".concat(i), className: classNames__default["default"]('OptionsMenu__list-item', className), tabIndex: -1, role: 'menuitem', ref: function (el) { return (_this.itemRefs[i] = el); } }, other));
957
+ });
958
+ // This allows the ClickOutsideListener to only be activated when the menu is
959
+ // currently open. This prevents an obscure behavior where the activation of a
960
+ // different menu would cause all menus to close
961
+ var clickOutsideEventActive = !show ? false : undefined;
962
+ // Key event is being handled in componentDidMount
963
+ /* eslint-disable jsx-a11y/click-events-have-key-events */
964
+ /* eslint-disable jsx-a11y/role-supports-aria-props */
965
+ return (React__default["default"].createElement(ClickOutsideListener$1, { onClickOutside: this.handleClickOutside, mouseEvent: clickOutsideEventActive, touchEvent: clickOutsideEventActive },
966
+ React__default["default"].createElement("ul", tslib.__assign({}, other, { className: classNames__default["default"]('OptionsMenu__list', className), "aria-expanded": show, role: "menu", onClick: handleClick, ref: function (el) {
967
+ _this.menuRef = el;
968
+ if (menuRef) {
969
+ setRef(menuRef, el);
970
+ }
971
+ } }), items)));
972
+ /* eslint-enable jsx-a11y/click-events-have-key-events */
973
+ };
974
+ OptionsMenuList.defaultProps = {
975
+ closeOnSelect: true,
976
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
977
+ onSelect: function () { },
978
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
979
+ onClose: function () { }
980
+ };
981
+ return OptionsMenuList;
982
+ }(React__default["default"].Component));
969
983
 
970
984
  var _a$1 = tslib.__read([40], 1), down = _a$1[0];
971
- var OptionsMenu = function (_a) {
972
- var children = _a.children, className = _a.className; _a.closeOnSelect; var menuRef = _a.menuRef, trigger = _a.trigger, _b = _a.align, align = _b === void 0 ? 'right' : _b, _c = _a.onClose, onClose = _c === void 0 ? function () { } : _c, // eslint-disable-line @typescript-eslint/no-empty-function
973
- _d = _a.onSelect, // eslint-disable-line @typescript-eslint/no-empty-function
974
- onSelect = _d === void 0 ? function () { } : _d, // eslint-disable-line @typescript-eslint/no-empty-function
975
- other = tslib.__rest(_a, ["children", "className", "closeOnSelect", "menuRef", "trigger", "align", "onClose", "onSelect"]);
976
- var _e = tslib.__read(React.useState(false), 2), show = _e[0], setShow = _e[1];
977
- var triggerRef = React.useRef(null);
978
- var toggleMenu = function (e) {
979
- if (e.defaultPrevented) {
980
- return;
981
- }
982
- setShow(!show);
983
- };
984
- var handleClose = function () {
985
- var _a;
986
- setShow(false);
987
- onClose();
988
- (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
985
+ var OptionsMenu = /** @class */ (function (_super) {
986
+ tslib.__extends(OptionsMenu, _super);
987
+ function OptionsMenu(props) {
988
+ var _this = _super.call(this, props) || this;
989
+ _this.toggleMenu = function (event) {
990
+ _this.setState(function (_a) {
991
+ var show = _a.show;
992
+ return ({ show: !show });
993
+ });
994
+ };
995
+ _this.handleClose = function () {
996
+ var _a;
997
+ var _b = _this.props.onClose, onClose = _b === void 0 ? OptionsMenu.defaultProps.onClose : _b;
998
+ _this.setState({ show: false });
999
+ onClose();
1000
+ (_a = _this.triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
1001
+ };
1002
+ _this.handleTriggerKeyDown = function (event) {
1003
+ var which = event.which, target = event.target;
1004
+ if (which === down) {
1005
+ event.preventDefault();
1006
+ target.click();
1007
+ }
1008
+ };
1009
+ _this.state = { show: false };
1010
+ _this.triggerRef = React__default["default"].createRef();
1011
+ return _this;
1012
+ }
1013
+ OptionsMenu.prototype.render = function () {
1014
+ var _a = this, toggleMenu = _a.toggleMenu, triggerRef = _a.triggerRef, handleTriggerKeyDown = _a.handleTriggerKeyDown;
1015
+ /* eslint-disable @typescript-eslint/no-unused-vars */
1016
+ var _b = this.props, children = _b.children, className = _b.className; _b.closeOnSelect; var menuRef = _b.menuRef, trigger = _b.trigger, align = _b.align; _b.onClose; var other = tslib.__rest(_b, ["children", "className", "closeOnSelect", "menuRef", "trigger", "align", "onClose"]);
1017
+ /* eslint-enable @typescript-eslint/no-unused-vars */
1018
+ var show = this.state.show;
1019
+ return (React__default["default"].createElement(OptionsMenuWrapper, { align: align, className: className },
1020
+ trigger &&
1021
+ trigger({
1022
+ onClick: toggleMenu,
1023
+ 'aria-expanded': show,
1024
+ ref: triggerRef,
1025
+ onKeyDown: handleTriggerKeyDown
1026
+ }),
1027
+ React__default["default"].createElement(OptionsMenuList, tslib.__assign({ show: show, menuRef: function (el) {
1028
+ if (menuRef) {
1029
+ setRef(menuRef, el);
1030
+ }
1031
+ }, onClose: this.handleClose }, other), children)));
989
1032
  };
990
- var handleTriggerKeyDown = function (event) {
991
- var which = event.which, target = event.target;
992
- if (which === down) {
993
- event.preventDefault();
994
- target.click();
995
- }
1033
+ OptionsMenu.defaultProps = {
1034
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1035
+ onClose: function () { },
1036
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1037
+ onSelect: function () { },
1038
+ align: 'right'
996
1039
  };
997
- return (React__default["default"].createElement(OptionsMenuWrapper, { align: align, className: className },
998
- trigger &&
999
- trigger({
1000
- onClick: toggleMenu,
1001
- 'aria-expanded': show,
1002
- ref: triggerRef,
1003
- onKeyDown: handleTriggerKeyDown
1004
- }),
1005
- React__default["default"].createElement(OptionsMenuList, tslib.__assign({ show: show, menuRef: function (el) {
1006
- if (menuRef) {
1007
- setRef(menuRef, el);
1008
- }
1009
- }, onClose: handleClose, onSelect: onSelect }, other), children)));
1010
- };
1040
+ return OptionsMenu;
1041
+ }(React.Component));
1011
1042
 
1012
- function OptionsMenuItemComponent(_a) {
1013
- var disabled = _a.disabled, className = _a.className, menuItemRef = _a.menuItemRef, _b = _a.onSelect, onSelect = _b === void 0 ? function () { } : _b, // eslint-disable-line @typescript-eslint/no-empty-function
1014
- other = tslib.__rest(_a, ["disabled", "className", "menuItemRef", "onSelect"]);
1015
- function handleClick(event) {
1016
- if (!disabled) {
1017
- onSelect(event);
1018
- }
1043
+ var OptionsMenuItemComponent = /** @class */ (function (_super) {
1044
+ tslib.__extends(OptionsMenuItemComponent, _super);
1045
+ function OptionsMenuItemComponent() {
1046
+ var _this = _super !== null && _super.apply(this, arguments) || this;
1047
+ _this.handleClick = function (event) {
1048
+ var _a = _this.props, disabled = _a.disabled, onSelect = _a.onSelect;
1049
+ if (!disabled) {
1050
+ onSelect(event);
1051
+ }
1052
+ };
1053
+ return _this;
1019
1054
  }
1020
- return (
1021
- // keydown happens in OptionsMenu which proxies to click
1022
- // eslint-disable-next-line jsx-a11y/click-events-have-key-events
1023
- React__default["default"].createElement("li", tslib.__assign({ role: "menuitem", ref: menuItemRef, "aria-disabled": disabled, onClick: handleClick, className: className }, other)));
1024
- }
1025
- var OptionsMenuItem = React.forwardRef(function (_a, ref) {
1026
- var props = tslib.__rest(_a, []);
1027
- return (React__default["default"].createElement(OptionsMenuItemComponent, tslib.__assign({ menuItemRef: ref }, props)));
1055
+ OptionsMenuItemComponent.prototype.render = function () {
1056
+ var _a = this, handleClick = _a.handleClick, props = _a.props;
1057
+ var menuItemRef = props.menuItemRef, disabled = props.disabled; props.onSelect; var other = tslib.__rest(props, ["menuItemRef", "disabled", "onSelect"]);
1058
+ return (
1059
+ // keydown happens in OptionsMenu which proxies to click
1060
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events
1061
+ React__default["default"].createElement("li", tslib.__assign({ role: "menuitem", ref: menuItemRef, "aria-disabled": disabled, onClick: handleClick }, other)));
1062
+ };
1063
+ OptionsMenuItemComponent.defaultProps = {
1064
+ // eslint-disable-next-line @typescript-eslint/no-empty-function
1065
+ onSelect: function () { }
1066
+ };
1067
+ return OptionsMenuItemComponent;
1068
+ }(React__default["default"].Component));
1069
+ var OptionsMenuItem = React__default["default"].forwardRef(function OptionsMenuItem(props, ref) {
1070
+ return React__default["default"].createElement(OptionsMenuItemComponent, tslib.__assign({ menuItemRef: ref }, props));
1028
1071
  });
1029
- OptionsMenuItem.displayName = 'OptionsMenuItem';
1030
1072
 
1031
1073
  /**
1032
1074
  * The trigger button component to be used as the default component
@@ -4070,10 +4112,7 @@ var Popover = React.forwardRef(function (_a, ref) {
4070
4112
  targetElement === null || targetElement === void 0 ? void 0 : targetElement.setAttribute('aria-haspopup', 'true');
4071
4113
  }
4072
4114
  }, [targetElement, id, show]);
4073
- var handleClickOutside = function (e) {
4074
- if (e.target === targetElement) {
4075
- return;
4076
- }
4115
+ var handleClickOutside = function () {
4077
4116
  if (show) {
4078
4117
  handleClosePopover();
4079
4118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "6.9.0-canary.453f7da6",
3
+ "version": "6.9.0",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Fully accessible react components library for Deque Cauldron",
6
6
  "homepage": "https://cauldron.dequelabs.com/",
@@ -25,7 +25,7 @@
25
25
  "dependencies": {
26
26
  "@popperjs/core": "^2.5.4",
27
27
  "classnames": "^2.2.6",
28
- "focus-trap-react": "^10.2.3",
28
+ "focus-trap-react": "8",
29
29
  "focusable": "^2.3.0",
30
30
  "keyname": "^0.1.0",
31
31
  "react-id-generator": "^3.0.1",
@@ -65,9 +65,8 @@
65
65
  "postcss-cli": "^7.1.1",
66
66
  "postcss-import": "^12.0.1",
67
67
  "postcss-loader": "^3.0.0",
68
- "prop-types": "^15.8.1",
69
- "react": "^17",
70
- "react-dom": "^17",
68
+ "react": "^16.13.1",
69
+ "react-dom": "^16.13.1",
71
70
  "rollup": "^2.23.0",
72
71
  "sinon": "^10.0.0",
73
72
  "ts-node": "^10.9.2",