@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/12.js CHANGED
@@ -1,1149 +1,123 @@
1
1
  (this["webpackJsonpaws_amplify_react"] = this["webpackJsonpaws_amplify_react"] || []).push([[12],{
2
2
 
3
- /***/ "../amplify-ui-components/dist/esm-es5/amplify-auth-fields_9.entry.js":
4
- /*!****************************************************************************!*\
5
- !*** ../amplify-ui-components/dist/esm-es5/amplify-auth-fields_9.entry.js ***!
6
- \****************************************************************************/
7
- /*! exports provided: amplify_auth_fields, amplify_code_field, amplify_country_dial_code, amplify_email_field, amplify_form_section, amplify_password_field, amplify_phone_field, amplify_select, amplify_username_field */
3
+ /***/ "../amplify-ui-components/dist/esm-es5/amplify-button_3.entry.js":
4
+ /*!***********************************************************************!*\
5
+ !*** ../amplify-ui-components/dist/esm-es5/amplify-button_3.entry.js ***!
6
+ \***********************************************************************/
7
+ /*! exports provided: amplify_button, amplify_loading_spinner, amplify_section */
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_auth_fields", function() { return AmplifyAuthFields; });
13
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_code_field", function() { return AmplifyCodeField; });
14
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_country_dial_code", function() { return AmplifyCountryDialCode; });
15
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_email_field", function() { return AmplifyEmailField; });
16
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_form_section", function() { return AmplifyFormSection; });
17
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_password_field", function() { return AmplifyPasswordField; });
18
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_phone_field", function() { return AmplifyPhoneField; });
19
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_select", function() { return AmplifySelect; });
20
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_username_field", function() { return AmplifyUsernameField; });
12
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_button", function() { return AmplifyButton; });
13
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_loading_spinner", function() { return AmplifyLoadingSpinner; });
14
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "amplify_section", function() { return AmplifySection; });
21
15
  /* harmony import */ var _index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-83f2275b.js */ "../amplify-ui-components/dist/esm-es5/index-83f2275b.js");
22
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @aws-amplify/core */ "@aws-amplify/core");
23
- /* harmony import */ var _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__);
24
- /* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @aws-amplify/auth */ "@aws-amplify/auth");
25
- /* harmony import */ var _aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_aws_amplify_auth__WEBPACK_IMPORTED_MODULE_2__);
26
- /* harmony import */ var _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Translations-108d469f.js */ "../amplify-ui-components/dist/esm-es5/Translations-108d469f.js");
27
- /* harmony import */ var _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./constants-c8ecaa24.js */ "../amplify-ui-components/dist/esm-es5/constants-c8ecaa24.js");
28
16
 
17
+ var amplifyButtonCss = "amplify-button{--background-color:var(--amplify-primary-color);--background-color-active:var(--amplify-primary-shade);--background-color-disable:var(--amplify-primary-tint);--color:var(--amplify-primary-contrast);--border-width:0;--border-color:initial;--border-style:initial;--border-radius:initial;--link-color:var(--amplify-primary-color);--link-hover:var(--amplify-primary-tint);--link-active:var(--amplify-primary-shade);--text-transform:uppercase;--icon-fill:var(--amplify-white);--icon-height:1.25rem;--padding:1rem;--width:100%;width:var(--width);text-align:center}@media (min-width: 672px){amplify-button{width:inherit}}.button{width:100%;min-width:153px;display:inline-block;margin-bottom:0;font-size:var(--amplify-text-sm);font-family:var(--amplify-font-family);font-weight:600;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;color:var(--color);padding:var(--padding);letter-spacing:0.75px;text-transform:var(--text-transform);background-color:var(--background-color);border-width:var(--border-width);border-color:var(--border-color);border-style:var(--border-style);border-radius:var(--border-radius)}.button:active{opacity:1;background-color:var(--background-color-active)}.button:hover{opacity:0.8}.button:disabled{opacity:0.65;cursor:auto;background-color:var(--background-color-disable)}.icon{background-color:inherit;border:none;font:inherit;cursor:pointer;padding:var(--padding)}.icon amplify-icon{--icon-fill-color:var(--icon-fill);--height:var(--icon-height)}.anchor{color:var(--link-color);background-color:inherit;padding:0;border:none;font:inherit;cursor:pointer}.anchor:link{color:var(--link-color);text-decoration:none}.anchor:hover{color:var(--link-hover);text-decoration:underline}.anchor:active{color:var(--link-active);text-decoration:underline}";
29
18
 
