@aws-amplify/ui-react 0.0.0-react-19-21905cd-20250108041547 → 0.0.0-react-19-b1be9ab-20250108195152
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.
|
@@ -2,7 +2,13 @@ import * as React from 'react';
|
|
|
2
2
|
import { MergeProps } from '@aws-amplify/ui-react-core';
|
|
3
3
|
import { AriaProps, BaseComponentProps } from './base';
|
|
4
4
|
import { BaseStyleProps } from './style';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated will be removed in a future major version
|
|
7
|
+
*/
|
|
5
8
|
export type IsAny<Type> = (Type extends never ? true : false) extends false ? false : true;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated will be removed in a future major version
|
|
11
|
+
*/
|
|
6
12
|
export type ElementType = React.ElementType;
|
|
7
13
|
type AsProp<Element extends ElementType> = {
|
|
8
14
|
/**
|
|
@@ -11,8 +17,14 @@ type AsProp<Element extends ElementType> = {
|
|
|
11
17
|
*/
|
|
12
18
|
as?: Element;
|
|
13
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* @deprecated will be removed in a future major version
|
|
22
|
+
*/
|
|
14
23
|
export type PrimitivePropsWithAs<Props extends BaseViewProps, Element extends ElementType> = Omit<Props, 'as'> & AsProp<Element>;
|
|
15
24
|
type PrimitivePropsWithRef<Props extends BaseViewProps, Element extends ElementType> = Omit<Props, 'ref'> & React.RefAttributes<React.ComponentRef<Element>>;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated will be removed in a future major version
|
|
27
|
+
*/
|
|
16
28
|
export type PrimitivePropsWithHTMLAttributes<Props extends BaseViewProps, Element extends ElementType> =
|
|
17
29
|
/**
|
|
18
30
|
* Doing an IsAny<Element> conditional check here makes sure typescript infers the type of `Element`.
|
|
@@ -21,40 +33,20 @@ export type PrimitivePropsWithHTMLAttributes<Props extends BaseViewProps, Elemen
|
|
|
21
33
|
* e.g. In an event handler, onChange((event) => { console.log(event)}), event will be implicitly inferred as any without the check
|
|
22
34
|
*/
|
|
23
35
|
IsAny<Element> extends false ? MergeProps<PrimitivePropsWithRef<Props, Element>, React.ComponentPropsWithoutRef<Element>> : any;
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated will be removed in a future major version
|
|
38
|
+
*/
|
|
24
39
|
export type PrimitiveProps<Props extends BaseViewProps, Element extends ElementType> = PrimitivePropsWithHTMLAttributes<PrimitivePropsWithAs<Props, Element>, Element>;
|
|
25
40
|
/**
|
|
26
|
-
* @
|
|
27
|
-
* Modifies return type of `React.ForwardRefRenderFunction`
|
|
28
|
-
* to allow usage in React 16
|
|
41
|
+
* @deprecated will be removed in a future major version
|
|
29
42
|
*/
|
|
30
|
-
interface
|
|
31
|
-
(props: P, ref: React.ForwardedRef<T>): React.JSX.Element | null;
|
|
32
|
-
displayName?: string | undefined;
|
|
33
|
-
/**
|
|
34
|
-
* defaultProps are not supported on render functions
|
|
35
|
-
*/
|
|
36
|
-
defaultProps?: never | undefined;
|
|
37
|
-
/**
|
|
38
|
-
* propTypes are not supported on render functions
|
|
39
|
-
*/
|
|
40
|
-
propTypes?: never | undefined;
|
|
41
|
-
}
|
|
42
|
-
export interface Primitive<Props extends BaseViewProps, Element extends ElementType> extends JSElementForwardRefRenderFunction<React.ComponentRef<Element>, Props> {
|
|
43
|
+
export interface Primitive<Props extends BaseViewProps, Element extends ElementType> extends React.ForwardRefRenderFunction<React.ComponentRef<Element>, Props> {
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
|
-
* @
|
|
46
|
-
* Modifies return type of `React.ForwardRefExoticComponent`
|
|
47
|
-
* to allow usage in React 16
|
|
46
|
+
* @deprecated will be removed in a future major version
|
|
48
47
|
*/
|
|
49
|
-
interface
|
|
50
|
-
(props:
|
|
51
|
-
defaultProps?: Partial<P> | undefined;
|
|
52
|
-
displayName?: string | undefined;
|
|
53
|
-
propTypes?: any;
|
|
54
|
-
readonly $$typeof: symbol;
|
|
55
|
-
}
|
|
56
|
-
export interface ForwardRefPrimitive<Props extends BaseViewProps, DefaultElement extends ElementType> extends JSXElementForwardRefExoticComponent<PrimitiveProps<Props, DefaultElement>> {
|
|
57
|
-
<Element extends ElementType = DefaultElement>(props: PrimitiveProps<Props, Element>): React.ReactElement<Props, Element> | null;
|
|
48
|
+
export interface ForwardRefPrimitive<Props extends BaseViewProps, DefaultElement extends ElementType> extends React.ForwardRefExoticComponent<PrimitiveProps<Props, DefaultElement>> {
|
|
49
|
+
<Element extends ElementType = DefaultElement>(props: PrimitiveProps<Props, Element>): ReturnType<React.ForwardRefExoticComponent<PrimitiveProps<Props, DefaultElement>>>;
|
|
58
50
|
}
|
|
59
51
|
/** @deprecated For internal use only */
|
|
60
52
|
export interface BaseViewProps extends BaseComponentProps, BaseStyleProps, AriaProps {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react",
|
|
3
|
-
"version": "0.0.0-react-19-
|
|
3
|
+
"version": "0.0.0-react-19-b1be9ab-20250108195152",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"typecheck": "tsc --noEmit"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@aws-amplify/ui": "0.0.0-react-19-
|
|
59
|
-
"@aws-amplify/ui-react-core": "0.0.0-react-19-
|
|
58
|
+
"@aws-amplify/ui": "0.0.0-react-19-b1be9ab-20250108195152",
|
|
59
|
+
"@aws-amplify/ui-react-core": "0.0.0-react-19-b1be9ab-20250108195152",
|
|
60
60
|
"@radix-ui/react-direction": "^1.1.0",
|
|
61
61
|
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
62
62
|
"@radix-ui/react-slider": "^1.2.2",
|