@aws-amplify/ui-react 4.3.3 → 4.3.5
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.js +1 -1
- package/dist/esm/components/AccountSettings/ChangePassword/ChangePassword.js +1 -1
- package/dist/esm/components/AccountSettings/ChangePassword/defaults.js +1 -1
- package/dist/esm/components/AccountSettings/DeleteUser/DeleteUser.js +1 -1
- package/dist/esm/components/Authenticator/FederatedSignIn/FederatedSignIn.js +1 -1
- package/dist/esm/components/Storage/FileUploader/UploadTracker/index.js +1 -1
- package/dist/esm/primitives/Alert/Alert.js +1 -1
- package/dist/esm/primitives/Checkbox/Checkbox.js +1 -1
- package/dist/esm/primitives/CheckboxField/CheckboxField.js +1 -1
- package/dist/esm/primitives/Expander/Expander.js +1 -1
- package/dist/esm/primitives/Expander/ExpanderItem.js +1 -1
- package/dist/esm/primitives/HighlightMatch/HighlightMatch.js +1 -1
- package/dist/esm/primitives/Pagination/usePagination.js +1 -1
- package/dist/esm/primitives/PhoneNumberField/PhoneNumberField.js +1 -1
- package/dist/esm/primitives/Radio/Radio.js +1 -1
- package/dist/esm/primitives/RadioGroupField/RadioGroupField.js +1 -1
- package/dist/esm/primitives/SearchField/SearchFieldButton.js +1 -1
- package/dist/esm/primitives/SelectField/SelectField.js +1 -1
- package/dist/esm/primitives/SliderField/SliderField.js +1 -1
- package/dist/esm/primitives/StepperField/StepperField.js +1 -1
- package/dist/esm/primitives/StepperField/useStepper.js +1 -1
- package/dist/esm/primitives/Tabs/Tabs.js +1 -1
- package/dist/esm/primitives/TextAreaField/TextAreaField.js +1 -1
- package/dist/esm/primitives/TextField/TextField.js +1 -1
- package/dist/esm/primitives/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/dist/esm/primitives/ToggleButtonGroup/useToggleButtonGroup.js +1 -1
- package/dist/esm/primitives/shared/constants.js +1 -1
- package/dist/esm/primitives/shared/datastore.js +1 -1
- package/dist/esm/primitives/shared/styleUtils.js +1 -1
- package/dist/esm/primitives/utils/{testUtils.js → getTestId.js} +0 -0
- package/dist/esm/primitives/utils/splitPrimitiveProps.js +1 -0
- package/dist/esm/version.js +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/styles.css +9 -2
- package/dist/types/components/AccountSettings/types.d.ts +1 -1
- package/dist/types/components/shared/ValidationErrors.d.ts +1 -1
- package/dist/types/primitives/Alert/AlertIcon.d.ts +1 -1
- package/dist/types/primitives/Checkbox/useCheckbox.d.ts +1 -1
- package/dist/types/primitives/Expander/Expander.d.ts +1 -1
- package/dist/types/primitives/Expander/ExpanderItem.d.ts +1 -1
- package/dist/types/primitives/Pagination/usePaginationItems.d.ts +5 -5
- package/dist/types/primitives/SearchField/useSearchField.d.ts +14 -7
- package/dist/types/primitives/StepperField/StepperField.d.ts +1 -1
- package/dist/types/primitives/StepperField/useStepper.d.ts +18 -11
- package/dist/types/primitives/SwitchField/useSwitch.d.ts +8 -6
- package/dist/types/primitives/ToggleButton/useToggleButton.d.ts +6 -3
- package/dist/types/primitives/ToggleButtonGroup/useToggleButtonGroup.d.ts +3 -1
- package/dist/types/primitives/shared/styleUtils.d.ts +1 -13
- package/dist/types/primitives/shared/types.d.ts +1 -1
- package/dist/types/primitives/types/autocomplete.d.ts +3 -3
- package/dist/types/primitives/types/checkbox.d.ts +2 -2
- package/dist/types/primitives/types/pagination.d.ts +1 -1
- package/dist/types/primitives/types/select.d.ts +2 -2
- package/dist/types/primitives/types/stepperField.d.ts +1 -3
- package/dist/types/primitives/types/toggleButton.d.ts +1 -1
- package/dist/types/primitives/utils/getTestId.d.ts +1 -0
- package/dist/types/primitives/utils/splitPrimitiveProps.d.ts +13 -0
- package/dist/types/primitives/utils/testUtils.d.ts +0 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/utils-5fd28806.js +1 -0
- package/package.json +21 -3
- package/dist/utils-6ae88f00.js +0 -1
package/dist/styles.css
CHANGED
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
--amplify-components-fileuploader-file-padding-block: var(--amplify-space-xs);
|
|
433
433
|
--amplify-components-fileuploader-file-padding-inline: var(--amplify-space-small);
|
|
434
434
|
--amplify-components-fileuploader-file-gap: var(--amplify-space-small);
|
|
435
|
-
--amplify-components-fileuploader-file-align-items:
|
|
435
|
+
--amplify-components-fileuploader-file-align-items: baseline;
|
|
436
436
|
--amplify-components-fileuploader-file-name-font-size: var(--amplify-font-sizes-medium);
|
|
437
437
|
--amplify-components-fileuploader-file-name-font-weight: var(--amplify-font-weights-bold);
|
|
438
438
|
--amplify-components-fileuploader-file-name-color: var(--amplify-colors-font-primary);
|
|
@@ -1678,6 +1678,7 @@ strong.amplify-text {
|
|
|
1678
1678
|
-webkit-user-select: text;
|
|
1679
1679
|
-moz-user-select: text;
|
|
1680
1680
|
user-select: text;
|
|
1681
|
+
display: inline-flex;
|
|
1681
1682
|
}
|
|
1682
1683
|
.amplify-input:focus {
|
|
1683
1684
|
border-color: var(--amplify-components-fieldcontrol-focus-border-color);
|
|
@@ -2739,10 +2740,16 @@ html[dir=rtl] .amplify-field-group__inner-start {
|
|
|
2739
2740
|
border-color: var(--amplify-components-fileuploader-file-border-color);
|
|
2740
2741
|
border-radius: var(--amplify-components-fileuploader-file-border-radius);
|
|
2741
2742
|
display: flex;
|
|
2742
|
-
flex-direction:
|
|
2743
|
+
flex-direction: column;
|
|
2743
2744
|
padding-inline: var(--amplify-components-fileuploader-file-padding-inline);
|
|
2744
2745
|
padding-block: var(--amplify-components-fileuploader-file-padding-block);
|
|
2745
2746
|
align-items: var(--amplify-components-fileuploader-file-align-items);
|
|
2747
|
+
}
|
|
2748
|
+
.amplify-fileuploader__file__wrapper {
|
|
2749
|
+
width: 100%;
|
|
2750
|
+
display: flex;
|
|
2751
|
+
flex-direction: row;
|
|
2752
|
+
align-items: center;
|
|
2746
2753
|
gap: var(--amplify-components-fileuploader-file-gap);
|
|
2747
2754
|
}
|
|
2748
2755
|
.amplify-fileuploader__file__name {
|
|
@@ -7,7 +7,7 @@ declare type CommonPasswordFieldProps = Partial<PasswordFieldPrimitiveProps> & R
|
|
|
7
7
|
fieldValidationErrors?: string[];
|
|
8
8
|
};
|
|
9
9
|
declare type CommonAlertProps = Partial<PrimitiveProps<AlertProps, 'div'>> & Required<Pick<AlertPrimitiveProps, 'children'>>;
|
|
10
|
-
declare type CommonButtonProps<T extends 'submit' | 'default' = 'default'> = Partial<ButtonPrimitiveProps> & Required<Pick<ButtonPrimitiveProps,
|
|
10
|
+
declare type CommonButtonProps<T extends 'submit' | 'default' = 'default'> = Partial<ButtonPrimitiveProps> & Required<Pick<ButtonPrimitiveProps, T extends 'submit' ? never : 'onClick'>>;
|
|
11
11
|
export declare type PasswordFieldComponent<Props = {}> = React.ComponentType<Props & CommonPasswordFieldProps>;
|
|
12
12
|
export declare type ButtonComponent<Props = {}> = React.ComponentType<Props & CommonButtonProps>;
|
|
13
13
|
export declare type SubmitButtonComponent<Props = {}> = React.ComponentType<Props & CommonButtonProps<'submit'>>;
|
|
@@ -3,4 +3,4 @@ export interface ValidationErrorsProps {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
dataAttr?: string;
|
|
5
5
|
}
|
|
6
|
-
export declare const ValidationErrors: ({ errors, id, dataAttr, }: ValidationErrorsProps) => JSX.Element;
|
|
6
|
+
export declare const ValidationErrors: ({ errors, id, dataAttr, }: ValidationErrorsProps) => JSX.Element | null;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { UseCheckbox } from '../types/checkbox';
|
|
3
|
-
export declare const useCheckbox: (initialChecked
|
|
3
|
+
export declare const useCheckbox: (initialChecked?: boolean, onChangeProp?: React.ChangeEventHandler) => UseCheckbox;
|
|
@@ -3,4 +3,4 @@ import { ExpanderProps } from '../types/expander';
|
|
|
3
3
|
/**
|
|
4
4
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/expander)
|
|
5
5
|
*/
|
|
6
|
-
export declare const Expander: React.ForwardRefExoticComponent<Pick<import("../types/view").PrimitivePropsWithRef<ExpanderProps,
|
|
6
|
+
export declare const Expander: React.ForwardRefExoticComponent<Pick<import("../types/view").PrimitivePropsWithRef<ExpanderProps, "div">, "area" | "slot" | "title" | "isDisabled" | "id" | "className" | "testId" | "inert" | "alignSelf" | "backgroundColor" | "backgroundImage" | "border" | "borderRadius" | "bottom" | "boxShadow" | "color" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "height" | "left" | "letterSpacing" | "lineHeight" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textDecoration" | "textTransform" | "top" | "transform" | "transformOrigin" | "width" | "whiteSpace" | "flex" | "order" | "grow" | "shrink" | "basis" | "column" | "columnEnd" | "columnSpan" | "columnStart" | "row" | "rowEnd" | "rowSpan" | "rowStart" | "ariaLabel" | "ariaValuetext" | "role" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "type" | "value" | "as" | "isCollapsible" | "style" | "onLoad" | "onError" | "onClick" | "onSubmit" | "onChange" | "onSelect" | "onBlur" | "onValueChange" | "inlist" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -4,4 +4,4 @@ export declare const EXPANDER_ITEM_TEST_ID = "expander-item";
|
|
|
4
4
|
export declare const EXPANDER_HEADER_TEST_ID = "expander-header";
|
|
5
5
|
export declare const EXPANDER_ICON_TEST_ID = "expander-icon";
|
|
6
6
|
export declare const EXPANDER_CONTENT_TEXT_TEST_ID = "expander-content-text";
|
|
7
|
-
export declare const ExpanderItem: React.ForwardRefExoticComponent<Pick<import("../types/view").PrimitivePropsWithRef<ExpanderItemProps,
|
|
7
|
+
export declare const ExpanderItem: React.ForwardRefExoticComponent<Pick<import("../types/view").PrimitivePropsWithRef<ExpanderItemProps, "div">, "area" | "slot" | "title" | "isDisabled" | "id" | "className" | "testId" | "inert" | "alignSelf" | "backgroundColor" | "backgroundImage" | "border" | "borderRadius" | "bottom" | "boxShadow" | "color" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "height" | "left" | "letterSpacing" | "lineHeight" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textDecoration" | "textTransform" | "top" | "transform" | "transformOrigin" | "width" | "whiteSpace" | "flex" | "order" | "grow" | "shrink" | "basis" | "column" | "columnEnd" | "columnSpan" | "columnStart" | "row" | "rowEnd" | "rowSpan" | "rowStart" | "ariaLabel" | "ariaValuetext" | "role" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "value" | "as" | "style" | "onLoad" | "onError" | "onClick" | "onSubmit" | "onChange" | "onSelect" | "onBlur" | "inlist" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,13 +3,13 @@ interface UsePaginationItemsProps {
|
|
|
3
3
|
totalPages: number;
|
|
4
4
|
hasMorePages: boolean;
|
|
5
5
|
siblingCount?: number;
|
|
6
|
-
currentPageLabel
|
|
7
|
-
pageLabel
|
|
8
|
-
previousLabel
|
|
9
|
-
nextLabel
|
|
6
|
+
currentPageLabel?: string;
|
|
7
|
+
pageLabel?: string;
|
|
8
|
+
previousLabel?: string;
|
|
9
|
+
nextLabel?: string;
|
|
10
10
|
onNext?: () => void;
|
|
11
11
|
onPrevious?: () => void;
|
|
12
|
-
onChange
|
|
12
|
+
onChange?: (newPageIndex?: number, prevPageIndex?: number) => void;
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
15
|
* This hook will be used to get the pagination items to be rendered in the pagination primitive
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { UseSearchFieldProps } from '../types';
|
|
2
|
-
|
|
3
|
+
declare type ClearHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
declare type ClickHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
declare type KeyDownHandler = React.KeyboardEventHandler<HTMLInputElement>;
|
|
6
|
+
declare type ChangeHandler = React.ChangeEventHandler<HTMLInputElement>;
|
|
7
|
+
interface UseSearchField {
|
|
3
8
|
composedValue: string;
|
|
4
|
-
onClearHandler:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
handleOnChange:
|
|
8
|
-
composedRefs:
|
|
9
|
-
}
|
|
9
|
+
onClearHandler: ClearHandler;
|
|
10
|
+
onClick: ClickHandler;
|
|
11
|
+
onKeyDown: KeyDownHandler;
|
|
12
|
+
handleOnChange: ChangeHandler;
|
|
13
|
+
composedRefs: React.Ref<HTMLInputElement>;
|
|
14
|
+
}
|
|
15
|
+
export declare const useSearchField: ({ defaultValue, value, onChange, onClear, onSubmit, externalRef, }: UseSearchFieldProps) => UseSearchField;
|
|
16
|
+
export {};
|
|
@@ -5,4 +5,4 @@ export declare const INCREASE_ICON = "increase-icon";
|
|
|
5
5
|
/**
|
|
6
6
|
* [📖 Docs](https://ui.docs.amplify.aws/react/components/stepperfield)
|
|
7
7
|
*/
|
|
8
|
-
export declare const StepperField: React.ForwardRefExoticComponent<Pick<import("../types/view").PrimitivePropsWithRef<StepperFieldProps, "input">, "area" | "slot" | "title" | "isDisabled" | "id" | "className" | "testId" | "inert" | "alignSelf" | "backgroundColor" | "backgroundImage" | "border" | "borderRadius" | "bottom" | "boxShadow" | "color" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "height" | "left" | "letterSpacing" | "lineHeight" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textDecoration" | "textTransform" | "top" | "transform" | "transformOrigin" | "width" | "whiteSpace" | "flex" | "order" | "grow" | "shrink" | "basis" | "column" | "columnEnd" | "columnSpan" | "columnStart" | "row" | "rowEnd" | "rowSpan" | "rowStart" | "ariaLabel" | "ariaValuetext" | "role" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "direction" | "wrap" | "alignItems" | "alignContent" | "justifyContent" | "gap" | "columnGap" | "rowGap" | "variation" | "form" | "label" | "pattern" | "list" | "required" | "step" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "size" | "src" | "type" | "value" | "labelHidden" | "outerEndComponent" | "outerStartComponent" | "innerStartComponent" | "innerEndComponent" | "descriptiveText" | "errorMessage" | "hasError" | "isReadOnly" | "isRequired" | "as" | "increaseButtonLabel" | "decreaseButtonLabel" | "style" | "onLoad" | "onError" | "onClick" | "inputStyles" | "onSubmit" | "onChange" | "onSelect" | "onBlur" | "inlist" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "
|
|
8
|
+
export declare const StepperField: React.ForwardRefExoticComponent<Pick<import("../types/view").PrimitivePropsWithRef<StepperFieldProps, "input">, "area" | "slot" | "title" | "isDisabled" | "id" | "className" | "testId" | "inert" | "alignSelf" | "backgroundColor" | "backgroundImage" | "border" | "borderRadius" | "bottom" | "boxShadow" | "color" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "height" | "left" | "letterSpacing" | "lineHeight" | "margin" | "marginBlock" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInline" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "opacity" | "overflow" | "padding" | "paddingBlock" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInline" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "textAlign" | "textDecoration" | "textTransform" | "top" | "transform" | "transformOrigin" | "width" | "whiteSpace" | "flex" | "order" | "grow" | "shrink" | "basis" | "column" | "columnEnd" | "columnSpan" | "columnStart" | "row" | "rowEnd" | "rowSpan" | "rowStart" | "ariaLabel" | "ariaValuetext" | "role" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "about" | "datatype" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "direction" | "wrap" | "alignItems" | "alignContent" | "justifyContent" | "gap" | "columnGap" | "rowGap" | "variation" | "form" | "label" | "pattern" | "list" | "required" | "step" | "accept" | "alt" | "autoComplete" | "autoFocus" | "capture" | "checked" | "crossOrigin" | "disabled" | "enterKeyHint" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "max" | "maxLength" | "min" | "minLength" | "multiple" | "name" | "readOnly" | "size" | "src" | "type" | "value" | "labelHidden" | "outerEndComponent" | "outerStartComponent" | "innerStartComponent" | "innerEndComponent" | "descriptiveText" | "errorMessage" | "hasError" | "isReadOnly" | "isRequired" | "as" | "increaseButtonLabel" | "decreaseButtonLabel" | "style" | "onLoad" | "onError" | "onClick" | "inputStyles" | "onSubmit" | "onChange" | "onSelect" | "onBlur" | "inlist" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoadCapture" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onStepChange" | "onIncrease" | "onDecrease"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { StepperFieldProps } from '../types/stepperField';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
declare type ChangeHandler = React.ChangeEventHandler<HTMLInputElement>;
|
|
4
|
+
declare type ClickHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
5
|
+
declare type FocusHandler = React.FocusEventHandler<HTMLInputElement>;
|
|
6
|
+
declare type WheelHandler = React.WheelEventHandler<HTMLInputElement>;
|
|
7
|
+
declare type InputValue = number | string;
|
|
8
|
+
interface UseStepper extends Required<Pick<StepperFieldProps, 'step' | 'value'>> {
|
|
9
|
+
inputValue: InputValue;
|
|
10
|
+
handleDecrease: ClickHandler;
|
|
11
|
+
handleIncrease: ClickHandler;
|
|
12
|
+
handleOnBlur: FocusHandler;
|
|
13
|
+
handleOnChange: ChangeHandler;
|
|
14
|
+
handleOnWheel: WheelHandler;
|
|
15
|
+
setInputValue: React.Dispatch<React.SetStateAction<InputValue>>;
|
|
13
16
|
shouldDisableDecreaseButton: boolean;
|
|
14
17
|
shouldDisableIncreaseButton: boolean;
|
|
15
|
-
}
|
|
18
|
+
}
|
|
19
|
+
export declare const useStepper: ({ defaultValue, value: controlledValue, step, max, min, isDisabled, isReadOnly, onChange, onDecrease, onIncrease, onStepChange, }: StepperFieldProps & {
|
|
20
|
+
onChange?: ChangeHandler;
|
|
21
|
+
}) => UseStepper;
|
|
22
|
+
export {};
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type ChangeHandler = React.ChangeEventHandler<HTMLInputElement>;
|
|
2
3
|
interface UseSwitchProps {
|
|
3
|
-
onChange?:
|
|
4
|
+
onChange?: ChangeHandler;
|
|
4
5
|
isChecked?: boolean;
|
|
5
6
|
defaultChecked?: boolean;
|
|
6
7
|
isDisabled?: boolean;
|
|
7
8
|
}
|
|
8
|
-
|
|
9
|
+
interface UseSwitch {
|
|
9
10
|
isOn: boolean;
|
|
10
|
-
changeHandler:
|
|
11
|
+
changeHandler: ChangeHandler;
|
|
11
12
|
isFocused: boolean;
|
|
12
|
-
setIsFocused:
|
|
13
|
-
}
|
|
13
|
+
setIsFocused: React.Dispatch<React.SetStateAction<boolean>>;
|
|
14
|
+
}
|
|
15
|
+
export declare const useSwitch: (props: UseSwitchProps) => UseSwitch;
|
|
14
16
|
export {};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { ToggleButtonProps } from '../types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
handleClick:
|
|
3
|
+
declare type ClickHandler = React.MouseEventHandler<HTMLButtonElement>;
|
|
4
|
+
declare type UseToggleButton = {
|
|
5
|
+
handleClick: ClickHandler;
|
|
6
|
+
isPressed?: boolean;
|
|
6
7
|
};
|
|
8
|
+
export declare const useToggleButton: ({ isPressed, defaultPressed, onClick, onChange, value, }: ToggleButtonProps) => UseToggleButton;
|
|
9
|
+
export {};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { ToggleButtonGroupProps } from '../types';
|
|
2
|
-
|
|
2
|
+
declare type UseToggleButtonParams = Pick<ToggleButtonGroupProps, 'onChange' | 'value' | 'isExclusive' | 'isSelectionRequired'>;
|
|
3
|
+
export declare const useToggleButtonGroup: ({ onChange, value, isExclusive, isSelectionRequired, }: UseToggleButtonParams) => (value: string) => void;
|
|
4
|
+
export {};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { GridItemStyleProps, GridSpanType, ViewProps } from '../types';
|
|
3
3
|
import { Breakpoint, Breakpoints } from '../types/responsive';
|
|
4
|
-
import { FlexContainerStyleProps } from '../types/flex';
|
|
5
4
|
import { WebTheme } from '@aws-amplify/ui';
|
|
6
5
|
export declare const isSpanPrimitiveValue: (spanValue: GridItemStyleProps['rowSpan'] | GridItemStyleProps['columnSpan']) => spanValue is GridSpanType;
|
|
7
6
|
export declare const getGridSpan: (spanValue: GridSpanType) => string;
|
|
@@ -37,15 +36,4 @@ export declare const useStyles: (props: ViewProps, style?: React.CSSProperties)
|
|
|
37
36
|
propStyles: React.CSSProperties;
|
|
38
37
|
nonStyleProps: Partial<ViewProps>;
|
|
39
38
|
};
|
|
40
|
-
interface SplitProps<PrimitiveProps> {
|
|
41
|
-
styleProps: AllStyleProps;
|
|
42
|
-
rest: Partial<Omit<PrimitiveProps, keyof FlexContainerStyleProps | keyof BaseStyleProps>>;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* This function splits props into style props and non-style props. This is used
|
|
46
|
-
* on Field primitives so we can apply style props on the wrapper element and
|
|
47
|
-
* the rest on the input.
|
|
48
|
-
* @param props this should be a destructured `rest` from the component's props
|
|
49
|
-
*/
|
|
50
|
-
export declare const splitPrimitiveProps: <PrimitiveProps extends Record<string, unknown>>(props: PrimitiveProps) => SplitProps<PrimitiveProps>;
|
|
51
39
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentClassName } from '@aws-amplify/ui';
|
|
2
2
|
declare 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' | 'SwitchField' | 'Table' | 'Tabs' | 'Text' | 'TextAreaField' | 'TextField' | 'ToggleButton' | 'ToggleButtonGroup' | 'VisuallyHidden';
|
|
3
|
-
declare 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' | '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' | 'SwitchField' | 'SwitchLabel' | 'SwitchThumb' | 'SwitchTrack' | 'SwitchWrapper' | 'Table' | 'TableCaption' | 'TableBody' | 'TableTd' | 'TableTh' | 'TableFoot' | 'TableHead' | 'TableRow' | 'Tabs' | 'TabItems' | 'Text' | 'Textarea' | 'TextAreaField' | 'TextField' | 'ToggleButton' | 'ToggleButtonGroup' | 'VisuallyHidden';
|
|
3
|
+
declare 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' | '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[];
|
|
@@ -11,6 +11,7 @@ export interface AutocompleteComboboxProps {
|
|
|
11
11
|
'aria-owns': React.AriaAttributes['aria-owns'];
|
|
12
12
|
}
|
|
13
13
|
export interface ComboBoxOption {
|
|
14
|
+
[key: string]: string;
|
|
14
15
|
/**
|
|
15
16
|
* @description
|
|
16
17
|
* Unique id for an option
|
|
@@ -21,7 +22,6 @@ export interface ComboBoxOption {
|
|
|
21
22
|
* Label for an option
|
|
22
23
|
*/
|
|
23
24
|
label: string;
|
|
24
|
-
[key: string]: string;
|
|
25
25
|
}
|
|
26
26
|
export interface AutocompleteOptionProps extends ViewProps {
|
|
27
27
|
/**
|
|
@@ -120,7 +120,7 @@ export interface UseAutocompleteProps extends Partial<AutocompleteProps> {
|
|
|
120
120
|
}
|
|
121
121
|
declare type SetStateAction<T> = React.Dispatch<React.SetStateAction<T>>;
|
|
122
122
|
export interface UseAutocomplete {
|
|
123
|
-
activeOptionId
|
|
123
|
+
activeOptionId?: ComboBoxOption['id'];
|
|
124
124
|
autocompleteId: string;
|
|
125
125
|
composedValue: string;
|
|
126
126
|
filteredOptions: ComboBoxOption[];
|
|
@@ -135,7 +135,7 @@ export interface UseAutocomplete {
|
|
|
135
135
|
listboxId: string;
|
|
136
136
|
menuId: string;
|
|
137
137
|
optionBaseId: string;
|
|
138
|
-
setActiveOption: SetStateAction<ComboBoxOption>;
|
|
138
|
+
setActiveOption: SetStateAction<ComboBoxOption | null>;
|
|
139
139
|
setIsMenuOpen: SetStateAction<boolean>;
|
|
140
140
|
setInternalValue: SetStateAction<string>;
|
|
141
141
|
}
|
|
@@ -44,10 +44,10 @@ export interface CheckboxProps extends FlexProps, InputProps {
|
|
|
44
44
|
inputStyles?: BaseStyleProps;
|
|
45
45
|
}
|
|
46
46
|
export interface UseCheckbox {
|
|
47
|
-
dataChecked
|
|
47
|
+
dataChecked?: boolean;
|
|
48
48
|
dataFocus: boolean;
|
|
49
49
|
onBlur: () => void;
|
|
50
50
|
onChange: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
51
51
|
onFocus: () => void;
|
|
52
|
-
setDataChecked: Dispatch<SetStateAction<boolean>>;
|
|
52
|
+
setDataChecked: Dispatch<SetStateAction<boolean | undefined>>;
|
|
53
53
|
}
|
|
@@ -70,7 +70,7 @@ interface BasePaginationProps {
|
|
|
70
70
|
* @description
|
|
71
71
|
* Callback function triggered every time the page changes
|
|
72
72
|
*/
|
|
73
|
-
onChange?: (newPageIndex
|
|
73
|
+
onChange?: (newPageIndex?: number, prevPageIndex?: number) => void;
|
|
74
74
|
}
|
|
75
75
|
export interface PaginationProps extends BasePaginationProps, ViewProps {
|
|
76
76
|
}
|
|
@@ -5,7 +5,7 @@ export declare type SelectVariation = 'quiet';
|
|
|
5
5
|
export interface SelectProps extends ViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
8
|
-
* A string providing a hint for a
|
|
8
|
+
* A string providing a hint for a user agent's autocomplete feature
|
|
9
9
|
*/
|
|
10
10
|
autoComplete?: string;
|
|
11
11
|
/**
|
|
@@ -25,7 +25,7 @@ export interface SelectProps extends ViewProps {
|
|
|
25
25
|
value?: string;
|
|
26
26
|
/**
|
|
27
27
|
* @description
|
|
28
|
-
* Changes the height and font size of the SelectField. Available options are
|
|
28
|
+
* Changes the height and font size of the SelectField. Available options are ‘small’, none (default), and ‘large’
|
|
29
29
|
*/
|
|
30
30
|
size?: Sizes;
|
|
31
31
|
/**
|
|
@@ -48,9 +48,7 @@ export interface StepperFieldProps extends TextFieldProps {
|
|
|
48
48
|
decreaseButtonLabel?: string;
|
|
49
49
|
/**
|
|
50
50
|
* @description
|
|
51
|
-
*
|
|
52
|
-
* Extends StepperField props from Omit<TextFieldProps, 'onChange'>, after removing [key: string]: any from the base type
|
|
53
|
-
* and rename onStepChange to onChange
|
|
51
|
+
* Event handler called with the current step value when it is updated
|
|
54
52
|
*/
|
|
55
53
|
onStepChange?: (value: number) => void;
|
|
56
54
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getTestId: (testId?: string, component?: string) => string | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AllStyleProps, BaseStyleProps, FlexContainerStyleProps } from '../types';
|
|
2
|
+
interface SplitProps<PrimitiveProps> {
|
|
3
|
+
styleProps: AllStyleProps;
|
|
4
|
+
rest: Partial<Omit<PrimitiveProps, keyof FlexContainerStyleProps | keyof BaseStyleProps>>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* This function splits props into style props and non-style props. This is used
|
|
8
|
+
* on Field primitives so we can apply style props on the wrapper element and
|
|
9
|
+
* the rest on the input.
|
|
10
|
+
* @param props this should be a destructured `rest` from the component's props
|
|
11
|
+
*/
|
|
12
|
+
export declare const splitPrimitiveProps: <PrimitiveProps extends Record<string, unknown>>(props: PrimitiveProps) => SplitProps<PrimitiveProps>;
|
|
13
|
+
export {};
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "4.3.
|
|
1
|
+
export declare const VERSION = "4.3.5";
|