@aws-amplify/ui 5.8.0 → 6.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/helpers/accountSettings/utils.mjs +33 -1
- package/dist/esm/helpers/accountSettings/validator.mjs +120 -1
- package/dist/esm/helpers/authenticator/actor.mjs +20 -1
- package/dist/esm/helpers/authenticator/constants.mjs +144 -1
- package/dist/esm/helpers/authenticator/defaultAuthHubHandler.mjs +52 -0
- package/dist/esm/helpers/authenticator/facade.mjs +137 -1
- package/dist/esm/helpers/authenticator/form.mjs +43 -1
- package/dist/esm/helpers/authenticator/formFields/defaults.mjs +132 -1
- package/dist/esm/helpers/authenticator/formFields/formFields.mjs +62 -1
- package/dist/esm/helpers/authenticator/formFields/utils.mjs +35 -0
- package/dist/esm/helpers/authenticator/getRoute.mjs +47 -0
- package/dist/esm/helpers/authenticator/textUtil.mjs +112 -1
- package/dist/esm/helpers/authenticator/utils.mjs +38 -1
- package/dist/esm/helpers/utils.mjs +5 -1
- package/dist/esm/i18n/country-dial-codes.mjs +210 -1
- package/dist/esm/i18n/dictionaries/authenticator/de.mjs +87 -1
- package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.mjs +83 -1
- package/dist/esm/i18n/dictionaries/authenticator/en.mjs +74 -1
- package/dist/esm/i18n/dictionaries/authenticator/es.mjs +83 -1
- package/dist/esm/i18n/dictionaries/authenticator/fr.mjs +92 -1
- package/dist/esm/i18n/dictionaries/authenticator/he.mjs +54 -1
- package/dist/esm/i18n/dictionaries/authenticator/id.mjs +96 -1
- package/dist/esm/i18n/dictionaries/authenticator/it.mjs +82 -1
- package/dist/esm/i18n/dictionaries/authenticator/ja.mjs +86 -1
- package/dist/esm/i18n/dictionaries/authenticator/kr.mjs +71 -1
- package/dist/esm/i18n/dictionaries/authenticator/nb.mjs +95 -1
- package/dist/esm/i18n/dictionaries/authenticator/nl.mjs +67 -1
- package/dist/esm/i18n/dictionaries/authenticator/pl.mjs +71 -1
- package/dist/esm/i18n/dictionaries/authenticator/pt.mjs +61 -1
- package/dist/esm/i18n/dictionaries/authenticator/ru.mjs +61 -1
- package/dist/esm/i18n/dictionaries/authenticator/sv.mjs +82 -1
- package/dist/esm/i18n/dictionaries/authenticator/tr.mjs +76 -1
- package/dist/esm/i18n/dictionaries/authenticator/ua.mjs +84 -1
- package/dist/esm/i18n/dictionaries/authenticator/zh.mjs +74 -1
- package/dist/esm/i18n/dictionaries/index.mjs +47 -1
- package/dist/esm/i18n/translations.mjs +67 -1
- package/dist/esm/index.mjs +28 -1
- package/dist/esm/machines/authenticator/actions.mjs +188 -1
- package/dist/esm/machines/authenticator/actors/forgotPassword.mjs +184 -0
- package/dist/esm/machines/authenticator/actors/signIn.mjs +328 -1
- package/dist/esm/machines/authenticator/actors/signOut.mjs +28 -1
- package/dist/esm/machines/authenticator/actors/signUp.mjs +295 -0
- package/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs +106 -0
- package/dist/esm/machines/authenticator/defaultServices.mjs +102 -1
- package/dist/esm/machines/authenticator/guards.mjs +70 -0
- package/dist/esm/machines/authenticator/index.mjs +368 -1
- package/dist/esm/machines/authenticator/utils.mjs +71 -0
- package/dist/esm/theme/breakpoints.mjs +14 -1
- package/dist/esm/theme/createTheme.mjs +156 -1
- package/dist/esm/theme/defaultDarkModeOverride.mjs +128 -1
- package/dist/esm/theme/defaultTheme.mjs +10 -1
- package/dist/esm/theme/tokens/borderWidths.mjs +7 -1
- package/dist/esm/theme/tokens/colors.mjs +166 -1
- package/dist/esm/theme/tokens/components/accordion.mjs +47 -0
- package/dist/esm/theme/tokens/components/alert.mjs +35 -1
- package/dist/esm/theme/tokens/components/authenticator.mjs +39 -1
- package/dist/esm/theme/tokens/components/autocomplete.mjs +42 -1
- package/dist/esm/theme/tokens/components/badge.mjs +44 -1
- package/dist/esm/theme/tokens/components/breadcrumbs.mjs +34 -1
- package/dist/esm/theme/tokens/components/button.mjs +685 -1
- package/dist/esm/theme/tokens/components/card.mjs +27 -1
- package/dist/esm/theme/tokens/components/checkbox.mjs +87 -1
- package/dist/esm/theme/tokens/components/checkboxField.mjs +8 -1
- package/dist/esm/theme/tokens/components/collection.mjs +72 -1
- package/dist/esm/theme/tokens/components/copy.mjs +18 -1
- package/dist/esm/theme/tokens/components/dialCodeSelect.mjs +7 -1
- package/dist/esm/theme/tokens/components/divider.mjs +22 -1
- package/dist/esm/theme/tokens/components/dropZone.mjs +46 -1
- package/dist/esm/theme/tokens/components/field.mjs +20 -1
- package/dist/esm/theme/tokens/components/fieldControl.mjs +131 -1
- package/dist/esm/theme/tokens/components/fieldGroup.mjs +11 -1
- package/dist/esm/theme/tokens/components/fieldMessages.mjs +13 -1
- package/dist/esm/theme/tokens/components/fieldset.mjs +40 -1
- package/dist/esm/theme/tokens/components/flex.mjs +9 -1
- package/dist/esm/theme/tokens/components/heading.mjs +30 -1
- package/dist/esm/theme/tokens/components/highlightMatch.mjs +7 -1
- package/dist/esm/theme/tokens/components/icon.mjs +6 -1
- package/dist/esm/theme/tokens/components/image.mjs +8 -1
- package/dist/esm/theme/tokens/components/inAppMessaging.mjs +23 -1
- package/dist/esm/theme/tokens/components/index.mjs +111 -1
- package/dist/esm/theme/tokens/components/input.mjs +12 -1
- package/dist/esm/theme/tokens/components/link.mjs +9 -1
- package/dist/esm/theme/tokens/components/liveness.mjs +7 -1
- package/dist/esm/theme/tokens/components/loader.mjs +42 -1
- package/dist/esm/theme/tokens/components/menu.mjs +27 -1
- package/dist/esm/theme/tokens/components/message.mjs +102 -1
- package/dist/esm/theme/tokens/components/pagination.mjs +40 -1
- package/dist/esm/theme/tokens/components/passwordField.mjs +38 -1
- package/dist/esm/theme/tokens/components/phoneNumberField.mjs +10 -1
- package/dist/esm/theme/tokens/components/placeholder.mjs +18 -1
- package/dist/esm/theme/tokens/components/radio.mjs +67 -1
- package/dist/esm/theme/tokens/components/radioGroup.mjs +19 -1
- package/dist/esm/theme/tokens/components/rating.mjs +9 -1
- package/dist/esm/theme/tokens/components/searchField.mjs +39 -1
- package/dist/esm/theme/tokens/components/select.mjs +63 -1
- package/dist/esm/theme/tokens/components/selectField.mjs +16 -1
- package/dist/esm/theme/tokens/components/sliderField.mjs +70 -1
- package/dist/esm/theme/tokens/components/stepperField.mjs +33 -1
- package/dist/esm/theme/tokens/components/storagemanager.mjs +97 -1
- package/dist/esm/theme/tokens/components/switchField.mjs +61 -1
- package/dist/esm/theme/tokens/components/table.mjs +105 -1
- package/dist/esm/theme/tokens/components/tabs.mjs +59 -1
- package/dist/esm/theme/tokens/components/text.mjs +28 -1
- package/dist/esm/theme/tokens/components/textAreaField.mjs +11 -1
- package/dist/esm/theme/tokens/components/textField.mjs +12 -1
- package/dist/esm/theme/tokens/components/toggleButton.mjs +96 -1
- package/dist/esm/theme/tokens/components/toggleButtonGroup.mjs +7 -1
- package/dist/esm/theme/tokens/fontSizes.mjs +14 -1
- package/dist/esm/theme/tokens/fontWeights.mjs +13 -1
- package/dist/esm/theme/tokens/fonts.mjs +19 -1
- package/dist/esm/theme/tokens/index.mjs +65 -1
- package/dist/esm/theme/tokens/lineHeights.mjs +7 -1
- package/dist/esm/theme/tokens/opacities.mjs +15 -1
- package/dist/esm/theme/tokens/outlineOffsets.mjs +7 -1
- package/dist/esm/theme/tokens/outlineWidths.mjs +7 -1
- package/dist/esm/theme/tokens/radii.mjs +11 -1
- package/dist/esm/theme/tokens/shadows.mjs +28 -1
- package/dist/esm/theme/tokens/space.mjs +29 -1
- package/dist/esm/theme/tokens/time.mjs +7 -1
- package/dist/esm/theme/tokens/transforms.mjs +10 -1
- package/dist/esm/theme/utils.mjs +81 -1
- package/dist/esm/types/authenticator/attributes.mjs +41 -1
- package/dist/esm/types/authenticator/user.mjs +18 -1
- package/dist/esm/types/authenticator/utils.mjs +5 -1
- package/dist/esm/types/primitives/componentClassName.mjs +164 -1
- package/dist/esm/utils/classNames.mjs +39 -0
- package/dist/esm/utils/setUserAgent/constants.mjs +43 -0
- package/dist/esm/utils/setUserAgent/setUserAgent.mjs +65 -0
- package/dist/esm/utils/utils.mjs +227 -0
- package/dist/esm/validators/index.mjs +19 -1
- package/dist/index.js +8396 -1
- package/dist/styles/StorageManager.css +138 -0
- package/dist/styles/StorageManager.layer.css +140 -0
- package/dist/styles/_fieldControl.css +0 -0
- package/dist/styles/_fieldControl.layer.css +3 -0
- package/dist/styles/accordion.css +64 -0
- package/dist/styles/accordion.layer.css +66 -0
- package/dist/styles/alert.css +44 -0
- package/dist/styles/alert.layer.css +46 -0
- package/dist/styles/authenticator.css +72 -0
- package/dist/styles/authenticator.layer.css +74 -0
- package/dist/styles/autocomplete.css +48 -0
- package/dist/styles/autocomplete.layer.css +50 -0
- package/dist/styles/badge.css +35 -0
- package/dist/styles/badge.layer.css +37 -0
- package/dist/styles/base.css +1491 -0
- package/dist/styles/base.layer.css +1493 -0
- package/dist/styles/breadcrumbs.css +40 -0
- package/dist/styles/breadcrumbs.layer.css +42 -0
- package/dist/styles/button.css +1122 -0
- package/dist/styles/button.layer.css +1124 -0
- package/dist/styles/card.css +26 -0
- package/dist/styles/card.layer.css +28 -0
- package/dist/styles/checkbox.css +95 -0
- package/dist/styles/checkbox.layer.css +97 -0
- package/dist/styles/checkboxField.css +6 -0
- package/dist/styles/checkboxField.layer.css +8 -0
- package/dist/styles/collection.css +70 -0
- package/dist/styles/collection.layer.css +72 -0
- package/dist/styles/copy.css +27 -0
- package/dist/styles/copy.layer.css +29 -0
- package/dist/styles/dialCodeSelect.css +3 -0
- package/dist/styles/dialCodeSelect.layer.css +5 -0
- package/dist/styles/divider.css +47 -0
- package/dist/styles/divider.layer.css +49 -0
- package/dist/styles/dropZone.css +45 -0
- package/dist/styles/dropZone.layer.css +47 -0
- package/dist/styles/field.css +17 -0
- package/dist/styles/field.layer.css +19 -0
- package/dist/styles/fieldGroup.css +130 -0
- package/dist/styles/fieldGroup.layer.css +132 -0
- package/dist/styles/fieldMessages.css +10 -0
- package/dist/styles/fieldMessages.layer.css +12 -0
- package/dist/styles/fieldModifiers.css +15 -0
- package/dist/styles/fieldModifiers.layer.css +17 -0
- package/dist/styles/fieldset.css +37 -0
- package/dist/styles/fieldset.layer.css +39 -0
- package/dist/styles/flex.css +8 -0
- package/dist/styles/flex.layer.css +10 -0
- package/dist/styles/grid.css +3 -0
- package/dist/styles/grid.layer.css +5 -0
- package/dist/styles/heading.css +40 -0
- package/dist/styles/heading.layer.css +42 -0
- package/dist/styles/highlightMatch.css +3 -0
- package/dist/styles/highlightMatch.layer.css +5 -0
- package/dist/styles/icon.css +14 -0
- package/dist/styles/icon.layer.css +16 -0
- package/dist/styles/image.css +9 -0
- package/dist/styles/image.layer.css +11 -0
- package/dist/styles/inAppMessaging.css +179 -0
- package/dist/styles/inAppMessaging.layer.css +181 -0
- package/dist/styles/input.css +83 -0
- package/dist/styles/input.layer.css +85 -0
- package/dist/styles/link.css +26 -0
- package/dist/styles/link.layer.css +28 -0
- package/dist/styles/liveness.css +374 -0
- package/dist/styles/liveness.layer.css +376 -0
- package/dist/styles/loader.css +108 -0
- package/dist/styles/loader.layer.css +110 -0
- package/dist/styles/menu.css +54 -0
- package/dist/styles/menu.layer.css +56 -0
- package/dist/styles/message.css +111 -0
- package/dist/styles/message.layer.css +113 -0
- package/dist/styles/pagination.css +41 -0
- package/dist/styles/pagination.layer.css +43 -0
- package/dist/styles/passwordField.css +49 -0
- package/dist/styles/passwordField.layer.css +51 -0
- package/dist/styles/phoneNumberField.css +30 -0
- package/dist/styles/phoneNumberField.layer.css +32 -0
- package/dist/styles/placeholder.css +31 -0
- package/dist/styles/placeholder.layer.css +33 -0
- package/dist/styles/radio.css +82 -0
- package/dist/styles/radio.layer.css +84 -0
- package/dist/styles/radioGroupField.css +25 -0
- package/dist/styles/radioGroupField.layer.css +27 -0
- package/dist/styles/radiogroup.css +5 -0
- package/dist/styles/radiogroup.layer.css +7 -0
- package/dist/styles/rating.css +33 -0
- package/dist/styles/rating.layer.css +35 -0
- package/dist/styles/reset.css +76 -0
- package/dist/styles/reset.layer.css +78 -0
- package/dist/styles/scrollView.css +4 -0
- package/dist/styles/scrollView.layer.css +6 -0
- package/dist/styles/searchField.css +29 -0
- package/dist/styles/searchField.layer.css +31 -0
- package/dist/styles/select.css +128 -0
- package/dist/styles/select.layer.css +130 -0
- package/dist/styles/selectField.css +18 -0
- package/dist/styles/selectField.layer.css +20 -0
- package/dist/styles/sliderField.css +143 -0
- package/dist/styles/sliderField.layer.css +145 -0
- package/dist/styles/stepperField.css +77 -0
- package/dist/styles/stepperField.layer.css +79 -0
- package/dist/styles/switchField.css +76 -0
- package/dist/styles/switchField.layer.css +78 -0
- package/dist/styles/table.css +146 -0
- package/dist/styles/table.layer.css +148 -0
- package/dist/styles/tabs.css +87 -0
- package/dist/styles/tabs.layer.css +89 -0
- package/dist/styles/text.css +40 -0
- package/dist/styles/text.layer.css +42 -0
- package/dist/styles/textArea.css +71 -0
- package/dist/styles/textArea.layer.css +73 -0
- package/dist/styles/textAreaField.css +12 -0
- package/dist/styles/textAreaField.layer.css +14 -0
- package/dist/styles/textField.css +14 -0
- package/dist/styles/textField.layer.css +16 -0
- package/dist/styles/toggleButton.css +280 -0
- package/dist/styles/toggleButton.layer.css +282 -0
- package/dist/styles/toggleButtonGroup.css +31 -0
- package/dist/styles/toggleButtonGroup.layer.css +33 -0
- package/dist/styles/visuallyHidden.css +12 -0
- package/dist/styles/visuallyHidden.layer.css +14 -0
- package/dist/styles.css +423 -869
- package/dist/styles.layer.css +6115 -0
- package/dist/theme.css +103 -157
- package/dist/types/helpers/accountSettings/utils.d.ts +1 -3
- package/dist/types/helpers/authenticator/actor.d.ts +1 -1
- package/dist/types/helpers/authenticator/constants.d.ts +5 -0
- package/dist/types/helpers/authenticator/defaultAuthHubHandler.d.ts +15 -0
- package/dist/types/helpers/authenticator/facade.d.ts +35 -6
- package/dist/types/helpers/authenticator/formFields/defaults.d.ts +3 -1
- package/dist/types/helpers/authenticator/formFields/formFields.d.ts +2 -1
- package/dist/types/helpers/authenticator/formFields/index.d.ts +1 -1
- package/dist/types/helpers/authenticator/formFields/{util.d.ts → utils.d.ts} +2 -0
- package/dist/types/helpers/authenticator/getRoute.d.ts +2 -0
- package/dist/types/helpers/authenticator/index.d.ts +2 -1
- package/dist/types/helpers/authenticator/textUtil.d.ts +8 -7
- package/dist/types/{types/authenticator/stateMachine/authMachine.d.ts → helpers/authenticator/types.d.ts} +5 -5
- package/dist/types/helpers/authenticator/utils.d.ts +0 -25
- package/dist/types/helpers/index.d.ts +0 -1
- package/dist/types/helpers/utils.d.ts +2 -2
- package/dist/types/i18n/translations.d.ts +2 -3
- package/dist/types/machines/authenticator/actions.d.ts +4 -62
- package/dist/types/machines/authenticator/actors/{resetPassword.d.ts → forgotPassword.d.ts} +3 -3
- package/dist/types/machines/authenticator/actors/index.d.ts +3 -1
- package/dist/types/machines/authenticator/actors/signIn.d.ts +3 -3
- package/dist/types/machines/authenticator/actors/signOut.d.ts +2 -2
- package/dist/types/machines/authenticator/{signUp.d.ts → actors/signUp.d.ts} +3 -3
- package/dist/types/machines/authenticator/actors/verifyUserAttributes.d.ts +5 -0
- package/dist/types/machines/authenticator/defaultServices.d.ts +208 -28
- package/dist/types/machines/authenticator/getAuthenticatorConfig.d.ts +14 -0
- package/dist/types/machines/authenticator/guards.d.ts +4 -0
- package/dist/types/machines/authenticator/index.d.ts +4 -2
- package/dist/types/machines/authenticator/types.d.ts +125 -0
- package/dist/types/machines/authenticator/utils.d.ts +7 -0
- package/dist/types/machines/index.d.ts +1 -0
- package/dist/types/theme/tokens/borderWidths.d.ts +2 -2
- package/dist/types/theme/tokens/colors.d.ts +7 -9
- package/dist/types/theme/tokens/components/accordion.d.ts +12 -0
- package/dist/types/theme/tokens/components/index.d.ts +2 -4
- package/dist/types/theme/tokens/components/radioGroup.d.ts +1 -1
- package/dist/types/theme/tokens/components/select.d.ts +6 -2
- package/dist/types/theme/tokens/components/storagemanager.d.ts +18 -3
- package/dist/types/theme/tokens/components/tabs.d.ts +4 -3
- package/dist/types/theme/tokens/fontSizes.d.ts +2 -2
- package/dist/types/theme/tokens/fontWeights.d.ts +2 -2
- package/dist/types/theme/tokens/fonts.d.ts +2 -2
- package/dist/types/theme/tokens/lineHeights.d.ts +2 -2
- package/dist/types/theme/tokens/opacities.d.ts +2 -2
- package/dist/types/theme/tokens/outlineOffsets.d.ts +2 -2
- package/dist/types/theme/tokens/outlineWidths.d.ts +2 -2
- package/dist/types/theme/tokens/radii.d.ts +2 -2
- package/dist/types/theme/tokens/shadows.d.ts +2 -2
- package/dist/types/theme/tokens/space.d.ts +2 -2
- package/dist/types/theme/tokens/time.d.ts +2 -2
- package/dist/types/theme/tokens/types/designToken.d.ts +12 -6
- package/dist/types/theme/types.d.ts +5 -1
- package/dist/types/types/authenticator/attributes.d.ts +10 -4
- package/dist/types/types/authenticator/form.d.ts +7 -6
- package/dist/types/types/authenticator/index.d.ts +0 -1
- package/dist/types/types/authenticator/user.d.ts +3 -29
- package/dist/types/types/authenticator/validator.d.ts +2 -2
- package/dist/types/types/displayText.d.ts +84 -0
- package/dist/types/types/index.d.ts +1 -0
- package/dist/types/types/primitives/componentClassName.d.ts +162 -180
- package/dist/types/types/util.d.ts +0 -5
- package/dist/types/utils/classNames.d.ts +4 -0
- package/dist/types/utils/index.d.ts +3 -135
- package/dist/types/utils/setUserAgent/constants.d.ts +7 -0
- package/dist/types/utils/setUserAgent/index.d.ts +1 -0
- package/dist/types/utils/setUserAgent/setUserAgent.d.ts +19 -0
- package/dist/types/utils/utils.d.ts +147 -0
- package/dist/types/validators/index.d.ts +2 -2
- package/package.json +5 -19
- package/dist/esm/helpers/authenticator/context.mjs +0 -1
- package/dist/esm/helpers/authenticator/formFields/util.mjs +0 -1
- package/dist/esm/helpers/storage/fileUploader/utils/uploader.mjs +0 -1
- package/dist/esm/machines/authenticator/actors/resetPassword.mjs +0 -1
- package/dist/esm/machines/authenticator/signUp.mjs +0 -1
- package/dist/esm/theme/tokens/components/expander.mjs +0 -1
- package/dist/esm/theme/tokens/components/fileUploader.mjs +0 -1
- package/dist/esm/utils/index.mjs +0 -1
- package/dist/types/helpers/authenticator/context.d.ts +0 -13
- package/dist/types/helpers/storage/fileUploader/index.d.ts +0 -1
- package/dist/types/helpers/storage/fileUploader/utils/index.d.ts +0 -1
- package/dist/types/helpers/storage/fileUploader/utils/uploader.d.ts +0 -28
- package/dist/types/helpers/storage/index.d.ts +0 -1
- package/dist/types/theme/tokens/components/expander.d.ts +0 -22
- package/dist/types/theme/tokens/components/fileUploader.d.ts +0 -23
- package/dist/types/types/authenticator/stateMachine/context.d.ts +0 -109
- package/dist/types/types/authenticator/stateMachine/event.d.ts +0 -17
- package/dist/types/types/authenticator/stateMachine/index.d.ts +0 -4
- package/dist/types/types/authenticator/stateMachine/state.d.ts +0 -10
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { State } from 'xstate';
|
|
2
|
+
import { AuthUser } from 'aws-amplify/auth';
|
|
3
|
+
import { LoginMechanism, SignUpAttribute, SocialProvider, UnverifiedUserAttributes, AuthFormData, AuthFormFields, AuthTouchData, ValidationError, PasswordSettings } from '../../types';
|
|
4
|
+
import { defaultServices } from './defaultServices';
|
|
5
|
+
export type ChallengeName = 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA' | 'SELECT_MFA_TYPE' | 'MFA_SETUP' | 'PASSWORD_VERIFIER' | 'CUSTOM_CHALLENGE' | 'DEVICE_SRP_AUTH' | 'DEVICE_PASSWORD_VERIFIER' | 'ADMIN_NO_SRP_AUTH' | 'NEW_PASSWORD_REQUIRED';
|
|
6
|
+
/**
|
|
7
|
+
* `AuthDeliveryMedium` is deeply nested in the v6 types, added this as utility
|
|
8
|
+
*/
|
|
9
|
+
export type V6AuthDeliveryMedium = 'EMAIL' | 'SMS' | 'PHONE' | 'UNKNOWN';
|
|
10
|
+
export interface V5CodeDeliveryDetails {
|
|
11
|
+
AttributeName: string;
|
|
12
|
+
DeliveryMedium: V6AuthDeliveryMedium;
|
|
13
|
+
Destination: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CodeDeliveryDetails {
|
|
16
|
+
destination?: string;
|
|
17
|
+
deliveryMedium?: V6AuthDeliveryMedium;
|
|
18
|
+
attributName?: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Authenticator routes that can be directly navigated to by user interaction.
|
|
22
|
+
*/
|
|
23
|
+
export type NavigableRoute = 'signIn' | 'signUp' | 'forgotPassword';
|
|
24
|
+
export type InitialRoute = 'signIn' | 'signUp' | 'forgotPassword';
|
|
25
|
+
/**
|
|
26
|
+
* `AuthTOTPSetupDetails` is deeply nested in the v6 types, added this as utility
|
|
27
|
+
*/
|
|
28
|
+
export interface AuthTOTPSetupDetails {
|
|
29
|
+
sharedSecret: string;
|
|
30
|
+
getSetupUri: (appName: string, accountName?: string) => URL;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Events that occur when actors are done
|
|
34
|
+
*/
|
|
35
|
+
export type InvokeActorEventTypes = 'done.invoke.forgotPasswordActor' | 'done.invoke.signInActor' | 'done.invoke.signUpActor' | 'done.invoke.signOutActor' | 'done.invoke.verifyUserAttributesActor';
|
|
36
|
+
/**
|
|
37
|
+
* All known explicit events for xstate
|
|
38
|
+
*/
|
|
39
|
+
export type AuthEventTypes = 'CHANGE' | 'BLUR' | 'FEDERATED_SIGN_IN' | 'RESEND' | 'FORGOT_PASSWORD' | 'AUTO_SIGN_IN_FAILURE' | 'SIGN_IN_WITH_REDIRECT' | 'SIGN_IN' | 'SIGN_OUT' | 'SIGN_UP' | 'SKIP' | 'SUBMIT' | 'INIT' | 'TOKEN_REFRESH' | InvokeActorEventTypes;
|
|
40
|
+
/**
|
|
41
|
+
* Data payload for auth events
|
|
42
|
+
*/
|
|
43
|
+
export type AuthEventData = Record<PropertyKey, any>;
|
|
44
|
+
/** Top-level auth machine event interface */
|
|
45
|
+
export interface AuthEvent {
|
|
46
|
+
type: AuthEventTypes;
|
|
47
|
+
data?: AuthEventData;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Data that actor returns when they are done and reach the final state
|
|
51
|
+
*/
|
|
52
|
+
export interface ActorDoneData {
|
|
53
|
+
codeDeliveryDetails?: V5CodeDeliveryDetails;
|
|
54
|
+
missingAttributes?: string[];
|
|
55
|
+
remoteError?: string;
|
|
56
|
+
step: Step;
|
|
57
|
+
totpSecretCode?: string;
|
|
58
|
+
username?: string;
|
|
59
|
+
unverifiedUserAttributes?: UnverifiedUserAttributes;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Context interface for the top-level machine
|
|
63
|
+
*/
|
|
64
|
+
export interface AuthContext {
|
|
65
|
+
actorRef?: any;
|
|
66
|
+
config?: {
|
|
67
|
+
loginMechanism?: LoginMechanism;
|
|
68
|
+
loginMechanisms?: LoginMechanism[];
|
|
69
|
+
signUpAttributes?: SignUpAttribute[];
|
|
70
|
+
socialProviders?: SocialProvider[];
|
|
71
|
+
formFields?: AuthFormFields;
|
|
72
|
+
initialState?: 'signIn' | 'signUp' | 'forgotPassword';
|
|
73
|
+
passwordSettings?: PasswordSettings;
|
|
74
|
+
};
|
|
75
|
+
services?: Partial<typeof defaultServices>;
|
|
76
|
+
user?: AuthUser;
|
|
77
|
+
actorDoneData?: ActorDoneData;
|
|
78
|
+
hasSetup?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export type InitialStep = 'FORGOT_PASSWORD' | 'SIGN_IN' | 'SIGN_UP';
|
|
81
|
+
export type SignInStep = 'CONFIRM_SIGN_IN_WITH_SMS_CODE' | 'CONFIRM_SIGN_IN_WITH_TOTP_CODE' | 'CONFIRM_SIGN_IN_WITH_NEW_PASSWORD_REQUIRED' | 'CONFIRM_SIGN_UP' | 'CONTINUE_SIGN_IN_WITH_TOTP_SETUP' | 'RESET_PASSWORD' | 'SIGN_IN_COMPLETE';
|
|
82
|
+
export type ResetPasswordStep = 'CONFIRM_RESET_PASSWORD_WITH_CODE' | 'RESET_PASSWORD_COMPLETE';
|
|
83
|
+
export type SignUpStep = 'CONFIRM_SIGN_UP' | 'COMPLETE_AUTO_SIGN_IN' | 'SIGN_UP_COMPLETE';
|
|
84
|
+
export type UserAttributeStep = 'SHOULD_CONFIRM_USER_ATTRIBUTE' | 'CONFIRM_ATTRIBUTE_WITH_CODE' | 'CONFIRM_ATTRIBUTE_COMPLETE';
|
|
85
|
+
type Step = InitialStep | SignInStep | SignUpStep | ResetPasswordStep | UserAttributeStep;
|
|
86
|
+
/**
|
|
87
|
+
* Base context for all actors that have auth forms associated
|
|
88
|
+
*/
|
|
89
|
+
interface BaseFormContext {
|
|
90
|
+
challengeName?: ChallengeName;
|
|
91
|
+
missingAttributes?: Array<string>;
|
|
92
|
+
remoteError?: string;
|
|
93
|
+
step: Step;
|
|
94
|
+
totpSecretCode?: string;
|
|
95
|
+
unverifiedUserAttributes?: UnverifiedUserAttributes;
|
|
96
|
+
username?: string;
|
|
97
|
+
selectedUserAttribute?: string;
|
|
98
|
+
user?: AuthUser;
|
|
99
|
+
loginMechanisms: Required<AuthContext>['config']['loginMechanisms'];
|
|
100
|
+
passwordSettings?: PasswordSettings;
|
|
101
|
+
socialProviders: Required<AuthContext>['config']['socialProviders'];
|
|
102
|
+
signUpAttributes?: SignUpAttribute[];
|
|
103
|
+
formFields?: AuthFormFields;
|
|
104
|
+
formValues?: AuthFormData;
|
|
105
|
+
touched?: AuthTouchData;
|
|
106
|
+
validationError?: ValidationError;
|
|
107
|
+
}
|
|
108
|
+
export interface ResetPasswordContext extends BaseFormContext, ActorDoneData {
|
|
109
|
+
}
|
|
110
|
+
export interface SignInContext extends BaseFormContext, ActorDoneData {
|
|
111
|
+
}
|
|
112
|
+
export interface SignUpContext extends BaseFormContext, ActorDoneData {
|
|
113
|
+
}
|
|
114
|
+
export interface VerifyUserContext extends BaseFormContext, ActorDoneData {
|
|
115
|
+
}
|
|
116
|
+
export interface SignOutContext extends Pick<BaseFormContext, 'user'> {
|
|
117
|
+
}
|
|
118
|
+
export type AuthActorContext = SignInContext | SignUpContext | ResetPasswordContext;
|
|
119
|
+
export type SignInState = State<SignInContext, AuthEvent>;
|
|
120
|
+
export type SignUpState = State<SignUpContext, AuthEvent>;
|
|
121
|
+
export type SignOutState = State<SignOutContext, AuthEvent>;
|
|
122
|
+
export type ResetPasswordState = State<ResetPasswordContext, AuthEvent>;
|
|
123
|
+
export type AuthActorState = State<AuthActorContext, AuthEvent>;
|
|
124
|
+
export type AuthMachineState = State<AuthContext, AuthEvent>;
|
|
125
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { AuthActorContext } from './types';
|
|
2
|
+
import { SignUpInput } from 'aws-amplify/auth';
|
|
3
|
+
import { LoginMechanism, UserAttributes } from '../../types';
|
|
4
|
+
export declare const sanitizePhoneNumber: (dialCode: string, phoneNumber: string) => string;
|
|
5
|
+
export declare const getUserAttributes: (formValues: AuthActorContext['formValues']) => UserAttributes;
|
|
6
|
+
export declare const getSignUpInput: (username: string, formValues: AuthActorContext['formValues'], loginMechanism: LoginMechanism) => SignUpInput;
|
|
7
|
+
export declare const getUsernameSignUp: ({ formValues, loginMechanisms, }: AuthActorContext) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DesignTokenValues, OutputVariantKey, RecursiveDesignToken, SpaceValue } from './types/designToken';
|
|
2
2
|
type BorderWidthSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type BorderWidths<Output extends OutputVariantKey = unknown, Platform = unknown> = Output extends 'required' | 'default' ? Required<DesignTokenValues<BorderWidthSize,
|
|
3
|
+
export type BorderWidths<Output extends OutputVariantKey = unknown, Platform = unknown> = (Output extends 'required' | 'default' ? Required<DesignTokenValues<BorderWidthSize, SpaceValue<Platform, Output>, Output, Platform>> : Partial<DesignTokenValues<BorderWidthSize, SpaceValue<Platform, Output>, Output, Platform>>) & RecursiveDesignToken<SpaceValue<Platform, Output>, Output, Platform>;
|
|
4
4
|
export declare const borderWidths: BorderWidths<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { ColorValue, DesignTokenValues, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { ColorValue, DesignTokenValues, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
/**
|
|
3
3
|
* Util type for creating color interfaces using `ColorValue` from string and number unions
|
|
4
4
|
*/
|
|
5
|
-
type BaseColorValues<VariantKey extends string | number, Output, Platform = unknown> = DesignTokenValues<VariantKey, ColorValue, Output, Platform>;
|
|
6
|
-
type ColorValues<VariantKey extends string | number, Output, Platform = unknown> = Output extends 'required' | 'default' ? BaseColorValues<VariantKey, Output, Platform> : Partial<BaseColorValues<VariantKey, Output, Platform>>;
|
|
5
|
+
type BaseColorValues<VariantKey extends string | number, Output, Platform = unknown> = RecursiveDesignToken<ColorValue, Output, Platform> & DesignTokenValues<VariantKey, ColorValue, Output, Platform>;
|
|
6
|
+
export type ColorValues<VariantKey extends string | number, Output, Platform = unknown> = Output extends 'required' | 'default' ? BaseColorValues<VariantKey, Output, Platform> : Partial<BaseColorValues<VariantKey, Output, Platform>>;
|
|
7
7
|
/**
|
|
8
8
|
* Util type for creating nested color scale interfaces from variant keys
|
|
9
9
|
*/
|
|
10
10
|
type BaseColorValueScale<VariantKey extends string | number, Output, Platform = unknown> = Record<VariantKey, ColorValues<ScaleKey, Output, Platform>>;
|
|
11
11
|
type ColorValueScale<VariantKey extends string | number, Output, Platform = unknown> = Output extends 'required' | 'default' ? BaseColorValueScale<VariantKey, Output, Platform> : Partial<BaseColorValueScale<VariantKey, Output, Platform>>;
|
|
12
|
-
type ScaleKey = 10 | 20 | 40 | 60 | 80 | 90 | 100;
|
|
12
|
+
export type ScaleKey = 10 | 20 | 40 | 60 | 80 | 90 | 100;
|
|
13
13
|
type OverlayKey = 5 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90;
|
|
14
|
-
type ColorPaletteKey = 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'purple' | 'pink' | 'neutral';
|
|
14
|
+
type ColorPaletteKey = 'red' | 'orange' | 'yellow' | 'green' | 'teal' | 'blue' | 'purple' | 'pink' | 'neutral' | 'primary' | 'secondary';
|
|
15
15
|
type GreyscalePaletteKey = 'white' | 'black' | 'transparent';
|
|
16
16
|
type OrderVariant = 'primary' | 'secondary' | 'tertiary';
|
|
17
17
|
type OrderVariantKey<Output = unknown> = Output extends 'default' ? Exclude<OrderVariant, 'quaternary'> : OrderVariant;
|
|
@@ -19,20 +19,18 @@ type InformationVariantKey = 'info' | 'warning' | 'error' | 'success';
|
|
|
19
19
|
type WebStateVariantKey = 'active' | 'disabled' | 'error' | 'hover' | 'focus' | 'pressed';
|
|
20
20
|
type ReactNativeStateVariantKey = Exclude<WebStateVariantKey, 'focused' | 'hover'>;
|
|
21
21
|
type StateVariantKey<Platform> = Platform extends 'react-native' ? ReactNativeStateVariantKey : WebStateVariantKey;
|
|
22
|
-
type BrandVariantKey = Extract<OrderVariantKey, 'primary' | 'secondary'>;
|
|
23
22
|
type FontVariantKey<Output, Platform> = 'inverse' | 'interactive' | Extract<StateVariantKey<Platform>, 'active' | 'disabled' | 'hover' | 'focus'> | OrderVariantKey<Output> | InformationVariantKey;
|
|
24
23
|
type BackgroundColorKey<Platform> = Extract<StateVariantKey<Platform>, 'disabled'> | OrderVariantKey | InformationVariantKey | 'quaternary';
|
|
25
24
|
type BorderColorKey<Output, Platform> = Extract<StateVariantKey<Platform>, 'disabled'> | OrderVariantKey<Output> | InformationVariantKey | (Output extends 'default' ? Exclude<StateVariantKey<Platform>, 'active' | 'hover'> : StateVariantKey<Platform>);
|
|
26
25
|
type PaletteValues<Output, Platform> = ColorValueScale<ColorPaletteKey, Output, Platform>;
|
|
27
26
|
type GreyscaleColors<Output, Platform> = ColorValues<GreyscalePaletteKey, Output, Platform>;
|
|
28
27
|
type BaseColors<Output extends OutputVariantKey = unknown, Platform = unknown> = PaletteValues<Output, Platform> & GreyscaleColors<Output, Platform> & {
|
|
29
|
-
brand?: ColorValueScale<BrandVariantKey, Output, Platform>;
|
|
30
28
|
background?: ColorValues<BackgroundColorKey<Platform>, Output, Platform>;
|
|
31
29
|
border?: ColorValues<BorderColorKey<Output, Platform>, Output, Platform>;
|
|
32
30
|
font?: ColorValues<FontVariantKey<Output, Platform>, Output, Platform>;
|
|
33
31
|
overlay?: ColorValues<OverlayKey, Output, Platform>;
|
|
34
32
|
shadow?: ColorValues<OrderVariantKey, Output, Platform>;
|
|
35
|
-
}
|
|
36
|
-
export type Colors<Output extends OutputVariantKey = unknown, Platform = unknown> =
|
|
33
|
+
} & RecursiveDesignToken<ColorValue, Output, Platform>;
|
|
34
|
+
export type Colors<Output extends OutputVariantKey = unknown, Platform = unknown> = Output extends 'required' | 'default' ? Required<BaseColors<Output, Platform>> : BaseColors<Output, Platform>;
|
|
37
35
|
export declare const colors: Colors<'default'>;
|
|
38
36
|
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
+
export type AccordionTokens<Output extends OutputVariantKey> = DesignTokenProperties<'backgroundColor', Output> & {
|
|
3
|
+
item?: DesignTokenProperties<'borderWidth' | 'borderStyle' | 'borderColor' | 'borderRadius', Output> & {
|
|
4
|
+
icon?: DesignTokenProperties<'transitionDuration' | 'transitionTimingFunction' | 'color', Output>;
|
|
5
|
+
content?: DesignTokenProperties<'color' | 'paddingInline' | 'paddingBlockEnd' | 'paddingBlockStart', Output>;
|
|
6
|
+
trigger?: DesignTokenProperties<'alignItems' | 'backgroundColor' | 'color' | 'gap' | 'justifyContent' | 'paddingBlock' | 'paddingInline', Output> & {
|
|
7
|
+
_hover?: DesignTokenProperties<'backgroundColor' | 'color', Output>;
|
|
8
|
+
_focus?: DesignTokenProperties<'boxShadow' | 'borderColor', Output>;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const accordion: Required<AccordionTokens<'default'>>;
|
|
@@ -12,13 +12,12 @@ import { CopyTokens } from './copy';
|
|
|
12
12
|
import { DialCodeSelectTokens } from './dialCodeSelect';
|
|
13
13
|
import { DividerTokens } from './divider';
|
|
14
14
|
import { DropZoneTokens } from './dropZone';
|
|
15
|
-
import {
|
|
15
|
+
import { AccordionTokens } from './accordion';
|
|
16
16
|
import { FieldTokens } from './field';
|
|
17
17
|
import { FieldControlTokens } from './fieldControl';
|
|
18
18
|
import { FieldGroupTokens } from './fieldGroup';
|
|
19
19
|
import { FieldsetTokens } from './fieldset';
|
|
20
20
|
import { FieldMessagesTokens } from './fieldMessages';
|
|
21
|
-
import { FileUploaderTokens } from './fileUploader';
|
|
22
21
|
import { FlexTokens } from './flex';
|
|
23
22
|
import { HeadingTokens } from './heading';
|
|
24
23
|
import { HighlightMatchTokens } from './highlightMatch';
|
|
@@ -54,6 +53,7 @@ import { ToggleButtonTokens } from './toggleButton';
|
|
|
54
53
|
import { ToggleButtonGroupTokens } from './toggleButtonGroup';
|
|
55
54
|
import { OutputVariantKey } from '../types/designToken';
|
|
56
55
|
type BaseComponentTokens<Output extends OutputVariantKey> = {
|
|
56
|
+
accordion?: AccordionTokens<Output>;
|
|
57
57
|
alert?: AlertTokens<Output>;
|
|
58
58
|
authenticator?: AuthenticatorTokens<Output>;
|
|
59
59
|
autocomplete?: AutocompleteTokens<Output>;
|
|
@@ -68,13 +68,11 @@ type BaseComponentTokens<Output extends OutputVariantKey> = {
|
|
|
68
68
|
countrycodeselect?: DialCodeSelectTokens<Output>;
|
|
69
69
|
divider?: DividerTokens<Output>;
|
|
70
70
|
dropzone?: DropZoneTokens<Output>;
|
|
71
|
-
expander?: ExpanderTokens<Output>;
|
|
72
71
|
field?: FieldTokens<Output>;
|
|
73
72
|
fieldset?: FieldsetTokens<Output>;
|
|
74
73
|
fieldcontrol?: FieldControlTokens<Output>;
|
|
75
74
|
fieldgroup?: FieldGroupTokens<Output>;
|
|
76
75
|
fieldmessages?: FieldMessagesTokens<Output>;
|
|
77
|
-
fileuploader?: FileUploaderTokens<Output>;
|
|
78
76
|
flex?: FlexTokens<Output>;
|
|
79
77
|
heading?: HeadingTokens<Output>;
|
|
80
78
|
highlightmatch?: HighlightMatchTokens<Output>;
|
|
@@ -4,6 +4,6 @@ export type RadioGroupTokens<Output extends OutputVariantKey> = {
|
|
|
4
4
|
_checked?: DesignTokenProperties<'color', Output>;
|
|
5
5
|
label?: DesignTokenProperties<'color', Output>;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
legend?: DesignTokenProperties<'color' | 'fontWeight', Output>;
|
|
8
8
|
};
|
|
9
9
|
export declare const radiogroup: Required<RadioGroupTokens<'default'>>;
|
|
@@ -4,14 +4,18 @@ type SelectIconWrapperTokens<Output> = DesignTokenProperties<'alignItems' | 'pos
|
|
|
4
4
|
small?: DesignTokenProperties<'right', Output>;
|
|
5
5
|
large?: DesignTokenProperties<'right', Output>;
|
|
6
6
|
};
|
|
7
|
-
export type SelectTokens<Output extends OutputVariantKey> = DesignTokenProperties<'paddingInlineEnd' | 'whiteSpace' | 'minWidth', Output> & {
|
|
7
|
+
export type SelectTokens<Output extends OutputVariantKey> = DesignTokenProperties<'backgroundColor' | 'color' | 'paddingInlineEnd' | 'whiteSpace' | 'minWidth', Output> & {
|
|
8
8
|
wrapper?: DesignTokenProperties<'cursor' | 'display' | 'flex' | 'position', Output>;
|
|
9
9
|
iconWrapper?: SelectIconWrapperTokens<Output>;
|
|
10
10
|
option?: DesignTokenProperties<'backgroundColor' | 'color', Output> & {
|
|
11
|
-
_disabled?: DesignTokenProperties<'color', Output>;
|
|
11
|
+
_disabled?: DesignTokenProperties<'color' | 'backgroundColor', Output>;
|
|
12
12
|
};
|
|
13
13
|
small?: SelectSizeTokens<Output>;
|
|
14
14
|
large?: SelectSizeTokens<Output>;
|
|
15
|
+
expanded?: DesignTokenProperties<'paddingBlock' | 'paddingInline', Output> & {
|
|
16
|
+
option?: DesignTokenProperties<'paddingBlock' | 'paddingInline', Output>;
|
|
17
|
+
};
|
|
18
|
+
_disabled?: DesignTokenProperties<'backgroundColor' | 'color', Output>;
|
|
15
19
|
};
|
|
16
20
|
export declare const select: Required<SelectTokens<'default'>>;
|
|
17
21
|
export {};
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { TypographyTokens } from '../types/typography';
|
|
3
|
+
type BaseDropZoneTokens<OutputType> = DesignTokenProperties<'backgroundColor' | 'borderWidth' | 'borderStyle' | 'borderColor' | 'borderRadius', OutputType>;
|
|
4
|
+
export interface StorageManagerTokens<OutputType extends OutputVariantKey> {
|
|
5
|
+
dropzone?: DesignTokenProperties<'gap' | 'paddingBlock' | 'paddingInline' | 'textAlign', OutputType> & BaseDropZoneTokens<OutputType> & {
|
|
6
|
+
_active?: BaseDropZoneTokens<OutputType>;
|
|
7
|
+
icon?: DesignTokenProperties<'fontSize' | 'color', OutputType>;
|
|
8
|
+
text?: TypographyTokens<OutputType>;
|
|
9
|
+
};
|
|
10
|
+
file?: DesignTokenProperties<'alignItems' | 'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'gap' | 'paddingBlock' | 'paddingInline', OutputType> & {
|
|
11
|
+
name?: TypographyTokens<OutputType>;
|
|
12
|
+
size?: TypographyTokens<OutputType>;
|
|
13
|
+
image?: DesignTokenProperties<'backgroundColor' | 'borderRadius' | 'color' | 'height' | 'width', OutputType>;
|
|
14
|
+
};
|
|
4
15
|
filelist?: DesignTokenProperties<'flexDirection' | 'gap'>;
|
|
5
|
-
|
|
16
|
+
loader?: DesignTokenProperties<'strokeWidth' | 'strokeFilled' | 'strokeEmpty' | 'strokeLinecap', OutputType>;
|
|
17
|
+
previewer?: DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderRadius' | 'borderStyle' | 'borderWidth' | 'maxHeight' | 'maxWidth' | 'paddingBlock' | 'paddingInline', OutputType> & {
|
|
18
|
+
text?: TypographyTokens<OutputType>;
|
|
19
|
+
body?: DesignTokenProperties<'gap' | 'paddingInline' | 'paddingBlock', OutputType>;
|
|
6
20
|
footer?: DesignTokenProperties<'justifyContent', OutputType>;
|
|
7
21
|
};
|
|
8
22
|
}
|
|
9
23
|
export declare const storagemanager: Required<StorageManagerTokens<'default'>>;
|
|
24
|
+
export {};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { DesignTokenProperties, OutputVariantKey } from '../types/designToken';
|
|
2
|
-
type TabItemStateTokens<OutputType> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'color', OutputType>;
|
|
2
|
+
type TabItemStateTokens<OutputType> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'boxShadow' | 'color', OutputType>;
|
|
3
3
|
type TabItemTokens<OutputType extends OutputVariantKey> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderStyle' | 'borderWidth' | 'color' | 'fontSize' | 'fontWeight' | 'paddingVertical' | 'paddingHorizontal' | 'textAlign' | 'transitionDuration', OutputType> & {
|
|
4
|
-
_hover?:
|
|
5
|
-
_focus?:
|
|
4
|
+
_hover?: TabItemStateTokens<OutputType>;
|
|
5
|
+
_focus?: TabItemStateTokens<OutputType>;
|
|
6
6
|
_active?: TabItemStateTokens<OutputType>;
|
|
7
7
|
_disabled?: TabItemStateTokens<OutputType>;
|
|
8
8
|
};
|
|
9
9
|
export type TabsTokens<Output extends OutputVariantKey> = DesignTokenProperties<'backgroundColor' | 'borderColor' | 'borderStyle' | 'borderWidth' | 'gap', Output> & {
|
|
10
10
|
item?: TabItemTokens<Output>;
|
|
11
|
+
panel?: DesignTokenProperties<'backgroundColor' | 'paddingInline' | 'paddingBlock', Output>;
|
|
11
12
|
};
|
|
12
13
|
export declare const tabs: Required<TabsTokens<'default'>>;
|
|
13
14
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, FontSizeValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, FontSizeValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type FontSize = 'xxxs' | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl' | 'xxxxl';
|
|
3
|
-
export type FontSizes<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<FontSize, FontSizeValue<Platform, Output>, Output, Platform>;
|
|
3
|
+
export type FontSizes<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<FontSize, FontSizeValue<Platform, Output>, Output, Platform> & RecursiveDesignToken<FontSizeValue<Platform, Output>, Output, Platform>;
|
|
4
4
|
export declare const fontSizes: FontSizes<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, FontWeightValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, FontWeightValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type FontWeight = 'hairline' | 'thin' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold' | 'extrabold' | 'black';
|
|
3
|
-
export type FontWeights<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<FontWeight, FontWeightValue<Platform, Output>, Output, Platform>;
|
|
3
|
+
export type FontWeights<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<FontWeight, FontWeightValue<Platform, Output>, Output, Platform> & RecursiveDesignToken<FontWeightValue<Platform, Output>, Output, Platform>;
|
|
4
4
|
export declare const fontWeights: FontWeights<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { DesignTokenValues, FontValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, FontValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type FontVariant = 'variable' | 'static';
|
|
3
3
|
type BaseFonts<Output extends OutputVariantKey = unknown, Platform = unknown> = {
|
|
4
4
|
default?: DesignTokenValues<FontVariant, FontValue, Output, Platform>;
|
|
5
5
|
};
|
|
6
|
-
export type Fonts<Output extends OutputVariantKey = unknown, Platform = unknown> = Output extends 'required' | 'default' ? Required<BaseFonts<Output, Platform>> : BaseFonts<Output, Platform>;
|
|
6
|
+
export type Fonts<Output extends OutputVariantKey = unknown, Platform = unknown> = (Output extends 'required' | 'default' ? Required<BaseFonts<Output, Platform>> : BaseFonts<Output, Platform>) & RecursiveDesignToken<FontValue, Output, Platform>;
|
|
7
7
|
export declare const fonts: Fonts<'default'>;
|
|
8
8
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, LineHeightValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, LineHeightValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type LineHeightSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type LineHeights<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<LineHeightSize, LineHeightValue, Output, Platform>;
|
|
3
|
+
export type LineHeights<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<LineHeightSize, LineHeightValue, Output, Platform> & RecursiveDesignToken<LineHeightValue, Output, Platform>;
|
|
4
4
|
export declare const lineHeights: LineHeights<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, OpacityValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OpacityValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type OpacityScale = 0 | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100;
|
|
3
|
-
export type Opacities<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<OpacityScale, OpacityValue<Platform, Output>, Output, Platform>;
|
|
3
|
+
export type Opacities<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<OpacityScale, OpacityValue<Platform, Output>, Output, Platform> & RecursiveDesignToken<OpacityValue<Platform, Output>, Output, Platform>;
|
|
4
4
|
export declare const opacities: Opacities<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, OutlineOffsetValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OutlineOffsetValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type OutlineOffsetSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type OutlineOffsets<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<OutlineOffsetSize, OutlineOffsetValue, Output, Platform>;
|
|
3
|
+
export type OutlineOffsets<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<OutlineOffsetSize, OutlineOffsetValue, Output, Platform> & RecursiveDesignToken<OutlineOffsetValue, Output, Platform>;
|
|
4
4
|
export declare const outlineOffsets: OutlineOffsets<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, OutlineWidthValue, OutputVariantKey } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OutlineWidthValue, OutputVariantKey, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type OutlineWidthSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type OutlineWidths<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<OutlineWidthSize, OutlineWidthValue, Output, Platform>;
|
|
3
|
+
export type OutlineWidths<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<OutlineWidthSize, OutlineWidthValue, Output, Platform> & RecursiveDesignToken<OutlineWidthValue, Output, Platform>;
|
|
4
4
|
export declare const outlineWidths: OutlineWidths<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, OutputVariantKey, RadiusValue } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OutputVariantKey, RadiusValue, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type RadiusSize = 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl';
|
|
3
|
-
export type Radii<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<RadiusSize, RadiusValue<Platform, Output>, Output, Platform>;
|
|
3
|
+
export type Radii<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<RadiusSize, RadiusValue<Platform, Output>, Output, Platform> & RecursiveDesignToken<RadiusValue<Platform, Output>, Output, Platform>;
|
|
4
4
|
export declare const radii: Radii<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, OutputVariantKey, ShadowValue } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OutputVariantKey, RecursiveDesignToken, ShadowValue } from './types/designToken';
|
|
2
2
|
type ShadowSize = 'small' | 'medium' | 'large';
|
|
3
|
-
export type Shadows<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<ShadowSize, ShadowValue, Output, Platform>;
|
|
3
|
+
export type Shadows<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<ShadowSize, ShadowValue, Output, Platform> & RecursiveDesignToken<ShadowValue, Output, Platform>;
|
|
4
4
|
export declare const shadows: Shadows<'default'>;
|
|
5
5
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { DesignTokenValues, OutputVariantKey, SpaceValue } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OutputVariantKey, SpaceValue, RecursiveDesignToken } from './types/designToken';
|
|
2
2
|
type SpaceSize = 'xxxs' | 'xxs' | 'xs' | 'small' | 'medium' | 'large' | 'xl' | 'xxl' | 'xxxl';
|
|
3
3
|
export type SpaceSizes<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<SpaceSize | 'zero', SpaceValue<Platform>, Output, Platform>;
|
|
4
4
|
type BaseSpace<Output extends OutputVariantKey = unknown, Platform = unknown> = SpaceSizes<Output, Platform> & {
|
|
5
5
|
relative?: DesignTokenValues<SpaceSize | 'full', SpaceValue, Output, Platform>;
|
|
6
6
|
};
|
|
7
|
-
export type Space<Output extends OutputVariantKey = unknown, Platform = unknown> = Output extends 'required' | 'default' ? Required<BaseSpace<Output, Platform>> : BaseSpace<Output, Platform>;
|
|
7
|
+
export type Space<Output extends OutputVariantKey = unknown, Platform = unknown> = (Output extends 'required' | 'default' ? Required<BaseSpace<Output, Platform>> : BaseSpace<Output, Platform>) & RecursiveDesignToken<SpaceValue<Platform, Output>, Output, Platform>;
|
|
8
8
|
export declare const space: Space<'default'>;
|
|
9
9
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DesignTokenValues, OutputVariantKey, TimeValue } from './types/designToken';
|
|
1
|
+
import { DesignTokenValues, OutputVariantKey, RecursiveDesignToken, TimeValue } from './types/designToken';
|
|
2
2
|
type Duration = 'short' | 'medium' | 'long';
|
|
3
|
-
export type Time<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<Duration, TimeValue<Platform, Output>, Output, Platform>;
|
|
3
|
+
export type Time<Output extends OutputVariantKey = unknown, Platform = unknown> = DesignTokenValues<Duration, TimeValue<Platform, Output>, Output, Platform> & RecursiveDesignToken<TimeValue<Platform, Output>, Output, Platform>;
|
|
4
4
|
export declare const time: Time<'default'>;
|
|
5
5
|
export {};
|
|
@@ -40,7 +40,6 @@ export type BorderColorValue = ColorValue;
|
|
|
40
40
|
export type BorderCollapseValue = string;
|
|
41
41
|
export type BorderRadiusValue = RadiusValue;
|
|
42
42
|
export type BorderStyleValue = string;
|
|
43
|
-
export type BorderWidthValue<Platform extends PlatformKey = unknown, Output extends OutputVariantKey = unknown> = Output extends 'required' ? Platform extends 'react-native' ? number : SpaceValue<Platform> : SpaceValue<Platform>;
|
|
44
43
|
export type BorderValue = string;
|
|
45
44
|
export type BoxSizingValue = string;
|
|
46
45
|
export type BoxShadowValue = ShadowValue;
|
|
@@ -78,7 +77,7 @@ export type StrokeFilledValue = string;
|
|
|
78
77
|
export type StrokeEmptyValue = string;
|
|
79
78
|
export type StrokeLinecapValue = string;
|
|
80
79
|
export type StrokeWidthValue = string;
|
|
81
|
-
export type SpaceValue<Platform extends PlatformKey = unknown> = Platform extends 'react-native' ?
|
|
80
|
+
export type SpaceValue<Platform extends PlatformKey = unknown, Output extends OutputVariantKey = unknown> = Platform extends 'react-native' ? Output extends 'required' ? number : number | string : string;
|
|
82
81
|
export type TextAlignValue = string;
|
|
83
82
|
export type TextDecorationValue = string;
|
|
84
83
|
export type TimeValue<Platform extends PlatformKey = unknown, Output extends OutputVariantKey = unknown> = Output extends 'required' ? Platform extends 'react-native' ? number : string : string;
|
|
@@ -107,7 +106,7 @@ interface TokenStandardProperties {
|
|
|
107
106
|
borderInlineStart: BorderValue;
|
|
108
107
|
borderRadius: BorderRadiusValue;
|
|
109
108
|
borderStyle: BorderStyleValue;
|
|
110
|
-
borderWidth:
|
|
109
|
+
borderWidth: SpaceValue;
|
|
111
110
|
border: BorderValue;
|
|
112
111
|
bottom: SpaceValue;
|
|
113
112
|
boxSizing: BoxSizingValue;
|
|
@@ -226,10 +225,17 @@ export type DesignTokenProperties<Keys extends TokenProperty, Output extends Out
|
|
|
226
225
|
export type PlatformKey = 'web' | 'react-native' | 'android' | 'ios' | unknown;
|
|
227
226
|
type PropKey = string | number;
|
|
228
227
|
type RequiredTokenValues<PropertyValueKey extends PropKey, PropertyValue, Platform extends PlatformKey = unknown> = Record<PropertyValueKey, Platform extends 'react-native' ? PropertyValue : WebDesignToken<PropertyValue>>;
|
|
229
|
-
type OptionalTokenValues<PropertyValueKey extends PropKey, PropertyValue
|
|
230
|
-
type DefaultTokenValues<PropertyValueKey extends PropKey, PropertyValue
|
|
228
|
+
type OptionalTokenValues<PropertyValueKey extends PropKey, PropertyValue> = Partial<Record<PropertyValueKey, DesignToken<PropertyValue>>>;
|
|
229
|
+
type DefaultTokenValues<PropertyValueKey extends PropKey, PropertyValue> = Required<Record<PropertyValueKey, DesignToken<PropertyValue>>>;
|
|
231
230
|
/**
|
|
232
231
|
* Utility for creating token interfaces in `Theme`
|
|
233
232
|
*/
|
|
234
|
-
export type DesignTokenValues<PropertyValueKey extends PropKey, PropertyValue, Output extends OutputVariantKey = unknown, Platform extends PlatformKey = unknown> = Output extends 'required' ? RequiredTokenValues<PropertyValueKey, PropertyValue, Platform> : Output extends 'optional' ? OptionalTokenValues<PropertyValueKey, PropertyValue
|
|
233
|
+
export type DesignTokenValues<PropertyValueKey extends PropKey, PropertyValue, Output extends OutputVariantKey = unknown, Platform extends PlatformKey = unknown> = Output extends 'required' ? RequiredTokenValues<PropertyValueKey, PropertyValue, Platform> : Output extends 'optional' ? OptionalTokenValues<PropertyValueKey, PropertyValue> : DefaultTokenValues<PropertyValueKey, PropertyValue>;
|
|
234
|
+
/**
|
|
235
|
+
* Helper type util allowing creation of a deeply nested object of Design Tokens
|
|
236
|
+
*/
|
|
237
|
+
export type RecursiveDesignToken<ValueType = unknown, Output extends OutputVariantKey = unknown, Platform extends PlatformKey = unknown> = {
|
|
238
|
+
[key: PropKey]: DesignTokenValue<ValueType, Output, Platform> | RecursiveDesignToken<ValueType, Output, Platform>;
|
|
239
|
+
} & (Output extends 'required' ? Platform extends 'react-native' ? DesignTokenValue<ValueType, Output, Platform> : {} : {});
|
|
240
|
+
export type DesignTokenValue<ValueType = unknown, Output extends OutputVariantKey = unknown, Platform extends PlatformKey = unknown> = Output extends 'required' ? Platform extends 'react-native' ? ValueType : WebDesignToken<ValueType> : DesignToken<ValueType>;
|
|
235
241
|
export {};
|
|
@@ -89,6 +89,8 @@ export interface Theme {
|
|
|
89
89
|
*/
|
|
90
90
|
name: string;
|
|
91
91
|
tokens?: Tokens;
|
|
92
|
+
primaryColor?: string;
|
|
93
|
+
secondaryColor?: string;
|
|
92
94
|
breakpoints?: PartialDeep<Breakpoints>;
|
|
93
95
|
/**
|
|
94
96
|
* Overrides allow you to change design tokens in different contexts, like
|
|
@@ -101,7 +103,7 @@ export interface Theme {
|
|
|
101
103
|
/**
|
|
102
104
|
* A DefaultTheme has all tokens and breakpoints required
|
|
103
105
|
*/
|
|
104
|
-
export interface DefaultTheme extends Pick<Theme, 'name' | 'overrides'> {
|
|
106
|
+
export interface DefaultTheme extends Pick<Theme, 'name' | 'overrides' | 'primaryColor' | 'secondaryColor'> {
|
|
105
107
|
tokens: DefaultTokens;
|
|
106
108
|
breakpoints: Breakpoints;
|
|
107
109
|
}
|
|
@@ -111,6 +113,8 @@ export interface DefaultTheme extends Pick<Theme, 'name' | 'overrides'> {
|
|
|
111
113
|
* to be used in Javascript/Typescript.
|
|
112
114
|
*/
|
|
113
115
|
export interface WebTheme extends Pick<DefaultTheme, 'breakpoints' | 'name' | 'overrides'> {
|
|
116
|
+
primaryColor?: string;
|
|
117
|
+
secondaryColor?: string;
|
|
114
118
|
cssText: string;
|
|
115
119
|
tokens: WebTokens;
|
|
116
120
|
}
|
|
@@ -1,22 +1,28 @@
|
|
|
1
|
+
import { UserAttributeKey } from 'aws-amplify/auth';
|
|
1
2
|
/** Array of auth fields that we supply defaults with */
|
|
2
3
|
export declare const signUpFieldsWithDefault: readonly ["birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website"];
|
|
3
4
|
/** Auth fields that we supply defaults with */
|
|
4
|
-
export type SignUpFieldsWithDefaults = typeof signUpFieldsWithDefault[number];
|
|
5
|
+
export type SignUpFieldsWithDefaults = (typeof signUpFieldsWithDefault)[number];
|
|
5
6
|
/** Array of auth fields that we do not supply defaults with */
|
|
6
7
|
export declare const signUpFieldsWithoutDefault: readonly ["address", "gender", "locale", "picture", "updated_at", "zoneinfo"];
|
|
7
8
|
/** Auth fields that we do not supply defaults with */
|
|
8
|
-
export type SignUpFieldsWithoutDefaults = typeof signUpFieldsWithoutDefault[number];
|
|
9
|
+
export type SignUpFieldsWithoutDefaults = (typeof signUpFieldsWithoutDefault)[number];
|
|
9
10
|
/** All known auth fields */
|
|
10
11
|
export type SignUpAttribute = SignUpFieldsWithDefaults | SignUpFieldsWithoutDefaults;
|
|
11
12
|
/** Fields that are common in all routes */
|
|
12
13
|
export type CommonFields = 'username' | 'password' | 'confirm_password';
|
|
13
14
|
/** Array of known login mechanisms */
|
|
14
15
|
export declare const LoginMechanismArray: readonly ["username", "email", "phone_number"];
|
|
16
|
+
/**
|
|
17
|
+
* Default supported federated sign sn providers
|
|
18
|
+
*/
|
|
19
|
+
export type FederatedProvider = 'amazon' | 'apple' | 'facebook' | 'google';
|
|
15
20
|
/** Login mechanisms that can be used to sign in */
|
|
16
|
-
export type LoginMechanism = typeof LoginMechanismArray[number];
|
|
21
|
+
export type LoginMechanism = (typeof LoginMechanismArray)[number];
|
|
17
22
|
/** List of social provider Authenticator supports */
|
|
18
23
|
export type SocialProvider = 'amazon' | 'apple' | 'facebook' | 'google';
|
|
19
24
|
export declare const authFieldsWithDefaults: readonly ["username", "email", "phone_number", "birthdate", "email", "family_name", "given_name", "middle_name", "name", "nickname", "phone_number", "preferred_username", "profile", "website", "confirmation_code", "password", "confirm_password"];
|
|
20
25
|
/** Input fields that we provide default fields with */
|
|
21
|
-
export type AuthFieldsWithDefaults = typeof authFieldsWithDefaults[number];
|
|
26
|
+
export type AuthFieldsWithDefaults = (typeof authFieldsWithDefaults)[number];
|
|
22
27
|
export declare const isAuthFieldsWithDefaults: (field: string) => field is "birthdate" | "email" | "family_name" | "given_name" | "middle_name" | "name" | "nickname" | "phone_number" | "preferred_username" | "profile" | "website" | "username" | "password" | "confirm_password" | "confirmation_code";
|
|
28
|
+
export type UserAttributes = Partial<Record<UserAttributeKey, string>>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { ResourcesConfig } from 'aws-amplify';
|
|
1
2
|
import { AuthFieldsWithDefaults } from './attributes';
|
|
2
3
|
/**
|
|
3
4
|
* Map of each input name to its value
|
|
4
5
|
*/
|
|
5
6
|
export type AuthFormData = Record<string, string>;
|
|
7
|
+
export type AuthTouchData = Record<string, boolean>;
|
|
6
8
|
/**
|
|
7
9
|
* List of routes that support custom formFields
|
|
8
10
|
*/
|
|
9
|
-
export type FormFieldComponents = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | '
|
|
11
|
+
export type FormFieldComponents = 'signIn' | 'signUp' | 'forceNewPassword' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forgotPassword' | 'setupTotp';
|
|
10
12
|
/**
|
|
11
13
|
* Used to customize form field attributes for each authenticator screen.
|
|
12
14
|
*/
|
|
@@ -57,8 +59,7 @@ export interface LegacyFormFieldOptions extends FormFieldOptions {
|
|
|
57
59
|
export type DefaultFormFieldOptions = Record<AuthFieldsWithDefaults, FormFieldOptions>;
|
|
58
60
|
/** Ordered list of formFields */
|
|
59
61
|
export type FormFieldsArray = Array<[string, FormFieldOptions]>;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
62
|
+
type AuthConfig = NonNullable<ResourcesConfig['Auth']>;
|
|
63
|
+
type CognitoConfig = NonNullable<AuthConfig['Cognito']>;
|
|
64
|
+
export type PasswordSettings = CognitoConfig['passwordFormat'];
|
|
65
|
+
export {};
|