30
-
31
-
32
-
33
- var componentFieldMapping = {
34
- username: function username(ff) {
35
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-username-field", {
36
- label: ff.label,
37
- placeholder: ff.placeholder,
38
- required: ff.required,
39
- handleInputChange: ff.handleInputChange,
40
- value: ff.value,
41
- inputProps: ff.inputProps,
42
- disabled: ff.disabled,
43
- hint: ff.hint
44
- });
45
- },
46
- password: function password(ff) {
47
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-password-field", {
48
- label: ff.label,
49
- placeholder: ff.placeholder,
50
- hint: ff.hint,
51
- required: ff.required,
52
- handleInputChange: ff.handleInputChange,
53
- value: ff.value,
54
- inputProps: ff.inputProps,
55
- disabled: ff.disabled
56
- });
57
- },
58
- email: function email(ff) {
59
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-email-field", {
60
- label: ff.label,
61
- placeholder: ff.placeholder,
62
- required: ff.required,
63
- handleInputChange: ff.handleInputChange,
64
- value: ff.value,
65
- inputProps: ff.inputProps,
66
- disabled: ff.disabled,
67
- hint: ff.hint
68
- });
69
- },
70
- code: function code(ff) {
71
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-code-field", {
72
- label: ff.label,
73
- placeholder: ff.placeholder,
74
- hint: ff.hint,
75
- required: ff.required,
76
- handleInputChange: ff.handleInputChange,
77
- value: ff.value,
78
- inputProps: Object.assign(Object.assign({}, ff.inputProps), {
79
- min: '0'
80
- }),
81
- disabled: ff.disabled
82
- });
83
- },
84
- // TODO: Will create a phone field component once the dial country code component is in
85
- phone_number: function phone_number(ff) {
86
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-phone-field", {
87
- label: ff.label,
88
- placeholder: ff.placeholder,
89
- required: ff.required,
90
- handleInputChange: ff.handleInputChange,
91
- value: ff.value,
92
- inputProps: ff.inputProps,
93
- disabled: ff.disabled,
94
- dialCode: ff.dialCode,
95
- hint: ff.hint
96
- });
97
- },
98
- "default": function _default(ff) {
99
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
100
- label: ff.label,
101
- type: ff.type,
102
- placeholder: ff.placeholder,
103
- required: ff.required,
104
- handleInputChange: ff.handleInputChange,
105
- value: ff.value,
106
- inputProps: ff.inputProps,
107
- disabled: ff.disabled,
108
- hint: ff.hint
109
- });
110
- }
111
- };
112
- var amplifyAuthFieldsCss = ".auth-fields{margin-bottom:2rem}";
113
-
114
- var AmplifyAuthFields =
115
- /** @class */
116
- function () {
117
- function AmplifyAuthFields(hostRef) {
118
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
119
- }
120
-
121
- AmplifyAuthFields.prototype.constructFormFieldOptions = function (formFields) {
122
- var content = [];
123
- if (formFields === undefined) return '';
124
- formFields.forEach(function (formField) {
125
- if (typeof formField === 'string') {
126
- content.push(componentFieldMapping[formField](formField));
127
- } else if (Object.keys(componentFieldMapping).includes(formField.type)) {
128
- content.push(componentFieldMapping[formField.type](formField));
129
- } else {
130
- content.push(componentFieldMapping['default'](formField));
131
- }
132
- });
133
- return content;
134
- };
135
-
136
- AmplifyAuthFields.prototype.render = function () {
137
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
138
- "class": "auth-fields"
139
- }, this.constructFormFieldOptions(this.formFields));
140
- };
141
-
142
- return AmplifyAuthFields;
143
- }();
144
-
145
- AmplifyAuthFields.style = amplifyAuthFieldsCss;
146
-
147
- var AmplifyCodeField =
148
- /** @class */
149
- function () {
150
- function AmplifyCodeField(hostRef) {
151
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
152
- /** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
153
-
154
- this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["i"];
155
- /** Used for the code label */
156
-
157
- this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].CODE_LABEL;
158
- /** Used for the placeholder label */
159
-
160
- this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].CODE_PLACEHOLDER;
161
- /** The required flag in order to make an input required prior to submitting a form */
162
-
163
- this.required = false;
164
- }
165
-
166
- AmplifyCodeField.prototype.render = function () {
167
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
168
- fieldId: this.fieldId,
169
- label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
170
- placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
171
- type: "number",
172
- hint: this.hint,
173
- required: this.required,
174
- handleInputChange: this.handleInputChange,
175
- value: this.value,
176
- inputProps: this.inputProps,
177
- disabled: this.disabled
178
- });
179
- };
180
-
181
- return AmplifyCodeField;
182
- }();
183
-
184
- var countryDialCodes = [{
185
- label: '+1',
186
- value: '+1'
187
- }, {
188
- label: '+7',
189
- value: '+7'
190
- }, {
191
- label: '+20',
192
- value: '+20'
193
- }, {
194
- label: '+27',
195
- value: '+27'
196
- }, {
197
- label: '+30',
198
- value: '+30'
199
- }, {
200
- label: '+31',
201
- value: '+31'
202
- }, {
203
- label: '+32',
204
- value: '+32'
205
- }, {
206
- label: '+33',
207
- value: '+33'
208
- }, {
209
- label: '+34',
210
- value: '+34'
211
- }, {
212
- label: '+36',
213
- value: '+36'
214
- }, {
215
- label: '+39',
216
- value: '+39'
217
- }, {
218
- label: '+40',
219
- value: '+40'
220
- }, {
221
- label: '+41',
222
- value: '+41'
223
- }, {
224
- label: '+43',
225
- value: '+43'
226
- }, {
227
- label: '+44',
228
- value: '+44'
229
- }, {
230
- label: '+45',
231
- value: '+45'
232
- }, {
233
- label: '+46',
234
- value: '+46'
235
- }, {
236
- label: '+47',
237
- value: '+47'
238
- }, {
239
- label: '+48',
240
- value: '+48'
241
- }, {
242
- label: '+49',
243
- value: '+49'
244
- }, {
245
- label: '+51',
246
- value: '+51'
247
- }, {
248
- label: '+52',
249
- value: '+52'
250
- }, {
251
- label: '+53',
252
- value: '+53'
253
- }, {
254
- label: '+54',
255
- value: '+54'
256
- }, {
257
- label: '+55',
258
- value: '+55'
259
- }, {
260
- label: '+56',
261
- value: '+56'
262
- }, {
263
- label: '+57',
264
- value: '+57'
265
- }, {
266
- label: '+58',
267
- value: '+58'
268
- }, {
269
- label: '+60',
270
- value: '+60'
271
- }, {
272
- label: '+61',
273
- value: '+61'
274
- }, {
275
- label: '+62',
276
- value: '+62'
277
- }, {
278
- label: '+63',
279
- value: '+63'
280
- }, {
281
- label: '+64',
282
- value: '+64'
283
- }, {
284
- label: '+65',
285
- value: '+65'
286
- }, {
287
- label: '+66',
288
- value: '+66'
289
- }, {
290
- label: '+81',
291
- value: '+81'
292
- }, {
293
- label: '+82',
294
- value: '+82'
295
- }, {
296
- label: '+84',
297
- value: '+84'
298
- }, {
299
- label: '+86',
300
- value: '+86'
301
- }, {
302
- label: '+90',
303
- value: '+90'
304
- }, {
305
- label: '+91',
306
- value: '+91'
307
- }, {
308
- label: '+92',
309
- value: '+92'
310
- }, {
311
- label: '+93',
312
- value: '+93'
313
- }, {
314
- label: '+94',
315
- value: '+94'
316
- }, {
317
- label: '+95',
318
- value: '+95'
319
- }, {
320
- label: '+98',
321
- value: '+98'
322
- }, {
323
- label: '+212',
324
- value: '+212'
325
- }, {
326
- label: '+213',
327
- value: '+213'
328
- }, {
329
- label: '+216',
330
- value: '+216'
331
- }, {
332
- label: '+218',
333
- value: '+218'
334
- }, {
335
- label: '+220',
336
- value: '+220'
337
- }, {
338
- label: '+221',
339
- value: '+221'
340
- }, {
341
- label: '+222',
342
- value: '+222'
343
- }, {
344
- label: '+223',
345
- value: '+223'
346
- }, {
347
- label: '+224',
348
- value: '+224'
349
- }, {
350
- label: '+225',
351
- value: '+225'
352
- }, {
353
- label: '+226',
354
- value: '+226'
355
- }, {
356
- label: '+227',
357
- value: '+227'
358
- }, {
359
- label: '+228',
360
- value: '+228'
361
- }, {
362
- label: '+229',
363
- value: '+229'
364
- }, {
365
- label: '+230',
366
- value: '+230'
367
- }, {
368
- label: '+231',
369
- value: '+231'
370
- }, {
371
- label: '+232',
372
- value: '+232'
373
- }, {
374
- label: '+233',
375
- value: '+233'
376
- }, {
377
- label: '+234',
378
- value: '+234'
379
- }, {
380
- label: '+235',
381
- value: '+235'
382
- }, {
383
- label: '+236',
384
- value: '+236'
385
- }, {
386
- label: '+237',
387
- value: '+237'
388
- }, {
389
- label: '+238',
390
- value: '+238'
391
- }, {
392
- label: '+239',
393
- value: '+239'
394
- }, {
395
- label: '+240',
396
- value: '+240'
397
- }, {
398
- label: '+241',
399
- value: '+241'
400
- }, {
401
- label: '+242',
402
- value: '+242'
403
- }, {
404
- label: '+243',
405
- value: '+243'
406
- }, {
407
- label: '+244',
408
- value: '+244'
409
- }, {
410
- label: '+245',
411
- value: '+245'
412
- }, {
413
- label: '+246',
414
- value: '+246'
415
- }, {
416
- label: '+248',
417
- value: '+248'
418
- }, {
419
- label: '+249',
420
- value: '+249'
421
- }, {
422
- label: '+250',
423
- value: '+250'
424
- }, {
425
- label: '+251',
426
- value: '+251'
427
- }, {
428
- label: '+252',
429
- value: '+252'
430
- }, {
431
- label: '+253',
432
- value: '+253'
433
- }, {
434
- label: '+254',
435
- value: '+254'
436
- }, {
437
- label: '+255',
438
- value: '+255'
439
- }, {
440
- label: '+256',
441
- value: '+256'
442
- }, {
443
- label: '+257',
444
- value: '+257'
445
- }, {
446
- label: '+258',
447
- value: '+258'
448
- }, {
449
- label: '+260',
450
- value: '+260'
451
- }, {
452
- label: '+261',
453
- value: '+261'
454
- }, {
455
- label: '+262',
456
- value: '+262'
457
- }, {
458
- label: '+263',
459
- value: '+263'
460
- }, {
461
- label: '+264',
462
- value: '+264'
463
- }, {
464
- label: '+265',
465
- value: '+265'
466
- }, {
467
- label: '+266',
468
- value: '+266'
469
- }, {
470
- label: '+267',
471
- value: '+267'
472
- }, {
473
- label: '+268',
474
- value: '+268'
475
- }, {
476
- label: '+269',
477
- value: '+269'
478
- }, {
479
- label: '+290',
480
- value: '+290'
481
- }, {
482
- label: '+291',
483
- value: '+291'
484
- }, {
485
- label: '+297',
486
- value: '+297'
487
- }, {
488
- label: '+298',
489
- value: '+298'
490
- }, {
491
- label: '+299',
492
- value: '+299'
493
- }, {
494
- label: '+345',
495
- value: '+345'
496
- }, {
497
- label: '+350',
498
- value: '+350'
499
- }, {
500
- label: '+351',
501
- value: '+351'
502
- }, {
503
- label: '+352',
504
- value: '+352'
505
- }, {
506
- label: '+353',
507
- value: '+353'
508
- }, {
509
- label: '+354',
510
- value: '+354'
511
- }, {
512
- label: '+355',
513
- value: '+355'
514
- }, {
515
- label: '+356',
516
- value: '+356'
517
- }, {
518
- label: '+357',
519
- value: '+357'
520
- }, {
521
- label: '+358',
522
- value: '+358'
523
- }, {
524
- label: '+359',
525
- value: '+359'
526
- }, {
527
- label: '+370',
528
- value: '+370'
529
- }, {
530
- label: '+371',
531
- value: '+371'
532
- }, {
533
- label: '+372',
534
- value: '+372'
535
- }, {
536
- label: '+373',
537
- value: '+373'
538
- }, {
539
- label: '+374',
540
- value: '+374'
541
- }, {
542
- label: '+375',
543
- value: '+375'
544
- }, {
545
- label: '+376',
546
- value: '+376'
547
- }, {
548
- label: '+377',
549
- value: '+377'
550
- }, {
551
- label: '+378',
552
- value: '+378'
553
- }, {
554
- label: '+379',
555
- value: '+379'
556
- }, {
557
- label: '+380',
558
- value: '+380'
559
- }, {
560
- label: '+381',
561
- value: '+381'
562
- }, {
563
- label: '+382',
564
- value: '+382'
565
- }, {
566
- label: '+385',
567
- value: '+385'
568
- }, {
569
- label: '+386',
570
- value: '+386'
571
- }, {
572
- label: '+387',
573
- value: '+387'
574
- }, {
575
- label: '+389',
576
- value: '+389'
577
- }, {
578
- label: '+420',
579
- value: '+420'
580
- }, {
581
- label: '+421',
582
- value: '+421'
583
- }, {
584
- label: '+423',
585
- value: '+423'
586
- }, {
587
- label: '+500',
588
- value: '+500'
589
- }, {
590
- label: '+501',
591
- value: '+501'
592
- }, {
593
- label: '+502',
594
- value: '+502'
595
- }, {
596
- label: '+503',
597
- value: '+503'
598
- }, {
599
- label: '+504',
600
- value: '+504'
601
- }, {
602
- label: '+505',
603
- value: '+505'
604
- }, {
605
- label: '+506',
606
- value: '+506'
607
- }, {
608
- label: '+507',
609
- value: '+507'
610
- }, {
611
- label: '+508',
612
- value: '+508'
613
- }, {
614
- label: '+509',
615
- value: '+509'
616
- }, {
617
- label: '+537',
618
- value: '+537'
619
- }, {
620
- label: '+590',
621
- value: '+590'
622
- }, {
623
- label: '+591',
624
- value: '+591'
625
- }, {
626
- label: '+593',
627
- value: '+593'
628
- }, {
629
- label: '+594',
630
- value: '+594'
631
- }, {
632
- label: '+595',
633
- value: '+595'
634
- }, {
635
- label: '+596',
636
- value: '+596'
637
- }, {
638
- label: '+597',
639
- value: '+597'
640
- }, {
641
- label: '+598',
642
- value: '+598'
643
- }, {
644
- label: '+599',
645
- value: '+599'
646
- }, {
647
- label: '+670',
648
- value: '+670'
649
- }, {
650
- label: '+672',
651
- value: '+672'
652
- }, {
653
- label: '+673',
654
- value: '+673'
655
- }, {
656
- label: '+674',
657
- value: '+674'
658
- }, {
659
- label: '+675',
660
- value: '+675'
661
- }, {
662
- label: '+676',
663
- value: '+676'
664
- }, {
665
- label: '+677',
666
- value: '+677'
667
- }, {
668
- label: '+678',
669
- value: '+678'
670
- }, {
671
- label: '+679',
672
- value: '+679'
673
- }, {
674
- label: '+680',
675
- value: '+680'
676
- }, {
677
- label: '+681',
678
- value: '+681'
679
- }, {
680
- label: '+682',
681
- value: '+682'
682
- }, {
683
- label: '+683',
684
- value: '+683'
685
- }, {
686
- label: '+685',
687
- value: '+685'
688
- }, {
689
- label: '+686',
690
- value: '+686'
691
- }, {
692
- label: '+687',
693
- value: '+687'
694
- }, {
695
- label: '+688',
696
- value: '+688'
697
- }, {
698
- label: '+689',
699
- value: '+689'
700
- }, {
701
- label: '+690',
702
- value: '+690'
703
- }, {
704
- label: '+691',
705
- value: '+691'
706
- }, {
707
- label: '+692',
708
- value: '+692'
709
- }, {
710
- label: '+850',
711
- value: '+850'
712
- }, {
713
- label: '+852',
714
- value: '+852'
715
- }, {
716
- label: '+853',
717
- value: '+853'
718
- }, {
719
- label: '+855',
720
- value: '+855'
721
- }, {
722
- label: '+856',
723
- value: '+856'
724
- }, {
725
- label: '+872',
726
- value: '+872'
727
- }, {
728
- label: '+880',
729
- value: '+880'
730
- }, {
731
- label: '+886',
732
- value: '+886'
733
- }, {
734
- label: '+960',
735
- value: '+960'
736
- }, {
737
- label: '+961',
738
- value: '+961'
739
- }, {
740
- label: '+962',
741
- value: '+962'
742
- }, {
743
- label: '+963',
744
- value: '+963'
745
- }, {
746
- label: '+964',
747
- value: '+964'
748
- }, {
749
- label: '+965',
750
- value: '+965'
751
- }, {
752
- label: '+966',
753
- value: '+966'
754
- }, {
755
- label: '+967',
756
- value: '+967'
757
- }, {
758
- label: '+968',
759
- value: '+968'
760
- }, {
761
- label: '+970',
762
- value: '+970'
763
- }, {
764
- label: '+971',
765
- value: '+971'
766
- }, {
767
- label: '+972',
768
- value: '+972'
769
- }, {
770
- label: '+973',
771
- value: '+973'
772
- }, {
773
- label: '+974',
774
- value: '+974'
775
- }, {
776
- label: '+975',
777
- value: '+975'
778
- }, {
779
- label: '+976',
780
- value: '+976'
781
- }, {
782
- label: '+977',
783
- value: '+977'
784
- }, {
785
- label: '+992',
786
- value: '+992'
787
- }, {
788
- label: '+993',
789
- value: '+993'
790
- }, {
791
- label: '+994',
792
- value: '+994'
793
- }, {
794
- label: '+995',
795
- value: '+995'
796
- }, {
797
- label: '+996',
798
- value: '+996'
799
- }, {
800
- label: '+998',
801
- value: '+998'
802
- }];
803
-
804
- var AmplifyCountryDialCode =
19
+ var AmplifyButton =
805
20
  /** @class */
