@pingux/astro 1.20.1-alpha.0 → 1.21.0-alpha.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.
@@ -35,21 +35,15 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/e
35
35
 
36
36
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
37
37
 
38
- var _from = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/array/from"));
39
-
40
- var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
41
-
42
38
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
43
39
 
44
40
  var _react = _interopRequireWildcard(require("react"));
45
41
 
46
- var _grid = require("@react-stately/grid");
47
-
48
- var _grid2 = require("@react-aria/grid");
42
+ var _list = require("@react-aria/list");
49
43
 
50
44
  var _layout = require("@react-stately/layout");
51
45
 
52
- var _list = require("@react-stately/list");
46
+ var _list2 = require("@react-stately/list");
53
47
 
54
48
  var _propTypes = _interopRequireDefault(require("prop-types"));
55
49
 
@@ -77,7 +71,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
77
71
 
78
72
  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; }
79
73
 
80
- 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) { (0, _defineProperty2["default"])(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; }
74
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
81
75
 
82
76
  var collectionTypes = {
83
77
  ITEM: 'item',
@@ -138,82 +132,38 @@ var ListView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
138
132
  (0, _react.useImperativeHandle)(ref, function () {
139
133
  return listViewRef.current;
140
134
  });
141
-
142
- var _useListState = (0, _list.useListState)(props),
143
- collection = _useListState.collection;
144
-
145
- var _useLocale = (0, _i18n.useLocale)(),
146
- direction = _useLocale.direction;
147
-
148
- var collator = (0, _i18n.useCollator)({
149
- usage: 'search',
150
- sensitivity: 'base'
151
- });
152
- var gridCollection = (0, _react.useMemo)(function () {
153
- var _context;
154
-
155
- return new _grid.GridCollection({
156
- columnCount: 1,
157
- items: (0, _map["default"])(_context = (0, _from["default"])(collection)).call(_context, function (item) {
158
- return _objectSpread(_objectSpread({}, item), {}, {
159
- hasChildNodes: true,
160
- childNodes: [{
161
- key: "cell-".concat(item.key),
162
- type: 'cell',
163
- index: 0,
164
- value: null,
165
- level: 0,
166
- rendered: null,
167
- textValue: item.textValue,
168
- hasChildNodes: false,
169
- childNodes: []
170
- }]
171
- });
172
- })
173
- });
174
- }, [collection]);
175
- var state = (0, _grid.useGridState)(_objectSpread(_objectSpread({}, props), {}, {
176
- collection: gridCollection,
177
- focusMode: 'cell',
135
+ var state = (0, _list2.useListState)(_objectSpread(_objectSpread({}, props), {}, {
178
136
  selectionBehavior: selectionStyle === 'highlight' ? 'replace' : 'toggle'
179
137
  }));
138
+ var collection = state.collection,
139
+ selectionManager = state.selectionManager;
180
140
  var layout = useListLayout(state);
181
- var keyboardDelegate = (0, _react.useMemo)(function () {
182
- return new _grid2.GridKeyboardDelegate({
183
- collection: state.collection,
184
- disabledKeys: state.disabledKeys,
185
- ref: listViewRef,
186
- direction: direction,
187
- collator: collator
188
- });
189
- }, [state, listViewRef, direction, collator]);
190
141
 
191
- var _useGrid = (0, _grid2.useGrid)(_objectSpread(_objectSpread({}, props), {}, {
142
+ var _useList = (0, _list.useList)(_objectSpread(_objectSpread({}, props), {}, {
192
143
  isVirtualized: true,
193
- keyboardDelegate: keyboardDelegate,
144
+ keyboardDelegate: layout,
194
145
  loadingState: loadingState
195
146
  }), state, listViewRef),
196
- gridProps = _useGrid.gridProps; // Sync loading state into the layout.
147
+ gridProps = _useList.gridProps; // Sync loading state into the layout.
197
148
 
198
149
 
199
150
  layout.isLoading = isLoading;
200
- var focusedItem = gridCollection.getFirstKey();
151
+ var focusedKey = selectionManager.focusedKey;
201
152
  delete gridProps.onMouseDown;
202
153
  return (0, _react2.jsx)(_ListViewContext.ListViewContext.Provider, {
203
154
  value: {
204
- state: state,
205
- keyboardDelegate: keyboardDelegate
155
+ state: state
206
156
  }
207
157
  }, (0, _react2.jsx)(_virtualizer.Virtualizer, (0, _extends2["default"])({}, gridProps, {
208
158
  onLoadMore: onLoadMore,
209
159
  ref: listViewRef,
210
- focusedKey: focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey,
160
+ focusedKey: focusedKey,
211
161
  renderWrapper: renderWrapper,
212
162
  sizeToFit: "height",
213
163
  scrollDirection: "vertical",
214
164
  layout: layout,
215
165
  isLoading: isLoading,
216
- collection: gridCollection,
166
+ collection: collection,
217
167
  transitionDuration: 0
218
168
  }, others), function (type, item) {
219
169
  if (type === 'item') {
@@ -576,7 +576,7 @@ var ListElement = function ListElement(_ref) {
576
576
  "aria-label": "create-icon",
577
577
  size: 20
578
578
  }, (0, _react2.jsx)(_CreateIcon["default"], null)), (0, _react2.jsx)(_IconButton["default"], {
579
- "aria-label": "create-icon",
579
+ "aria-label": "actions-icon",
580
580
  size: 20
581
581
  }, (0, _react2.jsx)(_MoreVertIcon["default"], null))));
582
582
  };
@@ -611,7 +611,7 @@ var Default = function Default(_ref2) {
611
611
  "aria-label": "create-icon",
612
612
  size: 20
613
613
  }, (0, _react2.jsx)(_CreateIcon["default"], null)), (0, _react2.jsx)(_IconButton["default"], {
614
- "aria-label": "create-icon",
614
+ "aria-label": "actions-icon",
615
615
  size: 20
616
616
  }, (0, _react2.jsx)(_MoreVertIcon["default"], null)))));
617
617
  });
@@ -18,8 +18,6 @@ exports["default"] = void 0;
18
18
 
19
19
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
20
20
 
21
- var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
22
-
23
21
  var _react = _interopRequireWildcard(require("react"));
24
22
 
25
23
  var _utils = require("@react-aria/utils");
@@ -28,12 +26,10 @@ var _focus = require("@react-aria/focus");
28
26
 
29
27
  var _propTypes = _interopRequireDefault(require("prop-types"));
30
28
 
31
- var _grid = require("@react-aria/grid");
29
+ var _list = require("@react-aria/list");
32
30
 
33
31
  var _interactions = require("@react-aria/interactions");
34
32
 
35
- var _selection = require("@react-aria/selection");
36
-
37
33
  var _ListViewContext = require("../ListView/ListViewContext");
38
34
 
39
35
  var _Box = _interopRequireDefault(require("../Box"));
@@ -47,31 +43,26 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "functi
47
43
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
48
44
 
49
45
  var ListViewItem = function ListViewItem(props) {
50
- var _context;
51
-
52
46
  var item = props.item,
53
- _props$item = props.item,
54
- key = _props$item.key,
55
- _props$item$props = _props$item.props,
47
+ _props$item$props = props.item.props,
56
48
  listItemProps = _props$item$props.listItemProps,
57
49
  rowProps = _props$item$props.rowProps,
58
50
  _props$item$props$has = _props$item$props.hasSeparator,
59
51
  hasSeparator = _props$item$props$has === void 0 ? true : _props$item$props$has,
60
52
  className = props.className;
61
53
  var dataId = item.props['data-id'];
62
- var cellNode = (0, _concat["default"])(_context = []).call(_context, item.childNodes)[0];
63
54
 
64
55
  var _useContext = (0, _react.useContext)(_ListViewContext.ListViewContext),
65
56
  state = _useContext.state;
66
57
 
67
58
  var isDisabled = state.disabledKeys.has(item.key);
68
59
  var rowRef = (0, _react.useRef)();
69
- var cellRef = (0, _react.useRef)();
70
60
  var isSelectable = state.selectionManager.selectionMode !== 'none';
71
61
 
72
62
  var _useFocusRing = (0, _focus.useFocusRing)({
73
63
  within: true
74
64
  }),
65
+ isFocusVisibleWithin = _useFocusRing.isFocusVisible,
75
66
  focusWithinProps = _useFocusRing.focusProps;
76
67
 
77
68
  var _useFocusRing2 = (0, _focus.useFocusRing)(),
@@ -82,47 +73,36 @@ var ListViewItem = function ListViewItem(props) {
82
73
  hoverProps = _useHover.hoverProps,
83
74
  isHovered = _useHover.isHovered;
84
75
 
85
- var _useGridRow = (0, _grid.useGridRow)({
76
+ var _useListItem = (0, _list.useListItem)({
86
77
  node: item,
87
- isVirtualized: true
78
+ isVirtualized: true,
79
+ isDisabled: isDisabled
88
80
  }, state, rowRef),
89
- raRowProps = _useGridRow.rowProps;
81
+ raRowProps = _useListItem.rowProps,
82
+ gridCellProps = _useListItem.gridCellProps;
90
83
 
91
84
  var isSelected = state.selectionManager.isSelected(item.key);
92
-
93
- var _useGridCell = (0, _grid.useGridCell)({
94
- node: cellNode,
95
- focusMode: 'cell'
96
- }, state, cellRef),
97
- gridCellProps = _useGridCell.gridCellProps;
98
-
99
- var _useSelectableItem = (0, _selection.useSelectableItem)({
100
- isDisabled: isDisabled,
101
- selectionManager: state.selectionManager,
102
- key: key,
103
- ref: cellRef
104
- }),
105
- selectableItemProps = _useSelectableItem.itemProps;
106
-
107
- var mergedProps = (0, _utils.mergeProps)(gridCellProps, hoverProps, focusWithinProps, focusProps, selectableItemProps);
85
+ var mergedProps = (0, _utils.mergeProps)(raRowProps, hoverProps, focusWithinProps, focusProps);
108
86
 
109
87
  var _useStatusClasses = (0, _hooks.useStatusClasses)(className, {
110
88
  isHovered: isSelectable && isHovered,
111
89
  isSelected: isSelected,
112
- isFocused: isDisabled ? false : isFocusVisible,
90
+ isFocused: isDisabled ? false : isFocusVisible || isFocusVisibleWithin,
113
91
  hasSeparator: hasSeparator
114
92
  }),
115
93
  classNames = _useStatusClasses.classNames;
116
94
 
117
95
  return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
118
96
  isDisabled: isDisabled,
119
- isRow: true
120
- }, raRowProps, {
97
+ isRow: true,
121
98
  ref: rowRef
122
- }, rowProps), (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
123
- as: "div",
124
- ref: cellRef
125
- }, mergedProps, {
99
+ }, mergedProps, rowProps, {
100
+ sx: {
101
+ outline: 'none'
102
+ }
103
+ }), (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
104
+ as: "div"
105
+ }, gridCellProps, {
126
106
  variant: "boxes.listViewItem",
127
107
  isFocused: isDisabled ? false : isFocusVisible,
128
108
  isDisabled: isDisabled,
@@ -136,7 +116,6 @@ ListViewItem.propTypes = {
136
116
  item: _propTypes["default"].shape({
137
117
  key: _propTypes["default"].string,
138
118
  rendered: _propTypes["default"].node,
139
- childNodes: _propTypes["default"].arrayOf(_propTypes["default"].shape({})),
140
119
  props: _propTypes["default"].shape({
141
120
  'data-id': _propTypes["default"].string,
142
121
  listItemProps: _propTypes["default"].shape({}),
@@ -9,22 +9,19 @@ import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
9
9
  import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
10
10
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
11
11
  import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
12
- import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
13
- import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
14
12
  import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
15
13
  var _excluded = ["disabledKeys", "loadingState", "onLoadMore", "onSelectionChange", "selectionMode", "selectionStyle"];
16
14
 
17
15
  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; }
18
16
 
19
- 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; }
17
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
20
18
 
21
19
  import React, { useMemo, forwardRef, useRef, useImperativeHandle } from 'react';
22
- import { GridCollection, useGridState } from '@react-stately/grid';
23
- import { GridKeyboardDelegate, useGrid } from '@react-aria/grid';
20
+ import { useList } from '@react-aria/list';
24
21
  import { ListLayout } from '@react-stately/layout';
25
22
  import { useListState } from '@react-stately/list';
26
23
  import PropTypes from 'prop-types';
27
- import { useCollator, useLocale } from '@react-aria/i18n';
24
+ import { useCollator } from '@react-aria/i18n';
28
25
  import { Virtualizer, VirtualizerItem } from '@react-aria/virtualizer';
29
26
  import { ListViewContext } from './ListViewContext';
30
27
  import ListViewItem from '../ListViewItem';
@@ -89,82 +86,38 @@ var ListView = /*#__PURE__*/forwardRef(function (props, ref) {
89
86
  useImperativeHandle(ref, function () {
90
87
  return listViewRef.current;
91
88
  });
92
-
93
- var _useListState = useListState(props),
94
- collection = _useListState.collection;
95
-
96
- var _useLocale = useLocale(),
97
- direction = _useLocale.direction;
98
-
99
- var collator = useCollator({
100
- usage: 'search',
101
- sensitivity: 'base'
102
- });
103
- var gridCollection = useMemo(function () {
104
- var _context;
105
-
106
- return new GridCollection({
107
- columnCount: 1,
108
- items: _mapInstanceProperty(_context = _Array$from(collection)).call(_context, function (item) {
109
- return _objectSpread(_objectSpread({}, item), {}, {
110
- hasChildNodes: true,
111
- childNodes: [{
112
- key: "cell-".concat(item.key),
113
- type: 'cell',
114
- index: 0,
115
- value: null,
116
- level: 0,
117
- rendered: null,
118
- textValue: item.textValue,
119
- hasChildNodes: false,
120
- childNodes: []
121
- }]
122
- });
123
- })
124
- });
125
- }, [collection]);
126
- var state = useGridState(_objectSpread(_objectSpread({}, props), {}, {
127
- collection: gridCollection,
128
- focusMode: 'cell',
89
+ var state = useListState(_objectSpread(_objectSpread({}, props), {}, {
129
90
  selectionBehavior: selectionStyle === 'highlight' ? 'replace' : 'toggle'
130
91
  }));
92
+ var collection = state.collection,
93
+ selectionManager = state.selectionManager;
131
94
  var layout = useListLayout(state);
132
- var keyboardDelegate = useMemo(function () {
133
- return new GridKeyboardDelegate({
134
- collection: state.collection,
135
- disabledKeys: state.disabledKeys,
136
- ref: listViewRef,
137
- direction: direction,
138
- collator: collator
139
- });
140
- }, [state, listViewRef, direction, collator]);
141
95
 
142
- var _useGrid = useGrid(_objectSpread(_objectSpread({}, props), {}, {
96
+ var _useList = useList(_objectSpread(_objectSpread({}, props), {}, {
143
97
  isVirtualized: true,
144
- keyboardDelegate: keyboardDelegate,
98
+ keyboardDelegate: layout,
145
99
  loadingState: loadingState
146
100
  }), state, listViewRef),
147
- gridProps = _useGrid.gridProps; // Sync loading state into the layout.
101
+ gridProps = _useList.gridProps; // Sync loading state into the layout.
148
102
 
149
103
 
150
104
  layout.isLoading = isLoading;
151
- var focusedItem = gridCollection.getFirstKey();
105
+ var focusedKey = selectionManager.focusedKey;
152
106
  delete gridProps.onMouseDown;
153
107
  return ___EmotionJSX(ListViewContext.Provider, {
154
108
  value: {
155
- state: state,
156
- keyboardDelegate: keyboardDelegate
109
+ state: state
157
110
  }
158
111
  }, ___EmotionJSX(Virtualizer, _extends({}, gridProps, {
159
112
  onLoadMore: onLoadMore,
160
113
  ref: listViewRef,
161
- focusedKey: focusedItem === null || focusedItem === void 0 ? void 0 : focusedItem.parentKey,
114
+ focusedKey: focusedKey,
162
115
  renderWrapper: renderWrapper,
163
116
  sizeToFit: "height",
164
117
  scrollDirection: "vertical",
165
118
  layout: layout,
166
119
  isLoading: isLoading,
167
- collection: gridCollection,
120
+ collection: collection,
168
121
  transitionDuration: 0
169
122
  }, others), function (type, item) {
170
123
  if (type === 'item') {
@@ -540,7 +540,7 @@ var ListElement = function ListElement(_ref) {
540
540
  "aria-label": "create-icon",
541
541
  size: 20
542
542
  }, ___EmotionJSX(CreateIcon, null)), ___EmotionJSX(IconButton, {
543
- "aria-label": "create-icon",
543
+ "aria-label": "actions-icon",
544
544
  size: 20
545
545
  }, ___EmotionJSX(MoreVertIcon, null))));
546
546
  };
@@ -576,7 +576,7 @@ export var Default = function Default(_ref2) {
576
576
  "aria-label": "create-icon",
577
577
  size: 20
578
578
  }, ___EmotionJSX(CreateIcon, null)), ___EmotionJSX(IconButton, {
579
- "aria-label": "create-icon",
579
+ "aria-label": "actions-icon",
580
580
  size: 20
581
581
  }, ___EmotionJSX(MoreVertIcon, null)))));
582
582
  });
@@ -1,24 +1,18 @@
1
1
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
2
- import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
3
2
  import React, { useContext, useRef } from 'react';
4
3
  import { mergeProps } from '@react-aria/utils';
5
4
  import { useFocusRing } from '@react-aria/focus';
6
5
  import PropTypes from 'prop-types';
7
- import { useGridCell, useGridRow } from '@react-aria/grid';
6
+ import { useListItem } from '@react-aria/list';
8
7
  import { useHover } from '@react-aria/interactions';
9
- import { useSelectableItem } from '@react-aria/selection';
10
8
  import { ListViewContext } from '../ListView/ListViewContext';
11
9
  import Box from '../Box';
12
10
  import { useStatusClasses } from '../../hooks';
13
11
  import { jsx as ___EmotionJSX } from "@emotion/react";
14
12
 
15
13
  var ListViewItem = function ListViewItem(props) {
16
- var _context;
17
-
18
14
  var item = props.item,
19
- _props$item = props.item,
20
- key = _props$item.key,
21
- _props$item$props = _props$item.props,
15
+ _props$item$props = props.item.props,
22
16
  listItemProps = _props$item$props.listItemProps,
23
17
  rowProps = _props$item$props.rowProps,
24
18
  _props$item$props$has = _props$item$props.hasSeparator,
@@ -26,19 +20,17 @@ var ListViewItem = function ListViewItem(props) {
26
20
  className = props.className;
27
21
  var dataId = item.props['data-id'];
28
22
 
29
- var cellNode = _concatInstanceProperty(_context = []).call(_context, item.childNodes)[0];
30
-
31
23
  var _useContext = useContext(ListViewContext),
32
24
  state = _useContext.state;
33
25
 
34
26
  var isDisabled = state.disabledKeys.has(item.key);
35
27
  var rowRef = useRef();
36
- var cellRef = useRef();
37
28
  var isSelectable = state.selectionManager.selectionMode !== 'none';
38
29
 
39
30
  var _useFocusRing = useFocusRing({
40
31
  within: true
41
32
  }),
33
+ isFocusVisibleWithin = _useFocusRing.isFocusVisible,
42
34
  focusWithinProps = _useFocusRing.focusProps;
43
35
 
44
36
  var _useFocusRing2 = useFocusRing(),
@@ -49,47 +41,36 @@ var ListViewItem = function ListViewItem(props) {
49
41
  hoverProps = _useHover.hoverProps,
50
42
  isHovered = _useHover.isHovered;
51
43
 
52
- var _useGridRow = useGridRow({
44
+ var _useListItem = useListItem({
53
45
  node: item,
54
- isVirtualized: true
46
+ isVirtualized: true,
47
+ isDisabled: isDisabled
55
48
  }, state, rowRef),
56
- raRowProps = _useGridRow.rowProps;
49
+ raRowProps = _useListItem.rowProps,
50
+ gridCellProps = _useListItem.gridCellProps;
57
51
 
58
52
  var isSelected = state.selectionManager.isSelected(item.key);
59
-
60
- var _useGridCell = useGridCell({
61
- node: cellNode,
62
- focusMode: 'cell'
63
- }, state, cellRef),
64
- gridCellProps = _useGridCell.gridCellProps;
65
-
66
- var _useSelectableItem = useSelectableItem({
67
- isDisabled: isDisabled,
68
- selectionManager: state.selectionManager,
69
- key: key,
70
- ref: cellRef
71
- }),
72
- selectableItemProps = _useSelectableItem.itemProps;
73
-
74
- var mergedProps = mergeProps(gridCellProps, hoverProps, focusWithinProps, focusProps, selectableItemProps);
53
+ var mergedProps = mergeProps(raRowProps, hoverProps, focusWithinProps, focusProps);
75
54
 
76
55
  var _useStatusClasses = useStatusClasses(className, {
77
56
  isHovered: isSelectable && isHovered,
78
57
  isSelected: isSelected,
79
- isFocused: isDisabled ? false : isFocusVisible,
58
+ isFocused: isDisabled ? false : isFocusVisible || isFocusVisibleWithin,
80
59
  hasSeparator: hasSeparator
81
60
  }),
82
61
  classNames = _useStatusClasses.classNames;
83
62
 
84
63
  return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Box, _extends({
85
64
  isDisabled: isDisabled,
86
- isRow: true
87
- }, raRowProps, {
65
+ isRow: true,
88
66
  ref: rowRef
89
- }, rowProps), ___EmotionJSX(Box, _extends({
90
- as: "div",
91
- ref: cellRef
92
- }, mergedProps, {
67
+ }, mergedProps, rowProps, {
68
+ sx: {
69
+ outline: 'none'
70
+ }
71
+ }), ___EmotionJSX(Box, _extends({
72
+ as: "div"
73
+ }, gridCellProps, {
93
74
  variant: "boxes.listViewItem",
94
75
  isFocused: isDisabled ? false : isFocusVisible,
95
76
  isDisabled: isDisabled,
@@ -103,7 +84,6 @@ ListViewItem.propTypes = {
103
84
  item: PropTypes.shape({
104
85
  key: PropTypes.string,
105
86
  rendered: PropTypes.node,
106
- childNodes: PropTypes.arrayOf(PropTypes.shape({})),
107
87
  props: PropTypes.shape({
108
88
  'data-id': PropTypes.string,
109
89
  listItemProps: PropTypes.shape({}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "1.20.1-alpha.0",
3
+ "version": "1.21.0-alpha.0",
4
4
  "description": "PingUX themeable React component library",
5
5
  "author": "ux-development@pingidentity.com",
6
6
  "license": "Apache-2.0",
@@ -82,11 +82,12 @@
82
82
  "@react-aria/combobox": "^3.0.0",
83
83
  "@react-aria/dialog": "^3.1.2",
84
84
  "@react-aria/focus": "^3.5.0",
85
- "@react-aria/grid": "^3.0.0-beta.1",
85
+ "@react-aria/grid": "^3.2.6",
86
86
  "@react-aria/i18n": "^3.3.0",
87
87
  "@react-aria/interactions": "^3.5.0",
88
88
  "@react-aria/label": "^3.1.0",
89
89
  "@react-aria/link": "^3.1.1",
90
+ "@react-aria/list": "3.0.0-nightly.3248",
90
91
  "@react-aria/listbox": "^3.3.0",
91
92
  "@react-aria/live-announcer": "^3.0.0",
92
93
  "@react-aria/menu": "^3.1.4",
@@ -102,7 +103,7 @@
102
103
  "@react-aria/switch": "3.1.1",
103
104
  "@react-aria/tabs": "^3.0.1",
104
105
  "@react-aria/tooltip": "^3.1.2",
105
- "@react-aria/utils": "^3.8.0",
106
+ "@react-aria/utils": "^3.12.0",
106
107
  "@react-aria/virtualizer": "^3.3.2",
107
108
  "@react-aria/visually-hidden": "3.2.1",
108
109
  "@react-spectrum/provider": "^3.2.1",
@@ -111,7 +112,7 @@
111
112
  "@react-stately/color": "^3.0.0-beta.2",
112
113
  "@react-stately/combobox": "^3.0.0",
113
114
  "@react-stately/data": "^3.4.0",
114
- "@react-stately/grid": "^3.0.0-beta.0",
115
+ "@react-stately/grid": "^3.1.4",
115
116
  "@react-stately/layout": "^3.2.1",
116
117
  "@react-stately/list": "^3.2.1",
117
118
  "@react-stately/menu": "^3.2.1",