@aws-amplify/ui-react 1.2.26 → 1.2.54-legacy-ui.10

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 (77) hide show
  1. package/CHANGELOG.md +224 -0
  2. package/dist/0.js.map +1 -1
  3. package/dist/1.js +656 -2000
  4. package/dist/1.js.map +1 -1
  5. package/dist/10.js +23 -681
  6. package/dist/10.js.map +1 -1
  7. package/dist/11.js +1157 -20
  8. package/dist/11.js.map +1 -1
  9. package/dist/12.js +61 -1087
  10. package/dist/12.js.map +1 -1
  11. package/dist/13.js +1146 -64
  12. package/dist/13.js.map +1 -1
  13. package/dist/14.js +34 -1163
  14. package/dist/14.js.map +1 -1
  15. package/dist/15.js +17 -37
  16. package/dist/15.js.map +1 -1
  17. package/dist/16.js +109 -13
  18. package/dist/16.js.map +1 -1
  19. package/dist/17.js +32 -67
  20. package/dist/17.js.map +1 -1
  21. package/dist/18.js +236 -46
  22. package/dist/18.js.map +1 -1
  23. package/dist/19.js +35 -224
  24. package/dist/19.js.map +1 -1
  25. package/dist/2.js +2190 -159
  26. package/dist/2.js.map +1 -1
  27. package/dist/20.js +28 -48
  28. package/dist/20.js.map +1 -1
  29. package/dist/21.js +46 -25
  30. package/dist/21.js.map +1 -1
  31. package/dist/22.js +22 -25
  32. package/dist/22.js.map +1 -1
  33. package/dist/23.js +254 -25
  34. package/dist/23.js.map +1 -1
  35. package/dist/24.js +62 -230
  36. package/dist/24.js.map +1 -1
  37. package/dist/25.js +28 -62
  38. package/dist/25.js.map +1 -1
  39. package/dist/26.js +349 -30
  40. package/dist/26.js.map +1 -1
  41. package/dist/27.js +24 -352
  42. package/dist/27.js.map +1 -1
  43. package/dist/28.js +25 -22
  44. package/dist/28.js.map +1 -1
  45. package/dist/29.js +483 -26
  46. package/dist/29.js.map +1 -1
  47. package/dist/3.js +2710 -1818
  48. package/dist/3.js.map +1 -1
  49. package/dist/30.js +1 -502
  50. package/dist/30.js.map +1 -1
  51. package/dist/31.js +1 -1
  52. package/dist/31.js.map +1 -1
  53. package/dist/32.js +12 -1
  54. package/dist/32.js.map +1 -1
  55. package/dist/4.js +361 -3669
  56. package/dist/4.js.map +1 -1
  57. package/dist/5.js +48 -242
  58. package/dist/5.js.map +1 -1
  59. package/dist/6.js +118 -74
  60. package/dist/6.js.map +1 -1
  61. package/dist/7.js +55 -99
  62. package/dist/7.js.map +1 -1
  63. package/dist/8.js +98 -46
  64. package/dist/8.js.map +1 -1
  65. package/dist/9.js +474 -412
  66. package/dist/9.js.map +1 -1
  67. package/dist/@aws-amplify/ui-react.js +50 -44
  68. package/dist/@aws-amplify/ui-react.js.map +1 -1
  69. package/dist/aws-amplify-react.min.js +2 -2
  70. package/dist/aws-amplify-react.min.js.map +1 -1
  71. package/dist/polyfills-core-js.js +5 -11
  72. package/dist/polyfills-core-js.js.map +1 -1
  73. package/dist/polyfills-css-shim.js.map +1 -1
  74. package/dist/polyfills-dom.js.map +1 -1
  75. package/package.json +3 -3
  76. package/dist/33.js +0 -13
  77. package/dist/33.js.map +0 -1