806
21
  function () {
807
- function AmplifyCountryDialCode(hostRef) {
22
+ function AmplifyButton(hostRef) {
808
23
  Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
809
- /** The ID of the field. Should match with its corresponding input's ID. */
24
+ /** Type of the button: 'button', 'submit' or 'reset' */
810
25
 
811
- this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["C"];
812
- /** The options of the country dial code select input. */
26
+ this.type = 'button';
27
+ /** Variant of a button: 'button' | 'anchor | 'icon' */
813
28
 
814
- this.options = countryDialCodes;
815
- /** Default selected dial code */
29
+ this.variant = 'button';
30
+ /** Disabled state of the button */
816
31
 
817
- this.dialCode = '+1';
32
+ this.disabled = false;
818
33
  }
819
34
 
820
- AmplifyCountryDialCode.prototype.componentWillLoad = function () {
821
- this.setSelectedDialCode();
822
- };
823
-
824
- AmplifyCountryDialCode.prototype.watchDialCodeHandler = function () {
825
- this.setSelectedDialCode();
35
+ AmplifyButton.prototype.componentWillLoad = function () {
36
+ 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.');
826
37
  };
827
38
 
828
- AmplifyCountryDialCode.prototype.setSelectedDialCode = function () {
829
- if (typeof this.dialCode === 'number') {
830
- this.selectedDialCode = "+" + this.dialCode;
831
- } else {
832
- this.selectedDialCode = this.dialCode;
833
- }
834
- };
39
+ AmplifyButton.prototype.render = function () {
40
+ var _a;
835
41
 
836
- AmplifyCountryDialCode.prototype.render = function () {
837
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-select", {
838
- fieldId: this.fieldId,
839
- options: this.options,
840
- handleInputChange: this.handleInputChange,
841
- selected: this.selectedDialCode
842
- });
42
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["H"], null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("button", {
43
+ "class": (_a = {}, _a[this.variant] = true, _a),
44
+ type: this.type,
45
+ disabled: this.disabled,
46
+ onClick: this.handleButtonClick
47
+ }, this.variant === 'icon' && Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-icon", {
48
+ name: this.icon
49
+ }), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null)));
843
50
  };
