@aws-amplify/ui-react 4.6.3 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/PrimitiveCatalog.mjs +1 -1
- package/dist/esm/components/AccountSettings/ChangePassword/ChangePassword.mjs +1 -1
- package/dist/esm/components/index.mjs +1 -1
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/primitives/Autocomplete/AutocompleteMenu.mjs +1 -1
- package/dist/esm/primitives/Autocomplete/AutocompleteOption.mjs +1 -1
- package/dist/esm/primitives/Link/Link.mjs +1 -1
- package/dist/esm/version.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/styles.css +0 -378
- package/dist/types/components/AccountSettings/types.d.ts +4 -7
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/primitives/Alert/Alert.d.ts +2 -3
- package/dist/types/primitives/Autocomplete/Autocomplete.d.ts +2 -3
- package/dist/types/primitives/Autocomplete/AutocompleteMenu.d.ts +2 -2
- package/dist/types/primitives/Autocomplete/AutocompleteOption.d.ts +2 -2
- package/dist/types/primitives/Badge/Badge.d.ts +2 -3
- package/dist/types/primitives/Button/Button.d.ts +2 -3
- package/dist/types/primitives/ButtonGroup/ButtonGroup.d.ts +2 -3
- package/dist/types/primitives/Card/Card.d.ts +2 -3
- package/dist/types/primitives/Checkbox/Checkbox.d.ts +3 -3
- package/dist/types/primitives/CheckboxField/CheckboxField.d.ts +2 -3
- package/dist/types/primitives/Collection/Collection.d.ts +2 -2
- package/dist/types/primitives/Divider/Divider.d.ts +2 -3
- package/dist/types/primitives/Expander/Expander.d.ts +3 -3
- package/dist/types/primitives/Expander/ExpanderItem.d.ts +3 -3
- package/dist/types/primitives/Field/Field.d.ts +3 -4
- package/dist/types/primitives/Field/FieldClearButton.d.ts +2 -3
- package/dist/types/primitives/Field/FieldDescription.d.ts +2 -2
- package/dist/types/primitives/Field/FieldErrorMessage.d.ts +2 -2
- package/dist/types/primitives/FieldGroup/FieldGroup.d.ts +2 -3
- package/dist/types/primitives/FieldGroupIcon/FieldGroupIcon.d.ts +2 -3
- package/dist/types/primitives/FieldGroupIcon/FieldGroupIconButton.d.ts +2 -3
- package/dist/types/primitives/Flex/Flex.d.ts +2 -3
- package/dist/types/primitives/Grid/Grid.d.ts +2 -3
- package/dist/types/primitives/Heading/Heading.d.ts +2 -5
- package/dist/types/primitives/HighlightMatch/HighlightMatch.d.ts +2 -3
- package/dist/types/primitives/Icon/Icon.d.ts +2 -3
- package/dist/types/primitives/Image/Image.d.ts +2 -3
- package/dist/types/primitives/Input/Input.d.ts +2 -3
- package/dist/types/primitives/Label/Label.d.ts +2 -3
- package/dist/types/primitives/Link/Link.d.ts +2 -3
- package/dist/types/primitives/Loader/Loader.d.ts +3 -3
- package/dist/types/primitives/Menu/Menu.d.ts +2 -3
- package/dist/types/primitives/Menu/MenuButton.d.ts +2 -8
- package/dist/types/primitives/Menu/MenuItem.d.ts +2 -6
- package/dist/types/primitives/Pagination/Pagination.d.ts +2 -3
- package/dist/types/primitives/Pagination/PaginationItem.d.ts +2 -2
- package/dist/types/primitives/PasswordField/PasswordField.d.ts +2 -3
- package/dist/types/primitives/PasswordField/ShowPasswordButton.d.ts +2 -3
- package/dist/types/primitives/PhoneNumberField/CountryCodeSelect.d.ts +2 -3
- package/dist/types/primitives/PhoneNumberField/PhoneNumberField.d.ts +2 -3
- package/dist/types/primitives/Placeholder/Placeholder.d.ts +2 -3
- package/dist/types/primitives/Radio/Radio.d.ts +2 -3
- package/dist/types/primitives/RadioGroupField/RadioGroupField.d.ts +2 -3
- package/dist/types/primitives/Rating/Rating.d.ts +2 -3
- package/dist/types/primitives/ScrollView/ScrollView.d.ts +2 -3
- package/dist/types/primitives/SearchField/SearchField.d.ts +2 -3
- package/dist/types/primitives/SearchField/SearchFieldButton.d.ts +2 -3
- package/dist/types/primitives/Select/Select.d.ts +3 -3
- package/dist/types/primitives/SelectField/SelectField.d.ts +2 -3
- package/dist/types/primitives/SliderField/SliderField.d.ts +3 -4
- package/dist/types/primitives/StepperField/StepperField.d.ts +3 -3
- package/dist/types/primitives/StepperField/useStepper.d.ts +1 -1
- package/dist/types/primitives/SwitchField/SwitchField.d.ts +2 -3
- package/dist/types/primitives/Table/Table.d.ts +2 -3
- package/dist/types/primitives/Table/TableBody.d.ts +2 -3
- package/dist/types/primitives/Table/TableCell.d.ts +2 -3
- package/dist/types/primitives/Table/TableFoot.d.ts +2 -3
- package/dist/types/primitives/Table/TableHead.d.ts +2 -3
- package/dist/types/primitives/Table/TableRow.d.ts +2 -3
- package/dist/types/primitives/Tabs/Tabs.d.ts +3 -4
- package/dist/types/primitives/Text/Text.d.ts +2 -3
- package/dist/types/primitives/TextArea/TextArea.d.ts +3 -3
- package/dist/types/primitives/TextAreaField/TextAreaField.d.ts +3 -3
- package/dist/types/primitives/TextField/TextField.d.ts +2 -3
- package/dist/types/primitives/ToggleButton/ToggleButton.d.ts +2 -3
- package/dist/types/primitives/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -3
- package/dist/types/primitives/View/View.d.ts +2 -7
- package/dist/types/primitives/VisuallyHidden/VisuallyHidden.d.ts +2 -3
- package/dist/types/primitives/shared/styleUtils.d.ts +3 -3
- package/dist/types/primitives/types/alert.d.ts +4 -2
- package/dist/types/primitives/types/autocomplete.d.ts +8 -5
- package/dist/types/primitives/types/badge.d.ts +3 -2
- package/dist/types/primitives/types/base.d.ts +5 -0
- package/dist/types/primitives/types/button.d.ts +3 -2
- package/dist/types/primitives/types/buttonGroup.d.ts +5 -3
- package/dist/types/primitives/types/card.d.ts +3 -2
- package/dist/types/primitives/types/checkbox.d.ts +5 -3
- package/dist/types/primitives/types/checkboxField.d.ts +5 -3
- package/dist/types/primitives/types/collection.d.ts +7 -5
- package/dist/types/primitives/types/divider.d.ts +3 -2
- package/dist/types/primitives/types/expander.d.ts +5 -3
- package/dist/types/primitives/types/field.d.ts +12 -7
- package/dist/types/primitives/types/fieldGroup.d.ts +4 -2
- package/dist/types/primitives/types/fieldGroupIcon.d.ts +6 -4
- package/dist/types/primitives/types/flex.d.ts +3 -2
- package/dist/types/primitives/types/grid.d.ts +3 -2
- package/dist/types/primitives/types/heading.d.ts +5 -2
- package/dist/types/primitives/types/highlightMatch.d.ts +3 -2
- package/dist/types/primitives/types/icon.d.ts +3 -2
- package/dist/types/primitives/types/image.d.ts +3 -2
- package/dist/types/primitives/types/input.d.ts +3 -2
- package/dist/types/primitives/types/label.d.ts +3 -2
- package/dist/types/primitives/types/link.d.ts +8 -16
- package/dist/types/primitives/types/loader.d.ts +3 -2
- package/dist/types/primitives/types/menu.d.ts +7 -4
- package/dist/types/primitives/types/pagination.d.ts +6 -7
- package/dist/types/primitives/types/passwordField.d.ts +7 -4
- package/dist/types/primitives/types/phoneNumberField.d.ts +8 -5
- package/dist/types/primitives/types/placeholder.d.ts +3 -2
- package/dist/types/primitives/types/radio.d.ts +4 -2
- package/dist/types/primitives/types/radioGroupField.d.ts +5 -3
- package/dist/types/primitives/types/rating.d.ts +4 -2
- package/dist/types/primitives/types/scrollView.d.ts +3 -2
- package/dist/types/primitives/types/searchField.d.ts +6 -3
- package/dist/types/primitives/types/select.d.ts +3 -2
- package/dist/types/primitives/types/selectField.d.ts +5 -3
- package/dist/types/primitives/types/sliderField.d.ts +4 -3
- package/dist/types/primitives/types/stepperField.d.ts +4 -2
- package/dist/types/primitives/types/switchField.d.ts +5 -3
- package/dist/types/primitives/types/table.d.ts +13 -8
- package/dist/types/primitives/types/tabs.d.ts +6 -3
- package/dist/types/primitives/types/text.d.ts +3 -7
- package/dist/types/primitives/types/textArea.d.ts +3 -2
- package/dist/types/primitives/types/textAreaField.d.ts +5 -3
- package/dist/types/primitives/types/textField.d.ts +7 -5
- package/dist/types/primitives/types/toggleButton.d.ts +4 -2
- package/dist/types/primitives/types/toggleButtonGroup.d.ts +5 -3
- package/dist/types/primitives/types/view.d.ts +14 -30
- package/dist/types/primitives/types/visuallyHidden.d.ts +3 -2
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -22
- package/dist/esm/components/Geo/LocationSearch/index.mjs +0 -1
- package/dist/esm/components/Geo/MapView/index.mjs +0 -1
- package/dist/esm/components/InAppMessaging/Backdrop/Backdrop.mjs +0 -1
- package/dist/esm/components/InAppMessaging/Backdrop/withBackdrop.mjs +0 -1
- package/dist/esm/components/InAppMessaging/BannerMessage/BannerMessage.mjs +0 -1
- package/dist/esm/components/InAppMessaging/BannerMessage/constants.mjs +0 -1
- package/dist/esm/components/InAppMessaging/CloseIconButton/CloseIconButton.mjs +0 -1
- package/dist/esm/components/InAppMessaging/FullScreenMessage/FullScreenMessage.mjs +0 -1
- package/dist/esm/components/InAppMessaging/FullScreenMessage/constants.mjs +0 -1
- package/dist/esm/components/InAppMessaging/InAppMessageDisplay/InAppMessageDisplay.mjs +0 -1
- package/dist/esm/components/InAppMessaging/InAppMessageDisplay/handleMessageLinkAction.mjs +0 -1
- package/dist/esm/components/InAppMessaging/MessageLayout/MessageLayout.mjs +0 -1
- package/dist/esm/components/InAppMessaging/MessageLayout/constants.mjs +0 -1
- package/dist/esm/components/InAppMessaging/MessageLayout/utils.mjs +0 -1
- package/dist/esm/components/InAppMessaging/ModalMessage/ModalMessage.mjs +0 -1
- package/dist/esm/components/InAppMessaging/ModalMessage/constants.mjs +0 -1
- package/dist/esm/components/InAppMessaging/hooks/useMessageImage/types.mjs +0 -1
- package/dist/esm/components/InAppMessaging/hooks/useMessageImage/useMessageImage.mjs +0 -1
- package/dist/esm/components/InAppMessaging/hooks/useMessageProps/useMessageProps.mjs +0 -1
- package/dist/esm/components/InAppMessaging/hooks/useMessageProps/utils.mjs +0 -1
- package/dist/esm/components/InAppMessaging/withInAppMessaging/withInAppMessaging.mjs +0 -1
- package/dist/types/components/Geo/LocationSearch/index.d.ts +0 -25
- package/dist/types/components/Geo/MapView/index.d.ts +0 -24
- package/dist/types/components/Geo/index.d.ts +0 -2
- package/dist/types/components/Geo/types/maplibre-gl-geocoder.d.ts +0 -171
- package/dist/types/components/InAppMessaging/Backdrop/Backdrop.d.ts +0 -4
- package/dist/types/components/InAppMessaging/Backdrop/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/Backdrop/types.d.ts +0 -8
- package/dist/types/components/InAppMessaging/Backdrop/withBackdrop.d.ts +0 -3
- package/dist/types/components/InAppMessaging/BannerMessage/BannerMessage.d.ts +0 -3
- package/dist/types/components/InAppMessaging/BannerMessage/constants.d.ts +0 -1
- package/dist/types/components/InAppMessaging/BannerMessage/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/BannerMessage/types.d.ts +0 -7
- package/dist/types/components/InAppMessaging/CloseIconButton/CloseIconButton.d.ts +0 -3
- package/dist/types/components/InAppMessaging/CloseIconButton/index.d.ts +0 -1
- package/dist/types/components/InAppMessaging/CloseIconButton/types.d.ts +0 -8
- package/dist/types/components/InAppMessaging/FullScreenMessage/FullScreenMessage.d.ts +0 -3
- package/dist/types/components/InAppMessaging/FullScreenMessage/constants.d.ts +0 -1
- package/dist/types/components/InAppMessaging/FullScreenMessage/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/FullScreenMessage/types.d.ts +0 -4
- package/dist/types/components/InAppMessaging/InAppMessageDisplay/InAppMessageDisplay.d.ts +0 -10
- package/dist/types/components/InAppMessaging/InAppMessageDisplay/handleMessageLinkAction.d.ts +0 -3
- package/dist/types/components/InAppMessaging/InAppMessageDisplay/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/InAppMessageDisplay/types.d.ts +0 -23
- package/dist/types/components/InAppMessaging/MessageLayout/MessageLayout.d.ts +0 -3
- package/dist/types/components/InAppMessaging/MessageLayout/constants.d.ts +0 -16
- package/dist/types/components/InAppMessaging/MessageLayout/index.d.ts +0 -1
- package/dist/types/components/InAppMessaging/MessageLayout/types.d.ts +0 -23
- package/dist/types/components/InAppMessaging/MessageLayout/utils.d.ts +0 -13
- package/dist/types/components/InAppMessaging/ModalMessage/ModalMessage.d.ts +0 -3
- package/dist/types/components/InAppMessaging/ModalMessage/constants.d.ts +0 -2
- package/dist/types/components/InAppMessaging/ModalMessage/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/ModalMessage/types.d.ts +0 -4
- package/dist/types/components/InAppMessaging/hooks/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/hooks/useMessageImage/index.d.ts +0 -1
- package/dist/types/components/InAppMessaging/hooks/useMessageImage/types.d.ts +0 -10
- package/dist/types/components/InAppMessaging/hooks/useMessageImage/useMessageImage.d.ts +0 -9
- package/dist/types/components/InAppMessaging/hooks/useMessageProps/index.d.ts +0 -2
- package/dist/types/components/InAppMessaging/hooks/useMessageProps/types.d.ts +0 -39
- package/dist/types/components/InAppMessaging/hooks/useMessageProps/useMessageProps.d.ts +0 -11
- package/dist/types/components/InAppMessaging/hooks/useMessageProps/utils.d.ts +0 -23
- package/dist/types/components/InAppMessaging/index.d.ts +0 -6
- package/dist/types/components/InAppMessaging/withInAppMessaging/index.d.ts +0 -1
- package/dist/types/components/InAppMessaging/withInAppMessaging/withInAppMessaging.d.ts +0 -5
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BaseFlexProps } from './flex';
|
|
3
|
+
import { BaseGridProps } from './grid';
|
|
4
4
|
import { BaseStyleProps } from './style';
|
|
5
|
+
import { ElementType, PrimitiveProps, PrimitivePropsWithAs } from './view';
|
|
5
6
|
export type CollectionType = 'list' | 'grid' | 'table';
|
|
6
7
|
export interface CollectionWrapperProps extends BaseStyleProps {
|
|
7
8
|
/**
|
|
@@ -62,10 +63,11 @@ export interface CollectionBaseProps<Item> {
|
|
|
62
63
|
*/
|
|
63
64
|
children: (item: Item, index: number) => JSX.Element;
|
|
64
65
|
}
|
|
65
|
-
export type ListCollectionProps<Item> =
|
|
66
|
-
export type GridCollectionProps<Item> =
|
|
67
|
-
export type
|
|
66
|
+
export type ListCollectionProps<Item> = BaseFlexProps & CollectionBaseProps<Item>;
|
|
67
|
+
export type GridCollectionProps<Item> = BaseGridProps & CollectionBaseProps<Item>;
|
|
68
|
+
export type BaseCollectionProps<Item, Element extends ElementType> = PrimitivePropsWithAs<CollectionWrapperProps, Element> & (({
|
|
68
69
|
type: 'list';
|
|
69
70
|
} & ListCollectionProps<Item>) | ({
|
|
70
71
|
type: 'grid';
|
|
71
72
|
} & GridCollectionProps<Item>));
|
|
73
|
+
export type CollectionProps<Item, Element extends ElementType = 'div'> = PrimitiveProps<BaseCollectionProps<Item, Element>, Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Sizes } from './base';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
3
3
|
export type DividerOrientations = 'horizontal' | 'vertical';
|
|
4
4
|
export type DividerSizes = Sizes;
|
|
5
5
|
export interface DividerOptions {
|
|
@@ -23,5 +23,6 @@ export interface DividerOptions {
|
|
|
23
23
|
*/
|
|
24
24
|
label?: string;
|
|
25
25
|
}
|
|
26
|
-
export interface
|
|
26
|
+
export interface BaseDividerProps extends BaseViewProps, DividerOptions {
|
|
27
27
|
}
|
|
28
|
+
export type DividerProps<Element extends ElementType = 'hr'> = PrimitiveProps<BaseDividerProps, Element>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from '../types/view';
|
|
3
3
|
type ExpanderType = 'single' | 'multiple';
|
|
4
|
-
export interface
|
|
4
|
+
export interface BaseExpanderProps extends BaseViewProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
7
7
|
* The value of the item(s) to expand. Use on uncontrolled component.
|
|
@@ -32,7 +32,8 @@ export interface ExpanderProps extends ViewProps {
|
|
|
32
32
|
*/
|
|
33
33
|
onValueChange?: (value?: string | string[]) => void;
|
|
34
34
|
}
|
|
35
|
-
export
|
|
35
|
+
export type ExpanderProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseExpanderProps, Element>;
|
|
36
|
+
export interface BaseExpanderItemProps extends BaseViewProps {
|
|
36
37
|
/**
|
|
37
38
|
* @description
|
|
38
39
|
* The content of the heading.
|
|
@@ -44,4 +45,5 @@ export interface ExpanderItemProps extends ViewProps {
|
|
|
44
45
|
*/
|
|
45
46
|
value: string;
|
|
46
47
|
}
|
|
48
|
+
export type ExpanderItemProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseExpanderItemProps, Element>;
|
|
47
49
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { BaseFieldGroupIconButtonProps } from './fieldGroupIcon';
|
|
3
|
+
import { BaseInputProps } from './input';
|
|
4
|
+
import { BaseTextProps } from './text';
|
|
5
5
|
import { BaseStyleProps } from './style';
|
|
6
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
6
7
|
/**
|
|
7
8
|
* Shared type across all field types
|
|
8
9
|
*/
|
|
9
|
-
export interface
|
|
10
|
+
export interface BaseFieldProps extends BaseViewProps {
|
|
10
11
|
/**
|
|
11
12
|
* @description
|
|
12
13
|
* Provides additional information needed to fill field
|
|
@@ -36,11 +37,15 @@ export interface FieldProps {
|
|
|
36
37
|
*/
|
|
37
38
|
inputStyles?: BaseStyleProps;
|
|
38
39
|
}
|
|
39
|
-
export
|
|
40
|
+
export type FieldProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseFieldProps, Element>;
|
|
41
|
+
export interface BaseFieldClearButtonProps extends Partial<BaseFieldGroupIconButtonProps> {
|
|
40
42
|
}
|
|
41
|
-
export
|
|
43
|
+
export type FieldClearButtonProps<Element extends ElementType = 'button'> = PrimitiveProps<BaseFieldClearButtonProps, Element>;
|
|
44
|
+
export interface BaseFieldDescriptionProps extends BaseTextProps, Pick<BaseFieldProps, 'descriptiveText' | 'labelHidden'> {
|
|
42
45
|
}
|
|
43
|
-
export
|
|
46
|
+
export type FieldDescriptionProps<Element extends ElementType = 'p'> = PrimitiveProps<BaseFieldDescriptionProps, Element>;
|
|
47
|
+
export interface BaseFieldErrorMessageProps extends BaseTextProps, Pick<BaseFieldProps, 'errorMessage'>, Pick<BaseInputProps, 'hasError'> {
|
|
44
48
|
}
|
|
49
|
+
export type FieldErrorMessageProps<Element extends ElementType = 'p'> = PrimitiveProps<BaseFieldErrorMessageProps, Element>;
|
|
45
50
|
export type FieldVariations = 'quiet';
|
|
46
51
|
export type LabelPositions = 'start' | 'end' | 'top' | 'bottom';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { BaseFlexProps } from './flex';
|
|
3
3
|
import { FieldVariations } from './field';
|
|
4
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
4
5
|
export type FieldGroupOrientation = 'horizontal' | 'vertical';
|
|
5
|
-
export interface
|
|
6
|
+
export interface BaseFieldGroupOptions extends BaseFlexProps {
|
|
6
7
|
children?: React.ReactNode;
|
|
7
8
|
orientation?: FieldGroupOrientation;
|
|
8
9
|
outerStartComponent?: React.ReactNode;
|
|
@@ -11,3 +12,4 @@ export interface FieldGroupOptions extends FlexProps {
|
|
|
11
12
|
innerEndComponent?: React.ReactNode;
|
|
12
13
|
variation?: FieldVariations;
|
|
13
14
|
}
|
|
15
|
+
export type FieldGroupOptions<Element extends ElementType = 'div'> = PrimitiveProps<BaseFieldGroupOptions, Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
1
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
2
|
+
import { BaseButtonProps } from './button';
|
|
3
|
+
export interface BaseFieldGroupIconProps extends BaseViewProps {
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* Determines whether Icon should be visible
|
|
@@ -13,5 +13,7 @@ export interface FieldGroupIconProps extends ViewProps {
|
|
|
13
13
|
*/
|
|
14
14
|
excludeFromTabOrder?: boolean;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type FieldGroupIconProps<Element extends ElementType = 'button' | 'div'> = PrimitiveProps<BaseFieldGroupIconProps, Element>;
|
|
17
|
+
export interface BaseFieldGroupIconButtonProps extends BaseFieldGroupIconProps, Pick<BaseButtonProps, 'onClick' | 'variation' | 'size' | 'type'> {
|
|
17
18
|
}
|
|
19
|
+
export type FieldGroupIconButtonProps<Element extends ElementType = 'button'> = PrimitiveProps<BaseFieldGroupIconButtonProps, Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { CSSLayoutStyleProps, ResponsiveStyle } from './style';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseViewProps, PrimitiveProps, ElementType } from './view';
|
|
4
4
|
export interface FlexContainerStyleProps extends CSSLayoutStyleProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
@@ -19,8 +19,9 @@ export interface FlexContainerStyleProps extends CSSLayoutStyleProps {
|
|
|
19
19
|
*/
|
|
20
20
|
wrap?: ResponsiveStyle<Property.FlexWrap>;
|
|
21
21
|
}
|
|
22
|
-
export interface
|
|
22
|
+
export interface BaseFlexProps extends BaseViewProps, FlexContainerStyleProps {
|
|
23
23
|
}
|
|
24
|
+
export type FlexProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseFlexProps, Element>;
|
|
24
25
|
export interface FlexItemStyleProps {
|
|
25
26
|
/**
|
|
26
27
|
* @description
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import { ResponsiveStyle, CSSLayoutStyleProps } from './style';
|
|
3
|
-
import {
|
|
3
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
4
4
|
export type GridSpanType = number | string | 'auto';
|
|
5
5
|
export interface GridContainerStyleProps extends CSSLayoutStyleProps {
|
|
6
6
|
/**
|
|
@@ -105,5 +105,6 @@ export interface GridItemStyleProps {
|
|
|
105
105
|
*/
|
|
106
106
|
rowStart?: ResponsiveStyle<Property.GridRowStart>;
|
|
107
107
|
}
|
|
108
|
-
export interface
|
|
108
|
+
export interface BaseGridProps extends GridContainerStyleProps, BaseViewProps {
|
|
109
109
|
}
|
|
110
|
+
export type GridProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseGridProps, Element>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseTextProps } from './text';
|
|
2
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
2
3
|
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
-
export
|
|
4
|
+
export type HeadingTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
5
|
+
export interface BaseHeadingProps extends BaseTextProps {
|
|
4
6
|
/**
|
|
5
7
|
* @description
|
|
6
8
|
* Controls which semantic section heading element is rendered, <h1> through <h6>
|
|
7
9
|
*/
|
|
8
10
|
level?: HeadingLevel;
|
|
9
11
|
}
|
|
12
|
+
export type HeadingProps<Element extends ElementType = HeadingTag> = PrimitiveProps<BaseHeadingProps, Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export interface
|
|
1
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
2
|
+
export interface BaseHighlightMatchProps extends BaseViewProps {
|
|
3
3
|
/**
|
|
4
4
|
* @description
|
|
5
5
|
* The label you would like to have match highlighting
|
|
@@ -11,3 +11,4 @@ export interface HighlightMatchProps extends ViewProps {
|
|
|
11
11
|
*/
|
|
12
12
|
query: string;
|
|
13
13
|
}
|
|
14
|
+
export type HighlightMatchProps<Element extends ElementType = 'span'> = PrimitiveProps<BaseHighlightMatchProps, Element>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
3
3
|
import { Sizes } from './base';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
export type ViewBox = {
|
|
@@ -9,7 +9,7 @@ export type ViewBox = {
|
|
|
9
9
|
height?: number;
|
|
10
10
|
};
|
|
11
11
|
export type IconSize = Sizes;
|
|
12
|
-
export interface
|
|
12
|
+
export interface BaseIconProps extends BaseViewProps {
|
|
13
13
|
/**
|
|
14
14
|
* @description
|
|
15
15
|
* This defines the shape of the <path> SVG element(the 'd' attribute).
|
|
@@ -49,3 +49,4 @@ export interface IconProps extends ViewProps {
|
|
|
49
49
|
*/
|
|
50
50
|
paths?: React.SVGAttributes<SVGPathElement>[];
|
|
51
51
|
}
|
|
52
|
+
export type IconProps<Element extends ElementType = 'svg'> = PrimitiveProps<BaseIconProps, Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
-
import {
|
|
3
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
4
4
|
import { ResponsiveStyle } from './style';
|
|
5
5
|
export interface ImageStyleProps {
|
|
6
6
|
/**
|
|
@@ -52,5 +52,6 @@ export interface ImageOptions extends ImageStyleProps {
|
|
|
52
52
|
*/
|
|
53
53
|
onError?(error: string | React.SyntheticEvent<HTMLImageElement, Event>): void;
|
|
54
54
|
}
|
|
55
|
-
export interface
|
|
55
|
+
export interface BaseImageProps extends BaseViewProps, ImageOptions {
|
|
56
56
|
}
|
|
57
|
+
export type ImageProps<Element extends ElementType = 'img'> = PrimitiveProps<BaseImageProps, Element>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Sizes } from './base';
|
|
3
3
|
import { FieldVariations } from './field';
|
|
4
|
-
import {
|
|
4
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
5
5
|
export type EnterKeyHint = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
|
|
6
6
|
export type InputMode = 'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url';
|
|
7
7
|
export type InputSizes = Sizes;
|
|
8
|
-
export interface
|
|
8
|
+
export interface BaseInputProps extends BaseViewProps {
|
|
9
9
|
/**
|
|
10
10
|
* @description
|
|
11
11
|
* Specifies permissions for browser UA to autocomplete field.
|
|
@@ -100,3 +100,4 @@ export interface InputProps extends ViewProps {
|
|
|
100
100
|
*/
|
|
101
101
|
variation?: FieldVariations;
|
|
102
102
|
}
|
|
103
|
+
export type InputProps<Element extends ElementType = 'input'> = PrimitiveProps<BaseInputProps, Element>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
3
|
-
export interface
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
3
|
+
export interface BaseLabelProps extends BaseViewProps {
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* Whether label should be visually hidden
|
|
@@ -12,3 +12,4 @@ export interface LabelProps extends ViewProps {
|
|
|
12
12
|
*/
|
|
13
13
|
children: React.ReactNode;
|
|
14
14
|
}
|
|
15
|
+
export type LabelProps<Element extends ElementType = 'label'> = PrimitiveProps<BaseLabelProps, Element>;
|
|
@@ -1,26 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
3
3
|
export interface LinkOptions {
|
|
4
|
-
/**
|
|
5
|
-
* @description
|
|
6
|
-
* Children to be rendered inside the Link component
|
|
7
|
-
*/
|
|
8
|
-
children: React.ReactNode;
|
|
9
4
|
/**
|
|
10
5
|
* @description
|
|
11
6
|
* Boolean value indicating an external link
|
|
12
7
|
* sets the rel attribute to "noopener noreferrer"
|
|
13
8
|
*/
|
|
14
9
|
isExternal?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* @deprecated
|
|
17
|
-
* The Link component's to prop will soon be deprecated.
|
|
18
|
-
* Please see the Amplify UI documentation for using the Link component with routing libraries:
|
|
19
|
-
* https://ui.docs.amplify.aws/react/components/link#routing-libraries
|
|
20
|
-
* @description
|
|
21
|
-
* A string representation of the URL path
|
|
22
|
-
*/
|
|
23
|
-
to?: string;
|
|
24
10
|
/**
|
|
25
11
|
* @description
|
|
26
12
|
* a stringifier that returns a string containing the whole URL, and allows the href to be updated.
|
|
@@ -29,5 +15,11 @@ export interface LinkOptions {
|
|
|
29
15
|
*/
|
|
30
16
|
href?: string;
|
|
31
17
|
}
|
|
32
|
-
export interface
|
|
18
|
+
export interface BaseLinkProps extends BaseViewProps, LinkOptions {
|
|
19
|
+
/**
|
|
20
|
+
* @description
|
|
21
|
+
* Children to be rendered inside the Link component
|
|
22
|
+
*/
|
|
23
|
+
children: React.ReactNode;
|
|
33
24
|
}
|
|
25
|
+
export type LinkProps<Element extends ElementType = 'a'> = PrimitiveProps<BaseLinkProps, Element>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from '../types/view';
|
|
3
3
|
import { Sizes } from './base';
|
|
4
4
|
import { StyleToken } from './style';
|
|
5
5
|
export type LoaderSizes = Sizes;
|
|
6
6
|
export type LoaderVariations = 'linear';
|
|
7
|
-
export interface
|
|
7
|
+
export interface BaseLoaderProps extends BaseViewProps {
|
|
8
8
|
/**
|
|
9
9
|
* @description
|
|
10
10
|
* This will set the size of Loader.
|
|
@@ -41,3 +41,4 @@ export interface LoaderProps extends ViewProps {
|
|
|
41
41
|
*/
|
|
42
42
|
isPercentageTextHidden?: boolean;
|
|
43
43
|
}
|
|
44
|
+
export type LoaderProps<Element extends ElementType = 'svg'> = PrimitiveProps<BaseLoaderProps, Element>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { BaseButtonProps } from './button';
|
|
3
|
+
import { BaseFlexProps } from './flex';
|
|
4
4
|
import { Sizes } from './base';
|
|
5
|
-
|
|
5
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
6
|
+
export interface BaseMenuProps extends BaseFlexProps {
|
|
6
7
|
/**
|
|
7
8
|
* @description
|
|
8
9
|
* Alignment of menu against trigger
|
|
@@ -41,10 +42,12 @@ export interface MenuProps extends FlexProps {
|
|
|
41
42
|
*/
|
|
42
43
|
triggerClassName?: string;
|
|
43
44
|
}
|
|
44
|
-
export
|
|
45
|
+
export type MenuProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseMenuProps, Element>;
|
|
46
|
+
export interface BaseMenuItemProps extends BaseButtonProps {
|
|
45
47
|
/**
|
|
46
48
|
* @description
|
|
47
49
|
* Accepts any number of MenuItem components
|
|
48
50
|
*/
|
|
49
51
|
children?: React.ReactNode;
|
|
50
52
|
}
|
|
53
|
+
export type MenuItemProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseMenuItemProps, Element>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseComponentProps, AriaProps } from './base';
|
|
2
2
|
import { BaseStyleProps } from './style';
|
|
3
|
-
import {
|
|
3
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
4
4
|
export type PaginationItemType = 'page' | 'next' | 'previous' | 'ellipsis';
|
|
5
5
|
export type PaginationCallbackType = 'onNext' | 'onPrevious' | 'onChange';
|
|
6
6
|
export type PaginationLabelType = 'pageLabel' | 'currentPageLabel' | 'previousLabel' | 'nextLabel';
|
|
7
|
-
interface BasePaginationProps {
|
|
7
|
+
export interface BasePaginationProps extends BaseViewProps {
|
|
8
8
|
/**
|
|
9
9
|
* @description
|
|
10
10
|
* Index of the current page. (starting from 1)
|
|
@@ -72,13 +72,12 @@ interface BasePaginationProps {
|
|
|
72
72
|
*/
|
|
73
73
|
onChange?: (newPageIndex?: number, prevPageIndex?: number) => void;
|
|
74
74
|
}
|
|
75
|
-
export
|
|
76
|
-
}
|
|
75
|
+
export type PaginationProps<Element extends ElementType = 'nav'> = PrimitiveProps<BasePaginationProps, Element>;
|
|
77
76
|
export interface UsePaginationProps extends Omit<BasePaginationProps, PaginationCallbackType & PaginationLabelType> {
|
|
78
77
|
}
|
|
79
|
-
export interface UsePaginationResult extends Required<Omit<BasePaginationProps, PaginationLabelType>> {
|
|
78
|
+
export interface UsePaginationResult extends Required<Omit<BasePaginationProps, PaginationLabelType | keyof BaseViewProps>> {
|
|
80
79
|
}
|
|
81
|
-
export interface
|
|
80
|
+
export interface BasePaginationItemProps extends BaseComponentProps, BaseStyleProps, AriaProps {
|
|
82
81
|
/**
|
|
83
82
|
* @description
|
|
84
83
|
* Available item type are 'page', 'next', 'previous' and 'ellipsis'.
|
|
@@ -112,4 +111,4 @@ export interface PaginationItemProps extends BaseComponentProps, BaseStyleProps,
|
|
|
112
111
|
*/
|
|
113
112
|
onClick?: () => void;
|
|
114
113
|
}
|
|
115
|
-
export
|
|
114
|
+
export type PaginationItemProps<Element extends ElementType = 'div'> = PrimitiveProps<BasePaginationItemProps, Element>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { BaseButtonProps } from './button';
|
|
3
|
+
import { BaseTextFieldProps } from './textField';
|
|
4
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
5
|
+
export interface BasePasswordFieldProps extends BaseTextFieldProps {
|
|
5
6
|
/**
|
|
6
7
|
* @description
|
|
7
8
|
* For password fields, will hide the "show password" button
|
|
@@ -51,8 +52,9 @@ export interface PasswordFieldProps extends TextFieldProps {
|
|
|
51
52
|
*/
|
|
52
53
|
showPasswordButtonRef?: React.Ref<HTMLButtonElement>;
|
|
53
54
|
}
|
|
55
|
+
export type PasswordFieldProps<Element extends ElementType = 'input'> = PrimitiveProps<BasePasswordFieldProps, Element>;
|
|
54
56
|
export type PasswordFieldType = 'password' | 'text';
|
|
55
|
-
export interface
|
|
57
|
+
export interface BaseShowPasswordButtonProps extends BaseButtonProps {
|
|
56
58
|
/**
|
|
57
59
|
* @description
|
|
58
60
|
* Determines whether the input is hidden or displayed. Options include 'password' or 'text'
|
|
@@ -89,3 +91,4 @@ export interface ShowPasswordButtonProps extends ButtonProps {
|
|
|
89
91
|
*/
|
|
90
92
|
showPasswordButtonLabel?: string;
|
|
91
93
|
}
|
|
94
|
+
export type ShowPasswordButtonProps<Element extends ElementType = 'button'> = PrimitiveProps<BaseShowPasswordButtonProps, Element>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { BaseSelectFieldProps } from './selectField';
|
|
3
|
+
import { BaseTextFieldProps } from './textField';
|
|
4
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
5
|
+
interface optionalPhoneNumberFieldProps extends BaseTextFieldProps, CountryCodeFieldProps {
|
|
5
6
|
/**
|
|
6
7
|
* @description
|
|
7
8
|
* Sets a hidden and accessible label for the dial code selector
|
|
@@ -91,10 +92,12 @@ interface DialCodeRequired extends optionalPhoneNumberFieldProps {
|
|
|
91
92
|
*/
|
|
92
93
|
defaultDialCode: string;
|
|
93
94
|
}
|
|
94
|
-
export type
|
|
95
|
-
export
|
|
95
|
+
export type BasePhoneNumberFieldProps = CountryCodeRequired | DialCodeRequired;
|
|
96
|
+
export type PhoneNumberFieldProps<Element extends ElementType = 'input'> = PrimitiveProps<BasePhoneNumberFieldProps, Element>;
|
|
97
|
+
export interface BaseDialCodeSelectProps extends BaseSelectFieldProps {
|
|
96
98
|
defaultValue?: string;
|
|
97
99
|
dialCodeList?: Array<string>;
|
|
98
100
|
isReadOnly?: boolean;
|
|
99
101
|
}
|
|
102
|
+
export type DialCodeSelectProps<Element extends ElementType = 'select'> = PrimitiveProps<BaseDialCodeSelectProps, Element>;
|
|
100
103
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sizes } from './base';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
3
3
|
export type PlaceholderSizes = Sizes;
|
|
4
|
-
export interface
|
|
4
|
+
export interface BasePlaceholderProps extends BaseViewProps {
|
|
5
5
|
/**
|
|
6
6
|
* @description
|
|
7
7
|
* If true, the placeholder won't show, if false the placeholder will show.
|
|
@@ -15,3 +15,4 @@ export interface PlaceholderProps extends ViewProps {
|
|
|
15
15
|
*/
|
|
16
16
|
size?: PlaceholderSizes;
|
|
17
17
|
}
|
|
18
|
+
export type PlaceholderProps<Element extends ElementType = 'div'> = PrimitiveProps<BasePlaceholderProps, Element>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BaseInputProps } from './input';
|
|
2
2
|
import { LabelPositions } from './field';
|
|
3
|
-
|
|
3
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
4
|
+
export interface BaseRadioProps extends BaseInputProps {
|
|
4
5
|
value: string;
|
|
5
6
|
/**
|
|
6
7
|
* @description
|
|
@@ -9,3 +10,4 @@ export interface RadioProps extends InputProps {
|
|
|
9
10
|
*/
|
|
10
11
|
labelPosition?: LabelPositions;
|
|
11
12
|
}
|
|
13
|
+
export type RadioProps<Element extends ElementType = 'input'> = PrimitiveProps<BaseRadioProps, Element>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FlexContainerStyleProps } from './flex';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
3
|
+
import { BaseFieldProps, LabelPositions } from './field';
|
|
4
|
+
import { BaseInputProps } from './input';
|
|
5
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
6
|
+
export interface BaseRadioGroupFieldProps extends BaseFieldProps, FlexContainerStyleProps, BaseInputProps {
|
|
6
7
|
name: string;
|
|
7
8
|
value?: string;
|
|
8
9
|
defaultValue?: string;
|
|
@@ -18,3 +19,4 @@ export interface RadioGroupFieldProps extends FieldProps, FlexContainerStyleProp
|
|
|
18
19
|
*/
|
|
19
20
|
labelPosition?: LabelPositions;
|
|
20
21
|
}
|
|
22
|
+
export type RadioGroupFieldProps<Element extends ElementType = 'input'> = PrimitiveProps<BaseRadioGroupFieldProps, Element>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Property } from 'csstype';
|
|
3
|
-
import {
|
|
3
|
+
import { BaseFlexProps } from './flex';
|
|
4
4
|
import { Sizes } from './base';
|
|
5
5
|
import { StyleToken } from './style';
|
|
6
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
6
7
|
export type RatingSizes = Sizes;
|
|
7
8
|
export interface RatingOptions {
|
|
8
9
|
/**
|
|
@@ -52,5 +53,6 @@ export interface RatingOptions {
|
|
|
52
53
|
*/
|
|
53
54
|
value?: number;
|
|
54
55
|
}
|
|
55
|
-
export interface
|
|
56
|
+
export interface BaseRatingProps extends RatingOptions, BaseFlexProps {
|
|
56
57
|
}
|
|
58
|
+
export type RatingProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseRatingProps, Element>;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
2
2
|
type ScrollViewOrientation = 'horizontal' | 'vertical';
|
|
3
|
-
export interface
|
|
3
|
+
export interface BaseScrollViewProps extends BaseViewProps {
|
|
4
4
|
/**
|
|
5
5
|
* @deprecated This prop has been deprecated. To get horizontal or vertical scrollbars,
|
|
6
6
|
* make the width or height of the ScrollView component smaller than the content.
|
|
7
7
|
*/
|
|
8
8
|
orientation?: ScrollViewOrientation;
|
|
9
9
|
}
|
|
10
|
+
export type ScrollViewProps<Element extends ElementType = 'div'> = PrimitiveProps<BaseScrollViewProps, Element>;
|
|
10
11
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FieldGroupIconButtonProps } from './fieldGroupIcon';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { BaseTextFieldProps } from './textField';
|
|
4
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
5
|
+
export interface BaseSearchFieldProps extends BaseTextFieldProps {
|
|
5
6
|
/**
|
|
6
7
|
* @description
|
|
7
8
|
* Set the initial value for an uncontrolled search field
|
|
@@ -54,8 +55,10 @@ export interface SearchFieldProps extends TextFieldProps {
|
|
|
54
55
|
*/
|
|
55
56
|
searchButtonRef?: React.Ref<HTMLButtonElement>;
|
|
56
57
|
}
|
|
57
|
-
export
|
|
58
|
+
export type SearchFieldProps<Element extends ElementType = 'input'> = PrimitiveProps<BaseSearchFieldProps, Element>;
|
|
59
|
+
export interface BaseSearchFieldButtonProps extends Partial<FieldGroupIconButtonProps> {
|
|
58
60
|
}
|
|
61
|
+
export type SearchFieldButtonProps<Element extends ElementType = 'button'> = PrimitiveProps<BaseSearchFieldButtonProps, Element>;
|
|
59
62
|
export interface UseSearchFieldProps extends Partial<SearchFieldProps> {
|
|
60
63
|
externalRef?: React.ForwardedRef<HTMLInputElement>;
|
|
61
64
|
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
3
3
|
import { Sizes } from './base';
|
|
4
4
|
export type SelectVariation = 'quiet';
|
|
5
|
-
export interface
|
|
5
|
+
export interface BaseSelectProps extends BaseViewProps {
|
|
6
6
|
/**
|
|
7
7
|
* @description
|
|
8
8
|
* A string providing a hint for a user agent's autocomplete feature
|
|
@@ -69,3 +69,4 @@ export interface SelectProps extends ViewProps {
|
|
|
69
69
|
*/
|
|
70
70
|
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
71
71
|
}
|
|
72
|
+
export type SelectProps<Element extends ElementType = 'select'> = PrimitiveProps<BaseSelectProps, Element>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { FlexContainerStyleProps } from './flex';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
2
|
+
import { BaseSelectProps } from './select';
|
|
3
|
+
import { BaseFieldProps } from './field';
|
|
4
|
+
import { ElementType, PrimitiveProps } from './view';
|
|
5
|
+
export interface BaseSelectFieldProps extends BaseFieldProps, FlexContainerStyleProps, BaseSelectProps {
|
|
5
6
|
/**
|
|
6
7
|
* @description
|
|
7
8
|
* List of option values for select dropdown
|
|
8
9
|
*/
|
|
9
10
|
options?: string[];
|
|
10
11
|
}
|
|
12
|
+
export type SelectFieldProps<Element extends ElementType = 'select'> = PrimitiveProps<BaseSelectFieldProps, Element>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { StyleToken } from './style';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { BaseTextFieldProps } from './textField';
|
|
5
|
+
import { ElementType, PrimitiveProps, BaseViewProps } from './view';
|
|
6
6
|
type SliderOrientation = 'horizontal' | 'vertical';
|
|
7
7
|
type Direction = 'ltr' | 'rtl';
|
|
8
|
-
export interface
|
|
8
|
+
export interface BaseSliderFieldProps extends BaseTextFieldProps, BaseViewProps {
|
|
9
9
|
/**
|
|
10
10
|
* @description
|
|
11
11
|
* Sets the minimum value for the SliderField range
|
|
@@ -79,4 +79,5 @@ export interface SliderFieldProps extends TextFieldProps, ViewProps {
|
|
|
79
79
|
*/
|
|
80
80
|
dir?: Direction;
|
|
81
81
|
}
|
|
82
|
+
export type SliderFieldProps<Element extends ElementType = 'span'> = PrimitiveProps<BaseSliderFieldProps, Element>;
|
|
82
83
|
export {};
|