@pingux/astro 2.137.0 → 2.138.0-alpha.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.
@@ -383,8 +383,8 @@ test('renders loader, if a loader component is passed in, and state is loading',
|
|
383
383
|
_userEvent["default"].type(listView, '{arrowdown}', {
|
384
384
|
skipClick: true
|
385
385
|
});
|
386
|
-
var loaders = _testWrapper.screen.
|
387
|
-
expect(loaders).
|
386
|
+
var loaders = _testWrapper.screen.getByRole('alert');
|
387
|
+
expect(loaders).toBeInTheDocument();
|
388
388
|
});
|
389
389
|
test('renders loader, if a loader component is passed in, and state is loadingMore', function () {
|
390
390
|
getComponent({
|
@@ -52,8 +52,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
52
52
|
var _useFocusRing = (0, _reactAria.useFocusRing)({
|
53
53
|
within: true
|
54
54
|
}),
|
55
|
-
isFocusVisibleWithin = _useFocusRing.isFocusVisible
|
56
|
-
focusWithinProps = _useFocusRing.focusProps;
|
55
|
+
isFocusVisibleWithin = _useFocusRing.isFocusVisible;
|
57
56
|
var _useFocusRing2 = (0, _reactAria.useFocusRing)(),
|
58
57
|
focusProps = _useFocusRing2.focusProps,
|
59
58
|
isFocusVisible = _useFocusRing2.isFocusVisible;
|
@@ -79,13 +78,13 @@ var ListViewItem = function ListViewItem(props) {
|
|
79
78
|
gridCellProps = _useGridListItem.gridCellProps,
|
80
79
|
isPressed = _useGridListItem.isPressed;
|
81
80
|
var isSelected = state.selectionManager.isSelected(item.key);
|
82
|
-
var mergedProps = (0, _reactAria.mergeProps)(raRowProps, hoverProps, isFocusable ? _objectSpread(
|
81
|
+
var mergedProps = (0, _reactAria.mergeProps)(raRowProps, hoverProps, isFocusable ? _objectSpread({}, focusProps) : {}, {
|
83
82
|
onPointerLeave: onPointerLeaveFunction
|
84
83
|
});
|
85
84
|
var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
|
86
85
|
isHovered: isSelectable && isHoverable && item.key === state.hover.hoveredItem,
|
87
86
|
isSelected: isSelected,
|
88
|
-
isFocused: isDisabled ? false : isFocusVisible
|
87
|
+
isFocused: isDisabled ? false : isFocusVisible,
|
89
88
|
hasSeparator: hasSeparator,
|
90
89
|
hasInsetSeparator: hasInsetSeparator,
|
91
90
|
isPressed: isPressed,
|
@@ -109,7 +108,9 @@ var ListViewItem = function ListViewItem(props) {
|
|
109
108
|
sx: {
|
110
109
|
outline: 'none'
|
111
110
|
}
|
112
|
-
}), (0, _react2.jsx)(
|
111
|
+
}), (0, _react2.jsx)(_reactAria.FocusRing, {
|
112
|
+
focusRingClass: "is-focussed"
|
113
|
+
}, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
113
114
|
as: "div",
|
114
115
|
variant: listItemVariant
|
115
116
|
}, gridCellProps, {
|
@@ -122,7 +123,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
122
123
|
variant: "listViewItem.loaderContainer"
|
123
124
|
}, (0, _react2.jsx)(_index.Loader, {
|
124
125
|
color: "neutral.50"
|
125
|
-
}))));
|
126
|
+
})))));
|
126
127
|
};
|
127
128
|
ListViewItem.propTypes = {
|
128
129
|
item: _propTypes["default"].shape({
|
@@ -377,8 +377,8 @@ test('renders loader, if a loader component is passed in, and state is loading',
|
|
377
377
|
userEvent.type(listView, '{arrowdown}', {
|
378
378
|
skipClick: true
|
379
379
|
});
|
380
|
-
var loaders = screen.
|
381
|
-
expect(loaders).
|
380
|
+
var loaders = screen.getByRole('alert');
|
381
|
+
expect(loaders).toBeInTheDocument();
|
382
382
|
});
|
383
383
|
test('renders loader, if a loader component is passed in, and state is loadingMore', function () {
|
384
384
|
getComponent({
|
@@ -12,7 +12,7 @@ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
|
12
12
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
13
13
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context2, _context3; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context2 = ownKeys(Object(source), !0)).call(_context2, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context3 = ownKeys(Object(source))).call(_context3, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
14
|
import React, { useContext, useRef } from 'react';
|
15
|
-
import { mergeProps, useFocusRing, useGridListItem } from 'react-aria';
|
15
|
+
import { FocusRing, mergeProps, useFocusRing, useGridListItem } from 'react-aria';
|
16
16
|
import { useHover } from '@react-aria/interactions';
|
17
17
|
import PropTypes from 'prop-types';
|
18
18
|
import { useStatusClasses } from '../../hooks';
|
@@ -40,8 +40,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
40
40
|
var _useFocusRing = useFocusRing({
|
41
41
|
within: true
|
42
42
|
}),
|
43
|
-
isFocusVisibleWithin = _useFocusRing.isFocusVisible
|
44
|
-
focusWithinProps = _useFocusRing.focusProps;
|
43
|
+
isFocusVisibleWithin = _useFocusRing.isFocusVisible;
|
45
44
|
var _useFocusRing2 = useFocusRing(),
|
46
45
|
focusProps = _useFocusRing2.focusProps,
|
47
46
|
isFocusVisible = _useFocusRing2.isFocusVisible;
|
@@ -67,13 +66,13 @@ var ListViewItem = function ListViewItem(props) {
|
|
67
66
|
gridCellProps = _useGridListItem.gridCellProps,
|
68
67
|
isPressed = _useGridListItem.isPressed;
|
69
68
|
var isSelected = state.selectionManager.isSelected(item.key);
|
70
|
-
var mergedProps = mergeProps(raRowProps, hoverProps, isFocusable ? _objectSpread(
|
69
|
+
var mergedProps = mergeProps(raRowProps, hoverProps, isFocusable ? _objectSpread({}, focusProps) : {}, {
|
71
70
|
onPointerLeave: onPointerLeaveFunction
|
72
71
|
});
|
73
72
|
var _useStatusClasses = useStatusClasses(className, {
|
74
73
|
isHovered: isSelectable && isHoverable && item.key === state.hover.hoveredItem,
|
75
74
|
isSelected: isSelected,
|
76
|
-
isFocused: isDisabled ? false : isFocusVisible
|
75
|
+
isFocused: isDisabled ? false : isFocusVisible,
|
77
76
|
hasSeparator: hasSeparator,
|
78
77
|
hasInsetSeparator: hasInsetSeparator,
|
79
78
|
isPressed: isPressed,
|
@@ -97,7 +96,9 @@ var ListViewItem = function ListViewItem(props) {
|
|
97
96
|
sx: {
|
98
97
|
outline: 'none'
|
99
98
|
}
|
100
|
-
}), ___EmotionJSX(
|
99
|
+
}), ___EmotionJSX(FocusRing, {
|
100
|
+
focusRingClass: "is-focussed"
|
101
|
+
}, ___EmotionJSX(Box, _extends({
|
101
102
|
as: "div",
|
102
103
|
variant: listItemVariant
|
103
104
|
}, gridCellProps, {
|
@@ -110,7 +111,7 @@ var ListViewItem = function ListViewItem(props) {
|
|
110
111
|
variant: "listViewItem.loaderContainer"
|
111
112
|
}, ___EmotionJSX(Loader, {
|
112
113
|
color: "neutral.50"
|
113
|
-
}))));
|
114
|
+
})))));
|
114
115
|
};
|
115
116
|
ListViewItem.propTypes = {
|
116
117
|
item: PropTypes.shape({
|