@react-types/card 3.0.0-alpha.43 → 3.0.0-alpha.44

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.
Files changed (2) hide show
  1. package/package.json +4 -5
  2. package/src/index.d.ts +1 -55
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-types/card",
3
- "version": "3.0.0-alpha.43",
3
+ "version": "3.0.0-alpha.44",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "types": "src/index.d.ts",
@@ -9,16 +9,15 @@
9
9
  "url": "https://github.com/adobe/react-spectrum"
10
10
  },
11
11
  "dependencies": {
12
- "@react-stately/virtualizer": "^4.4.6",
13
- "@react-types/provider": "^3.8.15",
14
- "@react-types/shared": "^3.33.1"
12
+ "@react-spectrum/card": "3.0.0-alpha.54"
15
13
  },
16
14
  "peerDependencies": {
15
+ "@react-spectrum/provider": "^3.0.0",
17
16
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
18
17
  "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
19
18
  },
20
19
  "publishConfig": {
21
20
  "access": "public"
22
21
  },
23
- "gitHead": "8df187370053aa35f553cb388ad670f65e1ab371"
22
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
24
23
  }
package/src/index.d.ts CHANGED
@@ -10,58 +10,4 @@
10
10
  * governing permissions and limitations under the License.
11
11
  */
12
12
 
13
- import {AriaLabelingProps, AsyncLoadable, Collection, CollectionBase, Direction, DOMProps, KeyboardDelegate, LoadingState, MultipleSelection, Node, Orientation, StyleProps} from '@react-types/shared';
14
- import {Layout} from '@react-stately/virtualizer';
15
- import {ReactNode} from 'react';
16
- import {Scale} from '@react-types/provider';
17
-
18
- interface AriaCardProps extends AriaLabelingProps {}
19
-
20
- interface SpectrumCardProps extends AriaCardProps, StyleProps, DOMProps {
21
- children: ReactNode,
22
- isQuiet?: boolean,
23
- layout?: 'grid' | 'waterfall' | 'gallery',
24
- // TODO: readd size when we get updated designs from spectrum
25
- // size?: 'S' | 'M' | 'L',
26
- orientation?: Orientation
27
- }
28
-
29
- interface LayoutOptions {
30
- // cardSize?: 'S' | 'M' | 'L',
31
- cardOrientation?: Orientation,
32
- collator?: Intl.Collator,
33
- // TODO: is this valid or is scale a spectrum specific thing that should be left out of the layouts?
34
- // Added here so we can keep the default item padding options within the layouts instead of having to
35
- // do extra work in CardView to accommodate different sizing for scales
36
- scale?: Scale
37
- }
38
-
39
- // TODO: double check if this is the best way to type the layout provided to the CardView
40
- interface CardViewLayout<T> extends Layout<Node<T>>, KeyboardDelegate {
41
- collection: Collection<Node<T>>,
42
- disabledKeys: any,
43
- isLoading: boolean,
44
- direction: Direction,
45
- layoutType: string,
46
- margin?: number
47
- }
48
-
49
- export interface CardViewLayoutConstructor<T> {
50
- new (options?: LayoutOptions): CardViewLayout<T>
51
- }
52
-
53
- interface CardViewProps<T> extends CollectionBase<T>, MultipleSelection, Omit<AsyncLoadable, 'isLoading'> {
54
- // TODO: Does LayoutConstructor and Layout give enough info for a user to know what to put in their own custom layout?
55
- // Replaced with CardViewLayout so that they know they need to have keyboardDelegate stuff as well as collection, disabledKeys, etc
56
- layout: CardViewLayoutConstructor<T> | CardViewLayout<T>,
57
- // TODO: readd size when we get updated designs from spectrum
58
- // cardSize?: 'S' | 'M' | 'L',
59
- cardOrientation?: Orientation,
60
- isQuiet?: boolean,
61
- renderEmptyState?: () => ReactNode,
62
- loadingState?: LoadingState
63
- }
64
-
65
- export interface AriaCardViewProps<T> extends CardViewProps<T>, DOMProps, AriaLabelingProps {}
66
-
67
- export interface SpectrumCardViewProps<T> extends AriaCardViewProps<T>, StyleProps {}
13
+ export {AriaCardViewProps, SpectrumCardProps, SpectrumCardViewProps} from '@react-spectrum/card';