844
51
 
845
- Object.defineProperty(AmplifyCountryDialCode, "watchers", {
52
+ Object.defineProperty(AmplifyButton.prototype, "el", {
846
53
  get: function get() {
847
- return {
848
- "dialCode": ["watchDialCodeHandler"]
849
- };
54
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["g"])(this);
850
55
  },
851
56
  enumerable: false,
852
57
  configurable: true
853
58
  });
854
- return AmplifyCountryDialCode;
855
- }();
856
-
857
- var AmplifyEmailField =
858
- /** @class */
859
- function () {
860
- function AmplifyEmailField(hostRef) {
861
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
862
- /** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
863
-
864
- this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["E"];
865
- /** Used for the EMAIL label */
866
-
867
- this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].EMAIL_LABEL;
868
- /** Used for the placeholder label */
869
-
870
- this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].EMAIL_PLACEHOLDER;
871
- /** The required flag in order to make an input required prior to submitting a form */
872
-
873
- this.required = false;
874
- }
875
-
876
- AmplifyEmailField.prototype.render = function () {
877
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
878
- fieldId: this.fieldId,
879
- label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
880
- placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
881
- type: "email",
882
- name: "email",
883
- required: this.required,
884
- handleInputChange: this.handleInputChange,
885
- value: this.value,
886
- inputProps: this.inputProps,
887
- disabled: this.disabled,
888
- hint: this.hint
889
- });
890
- };
891
-
892
- return AmplifyEmailField;
59
+ return AmplifyButton;
893
60
  }();
