@zohodesk/dot 1.0.0-beta.270 → 1.0.0-beta.271

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.
@@ -14,5 +14,6 @@ export const propTypes = {
14
14
  }),
15
15
  onKeyDown: PropTypes.func,
16
16
  childAnimationName: PropTypes.oneOf(['expand', 'flyDown']),
17
- needFocusScope: PropTypes.bool
17
+ needFocusScope: PropTypes.bool,
18
+ customProps: PropTypes.object
18
19
  };
@@ -255,7 +255,20 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
255
255
  subDrawerChildren = _this$props4.subDrawerChildren,
256
256
  onBodyClick = _this$props4.onBodyClick,
257
257
  onClose = _this$props4.onClose,
258
- needFocusScope = _this$props4.needFocusScope;
258
+ needFocusScope = _this$props4.needFocusScope,
259
+ customProps = _this$props4.customProps;
260
+ var _customProps$focusSco = customProps.focusScopeProps,
261
+ focusScopeProps = _customProps$focusSco === void 0 ? {} : _customProps$focusSco;
262
+ var _focusScopeProps$auto = focusScopeProps.autoFocus,
263
+ autoFocus = _focusScopeProps$auto === void 0 ? true : _focusScopeProps$auto,
264
+ _focusScopeProps$rest = focusScopeProps.restoreFocus,
265
+ restoreFocus = _focusScopeProps$rest === void 0 ? true : _focusScopeProps$rest,
266
+ _focusScopeProps$need = focusScopeProps.needArrowLoop,
267
+ needArrowLoop = _focusScopeProps$need === void 0 ? false : _focusScopeProps$need,
268
+ _focusScopeProps$need2 = focusScopeProps.needTabLoop,
269
+ needTabLoop = _focusScopeProps$need2 === void 0 ? true : _focusScopeProps$need2,
270
+ _focusScopeProps$enab = focusScopeProps.enableEnterAction,
271
+ enableEnterAction = _focusScopeProps$enab === void 0 ? false : _focusScopeProps$enab;
259
272
 
260
273
  var childrenWithProps = _react["default"].Children.map(children, function (child) {
261
274
  if (child.type === Header || child.type === Footer || child.type === Content) {
@@ -272,7 +285,7 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
272
285
 
273
286
  var content = /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
274
287
  className: "".concat(_DrawerModule["default"].container, " ").concat(_DrawerModule["default"].columns, " ").concat(_DrawerModule["default"].drawerModal, " ").concat(uptoTablet ? _DrawerModule["default"].mbleSize : _DrawerModule["default"][size]),
275
- "data-a11y-container-focus": false,
288
+ "data-a11y-need-focus-style": "false",
276
289
  tabindex: -1,
277
290
  eleRef: this.createRef
278
291
  }, /*#__PURE__*/_react["default"].createElement(_Card.Card, {
@@ -296,10 +309,12 @@ var Drawer = /*#__PURE__*/function (_React$Component4) {
296
309
  flexible: true
297
310
  }, subDrawerChildren))))) : null, needFocusScope ? /*#__PURE__*/_react["default"].createElement(_FocusScope["default"], {
298
311
  elementRef: this.createRef,
299
- autoFocus: true,
300
- focusTabLoop: true,
301
- restoreFocus: true,
302
- focusClose: onClose
312
+ autoFocus: autoFocus,
313
+ needTabLoop: needTabLoop,
314
+ restoreFocus: restoreFocus,
315
+ needArrowLoop: needArrowLoop,
316
+ onClose: onClose,
317
+ enableEnterAction: enableEnterAction
303
318
  }, content) : content);
304
319
  }
305
320
  }, {
@@ -25,6 +25,7 @@ var Drawer_defaultProps = {
25
25
  customClass: '',
26
26
  needAutoZindex: true,
27
27
  onBodyClick: function onBodyClick() {},
28
- needFocusScope: false
28
+ needFocusScope: false,
29
+ customProps: {}
29
30
  };
30
31
  exports.Drawer_defaultProps = Drawer_defaultProps;
@@ -59,6 +59,7 @@ var Drawer_propTypes = {
59
59
  subDrawerChildren: _propTypes["default"].func,
60
60
  subDrawerClass: _propTypes["default"].string,
61
61
  subDrawerSize: _propTypes["default"].oneOf(['xsmall', 'small', 'medium']),
62
- needFocusScope: _propTypes["default"].bool
62
+ needFocusScope: _propTypes["default"].bool,
63
+ customProps: _propTypes["default"].object
63
64
  };
64
65
  exports.Drawer_propTypes = Drawer_propTypes;