@pingux/astro 1.17.0-alpha.6 → 1.17.0-alpha.7

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.
@@ -64,15 +64,9 @@ var CollectionRockerButton = /*#__PURE__*/(0, _react.forwardRef)(function (props
64
64
  itemProps = item.props;
65
65
  var state = (0, _react.useContext)(_RockerButtonGroup.RockerContext);
66
66
  var isDisabled = state.disabledKeys.has(key);
67
-
68
- var _useFocusRing = (0, _focus.useFocusRing)(),
69
- isFocusVisible = _useFocusRing.isFocusVisible,
70
- focusProps = _useFocusRing.focusProps;
71
-
72
67
  var isSelected = state.selectedKey === key;
73
68
 
74
69
  var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
75
- isFocused: isFocusVisible,
76
70
  isSelected: isSelected,
77
71
  isDisabled: isDisabled
78
72
  }),
@@ -93,17 +87,19 @@ var CollectionRockerButton = /*#__PURE__*/(0, _react.forwardRef)(function (props
93
87
  }, state, rockerButtonRef),
94
88
  rockerButtonProps = _useRockerButton.rockerButtonProps;
95
89
 
96
- return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
90
+ return (0, _react2.jsx)(_focus.FocusRing, {
91
+ focusRingClass: "is-focused"
92
+ }, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
97
93
  as: "button",
98
94
  className: classNames,
99
95
  variant: "buttons.rocker"
100
96
  }, rockerButtonProps, {
101
97
  ref: rockerButtonRef
102
- }, focusProps, itemProps, {
98
+ }, itemProps, {
103
99
  sx: {
104
100
  '&.is-selected': _objectSpread({}, itemProps.selectedStyles)
105
101
  }
106
- }), rendered);
102
+ }), rendered));
107
103
  });
108
104
  exports.CollectionRockerButton = CollectionRockerButton;
109
105
  CollectionRockerButton.displayName = 'CollectionRockerButton';
@@ -16,7 +16,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
16
16
  import React, { forwardRef, useContext, useImperativeHandle, useRef } from 'react';
17
17
  import PropTypes from 'prop-types';
18
18
  import { Item } from '@react-stately/collections';
19
- import { useFocusRing } from '@react-aria/focus';
19
+ import { FocusRing } from '@react-aria/focus';
20
20
  import { useRockerButton, useStatusClasses, usePropWarning } from '../../hooks';
21
21
  import { Box } from '../../index';
22
22
  import { RockerContext } from '../RockerButtonGroup';
@@ -29,15 +29,9 @@ export var CollectionRockerButton = /*#__PURE__*/forwardRef(function (props, ref
29
29
  itemProps = item.props;
30
30
  var state = useContext(RockerContext);
31
31
  var isDisabled = state.disabledKeys.has(key);
32
-
33
- var _useFocusRing = useFocusRing(),
34
- isFocusVisible = _useFocusRing.isFocusVisible,
35
- focusProps = _useFocusRing.focusProps;
36
-
37
32
  var isSelected = state.selectedKey === key;
38
33
 
39
34
  var _useStatusClasses = useStatusClasses(className, {
40
- isFocused: isFocusVisible,
41
35
  isSelected: isSelected,
42
36
  isDisabled: isDisabled
43
37
  }),
@@ -58,17 +52,19 @@ export var CollectionRockerButton = /*#__PURE__*/forwardRef(function (props, ref
58
52
  }, state, rockerButtonRef),
59
53
  rockerButtonProps = _useRockerButton.rockerButtonProps;
60
54
 
61
- return ___EmotionJSX(Box, _extends({
55
+ return ___EmotionJSX(FocusRing, {
56
+ focusRingClass: "is-focused"
57
+ }, ___EmotionJSX(Box, _extends({
62
58
  as: "button",
63
59
  className: classNames,
64
60
  variant: "buttons.rocker"
65
61
  }, rockerButtonProps, {
66
62
  ref: rockerButtonRef
67
- }, focusProps, itemProps, {
63
+ }, itemProps, {
68
64
  sx: {
69
65
  '&.is-selected': _objectSpread({}, itemProps.selectedStyles)
70
66
  }
71
- }), rendered);
67
+ }), rendered));
72
68
  });
73
69
  CollectionRockerButton.displayName = 'CollectionRockerButton';
74
70
  CollectionRockerButton.propTypes = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.17.0-alpha.6",
3
+ "version": "1.17.0-alpha.7",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",