894
61
 
895
- var amplifyFormSectionCss = "amplify-form-section{--header-color:var(--amplify-secondary-color);--header-size:var(--amplify-text-md-sub);--subtitle-size:var(--amplify-grey);--subtitle-color:var(--amplify-grey);--footer-color:var(--amplify-grey);--footer-size:var(--amplify-text-sm);--font-family:var(--amplify-font-family);--font-weight:var(--amplify-font-weight)}.form-section-header{margin:1rem 0 1.5rem 0}.form-section-header .header{color:var(--header-color);font-size:var(--header-size);font-weight:700;margin-bottom:0.75rem}.form-section-header .subtitle{font-weight:400;font-size:var(--amplify-text-sm);color:var(--subtitle-color)}.form-section-footer{font-family:var(--font-family);font-weight:var(--font-weight);font-size:var(--footer-size);color:var(--footer-color);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:distribute;justify-content:space-around}@media (min-width: 672px){.form-section-footer{display:-ms-flexbox;display:flex;-ms-flex-direction:row-reverse;flex-direction:row-reverse;-ms-flex-pack:justify;justify-content:space-between;-ms-flex-align:baseline;align-items:baseline}}.form-section-footer *+*{margin-top:15px}";
62
+ AmplifyButton.style = amplifyButtonCss;
63
+ var amplifyLoadingSpinnerCss = ":host{--spinner-circle-fill:var(--amplify-smoke-white);--spinner-bar-fill:var(--amplify-primary-color);--width:0.875rem;--height:0.875rem}.loading-spinner svg{-webkit-animation:loading-spinner 1s linear infinite;animation:loading-spinner 1s linear infinite;width:var(--width);height:var(--height)}.loading-spinner svg #spinner-circle{fill:var(--spinner-circle-fill)}.loading-spinner svg #spinner-bar{fill:var(--spinner-bar-fill)}@-webkit-keyframes loading-spinner{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes loading-spinner{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}";
896
64
 
