@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/19.js CHANGED
@@ -1,18 +1,15 @@
1
1
  (this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[19],{
2
2
 
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 */
3
+ /***/ "../amplify-ui-components/dist/esm-es5/amplify-greetings.entry.js":
4
+ /*!************************************************************************!*\
5
+ !*** ../amplify-ui-components/dist/esm-es5/amplify-greetings.entry.js ***!
6
+ \************************************************************************/
7
+ /*! exports provided: amplify_greetings */
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_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; });
12
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_greetings", function() { return AmplifyGreetings; });
16
13
  /* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
17
14
  /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
18
15
  /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
@@ -29,236 +26,50 @@ __webpack_require__.r(__webpack_exports__);
29
26
 
30
27
 
31
28
 
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}";
29
+ var amplifyGreetingsCss = ":host{--background-color:var(--amplify-white);--border-color:var(--amplify-light-grey);--font-family:var(--amplify-font-family)}.greetings{display:-ms-flexbox;display:flex;border:1px solid transparent;background-color:var(--background-color);border-color:var(--border-color);padding:0.625rem;font-family:var(--font-family);-ms-flex-pack:justify;justify-content:space-between}.nav{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center}.logo{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;justify-self:flex-start}amplify-sign-out{margin-left:1rem}";
33
30
 
34
- var AmplifyFormField =
31
+ var AmplifyGreetings =
35
32
  /** @class */
36
33
  function () {
37
- function AmplifyFormField(hostRef) {
34
+ function AmplifyGreetings(hostRef) {
38
35
  Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
39
- /** The input type. Can be any HTML input type. */
36
+ /** Username displayed in the greetings */
40
37
 
41
- this.type = 'text';
42
- /** The required flag in order to make an input required prior to submitting a form */
38
+ this.username = null;
39
+ /** Logo displayed inside of the header */
43
40
 
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. */
41
+ this.logo = null;
42
+ /** Auth state change handler for this component */
46
43
 
47
- this.placeholder = '';
44
+ this.handleAuthStateChange = _helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["d"];
48
45
  }
49
46
 
50
- AmplifyFormField.prototype.render = function () {
51
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
52
- "class": "form-field"
53
- }, this.label && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
54
- "class": "form-field-label"
55
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-label", {
56
- htmlFor: this.fieldId
57
- }, this.label)), this.description && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
58
- id: this.fieldId + "-description",
59
- "class": "form-field-description",
60
- "data-test": "form-field-description"
61
- }, this.description), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
62
- name: "input"
63
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-input", {
64
- fieldId: this.fieldId,
65
- description: this.description,
66
- type: this.type,
67
- handleInputChange: this.handleInputChange,
68
- placeholder: this.placeholder,
69
- name: this.name,
70
- value: this.value,
71
- inputProps: this.inputProps,
72
- disabled: this.disabled,
73
- required: this.required
74
- }))), this.hint && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-hint", {
75
- id: this.fieldId + "-hint"
76
- }, this.hint));
47
+ AmplifyGreetings.prototype.componentWillLoad = function () {
48
+ 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.');
77
49
  };
78
50
 
