@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.
Files changed (201) hide show
  1. package/README.md +21 -3
  2. package/dist/esm/i18n/translations.mjs +1 -1
  3. package/dist/esm/machines/authenticator/actors/signIn.mjs +1 -1
  4. package/dist/esm/machines/authenticator/actors/signUp.mjs +1 -1
  5. package/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs +1 -1
  6. package/dist/esm/machines/authenticator/defaultServices.mjs +1 -1
  7. package/dist/esm/machines/authenticator/index.mjs +1 -1
  8. package/dist/esm/theme/createTheme/constants.mjs +0 -2
  9. package/dist/esm/theme/createTheme/createTheme.mjs +1 -1
  10. package/dist/esm/theme/createTheme/utils.mjs +1 -1
  11. package/dist/esm/utils/setUserAgent/constants.mjs +1 -1
  12. package/dist/index.js +0 -2
  13. package/dist/types/helpers/accountSettings/validator.d.ts +1 -1
  14. package/dist/types/helpers/authenticator/actor.d.ts +1 -1
  15. package/dist/types/helpers/authenticator/constants.d.ts +2 -2
  16. package/dist/types/helpers/authenticator/debugUtils.d.ts +1 -1
  17. package/dist/types/helpers/authenticator/defaultAuthHubHandler.d.ts +1 -1
  18. package/dist/types/helpers/authenticator/facade.d.ts +4 -4
  19. package/dist/types/helpers/authenticator/form.d.ts +1 -1
  20. package/dist/types/helpers/authenticator/formFields/defaults.d.ts +2 -2
  21. package/dist/types/helpers/authenticator/formFields/formFields.d.ts +2 -2
  22. package/dist/types/helpers/authenticator/formFields/utils.d.ts +2 -2
  23. package/dist/types/helpers/authenticator/getRoute.d.ts +2 -2
  24. package/dist/types/helpers/authenticator/textUtil.d.ts +3 -3
  25. package/dist/types/helpers/authenticator/types.d.ts +4 -4
  26. package/dist/types/i18n/dictionaries/authenticator/de.d.ts +1 -1
  27. package/dist/types/i18n/dictionaries/authenticator/en.d.ts +1 -1
  28. package/dist/types/i18n/dictionaries/authenticator/es.d.ts +1 -1
  29. package/dist/types/i18n/dictionaries/authenticator/fr.d.ts +1 -1
  30. package/dist/types/i18n/dictionaries/authenticator/he.d.ts +1 -1
  31. package/dist/types/i18n/dictionaries/authenticator/id.d.ts +1 -1
  32. package/dist/types/i18n/dictionaries/authenticator/it.d.ts +1 -1
  33. package/dist/types/i18n/dictionaries/authenticator/ja.d.ts +1 -1
  34. package/dist/types/i18n/dictionaries/authenticator/kr.d.ts +1 -1
  35. package/dist/types/i18n/dictionaries/authenticator/nb.d.ts +1 -1
  36. package/dist/types/i18n/dictionaries/authenticator/nl.d.ts +1 -1
  37. package/dist/types/i18n/dictionaries/authenticator/pl.d.ts +1 -1
  38. package/dist/types/i18n/dictionaries/authenticator/pt.d.ts +1 -1
  39. package/dist/types/i18n/dictionaries/authenticator/ru.d.ts +1 -1
  40. package/dist/types/i18n/dictionaries/authenticator/sv.d.ts +1 -1
  41. package/dist/types/i18n/dictionaries/authenticator/th.d.ts +1 -1
  42. package/dist/types/i18n/dictionaries/authenticator/tr.d.ts +1 -1
  43. package/dist/types/i18n/dictionaries/authenticator/ua.d.ts +1 -1
  44. package/dist/types/i18n/dictionaries/authenticator/zh.d.ts +1 -1
  45. package/dist/types/machines/authenticator/actions.d.ts +2 -2
  46. package/dist/types/machines/authenticator/actors/forgotPassword.d.ts +1 -1
  47. package/dist/types/machines/authenticator/actors/signIn.d.ts +1 -1
  48. package/dist/types/machines/authenticator/actors/signOut.d.ts +1 -1
  49. package/dist/types/machines/authenticator/actors/signUp.d.ts +1 -1
  50. package/dist/types/machines/authenticator/actors/utils.d.ts +1 -1
  51. package/dist/types/machines/authenticator/actors/verifyUserAttributes.d.ts +1 -1
  52. package/dist/types/machines/authenticator/defaultServices.d.ts +2 -2
  53. package/dist/types/machines/authenticator/getAuthenticatorConfig.d.ts +1 -1
  54. package/dist/types/machines/authenticator/guards.d.ts +2 -2
  55. package/dist/types/machines/authenticator/index.d.ts +1 -1
  56. package/dist/types/machines/authenticator/types.d.ts +4 -4
  57. package/dist/types/machines/authenticator/utils.d.ts +3 -3
  58. package/dist/types/theme/components/accordion.d.ts +1 -1
  59. package/dist/types/theme/components/aiConverstion.d.ts +1 -1
  60. package/dist/types/theme/components/alert.d.ts +1 -1
  61. package/dist/types/theme/components/autocomplete.d.ts +1 -1
  62. package/dist/types/theme/components/avatar.d.ts +1 -1
  63. package/dist/types/theme/components/badge.d.ts +1 -1
  64. package/dist/types/theme/components/breadcrumbs.d.ts +1 -1
  65. package/dist/types/theme/components/buttonGroup.d.ts +1 -1
  66. package/dist/types/theme/components/card.d.ts +1 -1
  67. package/dist/types/theme/components/checkbox.d.ts +1 -1
  68. package/dist/types/theme/components/checkboxField.d.ts +1 -1
  69. package/dist/types/theme/components/collection.d.ts +1 -1
  70. package/dist/types/theme/components/divider.d.ts +1 -1
  71. package/dist/types/theme/components/dropZone.d.ts +1 -1
  72. package/dist/types/theme/components/field.d.ts +1 -1
  73. package/dist/types/theme/components/fieldGroup.d.ts +1 -1
  74. package/dist/types/theme/components/fieldset.d.ts +1 -1
  75. package/dist/types/theme/components/fileUploader.d.ts +1 -1
  76. package/dist/types/theme/components/heading.d.ts +1 -1
  77. package/dist/types/theme/components/highlightMatch.d.ts +1 -1
  78. package/dist/types/theme/components/index.d.ts +48 -48
  79. package/dist/types/theme/components/input.d.ts +1 -1
  80. package/dist/types/theme/components/loader.d.ts +1 -1
  81. package/dist/types/theme/components/menu.d.ts +1 -1
  82. package/dist/types/theme/components/message.d.ts +1 -1
  83. package/dist/types/theme/components/pagination.d.ts +1 -1
  84. package/dist/types/theme/components/placeholder.d.ts +1 -1
  85. package/dist/types/theme/components/radio.d.ts +1 -1
  86. package/dist/types/theme/components/rating.d.ts +1 -1
  87. package/dist/types/theme/components/scrollview.d.ts +1 -1
  88. package/dist/types/theme/components/searchField.d.ts +1 -1
  89. package/dist/types/theme/components/select.d.ts +1 -1
  90. package/dist/types/theme/components/selectField.d.ts +1 -1
  91. package/dist/types/theme/components/sliderField.d.ts +1 -1
  92. package/dist/types/theme/components/stepperField.d.ts +1 -1
  93. package/dist/types/theme/components/storageBrowser.d.ts +1 -1
  94. package/dist/types/theme/components/storageManager.d.ts +1 -1
  95. package/dist/types/theme/components/switchField.d.ts +1 -1
  96. package/dist/types/theme/components/table.d.ts +1 -1
  97. package/dist/types/theme/components/tabs.d.ts +1 -1
  98. package/dist/types/theme/components/text.d.ts +1 -1
  99. package/dist/types/theme/components/textField.d.ts +1 -1
  100. package/dist/types/theme/components/textarea.d.ts +1 -1
  101. package/dist/types/theme/components/textareaField.d.ts +1 -1
  102. package/dist/types/theme/components/toggleButton.d.ts +1 -1
  103. package/dist/types/theme/components/utils.d.ts +5 -9
  104. package/dist/types/theme/createTheme/createAnimationCSS.d.ts +2 -2
  105. package/dist/types/theme/createTheme/createColorPalette.d.ts +1 -1
  106. package/dist/types/theme/createTheme/createComponentCSS.d.ts +3 -3
  107. package/dist/types/theme/createTheme/createComponentClasses.d.ts +3 -3
  108. package/dist/types/theme/createTheme/createGlobalCSS.d.ts +1 -1
  109. package/dist/types/theme/createTheme/createTheme.d.ts +2 -2
  110. package/dist/types/theme/createTheme/defineComponentTheme.d.ts +5 -5
  111. package/dist/types/theme/createTheme/index.d.ts +4 -2
  112. package/dist/types/theme/createTheme/utils.d.ts +3 -3
  113. package/dist/types/theme/defaultDarkModeOverride.d.ts +2 -2
  114. package/dist/types/theme/defaultTheme.d.ts +1 -1
  115. package/dist/types/theme/index.d.ts +5 -3
  116. package/dist/types/theme/tokens/borderWidths.d.ts +1 -1
  117. package/dist/types/theme/tokens/colors.d.ts +1 -1
  118. package/dist/types/theme/tokens/components/accordion.d.ts +1 -1
  119. package/dist/types/theme/tokens/components/aiConversation.d.ts +1 -1
  120. package/dist/types/theme/tokens/components/alert.d.ts +1 -1
  121. package/dist/types/theme/tokens/components/authenticator.d.ts +1 -1
  122. package/dist/types/theme/tokens/components/autocomplete.d.ts +1 -1
  123. package/dist/types/theme/tokens/components/avatar.d.ts +1 -1
  124. package/dist/types/theme/tokens/components/badge.d.ts +1 -1
  125. package/dist/types/theme/tokens/components/breadcrumbs.d.ts +1 -1
  126. package/dist/types/theme/tokens/components/button.d.ts +1 -1
  127. package/dist/types/theme/tokens/components/card.d.ts +1 -1
  128. package/dist/types/theme/tokens/components/checkbox.d.ts +1 -1
  129. package/dist/types/theme/tokens/components/checkboxField.d.ts +1 -1
  130. package/dist/types/theme/tokens/components/collection.d.ts +1 -1
  131. package/dist/types/theme/tokens/components/copy.d.ts +1 -1
  132. package/dist/types/theme/tokens/components/dialCodeSelect.d.ts +1 -1
  133. package/dist/types/theme/tokens/components/divider.d.ts +1 -1
  134. package/dist/types/theme/tokens/components/dropZone.d.ts +1 -1
  135. package/dist/types/theme/tokens/components/field.d.ts +1 -1
  136. package/dist/types/theme/tokens/components/fieldControl.d.ts +1 -1
  137. package/dist/types/theme/tokens/components/fieldGroup.d.ts +1 -1
  138. package/dist/types/theme/tokens/components/fieldMessages.d.ts +1 -1
  139. package/dist/types/theme/tokens/components/fieldset.d.ts +1 -1
  140. package/dist/types/theme/tokens/components/fileuploader.d.ts +2 -2
  141. package/dist/types/theme/tokens/components/flex.d.ts +1 -1
  142. package/dist/types/theme/tokens/components/heading.d.ts +1 -1
  143. package/dist/types/theme/tokens/components/highlightMatch.d.ts +1 -1
  144. package/dist/types/theme/tokens/components/icon.d.ts +1 -1
  145. package/dist/types/theme/tokens/components/image.d.ts +1 -1
  146. package/dist/types/theme/tokens/components/inAppMessaging.d.ts +1 -1
  147. package/dist/types/theme/tokens/components/index.d.ts +57 -57
  148. package/dist/types/theme/tokens/components/input.d.ts +1 -1
  149. package/dist/types/theme/tokens/components/link.d.ts +1 -1
  150. package/dist/types/theme/tokens/components/liveness.d.ts +1 -1
  151. package/dist/types/theme/tokens/components/loader.d.ts +1 -1
  152. package/dist/types/theme/tokens/components/menu.d.ts +1 -1
  153. package/dist/types/theme/tokens/components/message.d.ts +1 -1
  154. package/dist/types/theme/tokens/components/pagination.d.ts +1 -1
  155. package/dist/types/theme/tokens/components/passwordField.d.ts +1 -1
  156. package/dist/types/theme/tokens/components/phoneNumberField.d.ts +1 -1
  157. package/dist/types/theme/tokens/components/placeholder.d.ts +1 -1
  158. package/dist/types/theme/tokens/components/radio.d.ts +1 -1
  159. package/dist/types/theme/tokens/components/radioGroup.d.ts +1 -1
  160. package/dist/types/theme/tokens/components/rating.d.ts +1 -1
  161. package/dist/types/theme/tokens/components/searchField.d.ts +1 -1
  162. package/dist/types/theme/tokens/components/select.d.ts +1 -1
  163. package/dist/types/theme/tokens/components/selectField.d.ts +1 -1
  164. package/dist/types/theme/tokens/components/sliderField.d.ts +1 -1
  165. package/dist/types/theme/tokens/components/stepperField.d.ts +1 -1
  166. package/dist/types/theme/tokens/components/storagemanager.d.ts +2 -2
  167. package/dist/types/theme/tokens/components/switchField.d.ts +1 -1
  168. package/dist/types/theme/tokens/components/table.d.ts +1 -1
  169. package/dist/types/theme/tokens/components/tabs.d.ts +1 -1
  170. package/dist/types/theme/tokens/components/text.d.ts +1 -1
  171. package/dist/types/theme/tokens/components/textAreaField.d.ts +1 -1
  172. package/dist/types/theme/tokens/components/textField.d.ts +1 -1
  173. package/dist/types/theme/tokens/components/toggleButton.d.ts +1 -1
  174. package/dist/types/theme/tokens/components/toggleButtonGroup.d.ts +1 -1
  175. package/dist/types/theme/tokens/fontSizes.d.ts +1 -1
  176. package/dist/types/theme/tokens/fontWeights.d.ts +1 -1
  177. package/dist/types/theme/tokens/fonts.d.ts +1 -1
  178. package/dist/types/theme/tokens/index.d.ts +16 -16
  179. package/dist/types/theme/tokens/lineHeights.d.ts +1 -1
  180. package/dist/types/theme/tokens/opacities.d.ts +1 -1
  181. package/dist/types/theme/tokens/outlineOffsets.d.ts +1 -1
  182. package/dist/types/theme/tokens/outlineWidths.d.ts +1 -1
  183. package/dist/types/theme/tokens/radii.d.ts +1 -1
  184. package/dist/types/theme/tokens/shadows.d.ts +1 -1
  185. package/dist/types/theme/tokens/space.d.ts +1 -1
  186. package/dist/types/theme/tokens/time.d.ts +1 -1
  187. package/dist/types/theme/tokens/transforms.d.ts +1 -1
  188. package/dist/types/theme/tokens/types/designToken.d.ts +1 -1
  189. package/dist/types/theme/tokens/types/typography.d.ts +1 -1
  190. package/dist/types/theme/types.d.ts +7 -6
  191. package/dist/types/types/authenticator/attributes.d.ts +1 -1
  192. package/dist/types/types/authenticator/form.d.ts +2 -2
  193. package/dist/types/types/authenticator/validator.d.ts +2 -2
  194. package/dist/types/types/index.d.ts +1 -1
  195. package/dist/types/types/primitives/index.d.ts +2 -1
  196. package/dist/types/utils/index.d.ts +4 -2
  197. package/dist/types/utils/setUserAgent/constants.d.ts +1 -1
  198. package/dist/types/utils/setUserAgent/index.d.ts +2 -1
  199. package/dist/types/utils/utils.d.ts +1 -1
  200. package/dist/types/validators/index.d.ts +1 -1
  201. 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
