@aws-amplify/ui 5.8.1 → 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.
Files changed (343) hide show
  1. package/dist/esm/helpers/accountSettings/utils.mjs +33 -1
  2. package/dist/esm/helpers/accountSettings/validator.mjs +120 -1
  3. package/dist/esm/helpers/authenticator/actor.mjs +20 -1
  4. package/dist/esm/helpers/authenticator/constants.mjs +144 -1
  5. package/dist/esm/helpers/authenticator/defaultAuthHubHandler.mjs +52 -0
  6. package/dist/esm/helpers/authenticator/facade.mjs +137 -1
  7. package/dist/esm/helpers/authenticator/form.mjs +43 -1
  8. package/dist/esm/helpers/authenticator/formFields/defaults.mjs +132 -1
  9. package/dist/esm/helpers/authenticator/formFields/formFields.mjs +62 -1
  10. package/dist/esm/helpers/authenticator/formFields/utils.mjs +35 -0
  11. package/dist/esm/helpers/authenticator/getRoute.mjs +47 -0
  12. package/dist/esm/helpers/authenticator/textUtil.mjs +112 -1
  13. package/dist/esm/helpers/authenticator/utils.mjs +38 -1
  14. package/dist/esm/helpers/utils.mjs +5 -1
  15. package/dist/esm/i18n/country-dial-codes.mjs +210 -1
  16. package/dist/esm/i18n/dictionaries/authenticator/de.mjs +87 -1
  17. package/dist/esm/i18n/dictionaries/authenticator/defaultTexts.mjs +83 -1
  18. package/dist/esm/i18n/dictionaries/authenticator/en.mjs +74 -1
  19. package/dist/esm/i18n/dictionaries/authenticator/es.mjs +83 -1
  20. package/dist/esm/i18n/dictionaries/authenticator/fr.mjs +92 -1
  21. package/dist/esm/i18n/dictionaries/authenticator/he.mjs +54 -1
  22. package/dist/esm/i18n/dictionaries/authenticator/id.mjs +96 -1
  23. package/dist/esm/i18n/dictionaries/authenticator/it.mjs +82 -1
  24. package/dist/esm/i18n/dictionaries/authenticator/ja.mjs +86 -1
  25. package/dist/esm/i18n/dictionaries/authenticator/kr.mjs +71 -1
  26. package/dist/esm/i18n/dictionaries/authenticator/nb.mjs +95 -1
  27. package/dist/esm/i18n/dictionaries/authenticator/nl.mjs +67 -1
  28. package/dist/esm/i18n/dictionaries/authenticator/pl.mjs +71 -1
  29. package/dist/esm/i18n/dictionaries/authenticator/pt.mjs +61 -1
  30. package/dist/esm/i18n/dictionaries/authenticator/ru.mjs +61 -1
  31. package/dist/esm/i18n/dictionaries/authenticator/sv.mjs +82 -1
  32. package/dist/esm/i18n/dictionaries/authenticator/tr.mjs +76 -1
  33. package/dist/esm/i18n/dictionaries/authenticator/ua.mjs +84 -1
  34. package/dist/esm/i18n/dictionaries/authenticator/zh.mjs +74 -1
  35. package/dist/esm/i18n/dictionaries/index.mjs +47 -1
  36. package/dist/esm/i18n/translations.mjs +67 -1
  37. package/dist/esm/index.mjs +28 -1
  38. package/dist/esm/machines/authenticator/actions.mjs +188 -1
  39. package/dist/esm/machines/authenticator/actors/forgotPassword.mjs +184 -0
  40. package/dist/esm/machines/authenticator/actors/signIn.mjs +328 -1
  41. package/dist/esm/machines/authenticator/actors/signOut.mjs +28 -1
  42. package/dist/esm/machines/authenticator/actors/signUp.mjs +295 -0
  43. package/dist/esm/machines/authenticator/actors/verifyUserAttributes.mjs +106 -0
  44. package/dist/esm/machines/authenticator/defaultServices.mjs +102 -1
  45. package/dist/esm/machines/authenticator/guards.mjs +70 -0
  46. package/dist/esm/machines/authenticator/index.mjs +368 -1
  47. package/dist/esm/machines/authenticator/utils.mjs +71 -0
  48. package/dist/esm/theme/breakpoints.mjs +14 -1
  49. package/dist/esm/theme/createTheme.mjs +156 -1
  50. package/dist/esm/theme/defaultDarkModeOverride.mjs +128 -1
  51. package/dist/esm/theme/defaultTheme.mjs +10 -1
  52. package/dist/esm/theme/tokens/borderWidths.mjs +7 -1
  53. package/dist/esm/theme/tokens/colors.mjs +166 -1
  54. package/dist/esm/theme/tokens/components/accordion.mjs +47 -0
  55. package/dist/esm/theme/tokens/components/alert.mjs +35 -1
  56. package/dist/esm/theme/tokens/components/authenticator.mjs +39 -1
  57. package/dist/esm/theme/tokens/components/autocomplete.mjs +42 -1
  58. package/dist/esm/theme/tokens/components/badge.mjs +44 -1
  59. package/dist/esm/theme/tokens/components/breadcrumbs.mjs +34 -1
  60. package/dist/esm/theme/tokens/components/button.mjs +685 -1
  61. package/dist/esm/theme/tokens/components/card.mjs +27 -1
  62. package/dist/esm/theme/tokens/components/checkbox.mjs +87 -1
  63. package/dist/esm/theme/tokens/components/checkboxField.mjs +8 -1
  64. package/dist/esm/theme/tokens/components/collection.mjs +72 -1
  65. package/dist/esm/theme/tokens/components/copy.mjs +18 -1
  66. package/dist/esm/theme/tokens/components/dialCodeSelect.mjs +7 -1
  67. package/dist/esm/theme/tokens/components/divider.mjs +22 -1
  68. package/dist/esm/theme/tokens/components/dropZone.mjs +46 -1
  69. package/dist/esm/theme/tokens/components/field.mjs +20 -1
  70. package/dist/esm/theme/tokens/components/fieldControl.mjs +131 -1
  71. package/dist/esm/theme/tokens/components/fieldGroup.mjs +11 -1
  72. package/dist/esm/theme/tokens/components/fieldMessages.mjs +13 -1
  73. package/dist/esm/theme/tokens/components/fieldset.mjs +40 -1
  74. package/dist/esm/theme/tokens/components/flex.mjs +9 -1
  75. package/dist/esm/theme/tokens/components/heading.mjs +30 -1
  76. package/dist/esm/theme/tokens/components/highlightMatch.mjs +7 -1
  77. package/dist/esm/theme/tokens/components/icon.mjs +6 -1
  78. package/dist/esm/theme/tokens/components/image.mjs +8 -1
  79. package/dist/esm/theme/tokens/components/inAppMessaging.mjs +23 -1
  80. package/dist/esm/theme/tokens/components/index.mjs +111 -1
  81. package/dist/esm/theme/tokens/components/input.mjs +12 -1
  82. package/dist/esm/theme/tokens/components/link.mjs +9 -1
  83. package/dist/esm/theme/tokens/components/liveness.mjs +7 -1
  84. package/dist/esm/theme/tokens/components/loader.mjs +42 -1
  85. package/dist/esm/theme/tokens/components/menu.mjs +27 -1
  86. package/dist/esm/theme/tokens/components/message.mjs +102 -1
  87. package/dist/esm/theme/tokens/components/pagination.mjs +40 -1
  88. package/dist/esm/theme/tokens/components/passwordField.mjs +38 -1
  89. package/dist/esm/theme/tokens/components/phoneNumberField.mjs +10 -1
  90. package/dist/esm/theme/tokens/components/placeholder.mjs +18 -1
  91. package/dist/esm/theme/tokens/components/radio.mjs +67 -1
  92. package/dist/esm/theme/tokens/components/radioGroup.mjs +19 -1
  93. package/dist/esm/theme/tokens/components/rating.mjs +9 -1
  94. package/dist/esm/theme/tokens/components/searchField.mjs +39 -1
  95. package/dist/esm/theme/tokens/components/select.mjs +63 -1
  96. package/dist/esm/theme/tokens/components/selectField.mjs +16 -1
  97. package/dist/esm/theme/tokens/components/sliderField.mjs +70 -1
  98. package/dist/esm/theme/tokens/components/stepperField.mjs +33 -1
  99. package/dist/esm/theme/tokens/components/storagemanager.mjs +97 -1
  100. package/dist/esm/theme/tokens/components/switchField.mjs +61 -1
  101. package/dist/esm/theme/tokens/components/table.mjs +105 -1
  102. package/dist/esm/theme/tokens/components/tabs.mjs +59 -1
  103. package/dist/esm/theme/tokens/components/text.mjs +28 -1
  104. package/dist/esm/theme/tokens/components/textAreaField.mjs +11 -1
  105. package/dist/esm/theme/tokens/components/textField.mjs +12 -1
  106. package/dist/esm/theme/tokens/components/toggleButton.mjs +96 -1
  107. package/dist/esm/theme/tokens/components/toggleButtonGroup.mjs +7 -1
  108. package/dist/esm/theme/tokens/fontSizes.mjs +14 -1
  109. package/dist/esm/theme/tokens/fontWeights.mjs +13 -1
  110. package/dist/esm/theme/tokens/fonts.mjs +19 -1
  111. package/dist/esm/theme/tokens/index.mjs +65 -1
  112. package/dist/esm/theme/tokens/lineHeights.mjs +7 -1
  113. package/dist/esm/theme/tokens/opacities.mjs +15 -1
  114. package/dist/esm/theme/tokens/outlineOffsets.mjs +7 -1
  115. package/dist/esm/theme/tokens/outlineWidths.mjs +7 -1
  116. package/dist/esm/theme/tokens/radii.mjs +11 -1
  117. package/dist/esm/theme/tokens/shadows.mjs +28 -1
  118. package/dist/esm/theme/tokens/space.mjs +29 -1
  119. package/dist/esm/theme/tokens/time.mjs +7 -1
  120. package/dist/esm/theme/tokens/transforms.mjs +10 -1
  121. package/dist/esm/theme/utils.mjs +81 -1
  122. package/dist/esm/types/authenticator/attributes.mjs +41 -1
  123. package/dist/esm/types/authenticator/user.mjs +18 -1
  124. package/dist/esm/types/authenticator/utils.mjs +5 -1
  125. package/dist/esm/types/primitives/componentClassName.mjs +164 -1
  126. package/dist/esm/utils/classNames.mjs +39 -0
  127. package/dist/esm/utils/setUserAgent/constants.mjs +43 -0
  128. package/dist/esm/utils/setUserAgent/setUserAgent.mjs +65 -0
  129. package/dist/esm/utils/utils.mjs +227 -0
  130. package/dist/esm/validators/index.mjs +19 -1
  131. package/dist/index.js +8396 -1
  132. package/dist/styles/StorageManager.css +138 -0
  133. package/dist/styles/StorageManager.layer.css +140 -0
  134. package/dist/styles/_fieldControl.css +0 -0
  135. package/dist/styles/_fieldControl.layer.css +3 -0
  136. package/dist/styles/accordion.css +64 -0
  137. package/dist/styles/accordion.layer.css +66 -0
  138. package/dist/styles/alert.css +44 -0
  139. package/dist/styles/alert.layer.css +46 -0
  140. package/dist/styles/authenticator.css +72 -0
  141. package/dist/styles/authenticator.layer.css +74 -0
  142. package/dist/styles/autocomplete.css +48 -0
  143. package/dist/styles/autocomplete.layer.css +50 -0
  144. package/dist/styles/badge.css +35 -0
  145. package/dist/styles/badge.layer.css +37 -0
  146. package/dist/styles/base.css +1491 -0
  147. package/dist/styles/base.layer.css +1493 -0
  148. package/dist/styles/breadcrumbs.css +40 -0
  149. package/dist/styles/breadcrumbs.layer.css +42 -0
  150. package/dist/styles/button.css +1122 -0
  151. package/dist/styles/button.layer.css +1124 -0
  152. package/dist/styles/card.css +26 -0
  153. package/dist/styles/card.layer.css +28 -0
  154. package/dist/styles/checkbox.css +95 -0
  155. package/dist/styles/checkbox.layer.css +97 -0
  156. package/dist/styles/checkboxField.css +6 -0
  157. package/dist/styles/checkboxField.layer.css +8 -0
  158. package/dist/styles/collection.css +70 -0
  159. package/dist/styles/collection.layer.css +72 -0
  160. package/dist/styles/copy.css +27 -0
  161. package/dist/styles/copy.layer.css +29 -0
  162. package/dist/styles/dialCodeSelect.css +3 -0
  163. package/dist/styles/dialCodeSelect.layer.css +5 -0
  164. package/dist/styles/divider.css +47 -0
  165. package/dist/styles/divider.layer.css +49 -0
  166. package/dist/styles/dropZone.css +45 -0
  167. package/dist/styles/dropZone.layer.css +47 -0
  168. package/dist/styles/field.css +17 -0
  169. package/dist/styles/field.layer.css +19 -0
  170. package/dist/styles/fieldGroup.css +130 -0
  171. package/dist/styles/fieldGroup.layer.css +132 -0
  172. package/dist/styles/fieldMessages.css +10 -0
  173. package/dist/styles/fieldMessages.layer.css +12 -0
  174. package/dist/styles/fieldModifiers.css +15 -0
  175. package/dist/styles/fieldModifiers.layer.css +17 -0
  176. package/dist/styles/fieldset.css +37 -0
  177. package/dist/styles/fieldset.layer.css +39 -0
  178. package/dist/styles/flex.css +8 -0
  179. package/dist/styles/flex.layer.css +10 -0
  180. package/dist/styles/grid.css +3 -0
  181. package/dist/styles/grid.layer.css +5 -0
  182. package/dist/styles/heading.css +40 -0
  183. package/dist/styles/heading.layer.css +42 -0
  184. package/dist/styles/highlightMatch.css +3 -0
  185. package/dist/styles/highlightMatch.layer.css +5 -0
  186. package/dist/styles/icon.css +14 -0
  187. package/dist/styles/icon.layer.css +16 -0
  188. package/dist/styles/image.css +9 -0
  189. package/dist/styles/image.layer.css +11 -0
  190. package/dist/styles/inAppMessaging.css +179 -0
  191. package/dist/styles/inAppMessaging.layer.css +181 -0
  192. package/dist/styles/input.css +83 -0
  193. package/dist/styles/input.layer.css +85 -0
  194. package/dist/styles/link.css +26 -0
  195. package/dist/styles/link.layer.css +28 -0
  196. package/dist/styles/liveness.css +374 -0
  197. package/dist/styles/liveness.layer.css +376 -0
  198. package/dist/styles/loader.css +108 -0
  199. package/dist/styles/loader.layer.css +110 -0
  200. package/dist/styles/menu.css +54 -0
  201. package/dist/styles/menu.layer.css +56 -0
  202. package/dist/styles/message.css +111 -0
  203. package/dist/styles/message.layer.css +113 -0
  204. package/dist/styles/pagination.css +41 -0
  205. package/dist/styles/pagination.layer.css +43 -0
  206. package/dist/styles/passwordField.css +49 -0
  207. package/dist/styles/passwordField.layer.css +51 -0
  208. package/dist/styles/phoneNumberField.css +30 -0
  209. package/dist/styles/phoneNumberField.layer.css +32 -0
  210. package/dist/styles/placeholder.css +31 -0
  211. package/dist/styles/placeholder.layer.css +33 -0
  212. package/dist/styles/radio.css +82 -0
  213. package/dist/styles/radio.layer.css +84 -0
  214. package/dist/styles/radioGroupField.css +25 -0
  215. package/dist/styles/radioGroupField.layer.css +27 -0
  216. package/dist/styles/radiogroup.css +5 -0
  217. package/dist/styles/radiogroup.layer.css +7 -0
  218. package/dist/styles/rating.css +33 -0
  219. package/dist/styles/rating.layer.css +35 -0
  220. package/dist/styles/reset.css +76 -0
  221. package/dist/styles/reset.layer.css +78 -0
  222. package/dist/styles/scrollView.css +4 -0
  223. package/dist/styles/scrollView.layer.css +6 -0
  224. package/dist/styles/searchField.css +29 -0
  225. package/dist/styles/searchField.layer.css +31 -0
  226. package/dist/styles/select.css +128 -0
  227. package/dist/styles/select.layer.css +130 -0
  228. package/dist/styles/selectField.css +18 -0
  229. package/dist/styles/selectField.layer.css +20 -0
  230. package/dist/styles/sliderField.css +143 -0
  231. package/dist/styles/sliderField.layer.css +145 -0
  232. package/dist/styles/stepperField.css +77 -0
  233. package/dist/styles/stepperField.layer.css +79 -0
  234. package/dist/styles/switchField.css +76 -0
  235. package/dist/styles/switchField.layer.css +78 -0
  236. package/dist/styles/table.css +146 -0
  237. package/dist/styles/table.layer.css +148 -0
  238. package/dist/styles/tabs.css +87 -0
  239. package/dist/styles/tabs.layer.css +89 -0
  240. package/dist/styles/text.css +40 -0
  241. package/dist/styles/text.layer.css +42 -0
  242. package/dist/styles/textArea.css +71 -0
  243. package/dist/styles/textArea.layer.css +73 -0
  244. package/dist/styles/textAreaField.css +12 -0
  245. package/dist/styles/textAreaField.layer.css +14 -0
  246. package/dist/styles/textField.css +14 -0
  247. package/dist/styles/textField.layer.css +16 -0
  248. package/dist/styles/toggleButton.css +280 -0
  249. package/dist/styles/toggleButton.layer.css +282 -0
  250. package/dist/styles/toggleButtonGroup.css +31 -0
  251. package/dist/styles/toggleButtonGroup.layer.css +33 -0
  252. package/dist/styles/visuallyHidden.css +12 -0
  253. package/dist/styles/visuallyHidden.layer.css +14 -0
  254. package/dist/styles.css +298 -684
  255. package/dist/styles.layer.css +6115 -0
  256. package/dist/theme.css +93 -156
  257. package/dist/types/helpers/accountSettings/utils.d.ts +1 -3
  258. package/dist/types/helpers/authenticator/actor.d.ts +1 -1
  259. package/dist/types/helpers/authenticator/constants.d.ts +5 -0
  260. package/dist/types/helpers/authenticator/defaultAuthHubHandler.d.ts +15 -0
  261. package/dist/types/helpers/authenticator/facade.d.ts +35 -6
  262. package/dist/types/helpers/authenticator/formFields/defaults.d.ts +3 -1
  263. package/dist/types/helpers/authenticator/formFields/formFields.d.ts +2 -1
  264. package/dist/types/helpers/authenticator/formFields/index.d.ts +1 -1
  265. package/dist/types/helpers/authenticator/formFields/{util.d.ts → utils.d.ts} +2 -0
  266. package/dist/types/helpers/authenticator/getRoute.d.ts +2 -0
  267. package/dist/types/helpers/authenticator/index.d.ts +2 -1
  268. package/dist/types/helpers/authenticator/textUtil.d.ts +8 -7
  269. package/dist/types/{types/authenticator/stateMachine/authMachine.d.ts → helpers/authenticator/types.d.ts} +5 -5
  270. package/dist/types/helpers/authenticator/utils.d.ts +0 -25
  271. package/dist/types/helpers/index.d.ts +0 -1
  272. package/dist/types/helpers/utils.d.ts +2 -2
  273. package/dist/types/i18n/translations.d.ts +2 -3
  274. package/dist/types/machines/authenticator/actions.d.ts +4 -62
  275. package/dist/types/machines/authenticator/actors/{resetPassword.d.ts → forgotPassword.d.ts} +3 -3
  276. package/dist/types/machines/authenticator/actors/index.d.ts +3 -1
  277. package/dist/types/machines/authenticator/actors/signIn.d.ts +3 -3
  278. package/dist/types/machines/authenticator/actors/signOut.d.ts +2 -2
  279. package/dist/types/machines/authenticator/{signUp.d.ts → actors/signUp.d.ts} +3 -3
  280. package/dist/types/machines/authenticator/actors/verifyUserAttributes.d.ts +5 -0
  281. package/dist/types/machines/authenticator/defaultServices.d.ts +208 -28
  282. package/dist/types/machines/authenticator/getAuthenticatorConfig.d.ts +14 -0
  283. package/dist/types/machines/authenticator/guards.d.ts +4 -0
  284. package/dist/types/machines/authenticator/index.d.ts +4 -2
  285. package/dist/types/machines/authenticator/types.d.ts +125 -0
  286. package/dist/types/machines/authenticator/utils.d.ts +7 -0
  287. package/dist/types/machines/index.d.ts +1 -0
  288. package/dist/types/theme/tokens/borderWidths.d.ts +2 -2
  289. package/dist/types/theme/tokens/colors.d.ts +7 -9
  290. package/dist/types/theme/tokens/components/accordion.d.ts +12 -0
  291. package/dist/types/theme/tokens/components/index.d.ts +2 -4
  292. package/dist/types/theme/tokens/components/radioGroup.d.ts +1 -1
  293. package/dist/types/theme/tokens/components/storagemanager.d.ts +18 -3
  294. package/dist/types/theme/tokens/components/tabs.d.ts +4 -3
  295. package/dist/types/theme/tokens/fontSizes.d.ts +2 -2
  296. package/dist/types/theme/tokens/fontWeights.d.ts +2 -2
  297. package/dist/types/theme/tokens/fonts.d.ts +2 -2
  298. package/dist/types/theme/tokens/lineHeights.d.ts +2 -2
  299. package/dist/types/theme/tokens/opacities.d.ts +2 -2
  300. package/dist/types/theme/tokens/outlineOffsets.d.ts +2 -2
  301. package/dist/types/theme/tokens/outlineWidths.d.ts +2 -2
  302. package/dist/types/theme/tokens/radii.d.ts +2 -2
  303. package/dist/types/theme/tokens/shadows.d.ts +2 -2
  304. package/dist/types/theme/tokens/space.d.ts +2 -2
  305. package/dist/types/theme/tokens/time.d.ts +2 -2
  306. package/dist/types/theme/tokens/types/designToken.d.ts +12 -6
  307. package/dist/types/theme/types.d.ts +5 -1
  308. package/dist/types/types/authenticator/attributes.d.ts +10 -4
  309. package/dist/types/types/authenticator/form.d.ts +7 -6
  310. package/dist/types/types/authenticator/index.d.ts +0 -1
  311. package/dist/types/types/authenticator/user.d.ts +3 -29
  312. package/dist/types/types/authenticator/validator.d.ts +2 -2
  313. package/dist/types/types/displayText.d.ts +84 -0
  314. package/dist/types/types/index.d.ts +1 -0
  315. package/dist/types/types/primitives/componentClassName.d.ts +162 -180
  316. package/dist/types/types/util.d.ts +0 -5
  317. package/dist/types/utils/classNames.d.ts +4 -0
  318. package/dist/types/utils/index.d.ts +3 -135
  319. package/dist/types/utils/setUserAgent/constants.d.ts +7 -0
  320. package/dist/types/utils/setUserAgent/index.d.ts +1 -0
  321. package/dist/types/utils/setUserAgent/setUserAgent.d.ts +19 -0
  322. package/dist/types/utils/utils.d.ts +147 -0
  323. package/dist/types/validators/index.d.ts +2 -2
  324. package/package.json +5 -19
  325. package/dist/esm/helpers/authenticator/context.mjs +0 -1
  326. package/dist/esm/helpers/authenticator/formFields/util.mjs +0 -1
  327. package/dist/esm/helpers/storage/fileUploader/utils/uploader.mjs +0 -1
  328. package/dist/esm/machines/authenticator/actors/resetPassword.mjs +0 -1
  329. package/dist/esm/machines/authenticator/signUp.mjs +0 -1
  330. package/dist/esm/theme/tokens/components/expander.mjs +0 -1
  331. package/dist/esm/theme/tokens/components/fileUploader.mjs +0 -1
  332. package/dist/esm/utils/index.mjs +0 -1
  333. package/dist/types/helpers/authenticator/context.d.ts +0 -13
  334. package/dist/types/helpers/storage/fileUploader/index.d.ts +0 -1
  335. package/dist/types/helpers/storage/fileUploader/utils/index.d.ts +0 -1
  336. package/dist/types/helpers/storage/fileUploader/utils/uploader.d.ts +0 -28
  337. package/dist/types/helpers/storage/index.d.ts +0 -1
  338. package/dist/types/theme/tokens/components/expander.d.ts +0 -22
  339. package/dist/types/theme/tokens/components/fileUploader.d.ts +0 -23
  340. package/dist/types/types/authenticator/stateMachine/context.d.ts +0 -109
  341. package/dist/types/types/authenticator/stateMachine/event.d.ts +0 -17
  342. package/dist/types/types/authenticator/stateMachine/index.d.ts +0 -4
  343. package/dist/types/types/authenticator/stateMachine/state.d.ts +0 -10
