@aws-amplify/ui-react 4.6.0 → 4.6.2
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/components/Geo/LocationSearch/index.mjs +1 -1
- package/dist/esm/components/Geo/MapView/index.mjs +1 -1
- package/dist/esm/components/InAppMessaging/Backdrop/Backdrop.mjs +1 -1
- package/dist/esm/hooks/actions/constants.mjs +1 -1
- package/dist/esm/hooks/actions/useNavigateAction.mjs +1 -1
- package/dist/esm/primitives/Expander/ExpanderItem.mjs +1 -1
- package/dist/esm/primitives/Field/FieldDescription.mjs +1 -1
- package/dist/esm/primitives/Loader/Loader.mjs +1 -1
- package/dist/esm/primitives/Menu/Menu.mjs +1 -1
- package/dist/esm/primitives/Menu/MenuItem.mjs +1 -1
- package/dist/esm/primitives/Pagination/PaginationItem.mjs +1 -1
- package/dist/esm/primitives/Pagination/useRange.mjs +1 -1
- package/dist/esm/primitives/SearchField/SearchField.mjs +1 -1
- package/dist/esm/primitives/SliderField/SliderField.mjs +1 -1
- package/dist/esm/primitives/StepperField/StepperField.mjs +1 -1
- package/dist/esm/primitives/utils/useStableId.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/components/AccountSettings/DeleteUser/types.d.ts +2 -2
- package/dist/types/components/AccountSettings/types.d.ts +13 -13
- package/dist/types/components/Authenticator/Authenticator.d.ts +2 -2
- package/dist/types/components/Authenticator/RouteContainer/types.d.ts +2 -2
- package/dist/types/components/Authenticator/Router/types.d.ts +1 -1
- package/dist/types/components/Authenticator/withAuthenticator.d.ts +1 -1
- package/dist/types/components/Geo/types/maplibre-gl-geocoder.d.ts +1 -1
- package/dist/types/components/InAppMessaging/BannerMessage/types.d.ts +1 -1
- package/dist/types/components/InAppMessaging/InAppMessageDisplay/types.d.ts +4 -4
- package/dist/types/components/InAppMessaging/MessageLayout/types.d.ts +2 -2
- package/dist/types/components/InAppMessaging/hooks/useMessageImage/types.d.ts +1 -1
- package/dist/types/components/InAppMessaging/hooks/useMessageProps/types.d.ts +1 -1
- package/dist/types/components/Storage/FileUploader/types.d.ts +7 -7
- package/dist/types/components/ThemeProvider/index.d.ts +2 -2
- package/dist/types/helpers/utils.d.ts +1 -1
- package/dist/types/hooks/actions/shared/types.d.ts +2 -2
- package/dist/types/hooks/actions/shared/useTypeCastFields.d.ts +1 -1
- package/dist/types/hooks/actions/testModels/model.d.ts +1 -1
- package/dist/types/hooks/actions/testModels/todo.d.ts +1 -1
- package/dist/types/hooks/actions/useNavigateAction.d.ts +1 -1
- package/dist/types/hooks/actions/useStateMutationAction.d.ts +1 -1
- package/dist/types/hooks/useComposeRefsCallback.d.ts +1 -1
- package/dist/types/primitives/Heading/Heading.d.ts +1 -1
- package/dist/types/primitives/Icon/icons/types.d.ts +1 -1
- package/dist/types/primitives/SearchField/useSearchField.d.ts +4 -4
- package/dist/types/primitives/StepperField/useStepper.d.ts +5 -5
- package/dist/types/primitives/SwitchField/useSwitch.d.ts +1 -1
- package/dist/types/primitives/ToggleButton/useToggleButton.d.ts +2 -2
- package/dist/types/primitives/ToggleButtonGroup/useToggleButtonGroup.d.ts +1 -1
- package/dist/types/primitives/shared/types.d.ts +4 -4
- package/dist/types/primitives/types/alert.d.ts +1 -1
- package/dist/types/primitives/types/autocomplete.d.ts +1 -1
- package/dist/types/primitives/types/badge.d.ts +2 -2
- package/dist/types/primitives/types/base.d.ts +1 -1
- package/dist/types/primitives/types/button.d.ts +3 -3
- package/dist/types/primitives/types/card.d.ts +1 -1
- package/dist/types/primitives/types/collection.d.ts +4 -4
- package/dist/types/primitives/types/datastore.d.ts +7 -7
- package/dist/types/primitives/types/divider.d.ts +2 -2
- package/dist/types/primitives/types/expander.d.ts +1 -1
- package/dist/types/primitives/types/field.d.ts +2 -2
- package/dist/types/primitives/types/fieldGroup.d.ts +1 -1
- package/dist/types/primitives/types/grid.d.ts +1 -1
- package/dist/types/primitives/types/heading.d.ts +1 -1
- package/dist/types/primitives/types/icon.d.ts +2 -2
- package/dist/types/primitives/types/input.d.ts +3 -3
- package/dist/types/primitives/types/loader.d.ts +2 -2
- package/dist/types/primitives/types/pagination.d.ts +3 -3
- package/dist/types/primitives/types/passwordField.d.ts +1 -1
- package/dist/types/primitives/types/phoneNumberField.d.ts +1 -1
- package/dist/types/primitives/types/placeholder.d.ts +1 -1
- package/dist/types/primitives/types/rating.d.ts +1 -1
- package/dist/types/primitives/types/responsive.d.ts +3 -3
- package/dist/types/primitives/types/scrollView.d.ts +1 -1
- package/dist/types/primitives/types/select.d.ts +1 -1
- package/dist/types/primitives/types/sliderField.d.ts +2 -2
- package/dist/types/primitives/types/style.d.ts +5 -5
- package/dist/types/primitives/types/table.d.ts +3 -3
- package/dist/types/primitives/types/tabs.d.ts +1 -1
- package/dist/types/primitives/types/text.d.ts +1 -1
- package/dist/types/primitives/types/theme.d.ts +29 -29
- package/dist/types/primitives/types/view.d.ts +8 -8
- package/dist/types/primitives/utils/useStableId.d.ts +1 -1
- package/dist/types/studio/types.d.ts +3 -3
- package/dist/types/types/catalog.d.ts +5 -5
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
package/dist/styles.css
CHANGED
|
@@ -1746,7 +1746,7 @@ strong.amplify-text {
|
|
|
1746
1746
|
-webkit-user-select: text;
|
|
1747
1747
|
-moz-user-select: text;
|
|
1748
1748
|
user-select: text;
|
|
1749
|
-
display: inline-
|
|
1749
|
+
display: inline-block;
|
|
1750
1750
|
}
|
|
1751
1751
|
.amplify-input:focus {
|
|
1752
1752
|
border-color: var(--amplify-components-fieldcontrol-focus-border-color);
|
|
@@ -9,8 +9,8 @@ export interface WarningViewProps {
|
|
|
9
9
|
/** whether account deletion is in progress */
|
|
10
10
|
isDisabled: boolean;
|
|
11
11
|
}
|
|
12
|
-
export
|
|
13
|
-
export
|
|
12
|
+
export type WarningViewComponent<Props = {}> = React.ComponentType<Props & WarningViewProps>;
|
|
13
|
+
export type DeleteUserState = 'IDLE' | 'CONFIRMATION' | 'DELETING' | 'DONE' | 'ERROR';
|
|
14
14
|
export interface DeleteUserComponents {
|
|
15
15
|
ErrorMessage?: ErrorMessageComponent;
|
|
16
16
|
DeleteButton?: ButtonComponent;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AlertProps, ButtonProps, PasswordFieldProps, PrimitiveProps } from '../../primitives/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type PasswordFieldPrimitiveProps = PrimitiveProps<PasswordFieldProps, 'input'>;
|
|
4
|
+
type ButtonPrimitiveProps = PrimitiveProps<ButtonProps, 'button'>;
|
|
5
|
+
type AlertPrimitiveProps = PrimitiveProps<AlertProps, 'div'>;
|
|
6
|
+
type CommonPasswordFieldProps = Partial<PasswordFieldPrimitiveProps> & Required<Pick<PasswordFieldPrimitiveProps, 'onBlur' | 'onChange' | 'name'>> & {
|
|
7
7
|
fieldValidationErrors?: string[];
|
|
8
8
|
};
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
9
|
+
type CommonAlertProps = Partial<PrimitiveProps<AlertProps, 'div'>> & Required<Pick<AlertPrimitiveProps, 'children'>>;
|
|
10
|
+
type CommonButtonProps<T extends 'submit' | 'default' = 'default'> = Partial<ButtonPrimitiveProps> & Required<Pick<ButtonPrimitiveProps, T extends 'submit' ? never : 'onClick'>>;
|
|
11
|
+
export type PasswordFieldComponent<Props = {}> = React.ComponentType<Props & CommonPasswordFieldProps>;
|
|
12
|
+
export type ButtonComponent<Props = {}> = React.ComponentType<Props & CommonButtonProps>;
|
|
13
|
+
export type SubmitButtonComponent<Props = {}> = React.ComponentType<Props & CommonButtonProps<'submit'>>;
|
|
14
|
+
export type ErrorMessageComponent<Props = {}> = React.ComponentType<Props & CommonAlertProps>;
|
|
15
|
+
export type FormValues = Record<string, string>;
|
|
16
|
+
export type BlurredFields = string[];
|
|
17
|
+
export type ValidationError = Record<string, string[]>;
|
|
18
18
|
export {};
|
|
@@ -3,8 +3,8 @@ import { AuthenticatorMachineOptions, AmplifyUser } from '@aws-amplify/ui';
|
|
|
3
3
|
import { UseAuthenticator } from '@aws-amplify/ui-react-core';
|
|
4
4
|
import { ComponentsProviderProps } from './hooks/useCustomComponents';
|
|
5
5
|
import { RouterProps } from './Router';
|
|
6
|
-
export
|
|
7
|
-
export
|
|
6
|
+
export type SignOut = UseAuthenticator['signOut'];
|
|
7
|
+
export type AuthenticatorProps = Partial<AuthenticatorMachineOptions & ComponentsProviderProps & RouterProps & {
|
|
8
8
|
children: React.ReactNode | ((props: {
|
|
9
9
|
signOut?: SignOut;
|
|
10
10
|
user?: AmplifyUser;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export
|
|
2
|
+
export type RouteProps = {
|
|
3
3
|
className: string;
|
|
4
4
|
variation: 'default' | 'modal';
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type RouteContainerProps = {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
} & RouteProps;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { AuthenticatorProps, SignOut } from './Authenticator';
|
|
3
3
|
import { AmplifyUser } from '@aws-amplify/ui';
|
|
4
|
-
export
|
|
4
|
+
export type WithAuthenticatorOptions = Omit<AuthenticatorProps, 'children'>;
|
|
5
5
|
export interface WithAuthenticatorProps {
|
|
6
6
|
signOut?: SignOut;
|
|
7
7
|
user?: AmplifyUser;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BannerMessageCommonProps } from '@aws-amplify/ui-react-core';
|
|
2
2
|
import { MessageOverrideStyle } from '../hooks';
|
|
3
|
-
|
|
3
|
+
type BannerMessageAlignment = 'left' | 'center' | 'right';
|
|
4
4
|
export interface BannerMessageProps extends BannerMessageCommonProps<MessageOverrideStyle | undefined> {
|
|
5
5
|
alignment?: BannerMessageAlignment;
|
|
6
6
|
}
|
|
@@ -2,10 +2,10 @@ import { BannerMessageComponent, CarouselMessageComponent, FullScreenMessageComp
|
|
|
2
2
|
import { BannerMessageProps } from '../BannerMessage';
|
|
3
3
|
import { FullScreenMessageProps } from '../FullScreenMessage';
|
|
4
4
|
import { ModalMessageProps } from '../ModalMessage';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
type BannerStyle = BannerMessageProps['style'];
|
|
6
|
+
type CarouselStyle = any;
|
|
7
|
+
type FullScreenStyle = FullScreenMessageProps['style'];
|
|
8
|
+
type ModalStyle = ModalMessageProps['style'];
|
|
9
9
|
export interface MessageDefaultComponents {
|
|
10
10
|
BannerMessage: BannerMessageComponent<BannerStyle>;
|
|
11
11
|
CarouselMessage: CarouselMessageComponent<CarouselStyle>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MessageComponentBaseProps } from '@aws-amplify/ui-react-core';
|
|
2
2
|
import { ButtonProps } from '../../../primitives';
|
|
3
3
|
import { MessageComponentStyles, MessageOverrideStyle, UseMessageProps } from '../hooks';
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
type MessageLayoutOrientation = 'horizontal' | 'vertical';
|
|
5
|
+
export type MessageLayoutButtonModifier = 'dark' | 'light';
|
|
6
6
|
export interface MessageLayoutProps extends Omit<MessageComponentBaseProps<MessageOverrideStyle>, 'style'>, Omit<UseMessageProps, 'shouldRenderMessage' | 'styles'> {
|
|
7
7
|
/**
|
|
8
8
|
* @description
|
|
@@ -2,8 +2,8 @@ import React from 'react';
|
|
|
2
2
|
import { StorageAccessLevel, UploadTask } from '@aws-amplify/storage';
|
|
3
3
|
import { DragActionHandlers } from './hooks/useFileUploader/types';
|
|
4
4
|
import { ButtonProps } from '../../../primitives';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
5
|
+
export type SetShowPreviewer = (show: boolean) => void;
|
|
6
|
+
export type Files = File[];
|
|
7
7
|
export interface UploadDropZoneProps extends DragActionHandlers {
|
|
8
8
|
children?: React.ReactNode;
|
|
9
9
|
inDropZone?: boolean;
|
|
@@ -63,7 +63,7 @@ export interface FileStatus extends Partial<FileStateProps> {
|
|
|
63
63
|
name?: string;
|
|
64
64
|
file?: File;
|
|
65
65
|
}
|
|
66
|
-
export
|
|
66
|
+
export type FileStatuses = FileStatus[];
|
|
67
67
|
export declare enum FileState {
|
|
68
68
|
PAUSED = "paused",
|
|
69
69
|
SUCCESS = "success",
|
|
@@ -78,10 +78,10 @@ export interface FileStateProps {
|
|
|
78
78
|
errorMessage: string;
|
|
79
79
|
percentage?: number;
|
|
80
80
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
type UploadButtonComponent<Props = {}> = React.ComponentType<Props & Partial<ButtonProps>>;
|
|
82
|
+
type UploadDropZoneComponent<Props = {}> = React.ComponentType<Props & Partial<UploadDropZoneProps>>;
|
|
83
|
+
type PreviewerComponent<Props = {}> = React.ComponentType<Props & Partial<PreviewerProps>>;
|
|
84
|
+
type TrackerComponent<Props = {}> = React.ComponentType<Props & Partial<TrackerProps>>;
|
|
85
85
|
export interface Components {
|
|
86
86
|
UploadDropZone?: UploadDropZoneComponent;
|
|
87
87
|
UploadButton?: UploadButtonComponent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Theme, WebTheme } from '@aws-amplify/ui';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type ColorMode = 'system' | 'light' | 'dark';
|
|
4
|
+
export type Direction = 'ltr' | 'rtl';
|
|
5
5
|
interface ThemeProviderProps {
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
/**
|
|
@@ -5,10 +5,10 @@ import { PersistentModel, PersistentModelConstructor, ModelInit, PersistentModel
|
|
|
5
5
|
* because Datastore Int and Float scalar types are often
|
|
6
6
|
* entered by users in a TextField which returns a string
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
type ModelFields<Type> = {
|
|
9
9
|
[Property in keyof Type]: string | number | boolean;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type DataStoreActionFields<Model extends PersistentModel> = ModelInit<Model, PersistentModelMetaData<Model>> | ModelFields<ModelInit<Model, PersistentModelMetaData<Model>>>;
|
|
12
12
|
export interface UseDataStoreActionOptions<Model extends PersistentModel> {
|
|
13
13
|
model: PersistentModelConstructor<Model>;
|
|
14
14
|
/**
|
|
@@ -5,7 +5,7 @@ interface UseTypeCastFieldsProps<Model extends PersistentModel> {
|
|
|
5
5
|
modelName: string;
|
|
6
6
|
schema?: Schema;
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
type UseTypeCastFieldsReturn<Model extends PersistentModel> = ModelInit<Model, PersistentModelMetaData<Model>>;
|
|
9
9
|
/**
|
|
10
10
|
* Optimistically casts field string values to types required by
|
|
11
11
|
* datastore based on the schema type
|
|
@@ -3,7 +3,7 @@ export interface UseComposeRefsCallbackProps<RefType> {
|
|
|
3
3
|
externalRef?: React.ForwardedRef<RefType>;
|
|
4
4
|
internalRef: React.MutableRefObject<RefType>;
|
|
5
5
|
}
|
|
6
|
-
export
|
|
6
|
+
export type UseComposeRefsCallback<RefType> = (node: RefType) => void;
|
|
7
7
|
/**
|
|
8
8
|
* Creates ref callback to compose together external and internal refs
|
|
9
9
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { HeadingProps } from '../types';
|
|
3
|
-
|
|
3
|
+
type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
4
4
|
/**
|
|
5
5
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/heading)
|
|
6
6
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { UseSearchFieldProps } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
type ClearHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
type ClickHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
type KeyDownHandler = React.KeyboardEventHandler<HTMLInputElement>;
|
|
6
|
+
type ChangeHandler = React.ChangeEventHandler<HTMLInputElement>;
|
|
7
7
|
interface UseSearchField {
|
|
8
8
|
composedValue: string;
|
|
9
9
|
onClearHandler: ClearHandler;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StepperFieldProps } from '../types/stepperField';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
type ChangeHandler = React.ChangeEventHandler<HTMLInputElement>;
|
|
4
|
+
type ClickHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
type FocusHandler = React.FocusEventHandler<HTMLInputElement>;
|
|
6
|
+
type WheelHandler = React.WheelEventHandler<HTMLInputElement>;
|
|
7
|
+
type InputValue = number | string;
|
|
8
8
|
interface UseStepper extends Required<Pick<StepperFieldProps, 'step' | 'value'>> {
|
|
9
9
|
inputValue: InputValue;
|
|
10
10
|
handleDecrease: ClickHandler;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ToggleButtonProps } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type ClickHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
type UseToggleButton = {
|
|
5
5
|
handleClick: ClickHandler;
|
|
6
6
|
isPressed?: boolean;
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ToggleButtonGroupProps } from '../types';
|
|
2
|
-
|
|
2
|
+
type UseToggleButtonParams = Pick<ToggleButtonGroupProps, 'onChange' | 'value' | 'isExclusive' | 'isSelectionRequired'>;
|
|
3
3
|
export declare const useToggleButtonGroup: ({ onChange, value, isExclusive, isSelectionRequired, }: UseToggleButtonParams) => (value: string | undefined) => void;
|
|
4
4
|
export {};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ComponentClassName } from '@aws-amplify/ui';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type ComponentNameKey = 'Alert' | 'Autocomplete' | 'Badge' | 'Button' | 'Button' | 'Card' | 'Checkbox' | 'CheckboxField' | 'Collection' | 'PhoneNumberField' | 'Divider' | 'Expander' | 'FileUploader' | 'Flex' | 'Grid' | 'Heading' | 'HighlightMatch' | 'Icon' | 'Image' | 'Link' | 'Loader' | 'Menu' | 'Pagination' | 'PasswordField' | 'PhoneNumberField' | 'Placeholder' | 'Radio' | 'RadioGroupField' | 'Rating' | 'ScrollView' | 'SearchField' | 'Select' | 'SliderField' | 'SelectField' | 'StepperField' | 'StorageManager' | 'SwitchField' | 'Table' | 'Tabs' | 'Text' | 'TextAreaField' | 'TextField' | 'ToggleButton' | 'ToggleButtonGroup' | 'VisuallyHidden';
|
|
3
|
+
type ComponentClassNameKey = 'Alert' | 'AlertIcon' | 'AlertHeading' | 'AlertBody' | 'AlertDismiss' | 'Autocomplete' | 'AutocompleteMenu' | 'AutocompleteMenuEmpty' | 'AutocompleteMenuFooter' | 'AutocompleteMenuHeader' | 'AutocompleteMenuLoading' | 'AutocompleteMenuOption' | 'AutocompleteMenuOptions' | 'Badge' | 'Button' | 'ButtonGroup' | 'ButtonLoaderWrapper' | 'Card' | 'Checkbox' | 'CheckboxButton' | 'CheckboxIcon' | 'CheckboxInput' | 'CheckboxLabel' | 'CheckboxField' | 'Collection' | 'CollectionItems' | 'CollectionSearch' | 'CollectionPagination' | 'CountryCodeSelect' | 'DialCodeSelect' | 'Divider' | 'DividerLabel' | 'Expander' | 'ExpanderContent' | 'ExpanderContentText' | 'ExpanderHeader' | 'ExpanderIcon' | 'ExpanderItem' | 'ExpanderTrigger' | 'Field' | 'FieldDescription' | 'FieldErrorMessage' | 'FieldGroup' | 'FieldGroupControl' | 'FieldGroupOuterEnd' | 'FieldGroupOuterStart' | 'FieldGroupInnerEnd' | 'FieldGroupInnerStart' | 'FieldGroupIcon' | 'FieldGroupIconButton' | 'FieldGroupHasInnerEnd' | 'FieldGroupHasInnerStart' | 'FieldShowPassword' | 'FieldGroupFieldWrapper' | 'FileUploaderDropZone' | 'FileUploaderDropZoneIcon' | 'FileUploaderDropZoneText' | 'FileUploaderDropZoneButton' | 'FileUploaderFile' | 'FileUploaderFileWrapper' | 'FileUploaderFileName' | 'FileUploaderFileSize' | 'FileUploaderFileInfo' | 'FileUploaderFileStatus' | 'FileUploaderFileImage' | 'FileUploaderFileMain' | 'FileUploaderLoader' | 'FileUploaderPreviewer' | 'FileUploaderPreviewerText' | 'FileUploaderPreviewerBody' | 'FileUploaderPreviewerFooter' | 'FileUploaderPreviewerFooterActions' | 'Flex' | 'Grid' | 'Heading' | 'HighlightMatch' | 'HighlightMatchHighlighted' | 'Icon' | 'Image' | 'Input' | 'Label' | 'Link' | 'Loader' | 'LoaderDeterminate' | 'LoaderPercentageText' | 'MenuContent' | 'MenuContentWrapper' | 'MenuItem' | 'MenuTrigger' | 'Pagination' | 'PaginationItemButton' | 'PaginationItemCurrent' | 'PaginationItemEllipsis' | 'PasswordField' | 'PhoneNumberField' | 'Placeholder' | 'Radio' | 'RadioButton' | 'RadioInput' | 'RadioLabel' | 'RadioGroupField' | 'RadioGroup' | 'Rating' | 'ScrollView' | 'SearchField' | 'SearchFieldClear' | 'SearchFieldSearch' | 'Select' | 'SelectField' | 'SelectWrapper' | 'SelectIconWrapper' | 'SliderField' | 'SliderFieldGroup' | 'SliderFieldLabel' | 'SliderFieldRange' | 'SliderFieldRoot' | 'SliderFieldThumb' | 'SliderFieldTrack' | 'StepperField' | 'StepperFieldButtonDecrease' | 'StepperFieldButtonIncrease' | 'StepperFieldInput' | 'StorageManager' | 'StorageManagerDropZone' | 'StorageManagerDropZoneIcon' | 'StorageManagerDropZoneText' | 'StorageManagerFilePicker' | 'StorageManagerFile' | 'StorageManagerFileWrapper' | 'StorageManagerFileList' | 'StorageManagerFileName' | 'StorageManagerFileSize' | 'StorageManagerFileInfo' | 'StorageManagerFileStatus' | 'StorageManagerFileImage' | 'StorageManagerFileMain' | 'StorageManagerLoader' | 'StorageManagerPreviewer' | 'StorageManagerPreviewerText' | 'SwitchField' | 'SwitchLabel' | 'SwitchThumb' | 'SwitchTrack' | 'SwitchWrapper' | 'Table' | 'TableCaption' | 'TableBody' | 'TableTd' | 'TableTh' | 'TableFoot' | 'TableHead' | 'TableRow' | 'Tabs' | 'TabItems' | 'Text' | 'Textarea' | 'TextAreaField' | 'TextField' | 'ToggleButton' | 'ToggleButtonGroup' | 'VisuallyHidden';
|
|
4
4
|
interface ComponentClassNameMetadata {
|
|
5
5
|
className: ComponentClassName;
|
|
6
6
|
components?: ComponentNameKey[];
|
|
7
7
|
description?: string;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
9
|
+
export type ComponentClassNameItems = {
|
|
10
10
|
[Name in ComponentClassNameKey]: ComponentClassNameMetadata;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type ComponentClassNames = {
|
|
13
13
|
[Name in ComponentClassNameKey]: ComponentClassNameMetadata['className'];
|
|
14
14
|
};
|
|
15
15
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FlexProps } from './flex';
|
|
3
|
-
export
|
|
3
|
+
export type AlertVariations = 'info' | 'error' | 'warning' | 'success';
|
|
4
4
|
export interface AlertProps extends FlexProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
@@ -118,7 +118,7 @@ export interface UseAutocompleteProps extends Partial<AutocompleteProps> {
|
|
|
118
118
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
119
119
|
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
120
120
|
}
|
|
121
|
-
|
|
121
|
+
type SetStateAction<T> = React.Dispatch<React.SetStateAction<T>>;
|
|
122
122
|
export interface UseAutocomplete {
|
|
123
123
|
activeOptionId?: ComboBoxOption['id'];
|
|
124
124
|
autocompleteId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sizes } from './base';
|
|
2
2
|
import { ViewProps } from './view';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type BadgeVariations = 'info' | 'error' | 'warning' | 'success';
|
|
4
|
+
export type BadgeSizes = Sizes;
|
|
5
5
|
export interface BadgeProps extends ViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { Sizes } from './base';
|
|
3
3
|
import { ViewProps } from './view';
|
|
4
4
|
import { FlexContainerStyleProps } from './flex';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type ButtonSizes = Sizes;
|
|
6
|
+
export type ButtonTypes = 'button' | 'reset' | 'submit';
|
|
7
|
+
export type ButtonVariations = 'primary' | 'link' | 'menu' | 'warning' | 'destructive';
|
|
8
8
|
export interface ButtonProps extends ViewProps, FlexContainerStyleProps {
|
|
9
9
|
/**
|
|
10
10
|
* @description
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { FlexProps } from './flex';
|
|
3
3
|
import { GridProps } from './grid';
|
|
4
4
|
import { BaseStyleProps } from './style';
|
|
5
|
-
export
|
|
5
|
+
export type CollectionType = 'list' | 'grid' | 'table';
|
|
6
6
|
export interface CollectionWrapperProps extends BaseStyleProps {
|
|
7
7
|
/**
|
|
8
8
|
* @description
|
|
@@ -62,9 +62,9 @@ export interface CollectionBaseProps<Item> {
|
|
|
62
62
|
*/
|
|
63
63
|
children: (item: Item, index: number) => JSX.Element;
|
|
64
64
|
}
|
|
65
|
-
export
|
|
66
|
-
export
|
|
67
|
-
export
|
|
65
|
+
export type ListCollectionProps<Item> = FlexProps & CollectionBaseProps<Item>;
|
|
66
|
+
export type GridCollectionProps<Item> = GridProps & CollectionBaseProps<Item>;
|
|
67
|
+
export type CollectionProps<Item> = CollectionWrapperProps & (({
|
|
68
68
|
type: 'list';
|
|
69
69
|
} & ListCollectionProps<Item>) | ({
|
|
70
70
|
type: 'grid';
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { IdentifierFieldOrIdentifierObject, PersistentModel, PersistentModelConstructor, PersistentModelMetaData, ProducerPaginationInput, RecursiveModelPredicateExtender } from '@aws-amplify/datastore';
|
|
2
|
-
export
|
|
2
|
+
export type DataStoreItemProps<Model extends PersistentModel> = {
|
|
3
3
|
model: PersistentModelConstructor<Model>;
|
|
4
4
|
id: IdentifierFieldOrIdentifierObject<Model, PersistentModelMetaData<Model>>;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type DataStoreCollectionProps<Model extends PersistentModel> = {
|
|
7
7
|
model: PersistentModelConstructor<Model>;
|
|
8
8
|
criteria?: RecursiveModelPredicateExtender<Model>;
|
|
9
9
|
pagination?: ProducerPaginationInput<Model>;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type DataStoreBaseResult = {
|
|
12
12
|
error?: Error;
|
|
13
13
|
isLoading: boolean;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type DataStoreItemResult<Model extends PersistentModel> = DataStoreBaseResult & {
|
|
16
16
|
item?: Model;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type DataStoreCollectionResult<Model extends PersistentModel> = DataStoreBaseResult & {
|
|
19
19
|
items: Model[];
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type DataStoreBindingProps<Model extends PersistentModel, BindingType extends 'record' | 'collection'> = {
|
|
22
22
|
type: BindingType;
|
|
23
23
|
} & (BindingType extends 'record' ? DataStoreItemProps<Model> : BindingType extends 'collection' ? DataStoreCollectionProps<Model> : never);
|
|
24
|
-
export
|
|
24
|
+
export type DataStorePredicateObject = {
|
|
25
25
|
and?: DataStorePredicateObject[];
|
|
26
26
|
or?: DataStorePredicateObject[];
|
|
27
27
|
field?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sizes } from './base';
|
|
2
2
|
import { ViewProps } from './view';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export type DividerOrientations = 'horizontal' | 'vertical';
|
|
4
|
+
export type DividerSizes = Sizes;
|
|
5
5
|
export interface DividerOptions {
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
@@ -42,5 +42,5 @@ export interface FieldDescriptionProps extends TextProps, Pick<FieldProps, 'desc
|
|
|
42
42
|
}
|
|
43
43
|
export interface FieldErrorMessageProps extends TextProps, Pick<FieldProps, 'errorMessage'>, Pick<InputProps, 'hasError'> {
|
|
44
44
|
}
|
|
45
|
-
export
|
|
46
|
-
export
|
|
45
|
+
export type FieldVariations = 'quiet';
|
|
46
|
+
export type LabelPositions = 'start' | 'end' | 'top' | 'bottom';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FlexProps } from './flex';
|
|
3
3
|
import { FieldVariations } from './field';
|
|
4
|
-
export
|
|
4
|
+
export type FieldGroupOrientation = 'horizontal' | 'vertical';
|
|
5
5
|
export interface FieldGroupOptions extends FlexProps {
|
|
6
6
|
children?: React.ReactNode;
|
|
7
7
|
orientation?: FieldGroupOrientation;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { ResponsiveStyle, CSSLayoutStyleProps } from './style';
|
|
3
3
|
import { ViewProps } from './view';
|
|
4
|
-
export
|
|
4
|
+
export type GridSpanType = number | string | 'auto';
|
|
5
5
|
export interface GridContainerStyleProps extends CSSLayoutStyleProps {
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
@@ -2,13 +2,13 @@ import { Property } from 'csstype';
|
|
|
2
2
|
import { ViewProps } from './view';
|
|
3
3
|
import { Sizes } from './base';
|
|
4
4
|
import * as React from 'react';
|
|
5
|
-
export
|
|
5
|
+
export type ViewBox = {
|
|
6
6
|
minX?: number;
|
|
7
7
|
minY?: number;
|
|
8
8
|
width?: number;
|
|
9
9
|
height?: number;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type IconSize = Sizes;
|
|
12
12
|
export interface IconProps extends ViewProps {
|
|
13
13
|
/**
|
|
14
14
|
* @description
|
|
@@ -2,9 +2,9 @@ import * as React from 'react';
|
|
|
2
2
|
import { Sizes } from './base';
|
|
3
3
|
import { FieldVariations } from './field';
|
|
4
4
|
import { ViewProps } from './view';
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
5
|
+
export type EnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
6
|
+
export type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
7
|
+
export type InputSizes = Sizes;
|
|
8
8
|
export interface InputProps extends ViewProps {
|
|
9
9
|
/**
|
|
10
10
|
* @description
|