@aws-amplify/ui-react 3.2.0 → 3.4.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/IconWarning-47c8dc76.js +1 -0
- package/dist/esm/PrimitiveCatalog.js +1 -1
- package/dist/esm/components/Authenticator/SetupTOTP/SetupTOTP.js +1 -1
- package/dist/esm/components/Authenticator/shared/FormField.js +1 -1
- package/dist/esm/components/Geo/LocationSearch/index.js +1 -1
- package/dist/esm/components/Geo/MapView/index.js +1 -1
- package/dist/esm/hooks/actions/useAuthSignOutAction.js +1 -1
- package/dist/esm/hooks/actions/useDataStoreCreateAction.js +1 -1
- package/dist/esm/hooks/actions/useDataStoreDeleteAction.js +1 -1
- package/dist/esm/hooks/actions/useDataStoreUpdateAction.js +1 -1
- package/dist/esm/hooks/useBreakpointValue.js +1 -1
- package/dist/esm/internal.js +1 -1
- package/dist/esm/primitives/Alert/Alert.js +1 -1
- package/dist/esm/primitives/Alert/AlertIcon.js +1 -1
- package/dist/esm/primitives/Badge/Badge.js +1 -1
- package/dist/esm/primitives/Button/Button.js +1 -1
- package/dist/esm/primitives/ButtonGroup/ButtonGroup.js +1 -1
- package/dist/esm/primitives/Card/Card.js +1 -1
- package/dist/esm/primitives/Checkbox/Checkbox.js +1 -1
- package/dist/esm/primitives/CheckboxField/CheckboxField.js +1 -1
- package/dist/esm/primitives/Collection/Collection.js +1 -1
- package/dist/esm/primitives/Divider/Divider.js +1 -1
- package/dist/esm/primitives/Expander/Expander.js +1 -1
- package/dist/esm/primitives/Expander/ExpanderItem.js +1 -1
- package/dist/esm/primitives/Field/FieldClearButton.js +1 -1
- package/dist/esm/primitives/Field/FieldDescription.js +1 -1
- package/dist/esm/primitives/Field/FieldErrorMessage.js +1 -1
- package/dist/esm/primitives/FieldGroup/FieldGroup.js +1 -1
- package/dist/esm/primitives/FieldGroupIcon/FieldGroupIcon.js +1 -1
- package/dist/esm/primitives/FieldGroupIcon/FieldGroupIconButton.js +1 -1
- package/dist/esm/primitives/Flex/Flex.js +1 -1
- package/dist/esm/primitives/Grid/Grid.js +1 -1
- package/dist/esm/primitives/Heading/Heading.js +1 -1
- package/dist/esm/primitives/Icon/Icon.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconAdd.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconCheck.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconCheckCircle.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconCheckCircleOutline.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconChevronLeft.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconChevronRight.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconClose.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconError.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconExpandMore.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconFiberManualRecord.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconHighlightOff.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconIndeterminate.js +1 -0
- package/dist/esm/primitives/Icon/icons/IconInfo.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconMenu.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconRemove.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconSearch.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconStar.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconVisibility.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconVisibilityOff.js +1 -1
- package/dist/esm/primitives/Icon/icons/IconWarning.js +1 -1
- package/dist/esm/primitives/Image/Image.js +1 -1
- package/dist/esm/primitives/Input/Input.js +1 -1
- package/dist/esm/primitives/Label/Label.js +1 -1
- package/dist/esm/primitives/Link/Link.js +1 -1
- package/dist/esm/primitives/Loader/Loader.js +1 -1
- package/dist/esm/primitives/Menu/Menu.js +1 -1
- package/dist/esm/primitives/Menu/MenuButton.js +1 -1
- package/dist/esm/primitives/Menu/MenuItem.js +1 -1
- package/dist/esm/primitives/Pagination/Pagination.js +1 -1
- package/dist/esm/primitives/Pagination/PaginationItem.js +1 -1
- package/dist/esm/primitives/PasswordField/PasswordField.js +1 -1
- package/dist/esm/primitives/PasswordField/ShowPasswordButton.js +1 -1
- package/dist/esm/primitives/PhoneNumberField/CountryCodeSelect.js +1 -1
- package/dist/esm/primitives/PhoneNumberField/PhoneNumberField.js +1 -1
- package/dist/esm/primitives/Placeholder/Placeholder.js +1 -1
- package/dist/esm/primitives/Radio/Radio.js +1 -1
- package/dist/esm/primitives/RadioGroupField/RadioGroupField.js +1 -1
- package/dist/esm/primitives/Rating/Rating.js +1 -1
- package/dist/esm/primitives/ScrollView/ScrollView.js +1 -1
- package/dist/esm/primitives/SearchField/SearchField.js +1 -1
- package/dist/esm/primitives/SearchField/SearchFieldButton.js +1 -1
- package/dist/esm/primitives/Select/Select.js +1 -1
- package/dist/esm/primitives/SelectField/SelectField.js +1 -1
- package/dist/esm/primitives/SliderField/SliderField.js +1 -1
- package/dist/esm/primitives/StepperField/StepperField.js +1 -1
- package/dist/esm/primitives/SwitchField/SwitchField.js +1 -1
- package/dist/esm/primitives/Table/Table.js +1 -1
- package/dist/esm/primitives/Table/TableBody.js +1 -1
- package/dist/esm/primitives/Table/TableCell.js +1 -1
- package/dist/esm/primitives/Table/TableFoot.js +1 -1
- package/dist/esm/primitives/Table/TableHead.js +1 -1
- package/dist/esm/primitives/Table/TableRow.js +1 -1
- package/dist/esm/primitives/Tabs/Tabs.js +1 -1
- package/dist/esm/primitives/Text/Text.js +1 -1
- package/dist/esm/primitives/TextArea/TextArea.js +1 -1
- package/dist/esm/primitives/TextAreaField/TextAreaField.js +1 -1
- package/dist/esm/primitives/TextField/TextField.js +1 -1
- package/dist/esm/primitives/ToggleButton/ToggleButton.js +1 -1
- package/dist/esm/primitives/ToggleButtonGroup/ToggleButtonGroup.js +1 -1
- package/dist/esm/primitives/View/View.js +1 -1
- package/dist/esm/primitives/VisuallyHidden/VisuallyHidden.js +1 -1
- package/dist/esm/primitives/shared/constants.js +1 -1
- package/dist/esm/primitives/shared/responsive/getMediaQueries.js +1 -1
- package/dist/esm/primitives/shared/responsive/utils.js +1 -1
- package/dist/esm/primitives/shared/styleUtils.js +1 -1
- package/dist/esm/primitives/shared/types.js +1 -0
- package/dist/esm/primitives/shared/utils.js +1 -1
- package/dist/esm/primitives/utils/testUtils.js +1 -1
- package/dist/esm/primitives/utils/useLayoutEffect.js +1 -1
- package/dist/esm/studio/findChildOverrides.js +1 -0
- package/dist/esm/studio/getOverrideProps.js +1 -0
- package/dist/esm/studio/getOverridesFromVariants.js +1 -0
- package/dist/esm/studio/mergeVariantsAndOverrides.js +1 -0
- package/dist/index.js +1 -1
- package/dist/internal.js +1 -1
- package/dist/styles.css +37 -13
- package/dist/types/internal.d.ts +1 -1
- package/dist/types/primitives/Alert/Alert.d.ts +1 -1
- package/dist/types/primitives/Alert/AlertIcon.d.ts +1 -0
- package/dist/types/primitives/Checkbox/Checkbox.d.ts +1 -1
- package/dist/types/primitives/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/types/primitives/Collection/Collection.d.ts +1 -1
- package/dist/types/primitives/Icon/icons/IconIndeterminate.d.ts +4 -0
- package/dist/types/primitives/Icon/icons/index.d.ts +1 -0
- package/dist/types/primitives/PasswordField/PasswordField.d.ts +1 -1
- package/dist/types/primitives/PasswordField/ShowPasswordButton.d.ts +1 -1
- package/dist/types/primitives/shared/constants.d.ts +15 -544
- package/dist/types/primitives/shared/responsive/utils.d.ts +7 -1
- package/dist/types/primitives/shared/styleUtils.d.ts +12 -6
- package/dist/types/primitives/shared/types.d.ts +130 -0
- package/dist/types/primitives/shared/utils.d.ts +6 -54
- package/dist/types/primitives/types/alert.d.ts +5 -0
- package/dist/types/primitives/types/checkbox.d.ts +6 -0
- package/dist/types/primitives/types/collection.d.ts +6 -0
- package/dist/types/primitives/types/icon.d.ts +1 -1
- package/dist/types/primitives/types/passwordField.d.ts +32 -0
- package/dist/types/primitives/types/style.d.ts +4 -0
- package/dist/types/primitives/types/theme.d.ts +2 -48
- package/dist/types/primitives/utils/testUtils.d.ts +2 -2
- package/dist/types/studio/findChildOverrides.d.ts +18 -0
- package/dist/types/studio/getOverrideProps.d.ts +18 -0
- package/dist/types/studio/getOverridesFromVariants.d.ts +20 -0
- package/dist/types/studio/index.d.ts +5 -0
- package/dist/types/studio/mergeVariantsAndOverrides.d.ts +18 -0
- package/dist/types/studio/types.d.ts +18 -0
- package/package.json +5 -4
- package/dist/IconWarning-227761f5.js +0 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js +0 -1
- package/dist/esm/primitives/types/theme.js +0 -1
- package/dist/primitives.json +0 -27124
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
declare type ComponentNameKey = 'Alert' | 'Badge' | 'Button' | 'Button' | 'Card' | 'Checkbox' | 'CheckboxField' | 'Collection' | 'PhoneNumberField' | 'Divider' | 'Expander' | 'Flex' | 'Grid' | 'Heading' | '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';
|
|
2
|
+
declare type ComponentClassNameKey = 'Alert' | 'AlertIcon' | 'AlertHeading' | 'AlertBody' | 'AlertDismiss' | 'Badge' | 'Button' | 'ButtonGroup' | 'ButtonLoaderWrapper' | 'Card' | 'Checkbox' | 'CheckboxButton' | 'CheckboxIcon' | 'CheckboxInput' | 'CheckboxLabel' | 'CheckboxField' | 'Collection' | 'CollectionItems' | 'CollectionSearch' | 'CollectionPagination' | 'CountryCodeSelect' | 'Divider' | 'DividerLabel' | 'Expander' | 'ExpanderContent' | 'ExpanderContentText' | 'ExpanderHeader' | 'ExpanderIcon' | 'ExpanderItem' | 'ExpanderTrigger' | 'Field' | 'FieldDescription' | 'FieldErrorMessage' | 'FieldGroup' | 'FieldGroupControl' | 'FieldGroupOuterEnd' | 'FieldGroupOuterStart' | 'FieldGroupInnerEnd' | 'FieldGroupInnerStart' | 'FieldGroupIcon' | 'FieldGroupIconButton' | 'FieldGroupHasInnerEnd' | 'FieldGroupHasInnerStart' | 'FieldShowPassword' | 'FieldGroupFieldWrapper' | 'Flex' | 'Grid' | 'Heading' | 'Icon' | 'Image' | 'Input' | 'Label' | 'Link' | 'Loader' | 'LoaderDeterminate' | 'LoaderPercentageText' | 'MenuContent' | '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
|
+
export declare enum ComponentClassName {
|
|
4
|
+
Alert = "amplify-alert",
|
|
5
|
+
AlertIcon = "amplify-alert__icon",
|
|
6
|
+
AlertHeading = "amplify-alert__heading",
|
|
7
|
+
AlertBody = "amplify-alert__body",
|
|
8
|
+
AlertDismiss = "amplify-alert__dismiss",
|
|
9
|
+
Badge = "amplify-badge",
|
|
10
|
+
Button = "amplify-button",
|
|
11
|
+
ButtonGroup = "amplify-buttongroup",
|
|
12
|
+
ButtonLoaderWrapper = "amplify-button__loader-wrapper",
|
|
13
|
+
Card = "amplify-card",
|
|
14
|
+
Checkbox = "amplify-checkbox",
|
|
15
|
+
CheckboxButton = "amplify-checkbox__button",
|
|
16
|
+
CheckboxIcon = "amplify-checkbox__icon",
|
|
17
|
+
CheckboxInput = "amplify-checkbox__input",
|
|
18
|
+
CheckboxLabel = "amplify-checkbox__label",
|
|
19
|
+
CheckboxField = "amplify-checkboxfield",
|
|
20
|
+
Collection = "amplify-collection",
|
|
21
|
+
CollectionItems = "amplify-collection-items",
|
|
22
|
+
CollectionSearch = "amplify-collection-search",
|
|
23
|
+
CollectionPagination = "amplify-collection-pagination",
|
|
24
|
+
CountryCodeSelect = "amplify-countrycodeselect",
|
|
25
|
+
Divider = "amplify-divider",
|
|
26
|
+
DividerLabel = "amplify-divider--label",
|
|
27
|
+
Expander = "amplify-expander",
|
|
28
|
+
ExpanderContent = "amplify-expander__content",
|
|
29
|
+
ExpanderContentText = "amplify-expander__content__text",
|
|
30
|
+
ExpanderHeader = "amplify-expander__header",
|
|
31
|
+
ExpanderIcon = "amplify-expander__icon",
|
|
32
|
+
ExpanderItem = "amplify-expander__item",
|
|
33
|
+
ExpanderTrigger = "amplify-expander__trigger",
|
|
34
|
+
Field = "amplify-field",
|
|
35
|
+
FieldDescription = "amplify-field__description",
|
|
36
|
+
FieldErrorMessage = "amplify-field__error-message",
|
|
37
|
+
FieldGroup = "amplify-field-group",
|
|
38
|
+
FieldGroupControl = "amplify-field-group__control",
|
|
39
|
+
FieldGroupOuterEnd = "amplify-field-group__outer-end",
|
|
40
|
+
FieldGroupOuterStart = "amplify-field-group__outer-start",
|
|
41
|
+
FieldGroupInnerEnd = "amplify-field-group__inner-end",
|
|
42
|
+
FieldGroupInnerStart = "amplify-field-group__inner-start",
|
|
43
|
+
FieldGroupIcon = "amplify-field-group__icon",
|
|
44
|
+
FieldGroupIconButton = "amplify-field-group__icon-button",
|
|
45
|
+
FieldGroupHasInnerEnd = "amplify-field-group--has-inner-end",
|
|
46
|
+
FieldGroupHasInnerStart = "amplify-field-group--has-inner-start",
|
|
47
|
+
FieldShowPassword = "amplify-field__show-password",
|
|
48
|
+
FieldGroupFieldWrapper = "amplify-field-group__field-wrapper",
|
|
49
|
+
Flex = "amplify-flex",
|
|
50
|
+
Grid = "amplify-grid",
|
|
51
|
+
Heading = "amplify-heading",
|
|
52
|
+
Icon = "amplify-icon",
|
|
53
|
+
Image = "amplify-image",
|
|
54
|
+
Input = "amplify-input",
|
|
55
|
+
Label = "amplify-label",
|
|
56
|
+
Link = "amplify-link",
|
|
57
|
+
Loader = "amplify-loader",
|
|
58
|
+
LoaderDeterminate = "amplify-loader--determinate",
|
|
59
|
+
LoaderPercentageText = "amplify-loader__percentage-text",
|
|
60
|
+
MenuContent = "amplify-menu-content",
|
|
61
|
+
MenuItem = "amplify-menu-content__item",
|
|
62
|
+
MenuTrigger = "amplify-menu-trigger",
|
|
63
|
+
Pagination = "amplify-pagination",
|
|
64
|
+
PaginationItemButton = "amplify-pagination__item-button",
|
|
65
|
+
PaginationItemCurrent = "amplify-pagination__item-current",
|
|
66
|
+
PaginationItemEllipsis = "amplify-pagination__item-ellipsis",
|
|
67
|
+
PasswordField = "amplify-passwordfield",
|
|
68
|
+
PhoneNumberField = "amplify-phonenumberfield",
|
|
69
|
+
Placeholder = "amplify-placeholder",
|
|
70
|
+
Radio = "amplify-radio",
|
|
71
|
+
RadioButton = "amplify-radio__button",
|
|
72
|
+
RadioInput = "amplify-radio__input",
|
|
73
|
+
RadioLabel = "amplify-radio__label",
|
|
74
|
+
RadioGroupField = "amplify-radiogroupfield",
|
|
75
|
+
RadioGroup = "amplify-radiogroup",
|
|
76
|
+
Rating = "amplify-rating",
|
|
77
|
+
ScrollView = "amplify-scrollview",
|
|
78
|
+
SearchField = "amplify-searchfield",
|
|
79
|
+
SearchFieldClear = "amplify-searchfield__clear",
|
|
80
|
+
SearchFieldSearch = "amplify-searchfield__search",
|
|
81
|
+
Select = "amplify-select",
|
|
82
|
+
SelectField = "amplify-selectfield",
|
|
83
|
+
SelectWrapper = "amplify-select__wrapper",
|
|
84
|
+
SelectIconWrapper = "amplify-select__icon-wrapper",
|
|
85
|
+
SliderField = "amplify-sliderfield",
|
|
86
|
+
SliderFieldGroup = "amplify-sliderfield__group",
|
|
87
|
+
SliderFieldLabel = "amplify-sliderfield__label",
|
|
88
|
+
SliderFieldRange = "amplify-sliderfield__range",
|
|
89
|
+
SliderFieldRoot = "amplify-sliderfield__root",
|
|
90
|
+
SliderFieldThumb = "amplify-sliderfield__thumb",
|
|
91
|
+
SliderFieldTrack = "amplify-sliderfield__track",
|
|
92
|
+
StepperField = "amplify-stepperfield",
|
|
93
|
+
StepperFieldButtonDecrease = "amplify-stepperfield__button--decrease",
|
|
94
|
+
StepperFieldButtonIncrease = "amplify-stepperfield__button--increase",
|
|
95
|
+
StepperFieldInput = "amplify-stepperfield__input",
|
|
96
|
+
SwitchField = "amplify-switchfield",
|
|
97
|
+
SwitchLabel = "amplify-switch-label",
|
|
98
|
+
SwitchThumb = "amplify-switch-thumb",
|
|
99
|
+
SwitchTrack = "amplify-switch-track",
|
|
100
|
+
SwitchWrapper = "amplify-switch__wrapper",
|
|
101
|
+
Table = "amplify-table",
|
|
102
|
+
TableCaption = "amplify-table__caption",
|
|
103
|
+
TableBody = "amplify-table__body",
|
|
104
|
+
TableTd = "amplify-table__td",
|
|
105
|
+
TableTh = "amplify-table__th",
|
|
106
|
+
TableFoot = "amplify-table__foot",
|
|
107
|
+
TableHead = "amplify-table__head",
|
|
108
|
+
TableRow = "amplify-table__row",
|
|
109
|
+
Tabs = "amplify-tabs",
|
|
110
|
+
TabItems = "amplify-tabs-item",
|
|
111
|
+
Text = "amplify-text",
|
|
112
|
+
Textarea = "amplify-textarea",
|
|
113
|
+
TextAreaField = "amplify-textareafield",
|
|
114
|
+
TextField = "amplify-textfield",
|
|
115
|
+
ToggleButton = "amplify-togglebutton",
|
|
116
|
+
ToggleButtonGroup = "amplify-togglebuttongroup",
|
|
117
|
+
VisuallyHidden = "amplify-visually-hidden"
|
|
118
|
+
}
|
|
119
|
+
interface ComponentClassNameMetadata {
|
|
120
|
+
className: ComponentClassName;
|
|
121
|
+
components?: ComponentNameKey[];
|
|
122
|
+
description?: string;
|
|
123
|
+
}
|
|
124
|
+
export declare type ComponentClassNameItems = {
|
|
125
|
+
[Name in ComponentClassNameKey]: ComponentClassNameMetadata;
|
|
126
|
+
};
|
|
127
|
+
export declare type ComponentClassNames = {
|
|
128
|
+
[Name in ComponentClassNameKey]: ComponentClassNameMetadata['className'];
|
|
129
|
+
};
|
|
130
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ThemeStylePropKey } from '../types/theme';
|
|
2
|
+
import { ComponentClassName } from './types';
|
|
2
3
|
export declare const strHasLength: (str: unknown) => str is string;
|
|
3
4
|
export declare const isFunction: (fn: unknown) => fn is Function;
|
|
4
5
|
export declare const isEmptyString: (value: unknown) => boolean;
|
|
@@ -10,55 +11,7 @@ export declare const isNullOrEmptyString: (value: unknown) => boolean;
|
|
|
10
11
|
* @returns an integer array with elements from start to end consecutively
|
|
11
12
|
*/
|
|
12
13
|
export declare const getConsecutiveIntArray: (start: number, end: number) => number[];
|
|
13
|
-
|
|
14
|
-
* This method is used to parse through all of the overrides and
|
|
15
|
-
* only pass the relevant child overrides for a given component.
|
|
16
|
-
* @internal
|
|
17
|
-
* @param overrides escape hatch props
|
|
18
|
-
* @param elementHierarchy
|
|
19
|
-
* @returns overrides only for specified element
|
|
20
|
-
*/
|
|
21
|
-
export declare const findChildOverrides: (overrides: EscapeHatchProps | null | undefined, elementHierarchy: string) => any;
|
|
22
|
-
/**
|
|
23
|
-
* This helper method is used to get the overrides
|
|
24
|
-
* that will be applied to a component
|
|
25
|
-
* @internal
|
|
26
|
-
* @param overrides escape hatch props
|
|
27
|
-
* @param elementHierarchy
|
|
28
|
-
* @returns component overrides
|
|
29
|
-
*/
|
|
30
|
-
export declare const getOverrideProps: (overrides: EscapeHatchProps | null | undefined, elementHierarchy: string) => {
|
|
31
|
-
[k: string]: unknown;
|
|
32
|
-
};
|
|
33
|
-
export declare type EscapeHatchProps = {
|
|
34
|
-
[elementHierarchy: string]: Record<string, unknown>;
|
|
35
|
-
};
|
|
36
|
-
declare type VariantValues = {
|
|
37
|
-
[key: string]: string;
|
|
38
|
-
};
|
|
39
|
-
export declare type Variant = {
|
|
40
|
-
variantValues: VariantValues;
|
|
41
|
-
overrides: EscapeHatchProps;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Given a list of style variants, select a given one based on input props
|
|
45
|
-
* @internal
|
|
46
|
-
* @param variants list of style variants to select from
|
|
47
|
-
* @param props variant values to select from the list, may include additional props, to tidy up usage upstream
|
|
48
|
-
*/
|
|
49
|
-
export declare function getOverridesFromVariants(variants: Variant[], props: {
|
|
50
|
-
[key: string]: any;
|
|
51
|
-
}): {};
|
|
52
|
-
/**
|
|
53
|
-
* This helper method is used to merge
|
|
54
|
-
* variants with overrides
|
|
55
|
-
* @internal
|
|
56
|
-
* @param variants
|
|
57
|
-
* @param overrides
|
|
58
|
-
* @returns merged variants with overrides
|
|
59
|
-
*/
|
|
60
|
-
export declare const mergeVariantsAndOverrides: (variants: EscapeHatchProps, overrides: EscapeHatchProps) => EscapeHatchProps;
|
|
61
|
-
declare type Modifiers = string | number | null;
|
|
14
|
+
export declare type Modifiers = string | number | null;
|
|
62
15
|
/**
|
|
63
16
|
* This helper function creates modifier class names that are used for our flat BEM styling
|
|
64
17
|
* it takes in a base and modifier and returns the modified class if a modifier was passed in and null otherwise
|
|
@@ -66,7 +19,7 @@ declare type Modifiers = string | number | null;
|
|
|
66
19
|
* @param modifier The modifier to add onto the base
|
|
67
20
|
* @returns the modified class name or null
|
|
68
21
|
*/
|
|
69
|
-
export declare const classNameModifier: (base:
|
|
22
|
+
export declare const classNameModifier: (base: ComponentClassName, modifier: Modifiers) => string;
|
|
70
23
|
/**
|
|
71
24
|
* This helper function creates modified class names that are used for our flat BEM styling
|
|
72
25
|
* it takes in a base, modifier, and flag and returns the modified class name if the flag is true and null if the flag is false
|
|
@@ -75,6 +28,5 @@ export declare const classNameModifier: (base: ComponentClasses, modifier: Modif
|
|
|
75
28
|
* @param flag
|
|
76
29
|
* @returns the modified class name or null
|
|
77
30
|
*/
|
|
78
|
-
export declare const classNameModifierByFlag: (base:
|
|
79
|
-
export declare const getCSSVariableIfValueIsThemeKey: <Value>(propKey:
|
|
80
|
-
export {};
|
|
31
|
+
export declare const classNameModifierByFlag: (base: ComponentClassName, modifier: Modifiers, flag: boolean) => string;
|
|
32
|
+
export declare const getCSSVariableIfValueIsThemeKey: <Value>(propKey: ThemeStylePropKey, value: Value) => string | Value;
|
|
@@ -12,6 +12,11 @@ export interface AlertProps extends FlexProps {
|
|
|
12
12
|
* The isDismissible property will affect whether the user can dismiss (close) the Alert. Defaults to false (not dismissible).
|
|
13
13
|
*/
|
|
14
14
|
isDismissible?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* @description
|
|
17
|
+
* Configures the accessible label for the Alert's dismiss button.
|
|
18
|
+
*/
|
|
19
|
+
dismissButtonLabel?: string;
|
|
15
20
|
/**
|
|
16
21
|
* @description
|
|
17
22
|
* The onDismiss callback will be called when the user dismisses (closes) the Alert.
|
|
@@ -29,4 +29,10 @@ export interface CheckboxProps extends FlexProps, InputProps {
|
|
|
29
29
|
* "start"
|
|
30
30
|
*/
|
|
31
31
|
labelPosition?: LabelPositions;
|
|
32
|
+
/**
|
|
33
|
+
* @description
|
|
34
|
+
* Determines whether a checkbox is in indeterminate state
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
isIndeterminate?: boolean;
|
|
32
38
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { FlexProps } from './flex';
|
|
2
3
|
import { GridProps } from './grid';
|
|
3
4
|
import { BaseStyleProps } from './style';
|
|
@@ -42,6 +43,11 @@ export interface CollectionWrapperProps extends BaseStyleProps {
|
|
|
42
43
|
* Search field placeholder
|
|
43
44
|
*/
|
|
44
45
|
searchPlaceholder?: string;
|
|
46
|
+
/**
|
|
47
|
+
* @description
|
|
48
|
+
* Controls what is displayed when no results are found from the Collection search
|
|
49
|
+
*/
|
|
50
|
+
searchNoResultsFound?: React.ReactNode;
|
|
45
51
|
}
|
|
46
52
|
export interface CollectionBaseProps<Item> {
|
|
47
53
|
/**
|
|
@@ -21,7 +21,7 @@ export interface IconProps extends ViewProps {
|
|
|
21
21
|
* @description
|
|
22
22
|
* This is used to define a string that labels the current element.
|
|
23
23
|
*/
|
|
24
|
-
ariaLabel
|
|
24
|
+
ariaLabel?: string;
|
|
25
25
|
/**
|
|
26
26
|
* @description
|
|
27
27
|
* This defines the position and dimension, in user space, of an SVG viewport.
|
|
@@ -8,12 +8,28 @@ export interface PasswordFieldProps extends TextInputFieldProps {
|
|
|
8
8
|
*/
|
|
9
9
|
hideShowPassword?: boolean;
|
|
10
10
|
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* The hidePasswordButtonLabel prop is no longer in use, since the aria-label is now consistent between state changes.
|
|
11
13
|
* @description
|
|
12
14
|
* Set the `aria-label` for hide password button
|
|
13
15
|
* @default
|
|
14
16
|
* "Hide password"
|
|
15
17
|
*/
|
|
16
18
|
hidePasswordButtonLabel?: string;
|
|
19
|
+
/**
|
|
20
|
+
* @description
|
|
21
|
+
* Sets the text read by screen readers when the password is hidden
|
|
22
|
+
* @default
|
|
23
|
+
* "Password is hidden"
|
|
24
|
+
*/
|
|
25
|
+
passwordIsHiddenLabel?: string;
|
|
26
|
+
/**
|
|
27
|
+
* @description
|
|
28
|
+
* Sets the text read by screen readers when the password is shown
|
|
29
|
+
* @default
|
|
30
|
+
* "Password is shown"
|
|
31
|
+
*/
|
|
32
|
+
passwordIsShownLabel?: string;
|
|
17
33
|
/**
|
|
18
34
|
* @description
|
|
19
35
|
* Set the `aria-label` for show password button
|
|
@@ -43,12 +59,28 @@ export interface ShowPasswordButtonProps extends ButtonProps {
|
|
|
43
59
|
*/
|
|
44
60
|
fieldType: PasswordFieldType;
|
|
45
61
|
/**
|
|
62
|
+
* @deprecated
|
|
63
|
+
* The hidePasswordButtonLabel prop is no longer in use, since the aria-label is now consistent between state changes.
|
|
46
64
|
* @description
|
|
47
65
|
* Set the `aria-label` for hide password button
|
|
48
66
|
* @default
|
|
49
67
|
* "Hide password"
|
|
50
68
|
*/
|
|
51
69
|
hidePasswordButtonLabel?: string;
|
|
70
|
+
/**
|
|
71
|
+
* @description
|
|
72
|
+
* Sets the text read by screen readers when the password is hidden
|
|
73
|
+
* @default
|
|
74
|
+
* "Password is hidden"
|
|
75
|
+
*/
|
|
76
|
+
passwordIsHiddenLabel?: string;
|
|
77
|
+
/**
|
|
78
|
+
* @description
|
|
79
|
+
* Sets the text read by screen readers when the password is shown
|
|
80
|
+
* @default
|
|
81
|
+
* "Password is shown"
|
|
82
|
+
*/
|
|
83
|
+
passwordIsShownLabel?: string;
|
|
52
84
|
/**
|
|
53
85
|
* @description
|
|
54
86
|
* Set the `aria-label` for show password button
|
|
@@ -494,9 +494,13 @@ export declare type ComponentPropToStyleProp = Required<{
|
|
|
494
494
|
[key in keyof AllStyleProps]: keyof React.CSSProperties;
|
|
495
495
|
}>;
|
|
496
496
|
/**
|
|
497
|
+
* @internal May be removed in a future version
|
|
497
498
|
* Maps from component style props to React `style` props
|
|
498
499
|
* Note: Primarily needed to map from component style props that don't match CSS Properties directly
|
|
499
500
|
* such as wrap => flexWrap and direction => flexDirection
|
|
500
501
|
*/
|
|
501
502
|
export declare const ComponentPropsToStylePropsMap: ComponentPropToStyleProp;
|
|
503
|
+
/**
|
|
504
|
+
* @internal May be removed in a future version
|
|
505
|
+
*/
|
|
502
506
|
export declare const ComponentPropsToStylePropsMapKeys: (keyof AllStyleProps)[];
|
|
@@ -33,52 +33,6 @@ export declare type OpacityKeys<PropertyType> = PropertyType | '0' | '10' | '20'
|
|
|
33
33
|
export declare type RadiiKeys<PropertyType> = PropertyType | keyof Radii;
|
|
34
34
|
export declare type SpaceKeys<PropertyType> = PropertyType | keyof SpaceSizes | 'zero' | 'relative.xxxs' | 'relative.xxs' | 'relative.xs' | 'relative.small' | 'relative.medium' | 'relative.large' | 'relative.xl' | 'relative.xxl' | 'relative.xxxl' | 'relative.full';
|
|
35
35
|
export declare type TransformKeys<PropertyType> = PropertyType | 'slideX.small' | 'slideX.medium' | 'slideX.large';
|
|
36
|
-
export declare
|
|
37
|
-
|
|
38
|
-
color: string;
|
|
39
|
-
borderRadius: string;
|
|
40
|
-
fontSize: string;
|
|
41
|
-
fontWeight: string;
|
|
42
|
-
fontFamily: string;
|
|
43
|
-
lineHeight: string;
|
|
44
|
-
opacity: string;
|
|
45
|
-
boxShadow: string;
|
|
46
|
-
transform: string;
|
|
47
|
-
left: string;
|
|
48
|
-
right: string;
|
|
49
|
-
top: string;
|
|
50
|
-
bottom: string;
|
|
51
|
-
height: string;
|
|
52
|
-
width: string;
|
|
53
|
-
letterSpacing: string;
|
|
54
|
-
margin: string;
|
|
55
|
-
marginBlock: string;
|
|
56
|
-
marginBlockEnd: string;
|
|
57
|
-
marginBlockStart: string;
|
|
58
|
-
marginInline: string;
|
|
59
|
-
marginInlineEnd: string;
|
|
60
|
-
marginInlineStart: string;
|
|
61
|
-
marginLeft: string;
|
|
62
|
-
marginRight: string;
|
|
63
|
-
marginTop: string;
|
|
64
|
-
marginBottom: string;
|
|
65
|
-
maxHeight: string;
|
|
66
|
-
maxWidth: string;
|
|
67
|
-
minHeight: string;
|
|
68
|
-
minWidth: string;
|
|
69
|
-
padding: string;
|
|
70
|
-
paddingBlock: string;
|
|
71
|
-
paddingBlockEnd: string;
|
|
72
|
-
paddingBlockStart: string;
|
|
73
|
-
paddingInline: string;
|
|
74
|
-
paddingInlineEnd: string;
|
|
75
|
-
paddingInlineStart: string;
|
|
76
|
-
paddingLeft: string;
|
|
77
|
-
paddingRight: string;
|
|
78
|
-
paddingTop: string;
|
|
79
|
-
paddingBottom: string;
|
|
80
|
-
gap: string;
|
|
81
|
-
columnGap: string;
|
|
82
|
-
rowGap: string;
|
|
83
|
-
};
|
|
36
|
+
export declare type ThemeStylePropKey = 'backgroundColor' | 'borderRadius' | 'bottom' | 'boxShadow' | 'color' | 'columnGap' | 'fontFamily' | 'fontSize' | 'fontWeight' | 'gap' | 'height' | 'left' | 'letterSpacing' | 'lineHeight' | 'margin' | 'marginBlock' | 'marginBlockEnd' | 'marginBlockStart' | 'marginBottom' | 'marginInline' | 'marginInlineEnd' | 'marginInlineStart' | 'marginLeft' | 'marginRight' | 'marginTop' | 'maxHeight' | 'maxWidth' | 'minHeight' | 'minWidth' | 'opacity' | 'padding' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingLeft' | 'paddingRight' | 'paddingTop' | 'paddingBottom' | 'right' | 'rowGap' | 'top' | 'transform' | 'width';
|
|
37
|
+
export declare type ThemeTokenKey = 'components' | 'borderWidths' | 'colors' | 'fonts' | 'fontSizes' | 'fontWeights' | 'lineHeights' | 'opacities' | 'outlineOffsets' | 'outlineWidths' | 'radii' | 'shadows' | 'space' | 'time' | 'transforms';
|
|
84
38
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
2
|
-
export declare const errorMessageWrapper: (fn: () => void, message: string) => void;
|
|
1
|
+
export declare const getTestId: (testId: string, component: string) => string;
|
|
2
|
+
export declare const errorMessageWrapper: (fn: () => void, message: string) => void | Error;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EscapeHatchProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 🚨 WARNING:🚨
|
|
4
|
+
* This function is owned by the Studio UI Builder team
|
|
5
|
+
* and is used by code generated by Amplify CLI.
|
|
6
|
+
*
|
|
7
|
+
* When considering making changing to this file, please consult
|
|
8
|
+
* a member from the Studio UI Builder team.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* This method is used to parse through all of the overrides and
|
|
12
|
+
* only pass the relevant child overrides for a given component.
|
|
13
|
+
* @internal
|
|
14
|
+
* @param overrides escape hatch props
|
|
15
|
+
* @param elementHierarchy
|
|
16
|
+
* @returns overrides only for specified element
|
|
17
|
+
*/
|
|
18
|
+
export declare const findChildOverrides: (overrides: EscapeHatchProps | null | undefined, elementHierarchy: string) => EscapeHatchProps | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EscapeHatchProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 🚨 WARNING:🚨
|
|
4
|
+
* This function is owned by the Studio UI Builder team
|
|
5
|
+
* and is used by code generated by Amplify CLI.
|
|
6
|
+
*
|
|
7
|
+
* When considering making changing to this file, please consult
|
|
8
|
+
* a member from the Studio UI Builder team.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* This helper method is used to get the overrides
|
|
12
|
+
* that will be applied to a component
|
|
13
|
+
* @internal
|
|
14
|
+
* @param overrides escape hatch props
|
|
15
|
+
* @param elementHierarchy
|
|
16
|
+
* @returns component overrides
|
|
17
|
+
*/
|
|
18
|
+
export declare const getOverrideProps: (overrides: EscapeHatchProps | null | undefined, elementHierarchy: string) => EscapeHatchProps | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Variant } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 🚨 WARNING:🚨
|
|
4
|
+
* This function is owned by the Studio UI Builder team
|
|
5
|
+
* and is used by code generated by Amplify CLI.
|
|
6
|
+
*
|
|
7
|
+
* When considering making changing to this file, please consult
|
|
8
|
+
* a member from the Studio UI Builder team.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Given a list of style variants, select a given one based on input props
|
|
12
|
+
* @internal
|
|
13
|
+
* @param variants list of style variants to select from
|
|
14
|
+
* @param props variant values to select from the list, may include additional props, to tidy up usage upstream
|
|
15
|
+
*/
|
|
16
|
+
export declare function getOverridesFromVariants<T>(variants: Variant[], props: {
|
|
17
|
+
[key: string]: T;
|
|
18
|
+
}): {
|
|
19
|
+
[key: string]: Variant;
|
|
20
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { EscapeHatchProps, Variant } from './types';
|
|
2
|
+
export { findChildOverrides } from './findChildOverrides';
|
|
3
|
+
export { getOverridesFromVariants } from './getOverridesFromVariants';
|
|
4
|
+
export { getOverrideProps } from './getOverrideProps';
|
|
5
|
+
export { mergeVariantsAndOverrides } from './mergeVariantsAndOverrides';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EscapeHatchProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* 🚨 WARNING:🚨
|
|
4
|
+
* This function is owned by the Studio UI Builder team
|
|
5
|
+
* and is used by code generated by Amplify CLI.
|
|
6
|
+
*
|
|
7
|
+
* When considering making changing to this file, please consult
|
|
8
|
+
* a member from the Studio UI Builder team.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* This helper method is used to merge
|
|
12
|
+
* variants with overrides
|
|
13
|
+
* @internal
|
|
14
|
+
* @param variants
|
|
15
|
+
* @param overrides
|
|
16
|
+
* @returns merged variants with overrides
|
|
17
|
+
*/
|
|
18
|
+
export declare const mergeVariantsAndOverrides: (variants: EscapeHatchProps, overrides: EscapeHatchProps) => EscapeHatchProps;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 🚨 WARNING:🚨
|
|
3
|
+
* These types are owned by the Studio UI Builder team
|
|
4
|
+
* and are used during code generation triggered by Amplify CLI.
|
|
5
|
+
*
|
|
6
|
+
* When considering making changing to this file, please consult
|
|
7
|
+
* a member from the Studio UI Builder team.
|
|
8
|
+
*/
|
|
9
|
+
export declare type EscapeHatchProps = {
|
|
10
|
+
[elementHierarchy: string]: Record<string, unknown>;
|
|
11
|
+
};
|
|
12
|
+
export declare type VariantValues = {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
};
|
|
15
|
+
export declare type Variant = {
|
|
16
|
+
variantValues: VariantValues;
|
|
17
|
+
overrides: EscapeHatchProps;
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-amplify/ui-react",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
},
|
|
32
32
|
"files": [
|
|
33
33
|
"dist",
|
|
34
|
-
"dist/esm/node_modules",
|
|
35
34
|
"legacy",
|
|
36
35
|
"internal",
|
|
37
36
|
"LICENSE"
|
|
@@ -56,7 +55,7 @@
|
|
|
56
55
|
"size": "yarn run size-limit"
|
|
57
56
|
},
|
|
58
57
|
"dependencies": {
|
|
59
|
-
"@aws-amplify/ui": "3.
|
|
58
|
+
"@aws-amplify/ui": "3.13.0",
|
|
60
59
|
"@aws-amplify/ui-react-v1": "npm:@aws-amplify/ui-react@1.2.9",
|
|
61
60
|
"@radix-ui/react-accordion": "0.1.6",
|
|
62
61
|
"@radix-ui/react-dropdown-menu": "0.1.6",
|
|
@@ -71,7 +70,8 @@
|
|
|
71
70
|
"maplibre-gl-js-amplify": "2.0.2",
|
|
72
71
|
"qrcode": "1.5.0",
|
|
73
72
|
"react-generate-context": "1.0.1",
|
|
74
|
-
"react-map-gl": "7.0.15"
|
|
73
|
+
"react-map-gl": "7.0.15",
|
|
74
|
+
"tslib": "2.4.0"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"aws-amplify": "3.x.x || 4.x.x",
|
|
@@ -114,6 +114,7 @@
|
|
|
114
114
|
"react-router-dom": "^6.2.1",
|
|
115
115
|
"rimraf": "^3.0.2",
|
|
116
116
|
"rollup": "^2.70.0",
|
|
117
|
+
"rollup-plugin-node-externals": "^4.1.1",
|
|
117
118
|
"rollup-plugin-styles": "^4.0.0",
|
|
118
119
|
"rollup-plugin-terser": "^7.0.2",
|
|
119
120
|
"size-limit": "^7.0.8",
|