package/dist/17.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-buttons_2.entry.js"],"names":["AmplifyFederatedButtons","registerInstance","AuthState","Auth","_a","oauth","Object","isEmpty","amazonClientId","auth0Config","facebookAppId","googleClientId","oauthConfig","h","clientId","handleAuthStateChange","appId","config","amplifyStrikeCss","AmplifyStrike"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,IAAIA,uBAAuB;AAAG;AAAe,YAAY;AACrD,4CAA0C;AACtCC,gEAAgB,OAAhBA,OAAgB,CAAhBA;AACA;;AACA,qBAAiBC,yDAAS,CAA1B;AACA;;AACA;AACA;AACR;AACA;;AACQ;AACH;;AACDF,yBA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AAAEC,cAAQ,EAAV;AAA4BC,2BAAqB,EAAE,KAAKA;AAAxD,KAA1B,CAAf,CAAlC,EAA+JL,aAAa,IAAKG,4DAAC,cAAcA,4DAAC,4BAA4B;AAAEG,WAAK,EAAP;AAAwBD,2BAAqB,EAAE,KAAKA;AAApD,KAA5B,CAAf,CAAlL,EAA6SP,cAAc,IAAKK,4DAAC,cAAcA,4DAAC,0BAA0B;AAAEC,cAAQ,EAAV;AAA4BC,2BAAqB,EAAE,KAAKA;AAAxD,KAA1B,CAAf,CAAjU,EAA8bH,WAAW,IAAKC,4DAAC,cAAcA,4DAAC,yBAAyB;AAAEI,YAAM,EAAEL;AAAV,KAAzB,CAAf,CAA/c,EAAmhBH,WAAW,IAAKI,4DAAC,cAAcA,4DAAC,yBAAyB;AAAEI,YAAM,EAAR;AAAuBF,2BAAqB,EAAE,KAAKA;AAAnD,KAAzB,CAAf,CAApiB,CAAT;AARJf;;AAUA;AAtCJ,CAA6C,EAA7C;;AAwCA,IAAIkB,gBAAgB,GAApB;;AACA,IAAIC,aAAa;AAAG;AAAe,YAAY;AAC3C,kCAAgC;AAC5BlB,gEAAgB,OAAhBA,OAAgB,CAAhBA;AACH;;AACDkB,eAAa,CAAbA,mBAAiC,YAAY;AACzC,WAAQN,4DAAC,SAAS;AAAE,eAAO;AAAT,KAAT,EAAsCA,4DAAC,SAAhD,IAAgD,CAAvC,CAAT;AADJM;;AAGA;AAPJ,CAAmC,EAAnC;;AASAA,aAAa,CAAbA","file":"17.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { isEmpty } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar AmplifyFederatedButtons = /** @class */ (function () {\n function AmplifyFederatedButtons(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n /** Auth state change handler for this component\n * e.g. SignIn -> 'Create Account' link -> SignUp\n */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyFederatedButtons.prototype.componentWillLoad = function () {\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauthConfig = Object.assign(Object.assign({}, this.federated.oauthConfig), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0Config = Object.assign(Object.assign({}, this.federated.auth0Config), oauth['auth0']);\n }\n };\n AmplifyFederatedButtons.prototype.render = function () {\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n if (isEmpty(this.federated)) {\n return null;\n }\n var _a = this.federated, amazonClientId = _a.amazonClientId, auth0Config = _a.auth0Config, facebookAppId = _a.facebookAppId, googleClientId = _a.googleClientId, oauthConfig = _a.oauthConfig;\n return (h(\"div\", null, googleClientId && (h(\"div\", null, h(\"amplify-google-button\", { clientId: googleClientId, handleAuthStateChange: this.handleAuthStateChange }))), facebookAppId && (h(\"div\", null, h(\"amplify-facebook-button\", { appId: facebookAppId, handleAuthStateChange: this.handleAuthStateChange }))), amazonClientId && (h(\"div\", null, h(\"amplify-amazon-button\", { clientId: amazonClientId, handleAuthStateChange: this.handleAuthStateChange }))), oauthConfig && (h(\"div\", null, h(\"amplify-oauth-button\", { config: oauthConfig }))), auth0Config && (h(\"div\", null, h(\"amplify-auth0-button\", { config: auth0Config, handleAuthStateChange: this.handleAuthStateChange })))));\n };\n return AmplifyFederatedButtons;\n}());\nvar amplifyStrikeCss = \".sc-amplify-strike-h{--color:var(--amplify-grey);--border-color:var(--amplify-light-grey);--content-background:var(--amplify-white);display:block;width:100%;text-align:center;border-bottom:1px solid var(--border-color);line-height:0.1em;margin:32px 0;color:var(--color)}.strike-content.sc-amplify-strike{background:var(--content-background);padding:0 25px;font-size:var(--amplify-text-sm);font-weight:500}\";\nvar AmplifyStrike = /** @class */ (function () {\n function AmplifyStrike(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyStrike.prototype.render = function () {\n return (h(\"span\", { class: \"strike-content\" }, h(\"slot\", null)));\n };\n return AmplifyStrike;\n}());\nAmplifyStrike.style = amplifyStrikeCss;\nexport { AmplifyFederatedButtons as amplify_federated_buttons, AmplifyStrike as amplify_strike };\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js"],"names":["logger","ConsoleLogger","AmplifyFederatedSignIn","hostRef","registerInstance","authState","AuthState","SignIn","federated","prototype","componentWillLoad","console","warn","Auth","configure","Error","NO_AUTH_MODULE_FOUND","_a","oauth","oauth_config","Object","assign","auth0","render","debug","values","includes","h"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA,IAAIA,MAAM,GAAG,IAAIC,+DAAJ,CAAkB,2BAAlB,CAAb;;AACA,IAAIC,sBAAsB;AAAG;AAAe,YAAY;EACpD,SAASA,sBAAT,CAAgCC,OAAhC,EAAyC;IACrCC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;IACA;;IACA,KAAKC,SAAL,GAAiBC,yDAAS,CAACC,MAA3B;IACA;;IACA,KAAKC,SAAL,GAAiB,EAAjB;EACH;;EACDN,sBAAsB,CAACO,SAAvBP,CAAiCQ,iBAAjCR,GAAqD,YAAY;IAC7DS,OAAO,CAACC,IAARD,CAAa,kMAAbA;;IACA,IAAI,CAACE,sDAAD,IAAS,OAAOA,sDAAI,CAACC,SAA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SAAvCe,CAAL,EAAwD;MACpD,OAAO,IAAP;IACH;;IACDpB,MAAM,CAACwB,KAAPxB,CAAa,qBAAbA,EAAoC,KAAKQ,SAAzCR;IACA,OAAQ2B,4DAAC,CAAC,sBAAD,EAAyB;MAAE,aAAa;IAAf,CAAzB,EAAuEA,4DAAC,CAAC,iBAAD,EAAoB;MAAE,aAAa;IAAf,CAApB,EAAuEA,4DAAC,CAAC,2BAAD,EAA8B;MAAEtB,SAAS,EAAE,KAAKA,SAAlB;MAA6B,aAAa,2BAA1C;MAAuEG,SAAS,EAAE,KAAKA;IAAvF,CAA9B,CAAxE,CAAxE,CAAT;EAVJ;;EAYA,OAAON,sBAAP;AArCwC,GAA5C","file":"17.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nvar logger = new ConsoleLogger('amplify-federated-sign-in');\nvar AmplifyFederatedSignIn = /** @class */ (function () {\n function AmplifyFederatedSignIn(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n }\n AmplifyFederatedSignIn.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0 = Object.assign(Object.assign({}, this.federated.auth0), oauth['auth0']);\n }\n };\n AmplifyFederatedSignIn.prototype.render = function () {\n if (!this.federated) {\n logger.debug('federated prop is empty. show nothing');\n logger.debug('federated={google_client_id: , facebook_app_id: , amazon_client_id}');\n return null;\n }\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n logger.debug('federated Config is', this.federated);\n return (h(\"amplify-form-section\", { \"data-test\": \"federated-sign-in-section\" }, h(\"amplify-section\", { \"data-test\": \"federated-sign-in-body-section\" }, h(\"amplify-federated-buttons\", { authState: this.authState, \"data-test\": \"federated-sign-in-buttons\", federated: this.federated }))));\n };\n return AmplifyFederatedSignIn;\n}());\nexport { AmplifyFederatedSignIn as amplify_federated_sign_in };\n"],"sourceRoot":""}
package/dist/18.js CHANGED
@@ -1,87 +1,277 @@
1
1
  (this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[18],{
2
2
 
3
- /***/ "../amplify-ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js":
4
- /*!********************************************************************************!*\
5
- !*** ../amplify-ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js ***!
6
- \********************************************************************************/
7
- /*! exports provided: amplify_federated_sign_in */
3
+ /***/ "../amplify-ui-components/dist/esm-es5/amplify-form-field_4.entry.js":
4
+ /*!***************************************************************************!*\
5
+ !*** ../amplify-ui-components/dist/esm-es5/amplify-form-field_4.entry.js ***!
6
+ \***************************************************************************/
7
+ /*! exports provided: amplify_form_field, amplify_hint, amplify_input, amplify_label */
8
8
  /***/ (function(module, __webpack_exports__, __webpack_require__) {
9
9
 
10
10
  "use strict";
11
11
  __webpack_require__.r(__webpack_exports__);
12
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_federated_sign_in", function() { return AmplifyFederatedSignIn; });
12
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_form_field", function() { return AmplifyFormField; });
13
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_hint", function() { return AmplifyHint; });
14
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_input", function() { return AmplifyInput; });
15
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_label", function() { return AmplifyLabel; });
13
16
  /* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
14
17
  /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
15
18
  /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
16
19
  /* harmony import */ var _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./auth-types-78df304e.js */ "../amplify-ui-components/dist/esm-es5/auth-types-78df304e.js");
17
20
  /* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
18
21
  /* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__);
19
- /* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
22
+ /* harmony import */ var _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Translations-108d469f.js */ "../amplify-ui-components/dist/esm-es5/Translations-108d469f.js");
23
+ /* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
24
+ /* harmony import */ var _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./helpers-14fcb50c.js */ "../amplify-ui-components/dist/esm-es5/helpers-14fcb50c.js");
20
25
 
21
26
 
22
27
 
23
28
 
24
29
 
25
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["ConsoleLogger"]('amplify-federated-sign-in');
26
30
 
27
- var AmplifyFederatedSignIn =
31
+
32
+ var amplifyFormFieldCss = "amplify-form-field{--label-font-size:var(--amplify-text-md);--description-font-size:var(--amplify-text-sm)}.form-field{margin-bottom:15px}.form-field-label{display:block;font-size:var(--label-font-size);padding-bottom:0.5em}.form-field-description{font-size:var(--description-font-size);padding-top:0.5em}";
33
+
34
+ var AmplifyFormField =
28
35
  /** @class */
29
36
  function () {
30
- function AmplifyFederatedSignIn(hostRef) {
37
+ function AmplifyFormField(hostRef) {
31
38
  Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
32
- /** The current authentication state. */
39
+ /** The input type. Can be any HTML input type. */
40
+
41
+ this.type = 'text';
42
+ /** The required flag in order to make an input required prior to submitting a form */
33
43
 
34
- this.authState = _auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"].SignIn;
35
- /** Federated credentials & configuration. */
44
+ this.required = false;
45
+ /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */
36
46
 
37
- this.federated = {};
47
+ this.placeholder = '';
38
48
  }
39
49
 
40
- AmplifyFederatedSignIn.prototype.componentWillLoad = function () {
41
- if (!_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"] || typeof _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure !== 'function') {
42
- throw new Error(_constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["N"]);
43
- }
50
+ AmplifyFormField.prototype.componentWillLoad = function () {
51
+ console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
52
+ };
44
53
 
45
- var _a = _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_3__["Auth"].configure().oauth,
46
- oauth = _a === void 0 ? {} : _a; // backward compatibility
54
+ AmplifyFormField.prototype.render = function () {
55
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
56
+ "class": "form-field"
57
+ }, this.label && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
58
+ "class": "form-field-label"
59
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-label", {
60
+ htmlFor: this.fieldId
61
+ }, this.label)), this.description && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
62
+ id: this.fieldId + "-description",
63
+ "class": "form-field-description",
64
+ "data-test": "form-field-description"
65
+ }, this.description), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
66
+ name: "input"
67
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-input", {
68
+ fieldId: this.fieldId,
69
+ description: this.description,
70
+ type: this.type,
71
+ handleInputChange: this.handleInputChange,
72
+ placeholder: this.placeholder,
73
+ name: this.name,
74
+ value: this.value,
75
+ inputProps: this.inputProps,
76
+ disabled: this.disabled,
77
+ required: this.required
78
+ }))), this.hint && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-hint", {
79
+ id: this.fieldId + "-hint"
80
+ }, this.hint));
81
+ };
47
82
 