79
- return AmplifyFormField;
80
- }();
81
-
82
- AmplifyFormField.style = amplifyFormFieldCss;
83
- 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}";
84
-
85
- var AmplifyHint =
86
- /** @class */
87
- function () {
88
- function AmplifyHint(hostRef) {
89
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
90
- }
91
-
92
- AmplifyHint.prototype.render = function () {
93
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
94
- "class": "hint"
95
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
96
- };
97
-
98
- return AmplifyHint;
99
- }();
100
-
101
- AmplifyHint.style = amplifyHintCss;
102
- 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}";
103
-
104
- var AmplifyInput =
105
- /** @class */
106
- function () {
107
- function AmplifyInput(hostRef) {
108
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
109
- /** The input type. Can be any HTML input type. */
110
-
111
- this.type = 'text';
112
- /** The callback, called when the input is modified by the user. */
113
-
114
- this.handleInputChange = function () {
115
- return void 0;
116
- };
117
- /** (Optional) The placeholder for the input element. Using hints is recommended, but placeholders can also be useful to convey information to users. */
118
-
119
-
120
- this.placeholder = '';
121
- /** Whether the input is a required field */
122
-
123
- this.required = false;
124
- /** Whether the input has been autocompleted */
125
-
126
- this.autoCompleted = false;
127
- }
128
- /**
129
- * Sets the value of this input to the value in autofill input event.
130
- */
131
-
132
-
133
- AmplifyInput.prototype.setAutoCompleteValue = function (value) {
134
- var input = this.el.querySelector('input');
135
- if (!input) return;
136
- input.value = value; // dispatch an input event from this element to the parent form
137
-
138
- input.dispatchEvent(new Event('input'));
139
- this.autoCompleted = true;
140
- };
141
- /**
142
- * Checks if the target dummy input in `amplify-auth-container` is present have been autofilled.
143
- * If so, we update this.value with the autofilled value.
144
- */
145
-
146
-
147
- AmplifyInput.prototype.checkAutoCompletion = function (targetInput) {
148
- var _this = this;
149
-
150
- if (!targetInput) return;
151
-
152
- if (targetInput.value) {
153
- // if value is already set, we set the value directly
154
- this.setAutoCompleteValue(targetInput.value);
155
- } else {
156
- // if value is not set, we start listening for it
157
- targetInput.addEventListener('input', function (e) {
158
- var value = e.target.value;
159
-
160
- _this.setAutoCompleteValue(value);
161
- });
162
- }
163
- };
164
-
165
- AmplifyInput.prototype.disconnectedCallback = function () {
166
- this.removeHubListener && this.removeHubListener(); // stop listening to `onAuthUIStateChange`
167
- };
168
-
169
- AmplifyInput.prototype.componentWillLoad = function () {
170
- var _this = this; // the below behaviors are only applicable if `amplify-input` is used by `amplify-authenticator`.
171
-
172
-
173
- if (!Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-authenticator', this.el)) return;
174
- this.removeHubListener = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["o"])(function () {
175
- /**
176
- * When we're using slots, autofilled data will persist between different authState,
177
- * even though input events are not triggered. This ends up in parent components
178
- * not picking up input values. For now, we're emptying the input on authState change
179
- * which is the existing behavior.
180
- */
181
- var input = _this.el.querySelector('input');
182
-
183
- if (input) input.value = '';
184
- _this.autoCompleted = false;
185
- });
186
- };
187
-
188
- AmplifyInput.prototype.componentDidLoad = function () {
189
- // no-op if this field already has been autofilled or already has an value
190
- if (this.autoCompleted || this.value) return;
191
- if (/Firefox/.test(navigator.userAgent)) return; // firefox autofill works
192
-
193
- var container = Object(_helpers_14fcb50c_js__WEBPACK_IMPORTED_MODULE_6__["e"])('amplify-auth-container', this.el);
194
- 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`.
195
-
196
- if (!container || !signIn) return;
197
- var username = container.querySelector("input[name='username']");
198
- var password = container.querySelector("input[name='password']");
199
-
200
- if (this.name === 'username' || this.name === 'email' || this.name === 'phone') {
201
- this.checkAutoCompletion(username);
202
- } else if (this.name === 'password') {
203
- this.checkAutoCompletion(password);
204
- }
205
- };
206
-
207
- AmplifyInput.prototype.render = function () {
208
- var _this = this;
209
-
210
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["H"], {
211
- "class": "input-host"
212
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("input", Object.assign({
213
- id: this.fieldId,
214
- "aria-describedby": this.fieldId && this.description ? this.fieldId + "-description" : null,
215
- "data-autocompleted": this.autoCompleted,
216
- type: this.type,
217
- onInput: function onInput(event) {
218
- _this.autoCompleted = false;
219
-
220
- _this.handleInputChange(event);
221
- },
222
- placeholder: this.placeholder,
223
- name: this.name,
224
- "class": "input",
225
- value: this.value,
226
- disabled: this.disabled,
227
- required: this.required
228
- }, this.inputProps)));
229
- };
230
-
231
- Object.defineProperty(AmplifyInput.prototype, "el", {
232
- get: function get() {
233
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["g"])(this);
234
- },
235
- enumerable: false,
236
- configurable: true
237
- });
238
- return AmplifyInput;
239
- }();
240
-
241
- AmplifyInput.style = amplifyInputCss;
242
- var amplifyLabelCss = ":host{--label-color:var(--amplify-secondary-color)}.label{color:var(--label-color);font-size:var(--amplify-text-sm);margin-bottom:16px}";
243
-
244
- var AmplifyLabel =
245
- /** @class */
246
- function () {
247
- function AmplifyLabel(hostRef) {
248
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
249
- }
250
-
251
- AmplifyLabel.prototype.render = function () {
252
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("label", {
253
- "class": "label",
254
- htmlFor: this.htmlFor
255
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
51
+ AmplifyGreetings.prototype.render = function () {
52
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("header", {
53
+ "class": "greetings"
54
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
55
+ "class": "logo"
56
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
57
+ name: "logo"
58
+ }, this.logo && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", null, this.logo))), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", {
59
+ "class": "nav"
60
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
61
+ name: "nav"
62
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-nav", null, this.username && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
63
+ name: "greetings-message"
64
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", null, "Hello, ", this.username)), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-sign-out", {
65
+ handleAuthStateChange: this.handleAuthStateChange
66
+ })))));
256
67
  };
257
68
 
258
- return AmplifyLabel;
69
+ return AmplifyGreetings;
259
70
  }();
260
71
 
261
- AmplifyLabel.style = amplifyLabelCss;
72
+ AmplifyGreetings.style = amplifyGreetingsCss;
262
73
 
263
74
 
264
75
  /***/ })
package/dist/19.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-form-field_4.entry.js"],"names":["amplifyFormFieldCss","AmplifyFormField","registerInstance","h","htmlFor","fieldId","id","name","description","type","handleInputChange","placeholder","value","inputProps","disabled","required","amplifyHintCss","AmplifyHint","amplifyInputCss","AmplifyInput","input","_this","targetInput","e","closestElement","onAuthUIStateChange","navigator","container","signIn","username","password","onInput","Object","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,GAAvB;;AACA,IAAIC,gBAAgB;AAAG;AAAe,YAAY;AAC9C,qCAAmC;AAC/BC,gEAAgB,OAAhBA,OAAgB,CAAhBA;AACA;;AACA;AACA;;AACA;AACA;;AACA;AACH;;AACDD,kBAAgB,CAAhBA,mBAAoC,YAAY;AAC5C,WAAQE,4DAAC,QAAQ;AAAE,eAAO;AAAT,KAAR,EAAiC,cAAeA,4DAAC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AAe,GAAnB;;AACA,IAAIC,YAAY;AAAG;AAAe,YAAY;AAC1C,iCAA+B;AAC3BpC,gEAAgB,OAAhBA,OAAgB,CAAhBA;AACH;;AACDoC,cAAY,CAAZA,mBAAgC,YAAY;AACxC,WAAQnC,4DAAC,UAAU;AAAE,eAAF;AAAkBC,aAAO,EAAE,KAAKA;AAAhC,KAAV,EAAqDD,4DAAC,SAA/D,IAA+D,CAAtD,CAAT;AADJmC;;AAGA;AAPJ,CAAkC,EAAlC;;AASAA,YAAY,CAAZA","file":"19.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.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.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 // 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.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":""}
1
+ {"version":3,"sources":["webpack:///./node_modules/@aws-amplify/ui-components/dist/esm-es5/amplify-greetings.entry.js"],"names":["amplifyGreetingsCss","AmplifyGreetings","hostRef","registerInstance","username","logo","handleAuthStateChange","dispatchAuthStateChangeEvent","prototype","componentWillLoad","console","warn","render","h","name","style"],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,mBAAmB,GAAG,0lBAA1B;;AACA,IAAIC,gBAAgB;AAAG;AAAe,YAAY;EAC9C,SAASA,gBAAT,CAA0BC,OAA1B,EAAmC;IAC/BC,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\nimport './auth-types-78df304e.js';\nimport '@aws-amplify/auth';\nimport './Translations-108d469f.js';\nimport './constants-c8ecaa24.js';\nimport { d as dispatchAuthStateChangeEvent } from './helpers-14fcb50c.js';\nvar amplifyGreetingsCss = \":host{--background-color:var(--amplify-white);--border-color:var(--amplify-light-grey);--font-family:var(--amplify-font-family)}.greetings{display:-ms-flexbox;display:flex;border:1px solid transparent;background-color:var(--background-color);border-color:var(--border-color);padding:0.625rem;font-family:var(--font-family);-ms-flex-pack:justify;justify-content:space-between}.nav{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center}.logo{display:-ms-flexbox;display:flex;-ms-flex-item-align:center;align-self:center;justify-self:flex-start}amplify-sign-out{margin-left:1rem}\";\nvar AmplifyGreetings = /** @class */ (function () {\n function AmplifyGreetings(hostRef) {\n registerInstance(this, hostRef);\n /** Username displayed in the greetings */\n this.username = null;\n /** Logo displayed inside of the header */\n this.logo = null;\n /** Auth state change handler for this component */\n this.handleAuthStateChange = dispatchAuthStateChangeEvent;\n }\n AmplifyGreetings.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 AmplifyGreetings.prototype.render = function () {\n return (h(\"header\", { class: \"greetings\" }, h(\"span\", { class: \"logo\" }, h(\"slot\", { name: \"logo\" }, this.logo && h(\"span\", null, this.logo))), h(\"span\", { class: \"nav\" }, h(\"slot\", { name: \"nav\" }, h(\"amplify-nav\", null, this.username && (h(\"slot\", { name: \"greetings-message\" }, h(\"span\", null, \"Hello, \", this.username))), h(\"amplify-sign-out\", { handleAuthStateChange: this.handleAuthStateChange }))))));\n };\n return AmplifyGreetings;\n}());\nAmplifyGreetings.style = amplifyGreetingsCss;\nexport { AmplifyGreetings as amplify_greetings };\n"],"sourceRoot":""}