@@ -1,5 +1,5 @@
1
1
  import { PasswordSettings } from '.';
2
- import { AuthFormData } from './form';
2
+ import { AuthFormData, AuthTouchData } from './form';
3
3
  /**
4
4
  * Maps each input to its validation error, if any
5
5
  */
@@ -12,4 +12,4 @@ export type SignInResult = string;
12
12
  /**
13
13
  * Validates the given formData. This can be synchronous or asynchronous.
14
14
  */
15
- export type Validator = (formData: AuthFormData, touchData?: AuthFormData, passwordSettings?: PasswordSettings) => ValidatorResult | Promise<ValidatorResult>;
15
+ export type Validator = (formData: AuthFormData, touchData?: AuthTouchData, passwordSettings?: PasswordSettings) => ValidatorResult | Promise<ValidatorResult>;
@@ -0,0 +1,84 @@
1
+ type FieldLabelSuffix = 'FieldLabel';
2
+ type FieldPlaceholderSuffix = 'FieldPlaceholder';
3
+ /**
4
+ * For field component display text keys, customizable text properties use
5
+ * either the label or placeholder suffixes respectively, example:
6
+ * ```ts
7
+ * type UsernameFieldPlaceholderKey = `username${FieldSuffix}`;
8
+ *
9
+ * const usernameFieldPlaceholderKey: UsernameFieldPlaceholderKey =
10
+ * 'usernameFieldPlaceholder';
11
+ * ```
12
+ */
13
+ type FieldSuffix = FieldLabelSuffix | FieldPlaceholderSuffix;
14
+ /**
15
+ * Non-field display text keys (button titles, descriptive text, etc) are suffixed
16
+ * with `'Text'`, example:
17
+ * ```ts
18
+ * type SubmitButtonTextKey = `submitButton${TextSuffix}`;
19
+ *
20
+ * const submitButtonTextKey: SubmitButtonTextKey = 'submitButtonText';
21
+ * ```
22
+ */
23
+ type TextSuffix = 'Text';
24
+ /**
25
+ * Dynamic display text function keys are prefixed with `'get'`, example:
26
+ * ```ts
27
+ * type GetCopyButtonTextKey = `${GetPrefix}CopyButton${TextSuffix}`;
28
+ *
29
+ * const getCopyButtonTextKey: GetCopyButtonTextKey = 'getCopyButtonText';
30
+ * ```
31
+ */
32
+ type GetPrefix = 'get';
33
+ /**
34
+ * `DisplayTextBody` is intentionally unrestricted, but should describe
35
+ * the context of its usage, for example the component name that renders
36
+ * the text:
37
+ * ```ts
38
+ * type GetCopyButtonTextKey = `${GetPrefix}${DisplayTextBody}${TextSuffix}`;
39
+ *
40
+ * const getCopyButtonTextKey: GetCopyButtonTextKey = 'getCopyButtonText';
41
+ * ```
42
+ *
43
+ * An additional caveat of `DisplayTextBody` is that it functions as
44
+ * the prefix for generic display text as there is no additonal prefix
45
+ * required, example:
46
+ * ```ts
47
+ * type SubmitButtonTextKey = `${DisplayTextBody}${TextSuffix}`;
48
+ *
49
+ * const submitButtonText: SubmitButtonTextKey = 'submitButtonText';
50
+ * ```
51
+ */
52
+ type DisplayTextBody = string;
53
+ type DisplayTextSuffix = FieldSuffix | TextSuffix;
54
+ type GetDisplayTextKey = `${GetPrefix}${DisplayTextBody}${DisplayTextSuffix}`;
55
+ type DisplayTextKey = `${DisplayTextBody}${DisplayTextSuffix}`;
56
+ type DisplayTextBase = Record<GetDisplayTextKey, (...args: any) => string | undefined> | Record<DisplayTextKey, string>;
57
+ /**
58
+ * Display Text type utility for creating standardized `DisplayText` interfaces
59
+ * for usage as public exports and extended with `Required` for default values.
60
+ *
61
+ * Example:
62
+ * ```ts
63
+ * type GetCopyButtonText = (hasCopied: boolean) => string | undefined;
64
+ *
65
+ * // public export, allows optional key/values
66
+ * type SomeComponentDisplayText = DisplayTextTemplate<{
67
+ * getCopyButtonText?: GetCopyButtonText;
68
+ * submitButtonText?: string;
69
+ * }>;
70
+ *
71
+ * // default interface
72
+ * type SomeComponentDisplayTextDefault = Required<SomeComponentDisplayText>;
73
+ *
74
+ * // default values
75
+ * const someComponentDisplayText: SomeComponentDisplayTextDefault = {
76
+ * getCopyButtonText: (hasCopied) => (hasCopied ? 'Copied' : 'Copy'),
77
+ * submitButtonText: 'Submit'
78
+ * };
79
+ * ```
80
+ */
81
+ export type DisplayTextTemplate<T extends DisplayTextBase> = {
82
+ [K in keyof T]: K extends GetDisplayTextKey | DisplayTextKey ? T[K] : never;
83
+ };
84
+ export {};
@@ -1,3 +1,4 @@
1
+ export { DisplayTextTemplate } from './displayText';
1
2
  export * from './accountSettings';