897
- var AmplifyFormSection =
65
+ var AmplifyLoadingSpinner =
898
66
  /** @class */
899
67
  function () {
900
- function AmplifyFormSection(hostRef) {
68
+ function AmplifyLoadingSpinner(hostRef) {
901
69
  Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
902
- /** (Optional) Used as a the default value within the default footer slot */
903
-
904
- this.submitButtonText = 'Submit';
905
- /** String prefix for the data-test attributes in this component primarily used for testing purposes */
906
-
907
- this.testDataPrefix = 'form-section';
908
- /** Loading state for the form */
909
-
910
- this.loading = false;
911
- /** Secondary footer component or text */
912
-
913
- this.secondaryFooterContent = null;
914
- } // eslint-disable-next-line
915
-
916
-
917
- AmplifyFormSection.prototype.handleFormSubmit = function (ev) {
918
- this.handleSubmit(ev.detail);
919
- };
920
-
921
- AmplifyFormSection.prototype.render = function () {
922
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("form", {
923
- onSubmit: this.handleSubmit
924
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-section", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
925
- name: "amplify-form-section-header"
926
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
927
- "class": "form-section-header"
928
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("h3", {
929
- "class": "header",
930
- "data-test": this.testDataPrefix + '-header-section'
931
- }, this.headerText), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
932
- "class": "subtitle"
933
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
934
- name: "subtitle"
935
- }))))), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", {
936
- name: "amplify-form-section-footer"
937
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
938
- "class": "form-section-footer"
939
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-button", {
940
- type: "submit",
941
- "data-test": this.testDataPrefix + '-' + this.testDataPrefix + '-button'
942
- }, this.loading ? Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-loading-spinner", null) : Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("span", null, this.submitButtonText)), this.secondaryFooterContent)))));
943
- };
944
-
945
- return AmplifyFormSection;
946
- }();
947
-
948
- AmplifyFormSection.style = amplifyFormSectionCss;
949
-
950
- var AmplifyPasswordField =
951
- /** @class */
952
- function () {
953
- function AmplifyPasswordField(hostRef) {
954
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
955
- /** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
956
-
957
- this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["j"];
958
- /** Used for the password label */
959
-
960
- this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PASSWORD_LABEL;
961
- /** Used for the placeholder label */
962
-
963
- this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PASSWORD_PLACEHOLDER;
964
- /** The required flag in order to make an input required prior to submitting a form */
965
-
966
- this.required = false;
967
70
  }
968
71
 
969
- AmplifyPasswordField.prototype.render = function () {
970
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
971
- type: "password",
972
- name: "password",
973
- fieldId: this.fieldId,
974
- label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
975
- placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
976
- hint: this.hint,
977
- required: this.required,
978
- handleInputChange: this.handleInputChange,
979
- value: this.value,
980
- inputProps: this.inputProps,
981
- disabled: this.disabled
982
- });
72
+ AmplifyLoadingSpinner.prototype.componentWillLoad = function () {
73
+ 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.');
983
74
  };
