@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.
Files changed (63) hide show
  1. package/dist/esm/PrimitiveCatalog.js +1 -1
  2. package/dist/esm/components/AccountSettings/ChangePassword/ChangePassword.js +1 -1
  3. package/dist/esm/components/AccountSettings/ChangePassword/defaults.js +1 -1
  4. package/dist/esm/components/AccountSettings/DeleteUser/DeleteUser.js +1 -1
  5. package/dist/esm/components/Authenticator/FederatedSignIn/FederatedSignIn.js +1 -1
  6. package/dist/esm/components/Storage/FileUploader/UploadTracker/index.js +1 -1
  7. package/dist/esm/primitives/Alert/Alert.js +1 -1
  8. package/dist/esm/primitives/Checkbox/Checkbox.js +1 -1
  9. package/dist/esm/primitives/CheckboxField/CheckboxField.js +1 -1
  10. package/dist/esm/primitives/Expander/Expander.js +1 -1
  11. package/dist/esm/primitives/Expander/ExpanderItem.js +1 -1
  12. package/dist/esm/primitives/HighlightMatch/HighlightMatch.js +1 -1
  13. package/dist/esm/primitives/Pagination/usePagination.js +1 -1
  14. package/dist/esm/primitives/PhoneNumberField/PhoneNumberField.js +1 -1
  15. package/dist/esm/primitives/Radio/Radio.js +1 -1
  16. package/dist/esm/primitives/RadioGroupField/RadioGroupField.js +1 -1
  17. package/dist/esm/primitives/SearchField/SearchFieldButton.js +1 -1
  18. package/dist/esm/primitives/SelectField/SelectField.js +1 -1
  19. package/dist/esm/primitives/SliderField/SliderField.js +1 -1
  20. package/dist/esm/primitives/StepperField/StepperField.js +1 -1
  21. package/dist/esm/primitives/StepperField/useStepper.js +1 -1
  22. package/dist/esm/primitives/Tabs/Tabs.js +1 -1
  23. package/dist/esm/primitives/TextAreaField/TextAreaField.js +1 -1
  24. package/dist/esm/primitives/TextField/TextField.js +1 -1
  25. package/dist/esm/primitives/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
  26. package/dist/esm/primitives/ToggleButtonGroup/useToggleButtonGroup.js +1 -1
  27. package/dist/esm/primitives/shared/constants.js +1 -1
  28. package/dist/esm/primitives/shared/datastore.js +1 -1
  29. package/dist/esm/primitives/shared/styleUtils.js +1 -1
  30. package/dist/esm/primitives/utils/{testUtils.js → getTestId.js} +0 -0
  31. package/dist/esm/primitives/utils/splitPrimitiveProps.js +1 -0
  32. package/dist/esm/version.js +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/internal.js +1 -1
  35. package/dist/styles.css +9 -2
  36. package/dist/types/components/AccountSettings/types.d.ts +1 -1
  37. package/dist/types/components/shared/ValidationErrors.d.ts +1 -1
  38. package/dist/types/primitives/Alert/AlertIcon.d.ts +1 -1
  39. package/dist/types/primitives/Checkbox/useCheckbox.d.ts +1 -1
  40. package/dist/types/primitives/Expander/Expander.d.ts +1 -1
  41. package/dist/types/primitives/Expander/ExpanderItem.d.ts +1 -1
  42. package/dist/types/primitives/Pagination/usePaginationItems.d.ts +5 -5
  43. package/dist/types/primitives/SearchField/useSearchField.d.ts +14 -7
  44. package/dist/types/primitives/StepperField/StepperField.d.ts +1 -1
  45. package/dist/types/primitives/StepperField/useStepper.d.ts +18 -11
  46. package/dist/types/primitives/SwitchField/useSwitch.d.ts +8 -6
  47. package/dist/types/primitives/ToggleButton/useToggleButton.d.ts +6 -3
  48. package/dist/types/primitives/ToggleButtonGroup/useToggleButtonGroup.d.ts +3 -1
  49. package/dist/types/primitives/shared/styleUtils.d.ts +1 -13
  50. package/dist/types/primitives/shared/types.d.ts +1 -1
  51. package/dist/types/primitives/types/autocomplete.d.ts +3 -3
  52. package/dist/types/primitives/types/checkbox.d.ts +2 -2
  53. package/dist/types/primitives/types/pagination.d.ts +1 -1
  54. package/dist/types/primitives/types/select.d.ts +2 -2
  55. package/dist/types/primitives/types/stepperField.d.ts +1 -3
  56. package/dist/types/primitives/types/toggleButton.d.ts +1 -1
  57. package/dist/types/primitives/utils/getTestId.d.ts +1 -0
  58. package/dist/types/primitives/utils/splitPrimitiveProps.d.ts +13 -0
  59. package/dist/types/primitives/utils/testUtils.d.ts +0 -1
  60. package/dist/types/version.d.ts +1 -1
  61. package/dist/utils-5fd28806.js +1 -0
  62. package/package.json +21 -3
  63. 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: center;
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: row;
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, 'isDisabled' | (T extends 'submit' ? never : 'onClick')>>;
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,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { AlertVariations } from '../types';
3
3
  interface AlertIconProps {
4
- variation: AlertVariations;
4
+ variation?: AlertVariations;
5
5
  ariaHidden?: boolean;
6
6
  }