48
- if (oauth['domain']) {
49
- this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth);
50
- } else if (oauth['awsCognito']) {
51
- this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth['awsCognito']);
52
- }
83
+ return AmplifyFormField;
84
+ }();
53
85
 
54
- if (oauth['auth0']) {
55
- this.federated.auth0 = Object.assign(Object.assign({}, this.federated.auth0), oauth['auth0']);
56
- }
86
+ AmplifyFormField.style = amplifyFormFieldCss;
87
+ var amplifyHintCss = ":host{--color:var(--amplify-grey);--font-family:var(--amplify-font-family);--font-size:var(--amplify-text-xs);--font-weight:var(--amplify-font-weight)}.hint{color:var(--color);font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--font-size);margin-bottom:2.625rem}";
88
+
89
+ var AmplifyHint =
90
+ /** @class */
91
+ function () {
92
+ function AmplifyHint(hostRef) {
93
+ Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
94
+ }
95
+
96
+ AmplifyHint.prototype.componentWillLoad = function () {
97
+ console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
98
+ };
99
+
100
+ AmplifyHint.prototype.render = function () {
101
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
102
+ "class": "hint"
103
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
57
104
  };
58
105
 
59
- AmplifyFederatedSignIn.prototype.render = function () {
60
- if (!this.federated) {
61
- logger.debug('federated prop is empty. show nothing');
62
- logger.debug('federated={google_client_id: , facebook_app_id: , amazon_client_id}');
63
- return null;
106
+ return AmplifyHint;
107
+ }();
108
+
109
+ AmplifyHint.style = amplifyHintCss;
110
+ var amplifyInputCss = "amplify-input{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-color-focus:var(--amplify-primary-color);--border:1px solid var(--border-color);--margin:0 0 0.625rem 0}[data-autocompleted]{background-color:#e8f0fe !important}.input-host{width:100%}.input{display:block;width:100%;padding:1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);background-image:none;border:var(--border);border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:var(--margin);height:3.125rem;line-height:1.1;-webkit-box-shadow:none;box-shadow:none}.input:focus{outline:none;border-color:var(--border-color-focus)}.input:disabled{opacity:0.5}";
111
+
112
+ var AmplifyInput =
113
+ /** @class */
114
+ function () {
115
+ function AmplifyInput(hostRef) {
116
+ Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
117
+ /** The input type. Can be any HTML input type. */
118
+
119
+ this.type = 'text';
120
+ /** The callback, called when the input is modified by the user. */
121
+
122
+ this.handleInputChange = function () {
123
+ return void 0;
124
+ };
125
+ /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */
126
+
127
+
128
+ this.placeholder = '';
129
+ /** Whether the input is a required field */
130
+
131
+ this.required = false;
132
+ /** Whether the input has been autocompleted */
133
+
134
+ this.autoCompleted = false;
135
+ }
136
+ /**
137
+ * Sets the value of this input to the value in autofill input event.
138
+ */
139
+
140
+
141
+ AmplifyInput.prototype.setAutoCompleteValue = function (value) {
142
+ var input = this.el.querySelector('input');
143
+ if (!input) return;
144
+ input.value = value; // dispatch an input event from this element to the parent form
145
+
146
+ input.dispatchEvent(new Event('input'));
147
+ this.autoCompleted = true;
148
+ };
149
+ /**
150
+ * Checks if the target dummy input in `amplify-auth-container` is present have been autofilled.
151
+ * If so, we update this.value with the autofilled value.
152
+ */
153
+
154
+
155
+ AmplifyInput.prototype.checkAutoCompletion = function (targetInput) {
156
+ var _this = this;
157
+
158
+ if (!targetInput) return;
159
+
160
+ if (targetInput.value) {
161
+ // if value is already set, we set the value directly
162
+ this.setAutoCompleteValue(targetInput.value);
163
+ } else {
164
+ // if value is not set, we start listening for it
165
+ targetInput.addEventListener('input', function (e) {
166
+ var value = e.target.value;
167
+
168
+ _this.setAutoCompleteValue(value);
169
+ });
64
170
  }
171
+ };
172
+
173
+ AmplifyInput.prototype.disconnectedCallback = function () {
174
+ this.removeHubListener && this.removeHubListener(); // stop listening to `onAuthUIStateChange`
175
+ };
176
+
177
+ AmplifyInput.prototype.componentWillLoad = function () {
178
+ var _this = this;
179
+
180
+ console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.'); // the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.
181
+
182
+ if (!Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-authenticator', this.el)) return;
183
+ this.removeHubListener = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["o"])(function () {
184
+ /**
185
+ * When we're using slots, autofilled data will persist between different authState,
186
+ * even though input events are not triggered. This ends up in parent components
187
+ * not picking up input values. For now, we're emptying the input on authState change
188
+ * which is the existing behavior.
189
+ */
190
+ var input = _this.el.querySelector('input');
191
+
192
+ if (input) input.value = '';
193
+ _this.autoCompleted = false;
194
+ });
195
+ };
196
+
197
+ AmplifyInput.prototype.componentDidLoad = function () {
198
+ // no-op if this field already has been autofilled or already has an value
199
+ if (this.autoCompleted || this.value) return;
200
+ if (/Firefox/.test(navigator.userAgent)) return; // firefox autofill works
201
+
202
+ var container = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-auth-container', this.el);
203
+ var signIn = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-sign-in', this.el); // only autocomplete if `amplify-auth-container` is present and input is under `sign-in`.
65
204
 
66
- if (!Object.values(_auth_types_78df304e_js__WEBPACK_IMPORTED_MODULE_2__["A"]).includes(this.authState)) {
67
- return null;
205
+ if (!container || !signIn) return;
206
+ var username = container.querySelector("input[name='username']");
207
+ var password = container.querySelector("input[name='password']");
208
+
209
+ if (this.name === 'username' || this.name === 'email' || this.name === 'phone') {
210
+ this.checkAutoCompletion(username);
211
+ } else if (this.name === 'password') {
212
+ this.checkAutoCompletion(password);
68
213
  }
214
+ };
215
+
216
+ AmplifyInput.prototype.render = function () {
217
+ var _this = this;
218
+
219
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
220
+ "class": "input-host"
221
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", Object.assign({
222
+ id: this.fieldId,
223
+ "aria-describedby": this.fieldId && this.description ? this.fieldId + "-description" : null,
224
+ "data-autocompleted": this.autoCompleted,
225
+ type: this.type,
226
+ onInput: function onInput(event) {
227
+ _this.autoCompleted = false;
228
+
229
+ _this.handleInputChange(event);
230
+ },
231
+ placeholder: this.placeholder,
232
+ name: this.name,
233
+ "class": "input",
234
+ value: this.value,
235
+ disabled: this.disabled,
236
+ required: this.required
237
+ }, this.inputProps)));
238
+ };
239
+
240
+ Object.defineProperty(AmplifyInput.prototype, "el", {
241
+ get: function get() {
242
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["g"])(this);
243
+ },
244
+ enumerable: false,
245
+ configurable: true
246
+ });
247
+ return AmplifyInput;
248
+ }();
249
+
250
+ AmplifyInput.style = amplifyInputCss;
251
+ var amplifyLabelCss = ":host{--label-color:var(--amplify-secondary-color)}.label{color:var(--label-color);font-size:var(--amplify-text-sm);margin-bottom:16px}";
252
+
253
+ var AmplifyLabel =
254
+ /** @class */
255
+ function () {
256
+ function AmplifyLabel(hostRef) {
257
+ Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
258
+ }
259
+
260
+ AmplifyLabel.prototype.componentWillLoad = function () {
261
+ console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');
262
+ };
69
263
 
70
- logger.debug('federated Config is', this.federated);
71
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-section", {
72
- "data-test": "federated-sign-in-section"
73
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-section", {
74
- "data-test": "federated-sign-in-body-section"
75
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-federated-buttons", {
76
- authState: this.authState,
77
- "data-test": "federated-sign-in-buttons",
78
- federated: this.federated
79
- })));
264
+ AmplifyLabel.prototype.render = function () {
265
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("label", {
266
+ "class": "label",
267
+ htmlFor: this.htmlFor
268
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
80
269
  };
81
270
 
82
- return AmplifyFederatedSignIn;
271
+ return AmplifyLabel;
83
272
  }();
84
273
 
274
+ AmplifyLabel.style = amplifyLabelCss;
85
275
 
86
276
 
87
277
  /***/ })