- - [Theme](src/theme)
6
- - [I18n](src/i18n)
7
- - [State machines](src/machines)
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, deDict, enDict, esDict, frDict, idDict, itDict, jaDict, krDict, nbDict, nlDict, plDict, ptDict, zhDict, svDict, trDict, ruDict, heDict, uaDict, thDict } from './dictionaries/index.mjs';
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 { fetchUserAttributes, resetPassword, confirmSignIn, signInWithRedirect } from 'aws-amplify/auth';
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 { autoSignIn, fetchUserAttributes, signInWithRedirect } from 'aws-amplify/auth';
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 { sendUserAttributeVerificationCode, confirmUserAttribute } from 'aws-amplify/auth';
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 { getCurrentUser, signIn, signUp, confirmSignIn, confirmSignUp, confirmResetPassword, resetPassword, resendSignUpCode } from 'aws-amplify/auth';
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 { createMachine, forwardTo, assign, spawn, actions } from 'xstate';
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,6 +1,4 @@
1
1
  const OPTIONS = {
2
- openingCharacter: '{',
3
- closingCharacter: '}',
4
2
  separator: '.',
5
3
  };
6
4
  const REFERENCE_REGEX = /\{([^}]+)\}/g;
@@ -1,5 +1,5 @@
1
1
  import { defaultTheme } from '../defaultTheme.mjs';