984
75
 
985
- return AmplifyPasswordField;
986
- }();
987
-
988
- var amplifyPhoneFieldCss = ".phone-field{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:start;align-items:flex-start;width:100%}.phone-field input{border-left:none;border-radius:0 3px 3px 0}";
989
-
990
- var AmplifyPhoneField =
991
- /** @class */
992
- function () {
993
- function AmplifyPhoneField(hostRef) {
994
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
995
- /** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
996
-
997
- this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["b"];
998
- /** Used for the Phone label */
999
-
1000
- this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PHONE_LABEL;
1001
- /** Used for the placeholder label */
1002
-
1003
- this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].PHONE_PLACEHOLDER;
1004
- /** The required flag in order to make an input required prior to submitting a form */
1005
-
1006
- this.required = false;
1007
- }
1008
-
1009
- AmplifyPhoneField.prototype.render = function () {
1010
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", null, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
1011
- label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
1012
- hint: this.hint
1013
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("div", {
1014
- "class": "phone-field",
1015
- slot: "input"
1016
- }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-country-dial-code", {
1017
- dialCode: this.dialCode,
1018
- handleInputChange: this.handleInputChange
1019
- }), Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-input", {
1020
- fieldId: this.fieldId,
1021
- type: "tel",
1022
- handleInputChange: this.handleInputChange,
1023
- placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
1024
- name: this.fieldId,
1025
- value: this.value,
1026
- inputProps: this.inputProps,
1027
- disabled: this.disabled,
1028
- required: this.required
1029
- }))));
76
+ AmplifyLoadingSpinner.prototype.render = function () {
77
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-icon", {
78
+ "class": "loading-spinner",
79
+ name: "loading"
80
+ });
1030
81
  };
1031
82
 
1032
- return AmplifyPhoneField;
83
+ return AmplifyLoadingSpinner;
1033
84
  }();
1034
85
 
1035
- AmplifyPhoneField.style = amplifyPhoneFieldCss;
1036
- var amplifySelectCss = ":host{--color:var(--amplify-secondary-color);--background-color:var(--amplify-secondary-contrast);--border-color:var(--amplify-light-grey);--border-focus:var(--amplify-primary-color);--background-image:linear-gradient(45deg, transparent 50%, gray 50%),\n \tlinear-gradient(135deg, gray 50%, transparent 50%),\n \tlinear-gradient(to right, #ccc, #ccc)}.select{padding:1rem 1.75rem 1rem 1rem;font-size:var(--amplify-text-sm);color:var(--color);background-color:var(--background-color);border:1px solid var(--border-color);border-radius:3px 0 0 3px;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;-ms-flex-preferred-size:auto;flex-basis:auto;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;margin:0;height:3.125rem;background-image:var(--background-image);background-position:calc(100% - 1rem) calc(1em + 0.5rem), calc(100% - 0.7rem) calc(1em + 0.5rem), calc(100% - 2.5em) 0.5em;background-size:6px 5px, 6px 5px, 0px 1.5em;background-repeat:no-repeat}.select :focus{outline:none;border-color:var(--border-focus)}";
1037
- var DEFAULT_SELECT_OPTION = [{
1038
- label: '',
1039
- value: 1
1040
- }];
1041
- var logger = new _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["Logger"]('amplify-select');
86
+ AmplifyLoadingSpinner.style = amplifyLoadingSpinnerCss;
87
+ var amplifySectionCss = "amplify-section{--font-family:var(--amplify-font-family);--background-color:var(--amplify-background-color)}.section{position:relative;margin-bottom:var(--margin-bottom, 20px);background-color:var(--background-color);padding:var(--padding, 35px 40px);text-align:left;display:inline-block;border-radius:var(--border-radius, 6px);-webkit-box-shadow:var(--box-shadow, 1px 1px 4px 0 rgba(0, 0, 0, 0.15));box-shadow:var(--box-shadow, 1px 1px 4px 0 rgba(0, 0, 0, 0.15));-webkit-box-sizing:border-box;box-sizing:border-box;font-family:var(--font-family);width:100%;min-width:var(--min-width, 20rem)}@media (min-width: 672px){.section{width:var(--width, 28.75rem)}}";
1042
88
 