2
3
  export * from './authenticator';
3
4
  export * from './primitives';
@@ -1,181 +1,163 @@
1
- export declare enum ComponentClassName {
2
- Alert = "amplify-alert",
3
- AlertIcon = "amplify-alert__icon",
4
- AlertHeading = "amplify-alert__heading",
5
- AlertBody = "amplify-alert__body",
6
- AlertDismiss = "amplify-alert__dismiss",
7
- Autocomplete = "amplify-autocomplete",
8
- AutocompleteMenu = "amplify-autocomplete__menu",
9
- AutocompleteMenuEmpty = "amplify-autocomplete__menu--empty",
10
- AutocompleteMenuFooter = "amplify-autocomplete__menu__footer",
11
- AutocompleteMenuHeader = "amplify-autocomplete__menu__header",
12
- AutocompleteMenuLoading = "amplify-autocomplete__menu--loading",
13
- AutocompleteMenuOption = "amplify-autocomplete__menu__option",
14
- AutocompleteMenuOptions = "amplify-autocomplete__menu__options",
15
- Badge = "amplify-badge",
16
- Breadcrumbs = "amplify-breadcrumbs",
17
- BreadcrumbsList = "amplify-breadcrumbs__list",
18
- BreadcrumbsItem = "amplify-breadcrumbs__item",
19
- BreadcrumbsSeparator = "amplify-breadcrumbs__separator",
20
- BreadcrumbsLink = "amplify-breadcrumbs__link",
21
- Button = "amplify-button",
22
- ButtonGroup = "amplify-buttongroup",
23
- ButtonLoaderWrapper = "amplify-button__loader-wrapper",
24
- Card = "amplify-card",
25
- Checkbox = "amplify-checkbox",
26
- CheckboxButton = "amplify-checkbox__button",
27
- CheckboxIcon = "amplify-checkbox__icon",
28
- CheckboxInput = "amplify-checkbox__input",
29
- CheckboxLabel = "amplify-checkbox__label",
30
- CheckboxField = "amplify-checkboxfield",
31
- Collection = "amplify-collection",
32
- CollectionItems = "amplify-collection-items",
33
- CollectionSearch = "amplify-collection-search",
34
- CollectionPagination = "amplify-collection-pagination",
35
- CountryCodeSelect = "amplify-countrycodeselect",
36
- DialCodeSelect = "amplify-dialcodeselect",
37
- Divider = "amplify-divider",
38
- DividerLabel = "amplify-divider--label",
39
- DropZone = "amplify-dropzone",
40
- Expander = "amplify-expander",
41
- ExpanderContent = "amplify-expander__content",
42
- ExpanderContentText = "amplify-expander__content__text",
43
- ExpanderHeader = "amplify-expander__header",
44
- ExpanderIcon = "amplify-expander__icon",
45
- ExpanderItem = "amplify-expander__item",
46
- ExpanderTrigger = "amplify-expander__trigger",
47
- Field = "amplify-field",
48
- FieldDescription = "amplify-field__description",
49
- FieldErrorMessage = "amplify-field__error-message",
50
- FieldGroup = "amplify-field-group",
51
- FieldGroupControl = "amplify-field-group__control",
52
- FieldGroupOuterEnd = "amplify-field-group__outer-end",
53
- FieldGroupOuterStart = "amplify-field-group__outer-start",
54
- FieldGroupInnerEnd = "amplify-field-group__inner-end",
55
- FieldGroupInnerStart = "amplify-field-group__inner-start",
56
- FieldGroupIcon = "amplify-field-group__icon",
57
- FieldGroupIconButton = "amplify-field-group__icon-button",
58
- FieldGroupHasInnerEnd = "amplify-field-group--has-inner-end",
59
- FieldGroupHasInnerStart = "amplify-field-group--has-inner-start",
60
- FieldShowPassword = "amplify-field__show-password",
61
- FieldGroupFieldWrapper = "amplify-field-group__field-wrapper",
62
- Fieldset = "amplify-fieldset",
63
- FieldsetLegend = "amplify-fieldset__legend",
64
- FileUploaderDropZone = "amplify-fileuploader__dropzone",
65
- FileUploaderDropZoneIcon = "amplify-fileuploader__dropzone__icon",
66
- FileUploaderDropZoneText = "amplify-fileuploader__dropzone__text",
67
- FileUploaderDropZoneButton = "amplify-fileuploader__dropzone__button",
68
- FileUploaderFile = "amplify-fileuploader__file",
69
- FileUploaderFileWrapper = "amplify-fileuploader__file__wrapper",
70
- FileUploaderFileName = "amplify-fileuploader__file__name",
71
- FileUploaderFileSize = "amplify-fileuploader__file__size",
72
- FileUploaderFileInfo = "amplify-fileuploader__file__info",
73
- FileUploaderFileImage = "amplify-fileuploader__file__image",
74
- FileUploaderFileMain = "amplify-fileuploader__file__main",
75
- FileUploaderFileStatus = "amplify-fileuploader__file__status",
76
- FileUploaderLoader = "amplify-fileuploader__loader",
77
- FileUploaderPreviewer = "amplify-fileuploader__previewer",
78
- FileUploaderPreviewerText = "amplify-fileuploader__previewer__text",
79
- FileUploaderPreviewerBody = "amplify-fileuploader__previewer__body",
80
- FileUploaderPreviewerFooter = "amplify-fileuploader__previewer__footer",
81
- FileUploaderPreviewerFooterActions = "amplify-fileuploader__previewer__footer__actions",
82
- Flex = "amplify-flex",
83
- Grid = "amplify-grid",
84
- Heading = "amplify-heading",
85
- HighlightMatch = "amplify-highlightmatch",
86
- HighlightMatchHighlighted = "amplify-highlightmatch__highlighted",
87
- Icon = "amplify-icon",
88
- Image = "amplify-image",
89
- Input = "amplify-input",
90
- Label = "amplify-label",
91
- Link = "amplify-link",
92
- Loader = "amplify-loader",
93
- LoaderDeterminate = "amplify-loader--determinate",
94
- LoaderPercentageText = "amplify-loader__percentage-text",
95
- MenuContent = "amplify-menu-content",
96
- MenuContentWrapper = "amplify-menu-content-wrapper",
97
- MenuItem = "amplify-menu-content__item",
98
- MenuTrigger = "amplify-menu-trigger",
99
- Message = "amplify-message",
100
- MessageIcon = "amplify-message__icon",
101
- MessageHeading = "amplify-message__heading",
102
- MessageBody = "amplify-message__body",
103
- MessageContent = "amplify-message__content",
104
- MessageDismiss = "amplify-message__dismiss",
105
- Pagination = "amplify-pagination",
106
- PaginationItemButton = "amplify-pagination__item-button",
107
- PaginationItemCurrent = "amplify-pagination__item-current",
108
- PaginationItemEllipsis = "amplify-pagination__item-ellipsis",
109
- PasswordField = "amplify-passwordfield",
110
- PhoneNumberField = "amplify-phonenumberfield",
111
- Placeholder = "amplify-placeholder",
112
- Radio = "amplify-radio",
113
- RadioButton = "amplify-radio__button",
114
- RadioInput = "amplify-radio__input",
115
- RadioLabel = "amplify-radio__label",
116
- RadioGroupField = "amplify-radiogroupfield",
117
- RadioGroup = "amplify-radiogroup",
118
- Rating = "amplify-rating",
119
- ScrollView = "amplify-scrollview",
120
- SearchField = "amplify-searchfield",
121
- SearchFieldClear = "amplify-searchfield__clear",
122
- SearchFieldSearch = "amplify-searchfield__search",
123
- Select = "amplify-select",
124
- SelectField = "amplify-selectfield",
125
- SelectWrapper = "amplify-select__wrapper",
126
- SelectIconWrapper = "amplify-select__icon-wrapper",
127
- SliderField = "amplify-sliderfield",
128
- SliderFieldGroup = "amplify-sliderfield__group",
129
- SliderFieldLabel = "amplify-sliderfield__label",
130
- SliderFieldRange = "amplify-sliderfield__range",
131
- SliderFieldRoot = "amplify-sliderfield__root",
132
- SliderFieldThumb = "amplify-sliderfield__thumb",
133
- SliderFieldTrack = "amplify-sliderfield__track",
134
- StepperField = "amplify-stepperfield",
135
- StepperFieldButtonDecrease = "amplify-stepperfield__button--decrease",
136
- StepperFieldButtonIncrease = "amplify-stepperfield__button--increase",
137
- StepperFieldInput = "amplify-stepperfield__input",
138
- StorageImage = "amplify-storageimage",
139
- StorageManager = "amplify-storagemanager",
140
- StorageManagerDropZone = "amplify-storagemanager__dropzone",
141
- StorageManagerDropZoneIcon = "amplify-storagemanager__dropzone__icon",
142
- StorageManagerDropZoneText = "amplify-storagemanager__dropzone__text",
143
- StorageManagerFilePicker = "amplify-storagemanager__file__picker",
144
- StorageManagerFile = "amplify-storagemanager__file",
145
- StorageManagerFileWrapper = "amplify-storagemanager__file__wrapper",
146
- StorageManagerFileList = "amplify-storagemanager__file__list",
147
- StorageManagerFileName = "amplify-storagemanager__file__name",
148
- StorageManagerFileSize = "amplify-storagemanager__file__size",
149
- StorageManagerFileInfo = "amplify-storagemanager__file__info",
150
- StorageManagerFileImage = "amplify-storagemanager__file__image",
151
- StorageManagerFileMain = "amplify-storagemanager__file__main",
152
- StorageManagerFileStatus = "amplify-storagemanager__file__status",
153
- StorageManagerLoader = "amplify-storagemanager__loader",
154
- StorageManagerPreviewer = "amplify-storagemanager__previewer",
155
- StorageManagerPreviewerText = "amplify-storagemanager__previewer__text",
156
- StorageManagerPreviewerActions = "amplify-storagemanager__previewer__actions",
157
- StorageManagerPreviewerFooter = "amplify-storagemanager__previewer__footer",
158
- SwitchField = "amplify-switchfield",
159
- SwitchLabel = "amplify-switch-label",
160
- SwitchThumb = "amplify-switch-thumb",
161
- SwitchTrack = "amplify-switch-track",
162
- SwitchWrapper = "amplify-switch__wrapper",
163
- Table = "amplify-table",
164
- TableCaption = "amplify-table__caption",
165
- TableBody = "amplify-table__body",
166
- TableTd = "amplify-table__td",
167
- TableTh = "amplify-table__th",
168
- TableFoot = "amplify-table__foot",
169
- TableHead = "amplify-table__head",
170
- TableRow = "amplify-table__row",
171
- Tabs = "amplify-tabs",
172
- TabItems = "amplify-tabs-item",
173
- Text = "amplify-text",
174
- Textarea = "amplify-textarea",
175
- TextAreaField = "amplify-textareafield",
176
- TextField = "amplify-textfield",
177
- ToggleButton = "amplify-togglebutton",
178
- ToggleButtonGroup = "amplify-togglebuttongroup",
179
- VisuallyHidden = "amplify-visually-hidden"
180
- }
1
+ export declare const ComponentClassName: {
2
+ readonly Accordion: "amplify-accordion";
3
+ readonly AccordionItem: "amplify-accordion__item";
4
+ readonly AccordionItemTrigger: "amplify-accordion__item__trigger";
5
+ readonly AccordionItemContent: "amplify-accordion__item__content";
6
+ readonly AccordionItemIcon: "amplify-accordion__item__icon";
7
+ readonly Alert: "amplify-alert";
8
+ readonly AlertIcon: "amplify-alert__icon";
9
+ readonly AlertHeading: "amplify-alert__heading";
10
+ readonly AlertBody: "amplify-alert__body";
11
+ readonly AlertDismiss: "amplify-alert__dismiss";
12
+ readonly Autocomplete: "amplify-autocomplete";
13
+ readonly AutocompleteMenu: "amplify-autocomplete__menu";
14
+ readonly AutocompleteMenuEmpty: "amplify-autocomplete__menu--empty";
15
+ readonly AutocompleteMenuFooter: "amplify-autocomplete__menu__footer";
16
+ readonly AutocompleteMenuHeader: "amplify-autocomplete__menu__header";
17
+ readonly AutocompleteMenuLoading: "amplify-autocomplete__menu--loading";
18
+ readonly AutocompleteMenuOption: "amplify-autocomplete__menu__option";
19
+ readonly AutocompleteMenuOptions: "amplify-autocomplete__menu__options";
20
+ readonly Badge: "amplify-badge";
21
+ readonly Breadcrumbs: "amplify-breadcrumbs";
22
+ readonly BreadcrumbsList: "amplify-breadcrumbs__list";
23
+ readonly BreadcrumbsItem: "amplify-breadcrumbs__item";
24
+ readonly BreadcrumbsSeparator: "amplify-breadcrumbs__separator";
25
+ readonly BreadcrumbsLink: "amplify-breadcrumbs__link";
26
+ readonly Button: "amplify-button";
27
+ readonly ButtonGroup: "amplify-buttongroup";
28
+ readonly ButtonLoaderWrapper: "amplify-button__loader-wrapper";
29
+ readonly Card: "amplify-card";
30
+ readonly Checkbox: "amplify-checkbox";
31
+ readonly CheckboxButton: "amplify-checkbox__button";
32
+ readonly CheckboxIcon: "amplify-checkbox__icon";
33
+ readonly CheckboxInput: "amplify-checkbox__input";
34
+ readonly CheckboxLabel: "amplify-checkbox__label";
35
+ readonly CheckboxField: "amplify-checkboxfield";
36
+ readonly Collection: "amplify-collection";
37
+ readonly CollectionItems: "amplify-collection-items";
38
+ readonly CollectionSearch: "amplify-collection-search";
39
+ readonly CollectionPagination: "amplify-collection-pagination";
40
+ readonly CountryCodeSelect: "amplify-countrycodeselect";
41
+ readonly DialCodeSelect: "amplify-dialcodeselect";
42
+ readonly Divider: "amplify-divider";
43
+ readonly DividerLabel: "amplify-divider--label";
44
+ readonly DropZone: "amplify-dropzone";
45
+ readonly Field: "amplify-field";
46
+ readonly FieldDescription: "amplify-field__description";
47
+ readonly FieldErrorMessage: "amplify-field__error-message";
48
+ readonly FieldGroup: "amplify-field-group";
49
+ readonly FieldGroupControl: "amplify-field-group__control";
50
+ readonly FieldGroupOuterEnd: "amplify-field-group__outer-end";
51
+ readonly FieldGroupOuterStart: "amplify-field-group__outer-start";
52
+ readonly FieldGroupInnerEnd: "amplify-field-group__inner-end";
53
+ readonly FieldGroupInnerStart: "amplify-field-group__inner-start";
54
+ readonly FieldGroupIcon: "amplify-field-group__icon";
55
+ readonly FieldGroupIconButton: "amplify-field-group__icon-button";
56
+ readonly FieldGroupHasInnerEnd: "amplify-field-group--has-inner-end";
57
+ readonly FieldGroupHasInnerStart: "amplify-field-group--has-inner-start";
58
+ readonly FieldShowPassword: "amplify-field__show-password";
59
+ readonly FieldGroupFieldWrapper: "amplify-field-group__field-wrapper";
60
+ readonly Fieldset: "amplify-fieldset";
61
+ readonly FieldsetLegend: "amplify-fieldset__legend";
62
+ readonly Flex: "amplify-flex";
63
+ readonly Grid: "amplify-grid";
64
+ readonly Heading: "amplify-heading";
65
+ readonly HighlightMatch: "amplify-highlightmatch";
66
+ readonly HighlightMatchHighlighted: "amplify-highlightmatch__highlighted";
67
+ readonly Icon: "amplify-icon";
68
+ readonly Image: "amplify-image";
69
+ readonly Input: "amplify-input";
70
+ readonly Label: "amplify-label";
71
+ readonly Link: "amplify-link";
72
+ readonly Loader: "amplify-loader";
73
+ readonly LoaderLabel: "amplify-loader__label";
74
+ readonly MenuContent: "amplify-menu__content";
75
+ readonly MenuItem: "amplify-menu__content__item";
76
+ readonly MenuTrigger: "amplify-menu__trigger";
77
+ readonly MenuWrapper: "amplify-menu__wrapper";
78
+ readonly Message: "amplify-message";
79
+ readonly MessageIcon: "amplify-message__icon";
80
+ readonly MessageHeading: "amplify-message__heading";
81
+ readonly MessageBody: "amplify-message__body";
82
+ readonly MessageContent: "amplify-message__content";
83
+ readonly MessageDismiss: "amplify-message__dismiss";
84
+ readonly Pagination: "amplify-pagination";
85
+ readonly PaginationItem: "amplify-pagination__item";
86
+ readonly PasswordField: "amplify-passwordfield";
87
+ readonly PhoneNumberField: "amplify-phonenumberfield";
88
+ readonly Placeholder: "amplify-placeholder";
89
+ readonly Radio: "amplify-radio";
90
+ readonly RadioButton: "amplify-radio__button";
91
+ readonly RadioInput: "amplify-radio__input";
92
+ readonly RadioLabel: "amplify-radio__label";
93
+ readonly RadioGroupField: "amplify-radiogroupfield";
94
+ readonly RadioGroup: "amplify-radiogroup";
95
+ readonly Rating: "amplify-rating";
96
+ readonly RatingItem: "amplify-rating__item";
97
+ readonly RatingIcon: "amplify-rating__icon";
98
+ readonly RatingLabel: "amplify-rating__label";
99
+ readonly ScrollView: "amplify-scrollview";
100
+ readonly SearchField: "amplify-searchfield";
101
+ readonly SearchFieldClear: "amplify-searchfield__clear";
102
+ readonly SearchFieldSearch: "amplify-searchfield__search";
103
+ readonly Select: "amplify-select";
104
+ readonly SelectField: "amplify-selectfield";
105
+ readonly SelectWrapper: "amplify-select__wrapper";
106
+ readonly SelectIcon: "amplify-select__icon";
107
+ readonly SliderField: "amplify-sliderfield";
108
+ readonly SliderFieldGroup: "amplify-sliderfield__group";
109
+ readonly SliderFieldLabel: "amplify-sliderfield__label";
110
+ readonly SliderFieldRange: "amplify-sliderfield__range";
111
+ readonly SliderFieldRoot: "amplify-sliderfield__root";
112
+ readonly SliderFieldThumb: "amplify-sliderfield__thumb";
113
+ readonly SliderFieldTrack: "amplify-sliderfield__track";
114
+ readonly StepperField: "amplify-stepperfield";
115
+ readonly StepperFieldButtonDecrease: "amplify-stepperfield__button--decrease";
116
+ readonly StepperFieldButtonIncrease: "amplify-stepperfield__button--increase";
117
+ readonly StepperFieldInput: "amplify-stepperfield__input";
118
+ readonly StorageImage: "amplify-storageimage";
119
+ readonly StorageManager: "amplify-storagemanager";
120
+ readonly StorageManagerDropZone: "amplify-storagemanager__dropzone";
121
+ readonly StorageManagerDropZoneIcon: "amplify-storagemanager__dropzone__icon";
122
+ readonly StorageManagerDropZoneText: "amplify-storagemanager__dropzone__text";
123
+ readonly StorageManagerFilePicker: "amplify-storagemanager__file__picker";
124
+ readonly StorageManagerFile: "amplify-storagemanager__file";
125
+ readonly StorageManagerFileWrapper: "amplify-storagemanager__file__wrapper";
126
+ readonly StorageManagerFileList: "amplify-storagemanager__file__list";
127
+ readonly StorageManagerFileName: "amplify-storagemanager__file__name";
128
+ readonly StorageManagerFileSize: "amplify-storagemanager__file__size";
129
+ readonly StorageManagerFileInfo: "amplify-storagemanager__file__info";
130
+ readonly StorageManagerFileImage: "amplify-storagemanager__file__image";
131
+ readonly StorageManagerFileMain: "amplify-storagemanager__file__main";
132
+ readonly StorageManagerFileStatus: "amplify-storagemanager__file__status";
133
+ readonly StorageManagerLoader: "amplify-storagemanager__loader";
134
+ readonly StorageManagerPreviewer: "amplify-storagemanager__previewer";
135
+ readonly StorageManagerPreviewerText: "amplify-storagemanager__previewer__text";
136
+ readonly StorageManagerPreviewerActions: "amplify-storagemanager__previewer__actions";
137
+ readonly StorageManagerPreviewerFooter: "amplify-storagemanager__previewer__footer";
138
+ readonly SwitchField: "amplify-switchfield";
139
+ readonly SwitchLabel: "amplify-switch__label";
140
+ readonly SwitchThumb: "amplify-switch__thumb";
141
+ readonly SwitchTrack: "amplify-switch__track";
142
+ readonly SwitchWrapper: "amplify-switch__wrapper";
143
+ readonly Table: "amplify-table";
144
+ readonly TableCaption: "amplify-table__caption";
145
+ readonly TableBody: "amplify-table__body";
146
+ readonly TableTd: "amplify-table__td";
147
+ readonly TableTh: "amplify-table__th";
148
+ readonly TableFoot: "amplify-table__foot";
149
+ readonly TableHead: "amplify-table__head";
150
+ readonly TableRow: "amplify-table__row";
151
+ readonly Tabs: "amplify-tabs";
152
+ readonly TabsList: "amplify-tabs__list";
153
+ readonly TabsItem: "amplify-tabs__item";
154
+ readonly TabsPanel: "amplify-tabs__panel";
155
+ readonly Text: "amplify-text";
156
+ readonly Textarea: "amplify-textarea";
157
+ readonly TextAreaField: "amplify-textareafield";
158
+ readonly TextField: "amplify-textfield";
159
+ readonly ToggleButton: "amplify-togglebutton";
160
+ readonly ToggleButtonGroup: "amplify-togglebuttongroup";
161
+ readonly VisuallyHidden: "amplify-visually-hidden";
162
+ };
181
163
  export type Modifiers = string | number | null;
