@aws-amplify/ui 6.10.1 → 6.10.3
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/README.md +21 -3
- package/dist/esm/i18n/translations.mjs +1 -1
- package/dist/esm/machines/authenticator/actors/signIn.mjs +1 -1
- package/dist/esm/machines/authenticator/actors/signUp.mjs +1 -1
- package/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs +1 -1
- package/dist/esm/machines/authenticator/defaultServices.mjs +1 -1
- package/dist/esm/machines/authenticator/index.mjs +1 -1
- package/dist/esm/theme/createTheme/constants.mjs +0 -2
- package/dist/esm/theme/createTheme/createTheme.mjs +1 -1
- package/dist/esm/theme/createTheme/utils.mjs +1 -1
- package/dist/esm/utils/setUserAgent/constants.mjs +1 -1
- package/dist/index.js +0 -2
- package/dist/types/helpers/accountSettings/validator.d.ts +1 -1
- package/dist/types/helpers/authenticator/actor.d.ts +1 -1
- package/dist/types/helpers/authenticator/constants.d.ts +2 -2
- package/dist/types/helpers/authenticator/debugUtils.d.ts +1 -1
- package/dist/types/helpers/authenticator/defaultAuthHubHandler.d.ts +1 -1
- package/dist/types/helpers/authenticator/facade.d.ts +4 -4
- package/dist/types/helpers/authenticator/form.d.ts +1 -1
- package/dist/types/helpers/authenticator/formFields/defaults.d.ts +2 -2
- package/dist/types/helpers/authenticator/formFields/formFields.d.ts +2 -2
- package/dist/types/helpers/authenticator/formFields/utils.d.ts +2 -2
- package/dist/types/helpers/authenticator/getRoute.d.ts +2 -2
- package/dist/types/helpers/authenticator/textUtil.d.ts +3 -3
- package/dist/types/helpers/authenticator/types.d.ts +4 -4
- package/dist/types/i18n/dictionaries/authenticator/de.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/en.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/es.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/fr.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/he.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/id.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/it.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/ja.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/kr.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/nb.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/nl.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/pl.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/pt.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/ru.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/sv.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/th.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/tr.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/ua.d.ts +1 -1
- package/dist/types/i18n/dictionaries/authenticator/zh.d.ts +1 -1
- package/dist/types/machines/authenticator/actions.d.ts +2 -2
- package/dist/types/machines/authenticator/actors/forgotPassword.d.ts +1 -1
- package/dist/types/machines/authenticator/actors/signIn.d.ts +1 -1
- package/dist/types/machines/authenticator/actors/signOut.d.ts +1 -1
- package/dist/types/machines/authenticator/actors/signUp.d.ts +1 -1
- package/dist/types/machines/authenticator/actors/utils.d.ts +1 -1
- package/dist/types/machines/authenticator/actors/verifyUserAttributes.d.ts +1 -1
- package/dist/types/machines/authenticator/defaultServices.d.ts +2 -2
- package/dist/types/machines/authenticator/getAuthenticatorConfig.d.ts +1 -1
- package/dist/types/machines/authenticator/guards.d.ts +2 -2
- package/dist/types/machines/authenticator/index.d.ts +1 -1
- package/dist/types/machines/authenticator/types.d.ts +4 -4
- package/dist/types/machines/authenticator/utils.d.ts +3 -3
- package/dist/types/theme/components/accordion.d.ts +1 -1
- package/dist/types/theme/components/aiConverstion.d.ts +1 -1
- package/dist/types/theme/components/alert.d.ts +1 -1
- package/dist/types/theme/components/autocomplete.d.ts +1 -1
- package/dist/types/theme/components/avatar.d.ts +1 -1
- package/dist/types/theme/components/badge.d.ts +1 -1
- package/dist/types/theme/components/breadcrumbs.d.ts +1 -1
- package/dist/types/theme/components/buttonGroup.d.ts +1 -1
- package/dist/types/theme/components/card.d.ts +1 -1
- package/dist/types/theme/components/checkbox.d.ts +1 -1
- package/dist/types/theme/components/checkboxField.d.ts +1 -1
- package/dist/types/theme/components/collection.d.ts +1 -1
- package/dist/types/theme/components/divider.d.ts +1 -1
- package/dist/types/theme/components/dropZone.d.ts +1 -1
- package/dist/types/theme/components/field.d.ts +1 -1
- package/dist/types/theme/components/fieldGroup.d.ts +1 -1
- package/dist/types/theme/components/fieldset.d.ts +1 -1
- package/dist/types/theme/components/fileUploader.d.ts +1 -1
- package/dist/types/theme/components/heading.d.ts +1 -1
- package/dist/types/theme/components/highlightMatch.d.ts +1 -1
- package/dist/types/theme/components/index.d.ts +48 -48
- package/dist/types/theme/components/input.d.ts +1 -1
- package/dist/types/theme/components/loader.d.ts +1 -1
- package/dist/types/theme/components/menu.d.ts +1 -1
- package/dist/types/theme/components/message.d.ts +1 -1
- package/dist/types/theme/components/pagination.d.ts +1 -1
- package/dist/types/theme/components/placeholder.d.ts +1 -1
- package/dist/types/theme/components/radio.d.ts +1 -1
- package/dist/types/theme/components/rating.d.ts +1 -1
- package/dist/types/theme/components/scrollview.d.ts +1 -1
- package/dist/types/theme/components/searchField.d.ts +1 -1
- package/dist/types/theme/components/select.d.ts +1 -1
- package/dist/types/theme/components/selectField.d.ts +1 -1
- package/dist/types/theme/components/sliderField.d.ts +1 -1
- package/dist/types/theme/components/stepperField.d.ts +1 -1
- package/dist/types/theme/components/storageBrowser.d.ts +1 -1
- package/dist/types/theme/components/storageManager.d.ts +1 -1
- package/dist/types/theme/components/switchField.d.ts +1 -1
- package/dist/types/theme/components/table.d.ts +1 -1
- package/dist/types/theme/components/tabs.d.ts +1 -1
- package/dist/types/theme/components/text.d.ts +1 -1
- package/dist/types/theme/components/textField.d.ts +1 -1
- package/dist/types/theme/components/textarea.d.ts +1 -1
- package/dist/types/theme/components/textareaField.d.ts +1 -1
- package/dist/types/theme/components/toggleButton.d.ts +1 -1
- package/dist/types/theme/components/utils.d.ts +5 -9
- package/dist/types/theme/createTheme/createAnimationCSS.d.ts +2 -2
- package/dist/types/theme/createTheme/createColorPalette.d.ts +1 -1
- package/dist/types/theme/createTheme/createComponentCSS.d.ts +3 -3
- package/dist/types/theme/createTheme/createComponentClasses.d.ts +3 -3
- package/dist/types/theme/createTheme/createGlobalCSS.d.ts +1 -1
- package/dist/types/theme/createTheme/createTheme.d.ts +2 -2
- package/dist/types/theme/createTheme/defineComponentTheme.d.ts +5 -5
- package/dist/types/theme/createTheme/index.d.ts +4 -2
- package/dist/types/theme/createTheme/utils.d.ts +3 -3
- package/dist/types/theme/defaultDarkModeOverride.d.ts +2 -2
- package/dist/types/theme/defaultTheme.d.ts +1 -1
- package/dist/types/theme/index.d.ts +5 -3
- package/dist/types/theme/tokens/borderWidths.d.ts +1 -1
- package/dist/types/theme/tokens/colors.d.ts +1 -1
- package/dist/types/theme/tokens/components/accordion.d.ts +1 -1
- package/dist/types/theme/tokens/components/aiConversation.d.ts +1 -1
- package/dist/types/theme/tokens/components/alert.d.ts +1 -1
- package/dist/types/theme/tokens/components/authenticator.d.ts +1 -1
- package/dist/types/theme/tokens/components/autocomplete.d.ts +1 -1
- package/dist/types/theme/tokens/components/avatar.d.ts +1 -1
- package/dist/types/theme/tokens/components/badge.d.ts +1 -1
- package/dist/types/theme/tokens/components/breadcrumbs.d.ts +1 -1
- package/dist/types/theme/tokens/components/button.d.ts +1 -1
- package/dist/types/theme/tokens/components/card.d.ts +1 -1
- package/dist/types/theme/tokens/components/checkbox.d.ts +1 -1
- package/dist/types/theme/tokens/components/checkboxField.d.ts +1 -1
- package/dist/types/theme/tokens/components/collection.d.ts +1 -1
- package/dist/types/theme/tokens/components/copy.d.ts +1 -1
- package/dist/types/theme/tokens/components/dialCodeSelect.d.ts +1 -1
- package/dist/types/theme/tokens/components/divider.d.ts +1 -1
- package/dist/types/theme/tokens/components/dropZone.d.ts +1 -1
- package/dist/types/theme/tokens/components/field.d.ts +1 -1
- package/dist/types/theme/tokens/components/fieldControl.d.ts +1 -1
- package/dist/types/theme/tokens/components/fieldGroup.d.ts +1 -1
- package/dist/types/theme/tokens/components/fieldMessages.d.ts +1 -1
- package/dist/types/theme/tokens/components/fieldset.d.ts +1 -1
- package/dist/types/theme/tokens/components/fileuploader.d.ts +2 -2
- package/dist/types/theme/tokens/components/flex.d.ts +1 -1
- package/dist/types/theme/tokens/components/heading.d.ts +1 -1
- package/dist/types/theme/tokens/components/highlightMatch.d.ts +1 -1
- package/dist/types/theme/tokens/components/icon.d.ts +1 -1
- package/dist/types/theme/tokens/components/image.d.ts +1 -1
- package/dist/types/theme/tokens/components/inAppMessaging.d.ts +1 -1
- package/dist/types/theme/tokens/components/index.d.ts +57 -57
- package/dist/types/theme/tokens/components/input.d.ts +1 -1
- package/dist/types/theme/tokens/components/link.d.ts +1 -1
- package/dist/types/theme/tokens/components/liveness.d.ts +1 -1
- package/dist/types/theme/tokens/components/loader.d.ts +1 -1
- package/dist/types/theme/tokens/components/menu.d.ts +1 -1
- package/dist/types/theme/tokens/components/message.d.ts +1 -1
- package/dist/types/theme/tokens/components/pagination.d.ts +1 -1
- package/dist/types/theme/tokens/components/passwordField.d.ts +1 -1
- package/dist/types/theme/tokens/components/phoneNumberField.d.ts +1 -1
- package/dist/types/theme/tokens/components/placeholder.d.ts +1 -1
- package/dist/types/theme/tokens/components/radio.d.ts +1 -1
- package/dist/types/theme/tokens/components/radioGroup.d.ts +1 -1
- package/dist/types/theme/tokens/components/rating.d.ts +1 -1
- package/dist/types/theme/tokens/components/searchField.d.ts +1 -1
- package/dist/types/theme/tokens/components/select.d.ts +1 -1
- package/dist/types/theme/tokens/components/selectField.d.ts +1 -1
- package/dist/types/theme/tokens/components/sliderField.d.ts +1 -1
- package/dist/types/theme/tokens/components/stepperField.d.ts +1 -1
- package/dist/types/theme/tokens/components/storagemanager.d.ts +2 -2
- package/dist/types/theme/tokens/components/switchField.d.ts +1 -1
- package/dist/types/theme/tokens/components/table.d.ts +1 -1
- package/dist/types/theme/tokens/components/tabs.d.ts +1 -1
- package/dist/types/theme/tokens/components/text.d.ts +1 -1
- package/dist/types/theme/tokens/components/textAreaField.d.ts +1 -1
- package/dist/types/theme/tokens/components/textField.d.ts +1 -1
- package/dist/types/theme/tokens/components/toggleButton.d.ts +1 -1
- package/dist/types/theme/tokens/components/toggleButtonGroup.d.ts +1 -1
- package/dist/types/theme/tokens/fontSizes.d.ts +1 -1
- package/dist/types/theme/tokens/fontWeights.d.ts +1 -1
- package/dist/types/theme/tokens/fonts.d.ts +1 -1
- package/dist/types/theme/tokens/index.d.ts +16 -16
- package/dist/types/theme/tokens/lineHeights.d.ts +1 -1
- package/dist/types/theme/tokens/opacities.d.ts +1 -1
- package/dist/types/theme/tokens/outlineOffsets.d.ts +1 -1
- package/dist/types/theme/tokens/outlineWidths.d.ts +1 -1
- package/dist/types/theme/tokens/radii.d.ts +1 -1
- package/dist/types/theme/tokens/shadows.d.ts +1 -1
- package/dist/types/theme/tokens/space.d.ts +1 -1
- package/dist/types/theme/tokens/time.d.ts +1 -1
- package/dist/types/theme/tokens/transforms.d.ts +1 -1
- package/dist/types/theme/tokens/types/designToken.d.ts +1 -1
- package/dist/types/theme/tokens/types/typography.d.ts +1 -1
- package/dist/types/theme/types.d.ts +7 -6
- package/dist/types/types/authenticator/attributes.d.ts +1 -1
- package/dist/types/types/authenticator/form.d.ts +2 -2
- package/dist/types/types/authenticator/validator.d.ts +2 -2
- package/dist/types/types/index.d.ts +1 -1
- package/dist/types/types/primitives/index.d.ts +2 -1
- package/dist/types/utils/index.d.ts +4 -2
- package/dist/types/utils/setUserAgent/constants.d.ts +1 -1
- package/dist/types/utils/setUserAgent/index.d.ts +2 -1
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/types/validators/index.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
`@aws-amplify/ui` contains low-level logic & styles for stand-alone usage or re-use in framework-specific implementations.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
### Core Modules
|
|
8
|
+
|
|
9
|
+
- [Theme](src/theme) - Theming utilities and configurations
|
|
10
|
+
- [I18n](src/i18n) - Internationalization utilities
|
|
11
|
+
- [State machines](src/machines) - State management utilities
|
|
12
|
+
|
|
13
|
+
### Utilities
|
|
14
|
+
|
|
15
|
+
- Helpers - Various helper functions
|
|
16
|
+
- Types - Type definitions
|
|
17
|
+
- Utils - Utility functions
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
|
|
21
|
+
- Framework-agnostic core functionality
|
|
22
|
+
- Reusable state management
|
|
23
|
+
- Internationalization support
|
|
24
|
+
- Theming capabilities
|
|
25
|
+
- Utility functions for Amplify UI components
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I18n } from 'aws-amplify/utils';
|
|
2
|
-
import { defaultTexts,
|
|
2
|
+
import { defaultTexts, thDict, uaDict, heDict, ruDict, trDict, svDict, zhDict, ptDict, plDict, nlDict, nbDict, krDict, jaDict, itDict, idDict, frDict, esDict, enDict, deDict } from './dictionaries/index.mjs';
|
|
3
3
|
|
|
4
4
|
/*
|
|
5
5
|
* Copyright 2017-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMachine, sendUpdate } from 'xstate';
|
|
2
|
-
import {
|
|
2
|
+
import { signInWithRedirect, confirmSignIn, resetPassword, fetchUserAttributes } from 'aws-amplify/auth';
|
|
3
3
|
import { runValidators } from '../../../validators/index.mjs';
|
|
4
4
|
import ACTIONS from '../actions.mjs';
|
|
5
5
|
import { defaultServices } from '../defaultServices.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMachine, sendUpdate } from 'xstate';
|
|
2
|
-
import {
|
|
2
|
+
import { signInWithRedirect, fetchUserAttributes, autoSignIn } from 'aws-amplify/auth';
|
|
3
3
|
import { getSignUpInput } from '../utils.mjs';
|
|
4
4
|
import { runValidators } from '../../../validators/index.mjs';
|
|
5
5
|
import ACTIONS from '../actions.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createMachine, sendUpdate } from 'xstate';
|
|
2
|
-
import {
|
|
2
|
+
import { confirmUserAttribute, sendUserAttributeVerificationCode } from 'aws-amplify/auth';
|
|
3
3
|
import { runValidators } from '../../../validators/index.mjs';
|
|
4
4
|
import ACTIONS from '../actions.mjs';
|
|
5
5
|
import { defaultServices } from '../defaultServices.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Amplify } from 'aws-amplify';
|
|
2
|
-
import {
|
|
2
|
+
import { resendSignUpCode, resetPassword, confirmResetPassword, confirmSignUp, confirmSignIn, signUp, signIn, getCurrentUser } from 'aws-amplify/auth';
|
|
3
3
|
import '@aws-amplify/core/internals/utils';
|
|
4
4
|
import 'aws-amplify/utils';
|
|
5
5
|
import '../../utils/setUserAgent/constants.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { actions, createMachine, assign, spawn, forwardTo } from 'xstate';
|
|
2
2
|
import '@aws-amplify/core/internals/utils';
|
|
3
3
|
import '../../utils/setUserAgent/constants.mjs';
|
|
4
4
|
import { isEmptyObject } from '../../utils/utils.mjs';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultTheme } from '../defaultTheme.mjs';
|
|
2
|
-
import { deepExtend, setupTokens,
|
|
2
|
+
import { deepExtend, setupTokens, flattenProperties, setupToken } from './utils.mjs';
|
|
3
3
|
import { createComponentCSS } from './createComponentCSS.mjs';
|
|
4
4
|
import '@aws-amplify/core/internals/utils';
|
|
5
5
|
import '../../utils/setUserAgent/constants.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import kebabCase from 'lodash/kebabCase.js';
|
|
2
2
|
import '@aws-amplify/core/internals/utils';
|
|
3
3
|
import '../../utils/setUserAgent/constants.mjs';
|
|
4
|
-
import {
|
|
4
|
+
import { has, isObject, isString } from '../../utils/utils.mjs';
|
|
5
5
|
import { usesReference } from '../../utils/references.mjs';
|
|
6
6
|
|
|
7
7
|
const CSS_VARIABLE_PREFIX = 'amplify';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AiAction, Category, AuthAction, StorageAction, InAppMessagingAction, GeoAction } from '@aws-amplify/core/internals/utils';
|
|
2
2
|
|
|
3
3
|
const AI_INPUT_BASE = {
|
|
4
4
|
category: Category.AI,
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ValidatorOptions, PasswordRequirement, ValidationMode, InputEventType } from '../../types';
|
|
1
|
+
import type { ValidatorOptions, PasswordRequirement, ValidationMode, InputEventType } from '../../types';
|
|
2
2
|
export declare const getPasswordRequirement: () => PasswordRequirement | null;
|
|
3
3
|
export declare const getHasMinLength: (minLength: number) => ValidatorOptions;
|
|
4
4
|
export declare const hasLowerCase: ValidatorOptions;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* This file contains helpers that lets you easily access current actor's state
|
|
3
3
|
* and context.
|
|
4
4
|
*/
|
|
5
|
-
import { AuthActorContext, AuthActorState, AuthMachineState } from '../../machines/authenticator/types';
|
|
5
|
+
import type { AuthActorContext, AuthActorState, AuthMachineState } from '../../machines/authenticator/types';
|
|
6
6
|
/**
|
|
7
7
|
* Get the state of current actor. This is useful for checking which screen
|
|
8
8
|
* to render: e.g. `getActorState(state).matches('confirmSignUp.edit').
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file contains helpers related to forms and input attributes.
|
|
3
3
|
*/
|
|
4
|
-
import { DefaultFormFieldOptions } from '../../types';
|
|
5
|
-
import { AuthEventTypes, NavigableRoute } from '../../machines/authenticator/types';
|
|
4
|
+
import type { DefaultFormFieldOptions } from '../../types';
|
|
5
|
+
import type { AuthEventTypes, NavigableRoute } from '../../machines/authenticator/types';
|
|
6
6
|
export declare const defaultFormFieldOptions: DefaultFormFieldOptions;
|
|
7
7
|
/**
|
|
8
8
|
* List of special characters that Cognito allows.
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
* understandable authenticator contexts. We provide these contexts with
|
|
4
4
|
* `useAuthenticator` hook/composable/service.
|
|
5
5
|
*/
|
|
6
|
-
import { Sender } from 'xstate';
|
|
7
|
-
import { AuthUser } from 'aws-amplify/auth';
|
|
8
|
-
import { FederatedProvider, LoginMechanism, SocialProvider, UnverifiedUserAttributes, ValidationError } from '../../types';
|
|
9
|
-
import { AuthEvent, AuthEventData, AuthMachineState, AuthMFAType, ChallengeName, NavigableRoute, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
|
|
6
|
+
import type { Sender } from 'xstate';
|
|
7
|
+
import type { AuthUser } from 'aws-amplify/auth';
|
|
8
|
+
import type { FederatedProvider, LoginMechanism, SocialProvider, UnverifiedUserAttributes, ValidationError } from '../../types';
|
|
9
|
+
import type { AuthEvent, AuthEventData, AuthMachineState, AuthMFAType, ChallengeName, NavigableRoute, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
|
|
10
10
|
export type AuthenticatorRoute = 'authenticated' | 'confirmResetPassword' | 'confirmSignIn' | 'confirmSignUp' | 'confirmVerifyUser' | 'forceNewPassword' | 'idle' | 'forgotPassword' | 'setup' | 'signOut' | 'selectMfaType' | 'setupEmail' | 'setupTotp' | 'signIn' | 'signUp' | 'transition' | 'verifyUser';
|
|
11
11
|
type AuthenticatorValidationErrors = ValidationError;
|
|
12
12
|
export type AuthStatus = 'configuring' | 'authenticated' | 'unauthenticated';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormFields, FormFieldOptions, FormFieldComponents } from '../../../types';
|
|
2
|
-
import { AuthMachineState } from '../../../machines/authenticator/types';
|
|
1
|
+
import type { FormFields, FormFieldOptions, FormFieldComponents } from '../../../types';
|
|
2
|
+
import type { AuthMachineState } from '../../../machines/authenticator/types';
|
|
3
3
|
export declare const DEFAULT_COUNTRY_CODE = "+1";
|
|
4
4
|
export declare const getAliasDefaultFormField: (state: AuthMachineState) => FormFieldOptions;
|
|
5
5
|
/** Collect all the defaultFormFields getters */
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* This file contains helpers that generate default form fields, given the
|
|
3
3
|
* current Authenticator / Zero Config configuration.
|
|
4
4
|
*/
|
|
5
|
-
import { AuthMachineState } from '../../../machines/authenticator/types';
|
|
6
|
-
import { FormFields, FormFieldComponents, FormFieldsArray } from '../../../types';
|
|
5
|
+
import type { AuthMachineState } from '../../../machines/authenticator/types';
|
|
6
|
+
import type { FormFields, FormFieldComponents, FormFieldsArray } from '../../../types';
|
|
7
7
|
export declare const getDefaultFormFields: (route: FormFieldComponents, state: AuthMachineState) => FormFields;
|
|
8
8
|
export declare const getCustomFormFields: (route: FormFieldComponents, state: AuthMachineState) => FormFields;
|
|
9
9
|
export declare const getFormFields: (route: FormFieldComponents, state: AuthMachineState) => FormFields;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FormFields, FormFieldsArray } from '../../../types';
|
|
2
|
-
import { AuthMachineState } from '../../../machines/authenticator/types';
|
|
1
|
+
import type { FormFields, FormFieldsArray } from '../../../types';
|
|
2
|
+
import type { AuthMachineState } from '../../../machines/authenticator/types';
|
|
3
3
|
export declare const getPrimaryAlias: (state: AuthMachineState) => "email" | "phone_number" | "username";
|
|
4
4
|
/** Applies translations to label and placeholder */
|
|
5
5
|
export declare const applyTranslation: (formFields: FormFields) => FormFields;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthActorState, AuthMachineState } from '../../machines/authenticator/types';
|
|
2
|
-
import { AuthenticatorRoute } from './facade';
|
|
1
|
+
import type { AuthActorState, AuthMachineState } from '../../machines/authenticator/types';
|
|
2
|
+
import type { AuthenticatorRoute } from './facade';
|
|
3
3
|
export type GetRoute = (state: AuthMachineState, actorState: AuthActorState) => AuthenticatorRoute;
|
|
4
4
|
export declare const getRoute: (state: AuthMachineState, actorState: AuthActorState) => AuthenticatorRoute;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SocialProvider } from '../../types';
|
|
2
|
-
import { AuthMFAType, ChallengeName, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
|
|
3
|
-
import { AuthenticatorRoute } from './facade';
|
|
1
|
+
import type { SocialProvider } from '../../types';
|
|
2
|
+
import type { AuthMFAType, ChallengeName, V5CodeDeliveryDetails } from '../../machines/authenticator/types';
|
|
3
|
+
import type { AuthenticatorRoute } from './facade';
|
|
4
4
|
export declare const authenticatorTextUtil: {
|
|
5
5
|
/** Shared */
|
|
6
6
|
readonly getBackToSignInText: () => string;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* This files provides types that describe general shape of
|
|
3
3
|
* authenticator machine and its intepreter.
|
|
4
4
|
*/
|
|
5
|
-
import { Interpreter } from 'xstate';
|
|
6
|
-
import { AuthUser } from 'aws-amplify/auth';
|
|
7
|
-
import { HubCapsule } from 'aws-amplify/utils';
|
|
8
|
-
import { AuthContext, AuthEvent } from '../../machines/authenticator/types';
|
|
5
|
+
import type { Interpreter } from 'xstate';
|
|
6
|
+
import type { AuthUser } from 'aws-amplify/auth';
|
|
7
|
+
import type { HubCapsule } from 'aws-amplify/utils';
|
|
8
|
+
import type { AuthContext, AuthEvent } from '../../machines/authenticator/types';
|
|
9
9
|
/**
|
|
10
10
|
* Intefrace for `authMachine` machine interpreter
|
|
11
11
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const deDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const enDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const esDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const frDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const heDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const idDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const itDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const jaDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const krDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const nbDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const nlDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const plDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const ptDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const ruDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const svDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const thDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const trDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const uaDict: AuthenticatorDictionary;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AuthenticatorDictionary } from './types';
|
|
1
|
+
import type { AuthenticatorDictionary } from './types';
|
|
2
2
|
export declare const zhDict: AuthenticatorDictionary;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MachineOptions } from 'xstate';
|
|
2
|
-
import { AuthEvent, AuthActorContext } from './types';
|
|
1
|
+
import type { MachineOptions } from 'xstate';
|
|
2
|
+
import type { AuthEvent, AuthActorContext } from './types';
|
|
3
3
|
declare const ACTIONS: MachineOptions<AuthActorContext, AuthEvent>['actions'];
|
|
4
4
|
export default ACTIONS;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defaultServices } from '../defaultServices';
|
|
2
|
-
import { AuthEvent, ResetPasswordContext } from '../types';
|
|
2
|
+
import type { AuthEvent, ResetPasswordContext } from '../types';
|
|
3
3
|
export type ForgotPasswordMachineOptions = {
|
|
4
4
|
services?: Partial<typeof defaultServices>;
|
|
5
5
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuthEvent, VerifyUserContext } from '../types';
|
|
1
|
+
import type { AuthEvent, VerifyUserContext } from '../types';
|
|
2
2
|
export declare function verifyUserAttributesActor(): import("xstate").StateMachine<VerifyUserContext, any, AuthEvent, {
|
|
3
3
|
value: any;
|
|
4
4
|
context: VerifyUserContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UserAttributeKey } from 'aws-amplify/auth';
|
|
1
|
+
import type { UserAttributeKey } from 'aws-amplify/auth';
|
|
2
2
|
import { confirmResetPassword, confirmSignIn, confirmSignUp, resendSignUpCode, resetPassword, signIn, signUp } from 'aws-amplify/auth';
|
|
3
|
-
import { AuthFormData, AuthTouchData, PasswordSettings, SocialProvider, ValidatorResult } from '../../types';
|
|
3
|
+
import type { AuthFormData, AuthTouchData, PasswordSettings, SocialProvider, ValidatorResult } from '../../types';
|
|
4
4
|
export declare const defaultServices: {
|
|
5
5
|
getAmplifyConfig(): Promise<{
|
|
6
6
|
loginMechanisms: ("email" | "phone_number" | "username")[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LoginMechanism, PasswordSettings, SignUpAttribute, SocialProvider } from '../../types';
|
|
1
|
+
import type { LoginMechanism, PasswordSettings, SignUpAttribute, SocialProvider } from '../../types';
|
|
2
2
|
export interface LegacyConfig {
|
|
3
3
|
aws_cognito_username_attributes?: string[];
|
|
4
4
|
aws_cognito_signup_attributes?: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MachineOptions } from 'xstate';
|
|
2
|
-
import { AuthActorContext, AuthEvent } from './types';
|
|
1
|
+
import type { MachineOptions } from 'xstate';
|
|
2
|
+
import type { AuthActorContext, AuthEvent } from './types';
|
|
3
3
|
declare const GUARDS: MachineOptions<AuthActorContext, AuthEvent>['guards'];
|
|
4
4
|
export default GUARDS;
|
|
@@ -1,7 +1,7 @@
|
|
|
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';
|
|
1
|
+
import type { State } from 'xstate';
|
|
2
|
+
import type { AuthUser } from 'aws-amplify/auth';
|
|
3
|
+
import type { LoginMechanism, SignUpAttribute, SocialProvider, UnverifiedUserAttributes, AuthFormData, AuthFormFields, AuthTouchData, ValidationError, PasswordSettings } from '../../types';
|
|
4
|
+
import type { defaultServices } from './defaultServices';
|
|
5
5
|
export type ChallengeName = 'SMS_MFA' | 'SOFTWARE_TOKEN_MFA' | 'EMAIL_OTP' | 'SELECT_MFA_TYPE' | 'MFA_SETUP' | 'PASSWORD_VERIFIER' | 'CUSTOM_CHALLENGE' | 'DEVICE_SRP_AUTH' | 'DEVICE_PASSWORD_VERIFIER' | 'ADMIN_NO_SRP_AUTH' | 'NEW_PASSWORD_REQUIRED';
|
|
6
6
|
export type AuthMFAType = 'SMS' | 'TOTP' | 'EMAIL';
|
|
7
7
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AuthActorContext } from './types';
|
|
2
|
-
import { SignUpInput } from 'aws-amplify/auth';
|
|
3
|
-
import { LoginMechanism, UserAttributes } from '../../types';
|
|
1
|
+
import type { AuthActorContext } from './types';
|
|
2
|
+
import type { SignUpInput } from 'aws-amplify/auth';
|
|
3
|
+
import type { LoginMechanism, UserAttributes } from '../../types';
|
|
4
4
|
export declare const sanitizePhoneNumber: (dialCode: string, phoneNumber: string) => string;
|
|
5
5
|
export declare const getUserAttributes: (formValues: AuthActorContext['formValues']) => UserAttributes;
|
|
6
6
|
export declare const getSignUpInput: (username: string, formValues: AuthActorContext['formValues'], loginMechanism: LoginMechanism) => SignUpInput;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentStyles, Elements } from './utils';
|
|
1
|
+
import type { ComponentStyles, Elements } from './utils';
|
|
2
2
|
export type AccordionTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
3
|
[key in 'item' | 'item__trigger' | 'item__content' | 'item__icon']?: ComponentStyles;
|
|
4
4
|
}, Required>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Elements } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Elements } from './utils';
|
|
2
2
|
export type AIConversationTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
3
|
message?: ComponentStyles & Modifiers<'user' | 'assistant' | 'bubble', Required>;
|
|
4
4
|
message__list?: ComponentStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Elements, ColorTheme } from './utils';
|
|
2
2
|
export type AlertTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme, Required> & Elements<{
|
|
3
3
|
[key in 'icon' | 'heading' | 'body' | 'dismiss']?: ComponentStyles;
|
|
4
4
|
}, Required>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Elements } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Elements } from './utils';
|
|
2
2
|
export type AutoCompleteTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
3
|
menu?: ComponentStyles & Modifiers<'empty' | 'loading', Required>;
|
|
4
4
|
menu__option?: ComponentStyles & Modifiers<'active', Required>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Elements, ColorTheme, Size } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Elements, ColorTheme, Size } from './utils';
|
|
2
2
|
export type AvatarTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | ColorTheme | 'filled' | 'outlined', Required> & Elements<{
|
|
3
3
|
icon?: ComponentStyles;
|
|
4
4
|
image?: ComponentStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Elements, ColorTheme, Size } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Elements, ColorTheme, Size } from './utils';
|
|
2
2
|
export type BadgeTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | ColorTheme, Required> & Elements<{
|
|
3
3
|
[key in 'icon' | 'heading' | 'body' | 'dismiss']?: ComponentStyles;
|
|
4
4
|
}, Required>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentStyles, Elements, Modifiers } from './utils';
|
|
1
|
+
import type { ComponentStyles, Elements, Modifiers } from './utils';
|
|
2
2
|
export type BreadcrumbsTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
3
|
list?: ComponentStyles;
|
|
4
4
|
separator?: ComponentStyles;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ComponentStyles, Modifiers } from './utils';
|
|
1
|
+
import type { ComponentStyles, Modifiers } from './utils';
|
|
2
2
|
export type CardTheme<Required extends boolean = false> = ComponentStyles & Modifiers<'elevated' | 'outlined', Required>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, ColorTheme, Elements } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, ColorTheme, Elements } from './utils';
|
|
2
2
|
export type CheckboxTheme<Required extends boolean = false> = ComponentStyles & Modifiers<ColorTheme | 'disabled', Required> & Elements<{
|
|
3
3
|
button?: ComponentStyles & Modifiers<'focused' | 'error' | 'disabled'>;
|
|
4
4
|
icon?: ComponentStyles & Modifiers<'checked' | 'indeterminate' | 'disabled'>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ComponentStyles, Elements } from './utils';
|
|
1
|
+
import type { ComponentStyles, Elements } from './utils';
|
|
2
2
|
export type CollectionTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
3
|
[key in 'pagination' | 'search' | 'items']?: ComponentStyles;
|
|
4
4
|
}, Required>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Size } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Size } from './utils';
|
|
2
2
|
export type DividerTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | 'horizontal' | 'vertical', Required>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles } from './utils';
|
|
2
2
|
export type DropZoneTheme<Required extends boolean = false> = ComponentStyles & Modifiers<'disabled' | 'active' | 'rejected' | 'accepted', Required>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
2
2
|
export type FieldTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size, Required> & Elements<{
|
|
3
3
|
description?: ComponentStyles;
|
|
4
4
|
'error-message'?: ComponentStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Elements } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Elements } from './utils';
|
|
2
2
|
export type FieldGroupTheme<Required extends boolean = false> = ComponentStyles & Elements<{
|
|
3
3
|
'inner-start'?: ComponentStyles;
|
|
4
4
|
'inner-end'?: ComponentStyles;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
1
|
+
import type { Modifiers, ComponentStyles, Size, Elements } from './utils';
|
|
2
2
|
export type FieldsetTheme<Required extends boolean = false> = ComponentStyles & Modifiers<Size | 'outlined' | 'plain', Required> & Elements<{
|
|
3
3
|
legend?: ComponentStyles & Modifiers<Size, Required>;
|
|
4
4
|
}, Required>;
|