1043
- var AmplifySelect =
89
+ var AmplifySection =
1044
90
  /** @class */
1045
91
  function () {
1046
- function AmplifySelect(hostRef) {
92
+ function AmplifySection(hostRef) {
1047
93
  Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
1048
- /** The options of the select input. Must be an Array of Objects with an Object shape of {label: string, value: string|number} */
94
+ /** Equivalent to html section role */
1049
95
 
1050
- this.options = DEFAULT_SELECT_OPTION;
96
+ this.role = 'application';
1051
97
  }
1052
98
 
1053
- AmplifySelect.prototype.componentWillLoad = function () {
1054
- this.selectOptions = this.contructSelectOptions(this.options);
99
+ AmplifySection.prototype.componentWillLoad = function () {
100
+ 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.');
1055
101
  };
1056
102
 
1057
- AmplifySelect.prototype.handleSelectOptionsChange = function () {
1058
- this.selectOptions = this.contructSelectOptions(this.options);
103
+ AmplifySection.prototype.render = function () {
104
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("section", {
105
+ "class": "section",
106
+ role: this.role
107
+ }, Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("slot", null));
1059
108
  };
1060
109
 
1061
- AmplifySelect.prototype.isSelectedOptionValid = function (selected) {
1062
- if (selected && !this.options.some(function (option) {
1063
- return option.value === selected;
1064
- })) {
1065
- logger.warn('Selected option does not exist in options values, falling back to initial option');
1066
- return false;
1067
- }
1068
-
1069
- return true;
1070
- };
1071
-
1072
- AmplifySelect.prototype.contructSelectOptions = function (opts) {
1073
- var _this = this;
1074
-
1075
- this.isSelectedOptionValid(this.selected);
1076
- var content = [];
1077
- opts.forEach(function (opt) {
1078
- content.push(Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("option", {
1079
- value: opt.value,
1080
- selected: opt.value === _this.selected
1081
- }, opt.label));
1082
- });
1083
- return content;
1084
- };
1085
-
1086
- AmplifySelect.prototype.render = function () {
1087
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("select", {
1088
- name: this.fieldId,
1089
- id: this.fieldId,
1090
- "class": "select",
1091
- onChange: this.handleInputChange
1092
- }, this.selectOptions);
1093
- };
1094
-
1095
- Object.defineProperty(AmplifySelect, "watchers", {
110
+ Object.defineProperty(AmplifySection.prototype, "el", {
1096
111
  get: function get() {
1097
- return {
1098
- "options": ["handleSelectOptionsChange"],
1099
- "selected": ["handleSelectOptionsChange"]
1100
- };
112
+ return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["g"])(this);
1101
113
  },
1102
114
  enumerable: false,
1103
115
  configurable: true
1104
116
  });
1105
- return AmplifySelect;
1106
- }();
1107
-
1108
- AmplifySelect.style = amplifySelectCss;
1109
-
1110
- var AmplifyUsernameField =
1111
- /** @class */
1112
- function () {
1113
- function AmplifyUsernameField(hostRef) {
1114
- Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["r"])(this, hostRef);
1115
- /** Based on the type of field e.g. sign in, sign up, forgot password, etc. */
1116
-
1117
- this.fieldId = _constants_c8ecaa24_js__WEBPACK_IMPORTED_MODULE_4__["k"];
1118
- /** Used for the username label */
1119
-
1120
- this.label = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].USERNAME_LABEL;
1121
- /** Used for the placeholder label */
1122
-
1123
- this.placeholder = _Translations_108d469f_js__WEBPACK_IMPORTED_MODULE_3__["T"].USERNAME_PLACEHOLDER;
1124
- /** The required flag in order to make an input required prior to submitting a form */
1125
-
1126
- this.required = false;
1127
- }
1128
-
1129
- AmplifyUsernameField.prototype.render = function () {
1130
- return Object(_index_83f2275b_js__WEBPACK_IMPORTED_MODULE_0__["h"])("amplify-form-field", {
1131
- name: "username",
1132
- fieldId: this.fieldId,
1133
- label: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.label),
1134
- placeholder: _aws_amplify_core__WEBPACK_IMPORTED_MODULE_1__["I18n"].get(this.placeholder),
1135
- required: this.required,
1136
- handleInputChange: this.handleInputChange,
1137
- value: this.value,
1138
- inputProps: this.inputProps,
1139
- disabled: this.disabled,
1140
- hint: this.hint
1141
- });
1142
- };
1143
-
1144
- return AmplifyUsernameField;
117
+ return AmplifySection;
1145
118
  }();
1146
119
 
120
+ AmplifySection.style = amplifySectionCss;
1147
121
 
1148
122
 
1149
123
  /***/ })