7
7
  export declare const AlertIcon: React.FC<AlertIconProps>;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import { UseCheckbox } from '../types/checkbox';
3
- export declare const useCheckbox: (initialChecked: boolean, onChangeProp: React.ChangeEventHandler) => UseCheckbox;
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, React.ForwardRefExoticComponent<(import("@radix-ui/react-accordion").AccordionSingleProps | import("@radix-ui/react-accordion").AccordionMultipleProps) & React.RefAttributes<HTMLDivElement>>>, "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" | "disabled" | "type" | "value" | "as" | "asChild" | "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>>;
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, React.ForwardRefExoticComponent<import("@radix-ui/react-accordion").AccordionItemProps & React.RefAttributes<HTMLDivElement>>>, "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" | "disabled" | "value" | "as" | "asChild" | "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>>;
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: string;
7
- pageLabel: string;
8
- previousLabel: string;
9
- nextLabel: string;
6
+ currentPageLabel?: string;
7
+ pageLabel?: string;
8
+ previousLabel?: string;
9
+ nextLabel?: string;
10
10
  onNext?: () => void;
11
11
  onPrevious?: () => void;
12
- onChange: (newPageIndex: number, prevPageIndex: number) => void;
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
- export declare const useSearchField: ({ defaultValue, value, onChange, onClear, onSubmit, externalRef, }: UseSearchFieldProps) => {
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: () => void;
5
- onKeyDown: (event: any) => void;
6
- onClick: () => void;
7
- handleOnChange: (event: any) => void;
8
- composedRefs: import("../../hooks/useComposeRefsCallback").UseComposeRefsCallback<HTMLInputElement>;
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" | "onDecrease" | "onIncrease" | "onStepChange"> & React.RefAttributes<HTMLInputElement>>;
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
- export declare const useStepper: ({ defaultValue, value: controlledValue, step, max, min, isDisabled, isReadOnly, onDecrease, onIncrease, onStepChange, }: StepperFieldProps) => {
4
- step: number;
5
- value: number;
6
- inputValue: string | number;
7
- handleDecrease: React.MouseEventHandler<HTMLButtonElement>;
8
- handleIncrease: React.MouseEventHandler<HTMLButtonElement>;
9
- handleOnBlur: React.FocusEventHandler<HTMLInputElement>;
10
- handleOnChange: React.ChangeEventHandler<HTMLInputElement>;
11
- handleOnWheel: React.WheelEventHandler<HTMLInputElement>;
12
- setInputValue: React.Dispatch<React.SetStateAction<string | number>>;
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 { ChangeEvent } from 'react';
1
+ import React from 'react';
2
+ declare type ChangeHandler = React.ChangeEventHandler<HTMLInputElement>;
2
3
  interface UseSwitchProps {
3
- onChange?: React.ChangeEventHandler<HTMLInputElement>;
4
+ onChange?: ChangeHandler;
4
5
  isChecked?: boolean;
5
6
  defaultChecked?: boolean;
6
7
  isDisabled?: boolean;
7
8
  }
8
- export declare const useSwitch: (props: UseSwitchProps) => {
9
+ interface UseSwitch {
9
10
  isOn: boolean;
10
- changeHandler: (event: ChangeEvent<HTMLInputElement>) => void;
11
+ changeHandler: ChangeHandler;
11
12
  isFocused: boolean;
12
- setIsFocused: import("react").Dispatch<import("react").SetStateAction<boolean>>;
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
- export declare const useToggleButton: ({ isPressed, defaultPressed, onClick, onChange, value, }: ToggleButtonProps) => {
4
- isPressed: boolean;
5
- handleClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
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
- export declare const useToggleButtonGroup: (onChange: ToggleButtonGroupProps['onChange'], value: ToggleButtonGroupProps['value'], isExclusive?: boolean, isSelectionRequired?: boolean) => (value: string) => void;
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 { AllStyleProps, BaseStyleProps, GridItemStyleProps, GridSpanType, ViewProps } from '../types';
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: ComboBoxOption['id'];
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: boolean;
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: number, prevPageIndex: number) => void;
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 user agent's autocomplete feature
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 ‘small’, none (default), and ‘large’
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
- * TODO:
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
  /**
@@ -19,5 +19,5 @@ export interface ToggleButtonProps extends ButtonProps {
19
19
  * @description
20
20
  * Handles changes to the current value when using the ToggleButton as a controlled component
21
21
  */
22
- onChange?: (value: string) => void;
22
+ onChange?: (value?: string) => void;
23
23
  }
@@ -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 {};
@@ -1,2 +1 @@
1
- export declare const getTestId: (testId: string, component: string) => string;
2
1
  export declare const errorMessageWrapper: (fn: () => void, message: string) => void | Error;
@@ -1 +1 @@
1
- export declare const VERSION = "4.3.3";
1
+ export declare const VERSION = "4.3.5";