@pingux/astro 2.19.0-alpha.0 → 2.19.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.
@@ -103,6 +103,9 @@ var ListView = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
103
103
  hoveredItem: hoveredItem,
104
104
  setHoveredItem: setHoveredItem
105
105
  };
106
+ state.isLoading = (0, _react.useMemo)(function () {
107
+ return isLoading;
108
+ }, [isLoading]);
106
109
  var collection = state.collection,
107
110
  selectionManager = state.selectionManager;
108
111
  var layout = useListLayout(state);
@@ -25,7 +25,7 @@ var _interactions = require("@react-aria/interactions");
25
25
  var _list = require("@react-aria/list");
26
26
  var _propTypes = _interopRequireDefault(require("prop-types"));
27
27
  var _hooks = require("../../hooks");
28
- var _Box = _interopRequireDefault(require("../Box"));
28
+ var _index = require("../../index");
29
29
  var _ListViewContext = require("./ListViewContext");
30
30
  var _react2 = require("@emotion/react");
31
31
  function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -86,7 +86,7 @@ var ListViewItem = function ListViewItem(props) {
86
86
  // Whether the current component should have legacy styles removed
87
87
  // TODO: [Astro 3.0.0] Remove the legacy styles and update the code here.
88
88
  var shouldOverRideLegacyStyles = (0, _includes["default"])(_context = (0, _keys["default"])(item.rendered.props)).call(_context, 'data');
89
- return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
89
+ return (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
90
90
  isDisabled: isDisabled,
91
91
  isRow: true,
92
92
  ref: rowRef
@@ -94,7 +94,7 @@ var ListViewItem = function ListViewItem(props) {
94
94
  sx: {
95
95
  outline: 'none'
96
96
  }
97
- }), (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
97
+ }), (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
98
98
  as: "div"
99
99
  // Apply appropriate variant dependant on whether a legacy list item is used
100
100
  ,
@@ -105,7 +105,11 @@ var ListViewItem = function ListViewItem(props) {
105
105
  isSelected: isSelected,
106
106
  className: classNames,
107
107
  "data-id": dataId
108
- }, listItemProps), item.rendered));
108
+ }, listItemProps), item.rendered, state.isLoading && isFocusVisibleWithin && (0, _react2.jsx)(_index.Box, {
109
+ variant: "listViewItem.loaderContainer"
110
+ }, (0, _react2.jsx)(_index.Loader, {
111
+ color: "neutral.50"
112
+ }))));
109
113
  };
110
114
  ListViewItem.propTypes = {
111
115
  item: _propTypes["default"].shape({
@@ -71,6 +71,17 @@ var linkedViewContainer = _objectSpread(_objectSpread({}, container), {}, {
71
71
  }
72
72
  }
73
73
  });
74
+ var loaderContainer = {
75
+ bg: 'white',
76
+ p: 'xs',
77
+ position: 'absolute',
78
+ top: 'calc(50% - 18px)',
79
+ left: 'calc(50% - 44px)',
80
+ borderWidth: '1px',
81
+ borderColor: 'neutral.80',
82
+ borderStyle: 'solid',
83
+ borderRadius: '25px'
84
+ };
74
85
  var styledContainer = {
75
86
  m: '1px',
76
87
  minHeight: '72px',
@@ -115,6 +126,7 @@ var _default = {
115
126
  linkedViewContainer: linkedViewContainer,
116
127
  rightOfData: rightOfData,
117
128
  styledContainer: styledContainer,
118
- styledListItem: styledListItem
129
+ styledListItem: styledListItem,
130
+ loaderContainer: loaderContainer
119
131
  };
120
132
  exports["default"] = _default;
@@ -90,6 +90,9 @@ var ListView = /*#__PURE__*/forwardRef(function (props, ref) {
90
90
  hoveredItem: hoveredItem,
91
91
  setHoveredItem: setHoveredItem
92
92
  };
93
+ state.isLoading = useMemo(function () {
94
+ return isLoading;
95
+ }, [isLoading]);
93
96
  var collection = state.collection,
94
97
  selectionManager = state.selectionManager;
95
98
  var layout = useListLayout(state);
@@ -17,7 +17,7 @@ import { useHover } from '@react-aria/interactions';
17
17
  import { useListItem } from '@react-aria/list';
18
18
  import PropTypes from 'prop-types';
19
19
  import { useStatusClasses } from '../../hooks';
20
- import Box from '../Box';
20
+ import { Box, Loader } from '../../index';
21
21
  import { ListViewContext } from './ListViewContext';
22
22
  import { jsx as ___EmotionJSX } from "@emotion/react";
23
23
  var ListViewItem = function ListViewItem(props) {
@@ -93,7 +93,11 @@ var ListViewItem = function ListViewItem(props) {
93
93
  isSelected: isSelected,
94
94
  className: classNames,
95
95
  "data-id": dataId
96
- }, listItemProps), item.rendered));
96
+ }, listItemProps), item.rendered, state.isLoading && isFocusVisibleWithin && ___EmotionJSX(Box, {
97
+ variant: "listViewItem.loaderContainer"
98
+ }, ___EmotionJSX(Loader, {
99
+ color: "neutral.50"
100
+ }))));
97
101
  };
98
102
  ListViewItem.propTypes = {
99
103
  item: PropTypes.shape({
@@ -64,6 +64,17 @@ var linkedViewContainer = _objectSpread(_objectSpread({}, container), {}, {
64
64
  }
65
65
  }
66
66
  });
67
+ var loaderContainer = {
68
+ bg: 'white',
69
+ p: 'xs',
70
+ position: 'absolute',
71
+ top: 'calc(50% - 18px)',
72
+ left: 'calc(50% - 44px)',
73
+ borderWidth: '1px',
74
+ borderColor: 'neutral.80',
75
+ borderStyle: 'solid',
76
+ borderRadius: '25px'
77
+ };
67
78
  var styledContainer = {
68
79
  m: '1px',
69
80
  minHeight: '72px',
@@ -108,5 +119,6 @@ export default {
108
119
  linkedViewContainer: linkedViewContainer,
109
120
  rightOfData: rightOfData,
110
121
  styledContainer: styledContainer,
111
- styledListItem: styledListItem
122
+ styledListItem: styledListItem,
123
+ loaderContainer: loaderContainer
112
124
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pingux/astro",
3
- "version": "2.19.0-alpha.0",
3
+ "version": "2.19.0-alpha.1",
4
4
  "description": "React component library for Ping Identity's design system",
5
5
  "repository": {
6
6
  "type": "git",