@@ -1,8 +1,3 @@
1
- /**
2
- * Prevents usage of T from being automatically inferred.
3
- * see: https://github.com/Microsoft/TypeScript/issues/14829#issuecomment-504042546
4
- */
5
- export type NoInfer<T> = [T][T extends any ? 0 : never];
6
1
  /**
7
2
  * Improves readability of enumerable properties of an `Object` created from another `Object`,
8
3
  * for example types that have been created using `Omit` or `Pick`.
@@ -0,0 +1,4 @@
1
+ type ClassNamesInput = string | number | boolean | undefined | null | Record<string, unknown> | ClassNamesArgs;
2
+ type ClassNamesArgs = Array<ClassNamesInput>;
3
+ export declare const classNames: (...args: ClassNamesArgs) => string;
4
+ export {};
@@ -1,135 +1,3 @@
1
- import { ComponentClassName, Modifiers } from '../types';
2
- /**
3
- * Some libraries may not follow Node ES module spec and could be loaded as CommonJS modules,
4
- * To ensure the interoperability between ESM and CJS, modules from those libraries have to be loaded via namespace import
5
- * And sanitized by the function below because unlike ESM namespace, CJS namespace set `module.exports` object on the `default` key
6
- * https://nodejs.org/api/esm.html#interoperability-with-commonjs
7
- */
8
- export declare const sanitizeNamespaceImport: <T>(namespaceModule: T) => T;
9
- /**
10
- * Checks if `value` is an Object (non-primitive, non-array, non-function)
11
- * Will return false for Arrays and functions
12
- *
13
- *
14
- * @param {unknown} value The value to check
15
- * @returns {boolean} Returns `true` if `value` is an object, `false` otherwise
16
- */
17
- export declare function isObject(value: unknown): value is object;
18
- /**
19
- * Checks if `value` is a string primitive or object
20
- *
21
- * @param {unknown} value The value to check
22
- * @returns {boolean} Returns `true` if `value` is a string, `false` otherwise
23
- */
24
- export declare function isString(value: unknown): value is string;
25
- /**
26
- * Checks if `value` is a Map
27
- *
28
- * @param {unknown} value The value to check
29
- * @returns {boolean} Returns `true` if `value` is a Map, `false` otherwise
30
- */
31
- export declare function isMap(value: unknown): value is Map<unknown, unknown>;
32
- /**
33
- * Checks if `value` is a Set
34
- *
35
- * @param {unknown} value The value to check
36
- * @returns {boolean} Returns `true` if `value` is a Set, `false` otherwise
37
- */
38
- export declare function isSet<T>(value: unknown): value is Set<T>;
39
- /**
40
- * Checks if `value` is undefined
41
- *
42
- * @param {unknown} value The value to check
43
- * @returns {boolean} Returns `true` if `value` is undefined, `false` otherwise
44
- */
45
- export declare function isUndefined(value: unknown): value is undefined;
46
- /**
47
- * Checks if `value` is nullish
48
- *
49
- * @param {unknown} value The value to check
50
- * @returns {boolean} Returns `true` if `value` is nullish, `false` otherwise
51
- */
52
- export declare function isNil(value: unknown): value is null | undefined;
53
- /**
54
- * Checks if `value` is empty
55
- *
56
- * @param {unknown} value The value to check
57
- * @returns {boolean} Returns `true` if `value` is empty, `false` otherwise
58
- */
59
- export declare function isEmpty<T>(value: T): boolean;
60
- /**
61
- * Checks if all members of the `values` param are empty arrays
62
- *
63
- * @param {unknown} value The values to check
64
- * @returns {boolean} Returns `true` if all members of `values` are empty, `false` otherwise
65
- */
66
- export declare function areEmptyArrays<T>(...values: T[]): boolean;
67
- /**
68
- * Checks if all members of the `values` param are empty objects
69
- *
70
- * @param {unknown} values The values to check
71
- * @returns {boolean} Returns `true` if all members of the `values` param are empty, `false` otherwise
72
- */
73
- export declare function areEmptyObjects<T>(...values: T[]): boolean;
74
- /**
75
- * Capitalizes `value` and its return type
76
- *
77
- * @param {string} value string to capitalize
78
- * @returns {string} capitalized string
79
- */
80
- export declare function capitalize<T extends string>(value: T): Capitalize<T>;
81
- /**
82
- * Checks if `key` is a direct property of `value`
83
- *
84
- * @param {unknown} value `object` potentially containing property
85
- * @param {string} key property key
86
- * @returns whether `key` param is a property of the `obj` param
87
- */
88
- export declare function has(value: unknown, key: string): boolean;
89
- /**
90
- * Checks if `value` is a function
91
- *
92
- * @param {unknown} value param to check
93
- * @returns {boolean} whether `value` is a function
94
- */
95
- export declare function isFunction(value: unknown): value is Function;
96
- /**
97
- * This helper function creates modifier class names that are used for our flat BEM styling
98
- * it takes in a base and modifier and returns the modified class if a modifier was passed in and null otherwise
99
- * @param base The base class of the output
100
- * @param modifier The modifier to add onto the base
101
- * @returns the modified class name or empty string
102
- */
103
- export declare const classNameModifier: (base: ComponentClassName, modifier?: Modifiers) => string;
104
- /**
105
- * This helper function creates modified class names that are used for our flat BEM styling
106
- * it takes in a base, modifier, and flag and returns the modified class name if the flag is true and null if the flag is false
107
- * @param base
108
- * @param modifier
109
- * @param flag
110
- * @returns the modified class name or empty string
111
- */
112
- export declare const classNameModifierByFlag: (base: ComponentClassName, modifier: Modifiers, flag?: boolean) => string;
113
- /**
114
- * `isFunction` but types the param with its function signature
115
- *
116
- * @param {unknown} value param to check
117
- * @returns {boolean} whether `value` is a function
118
- */
119
- export declare function isTypedFunction<T extends (...args: any[]) => any>(value: unknown): value is T;
120
- /**
121
- * Similar to `Array.join`, with an optional callback/template param
122
- * for formatting returned string values
123
- *
124
- * @param {string[]} values string array
125
- * @param {(value: string) => string} template callback format param
126
- * @returns formatted string array
127
- */
128
- export declare function templateJoin(values: string[], template: (value: string) => string): string;
129
- /**
130
- * A function that does nothing
131
- *
132
- * @param {any[]} _ accepts any parameters
133
- * @returns nothing
134
- */
135
- export declare function noop(..._: any[]): void;
1
+ export { setUserAgent, SetUserAgentOptions } from './setUserAgent';
2
+ export * from './utils';
3
+ export { classNames } from './classNames';
@@ -0,0 +1,7 @@
1
+ import { AuthUserAgentInput, GeoUserAgentInput, InAppMessagingUserAgentInput, StorageUserAgentInput } from '@aws-amplify/core/internals/utils';
2
+ export declare const ACCOUNT_SETTINGS_INPUT_BASE: Omit<AuthUserAgentInput, 'additionalDetails'>;
3
+ export declare const AUTHENTICATOR_INPUT_BASE: Omit<AuthUserAgentInput, 'additionalDetails'>;
4
+ export declare const IN_APP_MESSAGING_INPUT_BASE: Omit<InAppMessagingUserAgentInput, 'additionalDetails'>;
5
+ export declare const LOCATION_SEARCH_INPUT_BASE: Omit<GeoUserAgentInput, 'additionalDetails'>;
6
+ export declare const MAP_VIEW_INPUT_BASE: Omit<GeoUserAgentInput, 'additionalDetails'>;
7
+ export declare const STORAGE_MANAGER_INPUT_BASE: Omit<StorageUserAgentInput, 'additionalDetails'>;
@@ -0,0 +1 @@
1
+ export { setUserAgent, SetUserAgentOptions } from './setUserAgent';