2
- import { deepExtend, setupTokens, setupToken, flattenProperties } from './utils.mjs';
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 { isObject, has, isString } from '../../utils/utils.mjs';
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 { Category, AiAction, AuthAction, StorageAction, InAppMessagingAction, GeoAction } from '@aws-amplify/core/internals/utils';
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
@@ -506,8 +506,6 @@ function humanFileSize(bytes, si = false, dp = 1) {
506
506
  }
507
507
 
508
508
  const OPTIONS = {
509
- openingCharacter: '{',
510
- closingCharacter: '}',
511
509
  separator: '.',
512
510
  };
513
511
  const REFERENCE_REGEX = /\{([^}]+)\}/g;
@@ -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.
@@ -1,4 +1,4 @@
1
- import { GetRoute } from './getRoute';
1
+ import type { GetRoute } from './getRoute';
2
2
  /**
3
3
  * @internal Not to be used in production
4
4
  * @description Debugging tool for logging `state` and `actorState`
@@ -1,4 +1,4 @@
1
- import { AuthInterpreter, AuthMachineHubHandler } from './types';
1
+ import type { AuthInterpreter, AuthMachineHubHandler } from './types';
2
2
  /**
3
3
  * Handles Amplify JS Auth hub events, by forwarding hub events as appropriate
4
4
  * xstate events.
@@ -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,4 +1,4 @@
1
- import { CommonFields, FormFields, SignUpAttribute } from '../../types';
1
+ import type { CommonFields, FormFields, SignUpAttribute } from '../../types';
2
2
  export declare const getFormDataFromEvent: (event: Event) => {
3
3
  [k: string]: FormDataEntryValue;
4
4
  };
@@ -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, SignInContext, AuthContext } from '../types';
1
+ import type { AuthEvent, SignInContext, AuthContext } from '../types';
2
2
  export interface SignInMachineOptions {
3
3
  services?: AuthContext['services'];
4
4
  }
@@ -1,4 +1,4 @@
1
- import { AuthEvent, SignOutContext } from '../types';
1
+ import type { AuthEvent, SignOutContext } from '../types';
2
2
  export declare const signOutActor: () => import("xstate").StateMachine<SignOutContext, any, AuthEvent, {
3
3
  value: any;
4
4
  context: SignOutContext;
@@ -1,4 +1,4 @@
1
- import { AuthContext, AuthEvent, SignUpContext } from '../types';
1
+ import type { AuthContext, AuthEvent, SignUpContext } from '../types';
2
2
  export type SignUpMachineOptions = {
3
3
  services?: AuthContext['services'];
4
4
  };
@@ -1,4 +1,4 @@
1
- import { Step } from '../types';
1
+ import type { Step } from '../types';
2
2
  export declare const getFederatedSignInState: (target: 'signIn' | 'signUp') => {
3
3
  entry: string[];
4
4
  invoke: {
@@ -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,4 +1,4 @@
1
- import { AuthEvent, AuthContext } from './types';
1
+ import type { AuthEvent, AuthContext } from './types';
2
2
  export type AuthenticatorMachineOptions = AuthContext['config'] & {
3
3
  services?: AuthContext['services'];
4
4
  };
@@ -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,3 +1,3 @@
1
- import { ComponentStyles } from './utils';
1
+ import type { ComponentStyles } from './utils';
2
2
  export interface ButtonGroupTheme extends ComponentStyles {
3
3
  }
@@ -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,3 +1,3 @@
1
- import { ComponentStyles } from './utils';
1
+ import type { ComponentStyles } from './utils';
2
2
  export interface CheckboxFieldTheme extends ComponentStyles {
3
3
  }
@@ -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>;