@react-spectrum/card 3.0.0-alpha.19 → 3.0.0-alpha.20

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/card",
3
- "version": "3.0.0-alpha.19",
3
+ "version": "3.0.0-alpha.20",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,26 +36,26 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/focus": "^3.12.1",
40
- "@react-aria/grid": "^3.7.1",
41
- "@react-aria/i18n": "^3.7.2",
42
- "@react-aria/interactions": "^3.15.1",
43
- "@react-aria/utils": "^3.17.0",
44
- "@react-aria/virtualizer": "^3.8.1",
45
- "@react-spectrum/checkbox": "^3.7.2",
46
- "@react-spectrum/divider": "^3.5.2",
47
- "@react-spectrum/layout": "^3.5.2",
48
- "@react-spectrum/progress": "^3.5.1",
49
- "@react-spectrum/utils": "^3.9.2",
50
- "@react-stately/collections": "^3.8.0",
51
- "@react-stately/grid": "^3.6.1",
52
- "@react-stately/list": "^3.8.1",
53
- "@react-stately/utils": "^3.6.0",
54
- "@react-stately/virtualizer": "^3.5.2",
55
- "@react-types/card": "3.0.0-alpha.15",
39
+ "@react-aria/focus": "^3.13.0",
40
+ "@react-aria/grid": "^3.8.0",
41
+ "@react-aria/i18n": "^3.8.0",
42
+ "@react-aria/interactions": "^3.16.0",
43
+ "@react-aria/utils": "^3.18.0",
44
+ "@react-aria/virtualizer": "^3.9.0",
45
+ "@react-spectrum/checkbox": "^3.7.3",
46
+ "@react-spectrum/divider": "^3.5.3",
47
+ "@react-spectrum/layout": "^3.5.3",
48
+ "@react-spectrum/progress": "^3.6.0",
49
+ "@react-spectrum/utils": "^3.10.0",
50
+ "@react-stately/collections": "^3.9.0",
51
+ "@react-stately/grid": "^3.7.0",
52
+ "@react-stately/list": "^3.9.0",
53
+ "@react-stately/utils": "^3.7.0",
54
+ "@react-stately/virtualizer": "^3.6.0",
55
+ "@react-types/card": "3.0.0-alpha.16",
56
56
  "@react-types/provider": "^3.6.2",
57
57
  "@react-types/shared": "^3.18.1",
58
- "@swc/helpers": "^0.4.14"
58
+ "@swc/helpers": "^0.5.0"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "5911ed21de4b76d66f6254c02302519e02d50e16"
70
+ "gitHead": "504e40e0a50c1b20ed0fb3ba9561a263b6d5565e"
71
71
  }
package/src/CardBase.tsx CHANGED
@@ -15,8 +15,7 @@ import {Checkbox} from '@react-spectrum/checkbox';
15
15
  import {classNames, SlotProvider, useDOMRef, useHasChild, useStyleProps} from '@react-spectrum/utils';
16
16
  import {DOMRef, Node} from '@react-types/shared';
17
17
  import {filterDOMProps, mergeProps, useLayoutEffect, useResizeObserver, useSlotId} from '@react-aria/utils';
18
- import {FocusRing} from '@react-aria/focus';
19
- import {getFocusableTreeWalker} from '@react-aria/focus';
18
+ import {FocusRing, getFocusableTreeWalker} from '@react-aria/focus';
20
19
  import React, {HTMLAttributes, useCallback, useMemo, useRef, useState} from 'react';
21
20
  import styles from '@adobe/spectrum-css-temp/components/card/vars.css';
22
21
  import {useCardViewContext} from './CardViewContext';
package/src/CardView.tsx CHANGED
@@ -19,7 +19,7 @@ import {GridCollection, useGridState} from '@react-stately/grid';
19
19
  import intlMessages from '../intl/*.json';
20
20
  import {mergeProps} from '@react-aria/utils';
21
21
  import {ProgressCircle} from '@react-spectrum/progress';
22
- import React, {ReactElement, useCallback, useMemo, useRef} from 'react';
22
+ import React, {ReactElement, ReactNode, useCallback, useMemo, useRef} from 'react';
23
23
  import {ReusableView} from '@react-stately/virtualizer';
24
24
  import {SpectrumCardViewProps} from '@react-types/card';
25
25
  import styles from '@adobe/spectrum-css-temp/components/card/vars.css';
@@ -88,12 +88,15 @@ function CardView<T extends object>(props: SpectrumCardViewProps<T>, ref: DOMRef
88
88
  keyboardDelegate: cardViewLayout
89
89
  }, state, domRef);
90
90
 
91
- type View = ReusableView<Node<T>, unknown>;
91
+ type View = ReusableView<Node<T>, ReactNode>;
92
92
  let renderWrapper = (parent: View, reusableView: View) => (
93
93
  <VirtualizerItem
94
94
  key={reusableView.key}
95
- reusableView={reusableView}
96
- parent={parent} />
95
+ layoutInfo={reusableView.layoutInfo}
96
+ virtualizer={reusableView.virtualizer}
97
+ parent={parent?.layoutInfo}>
98
+ {reusableView.rendered}
99
+ </VirtualizerItem>
97
100
  );
98
101
 
99
102
  let focusedKey = state.selectionManager.focusedKey;