@aws-amplify/ui-react 6.8.1 → 6.9.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.
- package/dist/esm/PrimitiveCatalog.mjs +28 -13
- package/dist/esm/components/ThemeProvider/ThemeProvider.mjs +2 -5
- package/dist/esm/primitives/DropZone/DropZoneChildren.mjs +3 -7
- package/dist/esm/primitives/Menu/Menu.mjs +2 -5
- package/dist/esm/primitives/Menu/MenuItem.mjs +2 -5
- package/dist/esm/primitives/SliderField/SliderField.mjs +2 -5
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +16 -35
- package/dist/internal.js +28 -13
- package/dist/types/components/AccountSettings/ChangePassword/ChangePassword.d.ts +2 -2
- package/dist/types/components/AccountSettings/DeleteUser/DeleteUser.d.ts +2 -2
- package/dist/types/components/Authenticator/Authenticator.d.ts +13 -13
- package/dist/types/components/Authenticator/ConfirmSignIn/ConfirmSignIn.d.ts +2 -2
- package/dist/types/components/Authenticator/ConfirmSignUp/ConfirmSignUp.d.ts +2 -2
- package/dist/types/components/Authenticator/FederatedSignIn/FederatedSignIn.d.ts +2 -2
- package/dist/types/components/Authenticator/FederatedSignIn/FederatedSignInButtons/FederatedSignInButton.d.ts +2 -2
- package/dist/types/components/Authenticator/ForceNewPassword/ForceNewPassword.d.ts +5 -5
- package/dist/types/components/Authenticator/ForgotPassword/ConfirmResetPassword.d.ts +4 -4
- package/dist/types/components/Authenticator/ForgotPassword/ForgotPassword.d.ts +4 -4
- package/dist/types/components/Authenticator/RouteContainer/RouteContainer.d.ts +2 -2
- package/dist/types/components/Authenticator/RouteContainer/types.d.ts +0 -1
- package/dist/types/components/Authenticator/Router/Router.d.ts +2 -2
- package/dist/types/components/Authenticator/SetupTotp/SetupTotp.d.ts +4 -4
- package/dist/types/components/Authenticator/SignIn/SignIn.d.ts +2 -2
- package/dist/types/components/Authenticator/SignUp/SignUp.d.ts +3 -3
- package/dist/types/components/Authenticator/VerifyUser/ConfirmVerifyUser.d.ts +2 -2
- package/dist/types/components/Authenticator/VerifyUser/VerifyUser.d.ts +4 -4
- package/dist/types/components/Authenticator/hooks/useCustomComponents/defaultComponents.d.ts +3 -4
- package/dist/types/components/Authenticator/shared/ConfirmSignInFooter.d.ts +2 -2
- package/dist/types/components/Authenticator/shared/ConfirmationCodeInput.d.ts +2 -2
- package/dist/types/components/Authenticator/shared/FormField.d.ts +2 -2
- package/dist/types/components/Authenticator/shared/FormFields.d.ts +2 -2
- package/dist/types/components/Authenticator/shared/RemoteErrorMessage.d.ts +2 -2
- package/dist/types/components/Authenticator/shared/SignInSignUpTabs.d.ts +2 -2
- package/dist/types/components/Authenticator/shared/TwoButtonSubmitFooter.d.ts +3 -3
- package/dist/types/components/Authenticator/withAuthenticator.d.ts +1 -1
- package/dist/types/components/FilterChildren/FilterChildren.d.ts +1 -1
- package/dist/types/components/ThemeProvider/ComponentStyle.d.ts +1 -1
- package/dist/types/components/ThemeProvider/GlobalStyle.d.ts +1 -1
- package/dist/types/components/ThemeProvider/Style.d.ts +1 -1
- package/dist/types/components/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/dist/types/components/ThemeProvider/ThemeStyle.d.ts +1 -1
- package/dist/types/components/shared/ValidationErrors.d.ts +2 -2
- package/dist/types/primitives/Alert/AlertIcon.d.ts +2 -2
- package/dist/types/primitives/Collection/Collection.d.ts +2 -2
- package/dist/types/primitives/DropZone/DropZone.d.ts +4 -4
- package/dist/types/primitives/DropZone/DropZoneChildren.d.ts +10 -9
- package/dist/types/primitives/DropZone/DropZoneProvider.d.ts +1 -1
- package/dist/types/primitives/Icon/context/IconsProvider.d.ts +1 -1
- package/dist/types/primitives/Icon/icons/types.d.ts +1 -2
- package/dist/types/primitives/Pagination/usePaginationItems.d.ts +2 -2
- package/dist/types/primitives/types/autocomplete.d.ts +1 -1
- package/dist/types/primitives/types/button.d.ts +0 -1
- package/dist/types/primitives/types/collection.d.ts +2 -2
- package/dist/types/primitives/types/field.d.ts +0 -1
- package/dist/types/primitives/types/fieldGroup.d.ts +0 -1
- package/dist/types/primitives/types/image.d.ts +0 -1
- package/dist/types/primitives/types/label.d.ts +0 -1
- package/dist/types/primitives/types/rating.d.ts +2 -3
- package/dist/types/primitives/types/style.d.ts +0 -1
- package/dist/types/primitives/types/switchField.d.ts +0 -1
- package/dist/types/primitives/types/textArea.d.ts +0 -1
- package/dist/types/primitives/types/view.d.ts +20 -28
- package/dist/types/primitives/utils/primitiveWithForwardRef.d.ts +2 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +9 -10
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RouteProps } from '../RouteContainer';
|
|
3
3
|
export declare const ConfirmResetPassword: {
|
|
4
|
-
({ className, variation, }: RouteProps): JSX.Element;
|
|
5
|
-
Header(): JSX.Element;
|
|
6
|
-
Footer(): JSX.Element;
|
|
4
|
+
({ className, variation, }: RouteProps): React.JSX.Element;
|
|
5
|
+
Header(): React.JSX.Element;
|
|
6
|
+
Footer(): React.JSX.Element;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RouteProps } from '../RouteContainer';
|
|
3
3
|
export declare const ForgotPassword: {
|
|
4
|
-
({ className, variation, }: RouteProps): JSX.Element;
|
|
5
|
-
Header(): JSX.Element;
|
|
6
|
-
Footer(): JSX.Element;
|
|
4
|
+
({ className, variation, }: RouteProps): React.JSX.Element;
|
|
5
|
+
Header(): React.JSX.Element;
|
|
6
|
+
Footer(): React.JSX.Element;
|
|
7
7
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RouteContainerProps } from './types';
|
|
3
|
-
export declare function RouteContainer({ children, className, variation, }: RouteContainerProps): JSX.Element;
|
|
3
|
+
export declare function RouteContainer({ children, className, variation, }: RouteContainerProps): React.JSX.Element;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RouterProps } from './types';
|
|
3
|
-
export declare function Router({ className, hideSignUp, variation, }: RouterProps): JSX.Element;
|
|
3
|
+
export declare function Router({ className, hideSignUp, variation, }: RouterProps): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { RouteProps } from '../RouteContainer';
|
|
3
3
|
export declare const SetupTotp: {
|
|
4
|
-
({ className, variation, }: RouteProps): JSX.Element;
|
|
5
|
-
Header(): JSX.Element;
|
|
6
|
-
Footer(): JSX.Element;
|
|
4
|
+
({ className, variation, }: RouteProps): React.JSX.Element;
|
|
5
|
+
Header(): React.JSX.Element;
|
|
6
|
+
Footer(): React.JSX.Element;
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare function SignIn(): JSX.Element;
|
|
2
|
+
export declare function SignIn(): React.JSX.Element;
|
|
3
3
|
export declare namespace SignIn {
|
|
4
4
|
var Footer: () => React.JSX.Element;
|
|
5
|
-
var Header: () => JSX.Element;
|
|
5
|
+
var Header: () => React.JSX.Element;
|
|
6
6
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare function SignUp(): JSX.Element;
|
|
2
|
+
export declare function SignUp(): React.JSX.Element;
|
|
3
3
|
export declare namespace SignUp {
|
|
4
|
-
var Header: () => JSX.Element;
|
|
4
|
+
var Header: () => React.JSX.Element;
|
|
5
5
|
var FormFields: () => React.JSX.Element;
|
|
6
|
-
var Footer: () => JSX.Element;
|
|
6
|
+
var Footer: () => React.JSX.Element;
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RouteProps } from '../RouteContainer';
|
|
3
3
|
export declare const ConfirmVerifyUser: {
|
|
4
|
-
({ className, variation, }: RouteProps): JSX.Element;
|
|
4
|
+
({ className, variation, }: RouteProps): React.JSX.Element;
|
|
5
5
|
Header(): React.JSX.Element;
|
|
6
|
-
Footer(): JSX.Element | null;
|
|
6
|
+
Footer(): React.JSX.Element | null;
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RouteProps } from '../RouteContainer';
|
|
3
3
|
export declare const VerifyUser: {
|
|
4
|
-
({ className, variation, }: RouteProps): JSX.Element;
|
|
5
|
-
Header(): JSX.Element;
|
|
6
|
-
Footer(): JSX.Element;
|
|
4
|
+
({ className, variation, }: RouteProps): React.JSX.Element;
|
|
5
|
+
Header(): React.JSX.Element;
|
|
6
|
+
Footer(): React.JSX.Element;
|
|
7
7
|
};
|
package/dist/types/components/Authenticator/hooks/useCustomComponents/defaultComponents.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
interface Components {
|
|
3
|
-
Footer?: () => JSX.Element | null;
|
|
4
|
-
FormFields?: () => JSX.Element | null;
|
|
5
|
-
Header?: () => JSX.Element | null;
|
|
2
|
+
Footer?: () => React.JSX.Element | null;
|
|
3
|
+
FormFields?: () => React.JSX.Element | null;
|
|
4
|
+
Header?: () => React.JSX.Element | null;
|
|
6
5
|
}
|
|
7
6
|
export interface DefaultComponents extends Omit<Components, 'FormFields'> {
|
|
8
7
|
ConfirmSignIn?: Omit<Components, 'FormFields'>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const ConfirmSignInFooter: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ConfirmSignInFooter: () => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface ConfirmationCodeInputProps {
|
|
3
3
|
errorText?: string;
|
|
4
4
|
labelHidden?: boolean;
|
|
@@ -7,4 +7,4 @@ export interface ConfirmationCodeInputProps {
|
|
|
7
7
|
required?: boolean;
|
|
8
8
|
type?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const ConfirmationCodeInput: (props: ConfirmationCodeInputProps) => JSX.Element;
|
|
10
|
+
export declare const ConfirmationCodeInput: (props: ConfirmationCodeInputProps) => React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { FormFieldOptions } from '@aws-amplify/ui';
|
|
3
3
|
export interface FormFieldProps extends Omit<FormFieldOptions, 'label'> {
|
|
4
4
|
label: string;
|
|
5
5
|
name: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function FormField({ autocomplete: autoComplete, dialCode, name, type, ...props }: FormFieldProps): JSX.Element;
|
|
7
|
+
export declare function FormField({ autocomplete: autoComplete, dialCode, name, type, ...props }: FormFieldProps): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function FormFields(): JSX.Element;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare function FormFields(): React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const RemoteErrorMessage: () => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const RemoteErrorMessage: () => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { RouteProps } from '../RouteContainer';
|
|
3
3
|
export declare const SignInSignUpTabs: ({ className, hideSignUp, variation, }: {
|
|
4
4
|
hideSignUp: boolean;
|
|
5
|
-
} & RouteProps) => JSX.Element;
|
|
5
|
+
} & RouteProps) => React.JSX.Element;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { AuthEventTypes } from '@aws-amplify/ui';
|
|
3
3
|
export interface TwoButtonSubmitFooterProps {
|
|
4
4
|
cancelButtonSendType: AuthEventTypes;
|
|
5
5
|
cancelButtonText: string;
|
|
6
|
-
submitButtonText?: JSX.Element;
|
|
6
|
+
submitButtonText?: React.JSX.Element;
|
|
7
7
|
}
|
|
8
|
-
export declare const TwoButtonSubmitFooter: (props: TwoButtonSubmitFooterProps) => JSX.Element;
|
|
8
|
+
export declare const TwoButtonSubmitFooter: (props: TwoButtonSubmitFooterProps) => React.JSX.Element;
|
|
@@ -9,4 +9,4 @@ export interface WithAuthenticatorProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* [📖 Docs](https://ui.docs.amplify.aws/react/connected-components/authenticator)
|
|
11
11
|
*/
|
|
12
|
-
export declare function withAuthenticator<Props = {}>(Component: React.ComponentType<Props & WithAuthenticatorProps>, options?: WithAuthenticatorOptions): (props: Props) => JSX.Element;
|
|
12
|
+
export declare function withAuthenticator<Props = {}>(Component: React.ComponentType<Props & WithAuthenticatorProps>, options?: WithAuthenticatorOptions): (props: Props) => React.JSX.Element;
|
|
@@ -7,4 +7,4 @@ export interface FilterChildrenProps {
|
|
|
7
7
|
allowedFilters?: string[];
|
|
8
8
|
targetFilter?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const FilterChildren: ({ allowedFilters, children, targetFilter, }: FilterChildrenProps) => JSX.Element | null;
|
|
10
|
+
export declare const FilterChildren: ({ allowedFilters, children, targetFilter, }: FilterChildrenProps) => React.JSX.Element | null;
|
|
@@ -12,7 +12,7 @@ interface ComponentStyleProps extends React.ComponentProps<'style'> {
|
|
|
12
12
|
componentThemes: BaseComponentTheme[];
|
|
13
13
|
}
|
|
14
14
|
export declare const ComponentStyle: {
|
|
15
|
-
({ theme, componentThemes, ...rest }: ComponentStyleProps): JSX.Element | null;
|
|
15
|
+
({ theme, componentThemes, ...rest }: ComponentStyleProps): React.JSX.Element | null;
|
|
16
16
|
displayName: string;
|
|
17
17
|
};
|
|
18
18
|
export {};
|
|
@@ -10,7 +10,7 @@ interface GlobalStyleProps extends React.ComponentProps<'style'> {
|
|
|
10
10
|
styles: Parameters<typeof createGlobalCSS>[0];
|
|
11
11
|
}
|
|
12
12
|
export declare const GlobalStyle: {
|
|
13
|
-
({ styles, ...rest }: GlobalStyleProps): JSX.Element | null;
|
|
13
|
+
({ styles, ...rest }: GlobalStyleProps): React.JSX.Element | null;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -3,7 +3,7 @@ interface StyleProps extends React.ComponentProps<'style'> {
|
|
|
3
3
|
cssText?: string;
|
|
4
4
|
}
|
|
5
5
|
export declare const Style: {
|
|
6
|
-
({ cssText, ...rest }: StyleProps): JSX.Element | null;
|
|
6
|
+
({ cssText, ...rest }: StyleProps): React.JSX.Element | null;
|
|
7
7
|
displayName: string;
|
|
8
8
|
};
|
|
9
9
|
export {};
|
|
@@ -27,5 +27,5 @@ interface ThemeProviderProps {
|
|
|
27
27
|
/**
|
|
28
28
|
* [📖 Docs](https://ui.docs.amplify.aws/react/theming)
|
|
29
29
|
*/
|
|
30
|
-
export declare function ThemeProvider({ children, colorMode, direction, nonce, theme, }: ThemeProviderProps): JSX.Element;
|
|
30
|
+
export declare function ThemeProvider({ children, colorMode, direction, nonce, theme, }: ThemeProviderProps): React.JSX.Element;
|
|
31
31
|
export {};
|
|
@@ -10,7 +10,7 @@ interface ThemeStyleProps extends React.ComponentProps<'style'> {
|
|
|
10
10
|
theme?: WebTheme;
|
|
11
11
|
}
|
|
12
12
|
export declare const ThemeStyle: {
|
|
13
|
-
({ theme, ...rest }: ThemeStyleProps): JSX.Element | null;
|
|
13
|
+
({ theme, ...rest }: ThemeStyleProps): React.JSX.Element | null;
|
|
14
14
|
displayName: string;
|
|
15
15
|
};
|
|
16
16
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
export interface ValidationErrorsProps {
|
|
3
3
|
errors: string[];
|
|
4
4
|
id?: string;
|
|
5
5
|
dataAttr?: string;
|
|
6
6
|
}
|
|
7
|
-
export declare const ValidationErrors: ({ errors, id, dataAttr, }: ValidationErrorsProps) => JSX.Element | null;
|
|
7
|
+
export declare const ValidationErrors: ({ errors, id, dataAttr, }: ValidationErrorsProps) => React.JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AlertVariations, ViewProps } from '../types';
|
|
3
3
|
interface AlertIconProps extends Pick<ViewProps, 'role' | 'ariaLabel'> {
|
|
4
4
|
variation?: AlertVariations;
|
|
@@ -8,7 +8,7 @@ interface AlertIconProps extends Pick<ViewProps, 'role' | 'ariaLabel'> {
|
|
|
8
8
|
* @internal For internal Amplify UI use only. May be removed in a future release.
|
|
9
9
|
*/
|
|
10
10
|
export declare const AlertIcon: {
|
|
11
|
-
({ variation, ariaHidden, ariaLabel, role, }: AlertIconProps): JSX.Element | null;
|
|
11
|
+
({ variation, ariaHidden, ariaLabel, role, }: AlertIconProps): React.JSX.Element | null;
|
|
12
12
|
displayName: string;
|
|
13
13
|
};
|
|
14
14
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { BaseCollectionProps, ElementType } from '../types';
|
|
3
3
|
/**
|
|
4
4
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/collection)
|
|
5
5
|
*/
|
|
6
6
|
export declare const Collection: {
|
|
7
|
-
<Item, Element_1 extends ElementType>({ className, isSearchable, isPaginated, items, itemsPerPage, searchFilter, searchLabel, searchNoResultsFound, searchPlaceholder, type, testId, ...rest }: BaseCollectionProps<Item, Element_1>): JSX.Element;
|
|
7
|
+
<Item, Element_1 extends ElementType>({ className, isSearchable, isPaginated, items, itemsPerPage, searchFilter, searchLabel, searchNoResultsFound, searchPlaceholder, type, testId, ...rest }: BaseCollectionProps<Item, Element_1>): React.JSX.Element;
|
|
8
8
|
displayName: string;
|
|
9
9
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ForwardRefPrimitive } from '../types';
|
|
2
2
|
import { BaseDropZoneProps } from './types';
|
|
3
|
-
import {
|
|
3
|
+
import { AcceptedType, DefaultType, RejectedType } from './DropZoneChildren';
|
|
4
4
|
type DropZoneType = ForwardRefPrimitive<BaseDropZoneProps, 'div'> & {
|
|
5
|
-
Accepted:
|
|
6
|
-
Rejected:
|
|
7
|
-
Default:
|
|
5
|
+
Accepted: AcceptedType;
|
|
6
|
+
Rejected: RejectedType;
|
|
7
|
+
Default: DefaultType;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
10
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/dropzone)
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Primitive } from '../types';
|
|
3
2
|
/**
|
|
4
3
|
* These are syntactic sugar components that make it easy to compose children
|
|
5
4
|
* in DropZone without having to expose the DropZoneContext.
|
|
6
5
|
*/
|
|
6
|
+
export type AcceptedType = (props: {
|
|
7
|
+
children?: React.ReactNode;
|
|
8
|
+
}) => React.JSX.Element | null;
|
|
7
9
|
/**
|
|
8
10
|
* This component renders when the user is dragging ONLY accepted files on the DropZone.
|
|
9
11
|
*/
|
|
10
|
-
declare const Accepted:
|
|
12
|
+
export declare const Accepted: AcceptedType;
|
|
13
|
+
export type RejectedType = (props: {
|
|
11
14
|
children?: React.ReactNode;
|
|
12
|
-
}
|
|
15
|
+
}) => React.JSX.Element | null;
|
|
13
16
|
/**
|
|
14
17
|
* This component renders when the user is dragging ANY rejected files on the DropZone.
|
|
15
18
|
*/
|
|
16
|
-
declare const Rejected:
|
|
19
|
+
export declare const Rejected: RejectedType;
|
|
20
|
+
export type DefaultType = (props: {
|
|
17
21
|
children?: React.ReactNode;
|
|
18
|
-
}
|
|
22
|
+
}) => React.JSX.Element | null;
|
|
19
23
|
/**
|
|
20
24
|
* This component renders by default when the user is not dragging.
|
|
21
25
|
*/
|
|
22
|
-
declare const Default:
|
|
23
|
-
children?: React.ReactNode;
|
|
24
|
-
}, 'div'>;
|
|
25
|
-
export { Accepted, Rejected, Default };
|
|
26
|
+
export declare const Default: DefaultType;
|
|
@@ -5,4 +5,4 @@ interface IconProviderProps {
|
|
|
5
5
|
icons?: IconsContextInterface;
|
|
6
6
|
}
|
|
7
7
|
export { IconsContextInterface };
|
|
8
|
-
export declare function IconsProvider({ children, icons, }: IconProviderProps): JSX.Element;
|
|
8
|
+
export declare function IconsProvider({ children, icons, }: IconProviderProps): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
interface UsePaginationItemsProps {
|
|
3
3
|
currentPage: number;
|
|
4
4
|
totalPages: number;
|
|
@@ -22,5 +22,5 @@ interface UsePaginationItemsProps {
|
|
|
22
22
|
* @param onChange callback function triggered every time the page changes
|
|
23
23
|
* @returns an array of pagination items
|
|
24
24
|
*/
|
|
25
|
-
export declare const usePaginationItems: ({ currentPage, totalPages, hasMorePages, siblingCount, currentPageLabel, pageLabel, previousLabel, nextLabel, onNext, onPrevious, onChange, }: UsePaginationItemsProps) => JSX.Element[];
|
|
25
|
+
export declare const usePaginationItems: ({ currentPage, totalPages, hasMorePages, siblingCount, currentPageLabel, pageLabel, previousLabel, nextLabel, onNext, onPrevious, onChange, }: UsePaginationItemsProps) => React.JSX.Element[];
|
|
26
26
|
export {};
|
|
@@ -56,7 +56,7 @@ interface CollectionChildren<Item> {
|
|
|
56
56
|
* The component to be repeated
|
|
57
57
|
* Same interface as Array.prototype.map
|
|
58
58
|
*/
|
|
59
|
-
children: (item: Item, index: number) => JSX.Element;
|
|
59
|
+
children: (item: Item, index: number) => React.JSX.Element;
|
|
60
60
|
}
|
|
61
61
|
export interface CollectionBaseProps<Item> extends CollectionChildren<Item> {
|
|
62
62
|
/**
|
|
@@ -69,7 +69,7 @@ export type ListCollectionProps<Item> = Omit<BaseFlexProps, 'children'> & Collec
|
|
|
69
69
|
export type GridCollectionProps<Item> = Omit<BaseGridProps, 'children'> & CollectionBaseProps<Item>;
|
|
70
70
|
/**
|
|
71
71
|
* Omits `React.ReactNode` as children to prevent intersection type for `children` of
|
|
72
|
-
* `React.ReactNode & (item: Item, index: number) => JSX.Element`
|
|
72
|
+
* `React.ReactNode & (item: Item, index: number) => React.JSX.Element`
|
|
73
73
|
* and replaces with `CollectionChildren`
|
|
74
74
|
*/
|
|
75
75
|
type ReplaceChildren<T, Item> = Omit<T, 'children'> & CollectionChildren<Item>;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Property } from 'csstype';
|
|
3
2
|
import { BaseFlexProps } from './flex';
|
|
4
3
|
import { Sizes } from './base';
|
|
@@ -18,7 +17,7 @@ export interface RatingOptions {
|
|
|
18
17
|
* override the empty icon an will create a rating component that uses
|
|
19
18
|
* different icons for filled and empty icons.
|
|
20
19
|
*/
|
|
21
|
-
emptyIcon?: JSX.Element;
|
|
20
|
+
emptyIcon?: React.JSX.Element;
|
|
22
21
|
/**
|
|
23
22
|
* @description
|
|
24
23
|
* The CSS color to use on the filled rating icon
|
|
@@ -32,7 +31,7 @@ export interface RatingOptions {
|
|
|
32
31
|
* with the emptyIcon prop
|
|
33
32
|
* Default is <IconStar />
|
|
34
33
|
*/
|
|
35
|
-
icon?: JSX.Element;
|
|
34
|
+
icon?: React.JSX.Element;
|
|
36
35
|
/**
|
|
37
36
|
* @description
|
|
38
37
|
* The max rating integer value
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Property } from 'csstype';
|
|
3
2
|
import { WebDesignToken } from '@aws-amplify/ui';
|
|
4
3
|
import type { BoxShadowKeys, BorderWidthKeys, ColorKeys, FontFamilyKeys, FontSizeKeys, FontWeightKeys, LineHeightKeys, OpacityKeys, RadiiKeys, SpaceKeys, TransformKeys } from './theme';
|
|
@@ -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>): 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?: React.WeakValidationMap<P> | undefined;
|
|
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 | 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 {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { BaseViewProps, ElementType, ForwardRefPrimitive, Primitive } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Updates the return type for primitives wrapped in `React.forwardRef` to
|
|
@@ -8,4 +9,4 @@ import { BaseViewProps, ElementType, ForwardRefPrimitive, Primitive } from '../t
|
|
|
8
9
|
* @param primitive UI Primitive to be wrapped with `React.forwardRef`
|
|
9
10
|
* @returns ForwaredRef wrapped UI Primitive
|
|
10
11
|
*/
|
|
11
|
-
export declare const primitiveWithForwardRef: <P extends BaseViewProps, E extends ElementType>(primitive: Primitive<P
|
|
12
|
+
export declare const primitiveWithForwardRef: <P extends BaseViewProps, E extends ElementType>(primitive: Primitive<React.PropsWithoutRef<P>, E>) => ForwardRefPrimitive<P, E>;
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "6.
|
|
1
|
+
export declare const VERSION = "6.9.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.9.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.mjs",
|
|
6
6
|
"exports": {
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"typecheck": "tsc --noEmit"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@aws-amplify/ui": "6.
|
|
59
|
-
"@aws-amplify/ui-react-core": "3.
|
|
60
|
-
"@radix-ui/react-direction": "1.
|
|
61
|
-
"@radix-ui/react-dropdown-menu": "1.
|
|
62
|
-
"@radix-ui/react-slider": "1.
|
|
58
|
+
"@aws-amplify/ui": "6.8.0",
|
|
59
|
+
"@aws-amplify/ui-react-core": "3.3.0",
|
|
60
|
+
"@radix-ui/react-direction": "^1.1.0",
|
|
61
|
+
"@radix-ui/react-dropdown-menu": "^2.1.4",
|
|
62
|
+
"@radix-ui/react-slider": "^1.2.2",
|
|
63
63
|
"@xstate/react": "^3.2.2",
|
|
64
64
|
"lodash": "4.17.21",
|
|
65
65
|
"qrcode": "1.5.0",
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@aws-amplify/core": "*",
|
|
70
70
|
"aws-amplify": "^6.9.0",
|
|
71
|
-
"react": "^16.14.0 || ^17.0 || ^18.0",
|
|
72
|
-
"react-dom": "^16.14
|
|
71
|
+
"react": "^16.14.0 || ^17.0 || ^18.0 || ^19",
|
|
72
|
+
"react-dom": "^16.14 || ^17 || ^18 || ^19"
|
|
73
73
|
},
|
|
74
74
|
"peerDependenciesMeta": {
|
|
75
75
|
"aws-amplify": {
|
|
@@ -79,8 +79,7 @@
|
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@svgr/core": "^5.5.0",
|
|
81
81
|
"@types/qrcode": "^1.4.2",
|
|
82
|
-
"jest-matchmedia-mock": "^1.1.0"
|
|
83
|
-
"react-router-dom": "^6.2.1"
|
|
82
|
+
"jest-matchmedia-mock": "^1.1.0"
|
|
84
83
|
},
|
|
85
84
|
"sideEffects": [
|
|
86
85
|
"dist/**/*.css"
|