package/dist/18.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-federated-sign-in.entry.js"],"names":["logger","AmplifyFederatedSignIn","registerInstance","AuthState","Auth","_a","oauth","Object","h","authState","federated"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA,IAAIA,MAAM,GAAG,oEAAb,2BAAa,CAAb;;AACA,IAAIC,sBAAsB;AAAG;AAAe,YAAY;AACpD,2CAAyC;AACrCC,gEAAgB,OAAhBA,OAAgB,CAAhBA;AACA;;AACA,qBAAiBC,yDAAS,CAA1B;AACA;;AACA;AACH;;AACDF,wBAAsB,CAAtBA,8BAAqD,YAAY;AAC7D,QAAI,2DAAS,OAAOG,sDAAI,CAAX,cAAb,YAAmD;AAC/C,YAAM,UAAN,wDAAM,CAAN;AACH;;AACD,QAAIC,EAAE,GAAGD,sDAAI,CAAJA,YAAT;AAAA,QAAiCE,KAAK,GAAGD,EAAE,KAAK,KAAPA,SAJoB,EAI7D,CAJ6D,CAK7D;;AACA,QAAIC,KAAK,CAAT,QAAS,CAAT,EAAqB;AACjB,oCAA8BC,MAAM,CAANA,OAAcA,MAAM,CAANA,WAAkB,eAAhCA,YAAcA,CAAdA,EAA9B,KAA8BA,CAA9B;AADJ,WAGK,IAAID,KAAK,CAAT,YAAS,CAAT,EAAyB;AAC1B,oCAA8BC,MAAM,CAANA,OAAcA,MAAM,CAANA,WAAkB,eAAhCA,YAAcA,CAAdA,EAA8DD,KAAK,CAAjG,YAAiG,CAAnEC,CAA9B;AACH;;AACD,QAAID,KAAK,CAAT,OAAS,CAAT,EAAoB;AAChB,6BAAuBC,MAAM,CAANA,OAAcA,MAAM,CAANA,WAAkB,eAAhCA,KAAcA,CAAdA,EAAuDD,KAAK,CAAnF,OAAmF,CAA5DC,CAAvB;AACH;AAdLN;;AAgBAA,wBAAsB,CAAtBA,mBAA0C,YAAY;AAClD,QAAI,CAAC,KAAL,WAAqB;AACjBD,YAAM,CAANA;AACAA,YAAM,CAANA;AACA;AACH;;AACD,QAAI,CAACO,MAAM,CAANA,2EAAkC,KAAvC,SAAKA,CAAL,EAAwD;AACpD;AACH;;AACDP,UAAM,CAANA,6BAAoC,KAApCA;AACA,WAAQQ,4DAAC,yBAAyB;AAAE,mBAAa;AAAf,KAAzB,EAAuEA,4DAAC,oBAAoB;AAAE,mBAAa;AAAf,KAApB,EAAuEA,4DAAC,8BAA8B;AAAEC,eAAS,EAAE,KAAb;AAA6B,mBAA7B;AAAuEC,eAAS,EAAE,KAAKA;AAAvF,KAA9B,CAAxE,CAAxE,CAAT;AAVJT;;AAYA;AApCJ,CAA4C,EAA5C","file":"18.js","sourcesContent":["import { r as registerInstance, h } from './index-83f2275b.js';\nimport { ConsoleLogger } from '@aws-amplify/core';\nimport { A as AuthState } from './auth-types-78df304e.js';\nimport { Auth } from '@aws-amplify/auth';\nimport { N as NO_AUTH_MODULE_FOUND } from './constants-c8ecaa24.js';\nvar logger = new ConsoleLogger('amplify-federated-sign-in');\nvar AmplifyFederatedSignIn = /** @class */ (function () {\n function AmplifyFederatedSignIn(hostRef) {\n registerInstance(this, hostRef);\n /** The current authentication state. */\n this.authState = AuthState.SignIn;\n /** Federated credentials & configuration. */\n this.federated = {};\n }\n AmplifyFederatedSignIn.prototype.componentWillLoad = function () {\n if (!Auth || typeof Auth.configure !== 'function') {\n throw new Error(NO_AUTH_MODULE_FOUND);\n }\n var _a = Auth.configure().oauth, oauth = _a === void 0 ? {} : _a;\n // backward compatibility\n if (oauth['domain']) {\n this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth);\n }\n else if (oauth['awsCognito']) {\n this.federated.oauth_config = Object.assign(Object.assign({}, this.federated.oauth_config), oauth['awsCognito']);\n }\n if (oauth['auth0']) {\n this.federated.auth0 = Object.assign(Object.assign({}, this.federated.auth0), oauth['auth0']);\n }\n };\n AmplifyFederatedSignIn.prototype.render = function () {\n if (!this.federated) {\n logger.debug('federated prop is empty. show nothing');\n logger.debug('federated={google_client_id: , facebook_app_id: , amazon_client_id}');\n return null;\n }\n if (!Object.values(AuthState).includes(this.authState)) {\n return null;\n }\n logger.debug('federated Config is', this.federated);\n return (h(\"amplify-form-section\", { \"data-test\": \"federated-sign-in-section\" }, h(\"amplify-section\", { \"data-test\": \"federated-sign-in-body-section\" }, h(\"amplify-federated-buttons\", { authState: this.authState, \"data-test\": \"federated-sign-in-buttons\", federated: this.federated }))));\n };\n return AmplifyFederatedSignIn;\n}());\nexport { AmplifyFederatedSignIn as amplify_federated_sign_in };\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-form-field_4.entry.js"],"names":["amplifyFormFieldCss","AmplifyFormField","hostRef","registerInstance","type","required","placeholder","prototype","componentWillLoad","console","warn","render","h","label","htmlFor","fieldId","description","id","name","handleInputChange","value","inputProps","disabled","hint","style","amplifyHintCss","AmplifyHint","amplifyInputCss","AmplifyInput","autoCompleted","setAutoCompleteValue","input","el","querySelector","dispatchEvent","Event","checkAutoCompletion","targetInput","_this","addEventListener","e","target","disconnectedCallback","removeHubListener","closestElement","onAuthUIStateChange","componentDidLoad","test","navigator","userAgent","container","signIn","username","password","Host","Object","assign","onInput","event","defineProperty","get","getElement","enumerable","configurable","amplifyLabelCss","AmplifyLabel"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,mBAAmB,GAAG,mTAA1B;;AACA,IAAIC,gBAAgB;AAAG;AAAe,YAAY;EAC9C,SAASA,gBAAT,CAA0BC,OAA1B,EAAmC;IAC/BC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;IACA;;IACA,KAAKC,IAAL,GAAY,MAAZ;IACA;;IACA,KAAKC,QAAL,GAAgB,KAAhB;IACA;;IACA,KAAKC,WAAL,GAAmB,EAAnB;EACH;;EACDL,gBAAgB,CAACM,SAAjBN,CAA2BO,iBAA3BP,GAA+C,YAAY;IACvDQ,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAR,gBAAgB,CAACM,SAAjBN,CAA2BU,MAA3BV,GAAoC,YAAY;IAC5C,OAAQW,4DAAC,CAAC,KAAD,EAAQ;MAAE,SAAO;IAAT,CAAR,EAAiC,KAAKC,KAAL,IAAeD,4DAAC,CAAC,KAAD,EAAQ;MAAE,SAAO;IAAT,CAAR,EAAuCA,4DAAC,CAAC,eAAD,EAAkB;MAAEE,OAAO,EAAE,KAAKC;IAAhB,CAAlB,EAA6C,KAAKF,KAAlD,CAAxC,CAAjD,EAAqJ,KAAKG,WAAL,IAAqBJ,4DAAC,CAAC,KAAD,EAAQ;MAAEK,EAAE,EAAE,KAAKF,OAAL,GAAe,cAArB;MAAqC,SAAO,wBAA5C;MA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eAAY;MAAE,OAAOC,4DAAU,CAAC,IAAD,CAAjB;IAD6B;IAEhDC,UAAU,EAAE,KAFoC;IAGhDC,YAAY,EAAE;EAHkC,CAApDR;EAKA,OAAO3B,YAAP;AAxG8B,GAAlC;;AA0GAA,YAAY,CAACJ,KAAbI,GAAqBD,eAArBC;AACA,IAAIoC,eAAe,GAAG,yIAAtB;;AACA,IAAIC,YAAY;AAAG;AAAe,YAAY;EAC1C,SAASA,YAAT,CAAsB/D,OAAtB,EAA+B;IAC3BC,4DAAgB,CAAC,IAAD,EAAOD,OAAP,CAAhBC;EACH;;EACD8D,YAAY,CAAC1D,SAAb0D,CAAuBzD,iBAAvByD,GAA2C,YAAY;IACnDxD,OAAO,CAACC,IAARD,CAAa,kMAAbA;EADJ;;EAGAwD,YAAY,CAAC1D,SAAb0D,CAAuBtD,MAAvBsD,GAAgC,YAAY;IACxC,OAAQrD,4DAAC,CAAC,OAAD,EAAU;MAAE,SAAO,OAAT;MAAkBE,OAAO,EAAE,KAAKA;IAAhC,CAAV,EAAqDF,4DAAC,CAAC,MAAD,EAAS,IAAT,CAAtD,CAAT;EADJ;;EAGA,OAAOqD,YAAP;AAV8B,GAAlC;;AAYAA,YAAY,CAACzC,KAAbyC,GAAqBD,eAArBC","file":"18.js","sourcesContent":["import { r as registerInstance, h, H as Host, g as getElement } from './index-83f2275b.js';\nimport '@aws-amplify/core';\nimport './auth-types-78df304e.js';\nimport '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport './constants-c8ecaa24.js';\nimport { e as closestElement, o as onAuthUIStateChange } from './helpers-14fcb50c.js';\nvar amplifyFormFieldCss = \"amplify-form-field{--label-font-size:var(--amplify-text-md);--description-font-size:var(--amplify-text-sm)}.form-field{margin-bottom:15px}.form-field-label{display:block;font-size:var(--label-font-size);padding-bottom:0.5em}.form-field-description{font-size:var(--description-font-size);padding-top:0.5em}\";\nvar AmplifyFormField = /** @class */ (function () {\n function AmplifyFormField(hostRef) {\n registerInstance(this, hostRef);\n /** The input type. Can be any HTML input type. */\n this.type = 'text';\n /** The required flag in order to make an input required prior to submitting a form */\n this.required = false;\n /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */\n this.placeholder = '';\n }\n AmplifyFormField.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyFormField.prototype.render = function () {\n return (h(\"div\", { class: \"form-field\" }, this.label && (h(\"div\", { class: \"form-field-label\" }, h(\"amplify-label\", { htmlFor: this.fieldId }, this.label))), this.description && (h(\"div\", { id: this.fieldId + \"-description\", class: \"form-field-description\", \"data-test\": \"form-field-description\" }, this.description)), h(\"div\", null, h(\"slot\", { name: \"input\" }, h(\"amplify-input\", { fieldId: this.fieldId, description: this.description, type: this.type, handleInputChange: this.handleInputChange, placeholder: this.placeholder, name: this.name, value: this.value, inputProps: this.inputProps, disabled: this.disabled, required: this.required }))), this.hint && (h(\"amplify-hint\", { id: this.fieldId + \"-hint\" }, this.hint))));\n };\n return AmplifyFormField;\n}());\nAmplifyFormField.style = amplifyFormFieldCss;\nvar amplifyHintCss = \":host{--color:var(--amplify-grey);--font-family:var(--amplify-font-family);--font-size:var(--amplify-text-xs);--font-weight:var(--amplify-font-weight)}.hint{color:var(--color);font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--font-size);margin-bottom:2.625rem}\";\nvar AmplifyHint = /** @class */ (function () {\n function AmplifyHint(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyHint.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyHint.prototype.render = function () {\n return (h(\"div\", { class: \"hint\" }, h(\"slot\", null)));\n };\n return AmplifyHint;\n}());\nAmplifyHint.style = amplifyHintCss;\nvar amplifyInputCss = \"amplify-input{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-color-focus:var(--amplify-primary-color);--border:1px solid var(--border-color);--margin:0 0 0.625rem 0}[data-autocompleted]{background-color:#e8f0fe !important}.input-host{width:100%}.input{display:block;width:100%;padding:1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);background-image:none;border:var(--border);border-radius:3px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:var(--margin);height:3.125rem;line-height:1.1;-webkit-box-shadow:none;box-shadow:none}.input:focus{outline:none;border-color:var(--border-color-focus)}.input:disabled{opacity:0.5}\";\nvar AmplifyInput = /** @class */ (function () {\n function AmplifyInput(hostRef) {\n registerInstance(this, hostRef);\n /** The input type. Can be any HTML input type. */\n this.type = 'text';\n /** The callback, called when the input is modified by the user. */\n this.handleInputChange = function () { return void 0; };\n /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */\n this.placeholder = '';\n /** Whether the input is a required field */\n this.required = false;\n /** Whether the input has been autocompleted */\n this.autoCompleted = false;\n }\n /**\n * Sets the value of this input to the value in autofill input event.\n */\n AmplifyInput.prototype.setAutoCompleteValue = function (value) {\n var input = this.el.querySelector('input');\n if (!input)\n return;\n input.value = value;\n // dispatch an input event from this element to the parent form\n input.dispatchEvent(new Event('input'));\n this.autoCompleted = true;\n };\n /**\n * Checks if the target dummy input in `amplify-auth-container` is present have been autofilled.\n * If so, we update this.value with the autofilled value.\n */\n AmplifyInput.prototype.checkAutoCompletion = function (targetInput) {\n var _this = this;\n if (!targetInput)\n return;\n if (targetInput.value) {\n // if value is already set, we set the value directly\n this.setAutoCompleteValue(targetInput.value);\n }\n else {\n // if value is not set, we start listening for it\n targetInput.addEventListener('input', function (e) {\n var value = e.target.value;\n _this.setAutoCompleteValue(value);\n });\n }\n };\n AmplifyInput.prototype.disconnectedCallback = function () {\n this.removeHubListener && this.removeHubListener(); // stop listening to `onAuthUIStateChange`\n };\n AmplifyInput.prototype.componentWillLoad = function () {\n var _this = this;\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n // the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.\n if (!closestElement('amplify-authenticator', this.el))\n return;\n this.removeHubListener = onAuthUIStateChange(function () {\n /**\n * When we're using slots, autofilled data will persist between different authState,\n * even though input events are not triggered. This ends up in parent components\n * not picking up input values. For now, we're emptying the input on authState change\n * which is the existing behavior.\n */\n var input = _this.el.querySelector('input');\n if (input)\n input.value = '';\n _this.autoCompleted = false;\n });\n };\n AmplifyInput.prototype.componentDidLoad = function () {\n // no-op if this field already has been autofilled or already has an value\n if (this.autoCompleted || this.value)\n return;\n if (/Firefox/.test(navigator.userAgent))\n return; // firefox autofill works\n var container = closestElement('amplify-auth-container', this.el);\n var signIn = closestElement('amplify-sign-in', this.el);\n // only autocomplete if `amplify-auth-container` is present and input is under `sign-in`.\n if (!container || !signIn)\n return;\n var username = container.querySelector(\"input[name='username']\");\n var password = container.querySelector(\"input[name='password']\");\n if (this.name === 'username' ||\n this.name === 'email' ||\n this.name === 'phone') {\n this.checkAutoCompletion(username);\n }\n else if (this.name === 'password') {\n this.checkAutoCompletion(password);\n }\n };\n AmplifyInput.prototype.render = function () {\n var _this = this;\n return (h(Host, { class: \"input-host\" }, h(\"input\", Object.assign({ id: this.fieldId, \"aria-describedby\": this.fieldId && this.description\n ? this.fieldId + \"-description\"\n : null, \"data-autocompleted\": this.autoCompleted, type: this.type, onInput: function (event) {\n _this.autoCompleted = false;\n _this.handleInputChange(event);\n }, placeholder: this.placeholder, name: this.name, class: \"input\", value: this.value, disabled: this.disabled, required: this.required }, this.inputProps))));\n };\n Object.defineProperty(AmplifyInput.prototype, \"el\", {\n get: function () { return getElement(this); },\n enumerable: false,\n configurable: true\n });\n return AmplifyInput;\n}());\nAmplifyInput.style = amplifyInputCss;\nvar amplifyLabelCss = \":host{--label-color:var(--amplify-secondary-color)}.label{color:var(--label-color);font-size:var(--amplify-text-sm);margin-bottom:16px}\";\nvar AmplifyLabel = /** @class */ (function () {\n function AmplifyLabel(hostRef) {\n registerInstance(this, hostRef);\n }\n AmplifyLabel.prototype.componentWillLoad = function () {\n console.warn('Version `1.x` of Amplify UI has been deprecated and will be removed in a future major version of `aws-amplify`. Please visit https://ui.docs.amplify.aws/ for the current version of Amplify UI.');\n };\n AmplifyLabel.prototype.render = function () {\n return (h(\"label\", { class: \"label\", htmlFor: this.htmlFor }, h(\"slot\", null)));\n };\n return AmplifyLabel;\n}());\nAmplifyLabel.style = amplifyLabelCss;\nexport { AmplifyFormField as amplify_form_field, AmplifyHint as amplify_hint, AmplifyInput as amplify_input, AmplifyLabel as amplify_label };\n"],"sourceRoot":""}