@hortiview/default-components 1.4.4 → 1.5.1

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 (51) hide show
  1. package/README.md +51 -0
  2. package/dist/components/DefaultAllowedComponent/DefaultAllowedComponent.d.ts +11 -0
  3. package/dist/components/DefaultAllowedComponent/DefaultAllowedComponent.js +11 -0
  4. package/dist/components/DefaultFormNumber/DefaultFormNumber.js +12 -1496
  5. package/dist/components/DefaultFormSelect/DefaultFormSelect.js +9 -178
  6. package/dist/components/DefaultLoadingSpinner/DefaultLoadingSpinner.js +6 -6
  7. package/dist/components/GenericTable/GenericTable.js +12 -18731
  8. package/dist/components/HealthChecks/DataBaseHealthCheck.js +2 -2
  9. package/dist/components/HealthChecks/DefaultHealthCheck.js +4 -4
  10. package/dist/components/HealthChecks/IotServiceHealthCheck.js +5 -5
  11. package/dist/components/HealthChecks/PlatformHealthCheck.js +4 -4
  12. package/dist/components/ImpatienceLoadingSpinner/ImpatienceLoadingSpinner.js +9 -9
  13. package/dist/components/InternationalizationWrapper/InternationalizationWrapper.js +4 -4
  14. package/dist/components/OfflineView/OfflineView.js +9 -9
  15. package/dist/i18n.js +1696 -5
  16. package/dist/{i18nInstance-D_96ADqd.js → i18nInstance-CYqpK5II.js} +2 -2
  17. package/dist/locales/en-US.js +16 -14
  18. package/dist/locales/en-US.json.d.ts +3 -0
  19. package/dist/locales/es-MX.js +16 -14
  20. package/dist/locales/es-MX.json.d.ts +3 -0
  21. package/dist/locales/tr-TR.js +17 -15
  22. package/dist/locales/tr-TR.json.d.ts +3 -0
  23. package/dist/main.d.ts +1 -0
  24. package/dist/main.js +24 -22
  25. package/dist/useTranslation-DGtUf8nl.js +101 -0
  26. package/package.json +3 -32
  27. package/dist/Iconify-aUog1Oez.js +0 -83
  28. package/dist/InfoCard-BxjAQiFE.js +0 -58
  29. package/dist/LoadingSpinner-DBMjIfY1.js +0 -502
  30. package/dist/OfflineView-NUM9WE0F-BI9rnget.js +0 -46
  31. package/dist/assets/DefaultFormNumber.css +0 -1
  32. package/dist/assets/DefaultFormSelect.css +0 -1
  33. package/dist/assets/GenericTable.css +0 -1
  34. package/dist/assets/Iconify.css +0 -1
  35. package/dist/assets/InfoCard.css +0 -1
  36. package/dist/assets/LoadingSpinner.css +0 -1
  37. package/dist/assets/OfflineView-NUM9WE0F.css +0 -1
  38. package/dist/component-DsB0poTj-DgsYK0_R.js +0 -570
  39. package/dist/correct-is-regexp-logic-BBlm4UpN-CvII841s.js +0 -493
  40. package/dist/i18n-CCQpJsQK.js +0 -1707
  41. package/dist/index.es-B0QNuIUR-Bte5aF5M.js +0 -360
  42. package/dist/index.es-CIsLNz4j-ZEEcPmTs.js +0 -79
  43. package/dist/index.es-CvHDFF6V-CjZvA03R.js +0 -2004
  44. package/dist/index.es-DiONypF4-eT98Y3u_.js +0 -844
  45. package/dist/index.es-DnEIFMjv-DuuORGfo.js +0 -1044
  46. package/dist/index.es-NEYPxnlS-C8xQv2De.js +0 -860
  47. package/dist/index.es-fV9oWpEf-BXuhoGtE.js +0 -14374
  48. package/dist/isTypedArray-Dw_IY7Zq-wj3MphCb.js +0 -210
  49. package/dist/slicedToArray-h0Nnkd_P-C4SkVJMK.js +0 -432
  50. package/dist/useHelperText-B7OMZXvE.js +0 -391
  51. package/dist/useTranslation-B_lNCuLm.js +0 -5343
@@ -1,2004 +0,0 @@
1
- import { r as Ot, d as wn, g as Ct, j as jn, L as Bn, i as Ne, h as tt, e as U, k as A, l as c, m as et, Z as Fe, c as kn, p as Pe, f as Mn, v as Un, s as We, B as $e, n as ze, o as nt, X as qn, a as Ve, b as Xn, t as a, q as F, w as Gn } from "./useTranslation-B_lNCuLm.js";
2
- import { B as Se, y as Wn, v as He, K as $n, a as zn, W as Zn } from "./index.es-DiONypF4-eT98Y3u_.js";
3
- import { S as B } from "./slicedToArray-h0Nnkd_P-C4SkVJMK.js";
4
- import u, { forwardRef as At, useState as k, useRef as O, useMemo as Yn, useEffect as g, useImperativeHandle as Ze, useCallback as De } from "react";
5
- import { p as pt, U as we, _ as Kn, O as Jn } from "./component-DsB0poTj-DgsYK0_R.js";
6
- /**
7
- * @license
8
- * Copyright 2018 Google Inc.
9
- *
10
- * Permission is hereby granted, free of charge, to any person obtaining a copy
11
- * of this software and associated documentation files (the "Software"), to deal
12
- * in the Software without restriction, including without limitation the rights
13
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
- * copies of the Software, and to permit persons to whom the Software is
15
- * furnished to do so, subject to the following conditions:
16
- *
17
- * The above copyright notice and this permission notice shall be included in
18
- * all copies or substantial portions of the Software.
19
- *
20
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
26
- * THE SOFTWARE.
27
- */
28
- var M = {
29
- LINE_RIPPLE_ACTIVE: "mdc-line-ripple--active",
30
- LINE_RIPPLE_DEACTIVATING: "mdc-line-ripple--deactivating"
31
- };
32
- /**
33
- * @license
34
- * Copyright 2018 Google Inc.
35
- *
36
- * Permission is hereby granted, free of charge, to any person obtaining a copy
37
- * of this software and associated documentation files (the "Software"), to deal
38
- * in the Software without restriction, including without limitation the rights
39
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
40
- * copies of the Software, and to permit persons to whom the Software is
41
- * furnished to do so, subject to the following conditions:
42
- *
43
- * The above copyright notice and this permission notice shall be included in
44
- * all copies or substantial portions of the Software.
45
- *
46
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
47
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
48
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
49
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
50
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
51
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
52
- * THE SOFTWARE.
53
- */
54
- var Qn = (
55
- /** @class */
56
- function(r) {
57
- A(e, r);
58
- function e(t) {
59
- var n = r.call(this, c(c({}, e.defaultAdapter), t)) || this;
60
- return n.transitionEndHandler_ = function(i) {
61
- return n.handleTransitionEnd(i);
62
- }, n;
63
- }
64
- return Object.defineProperty(e, "cssClasses", {
65
- get: function() {
66
- return M;
67
- },
68
- enumerable: !1,
69
- configurable: !0
70
- }), Object.defineProperty(e, "defaultAdapter", {
71
- /**
72
- * See {@link MDCLineRippleAdapter} for typing information on parameters and return types.
73
- */
74
- get: function() {
75
- return {
76
- addClass: function() {
77
- },
78
- removeClass: function() {
79
- },
80
- hasClass: function() {
81
- return !1;
82
- },
83
- setStyle: function() {
84
- },
85
- registerEventHandler: function() {
86
- },
87
- deregisterEventHandler: function() {
88
- }
89
- };
90
- },
91
- enumerable: !1,
92
- configurable: !0
93
- }), e.prototype.init = function() {
94
- this.adapter.registerEventHandler("transitionend", this.transitionEndHandler_);
95
- }, e.prototype.destroy = function() {
96
- this.adapter.deregisterEventHandler("transitionend", this.transitionEndHandler_);
97
- }, e.prototype.activate = function() {
98
- this.adapter.removeClass(M.LINE_RIPPLE_DEACTIVATING), this.adapter.addClass(M.LINE_RIPPLE_ACTIVE);
99
- }, e.prototype.setRippleCenter = function(t) {
100
- this.adapter.setStyle("transform-origin", t + "px center");
101
- }, e.prototype.deactivate = function() {
102
- this.adapter.addClass(M.LINE_RIPPLE_DEACTIVATING);
103
- }, e.prototype.handleTransitionEnd = function(t) {
104
- var n = this.adapter.hasClass(M.LINE_RIPPLE_DEACTIVATING);
105
- t.propertyName === "opacity" && n && (this.adapter.removeClass(M.LINE_RIPPLE_ACTIVE), this.adapter.removeClass(M.LINE_RIPPLE_DEACTIVATING));
106
- }, e;
107
- }(nt)
108
- );
109
- /**
110
- * @license
111
- * Copyright 2018 Google Inc.
112
- *
113
- * Permission is hereby granted, free of charge, to any person obtaining a copy
114
- * of this software and associated documentation files (the "Software"), to deal
115
- * in the Software without restriction, including without limitation the rights
116
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
117
- * copies of the Software, and to permit persons to whom the Software is
118
- * furnished to do so, subject to the following conditions:
119
- *
120
- * The above copyright notice and this permission notice shall be included in
121
- * all copies or substantial portions of the Software.
122
- *
123
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
124
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
125
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
126
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
127
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
128
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
129
- * THE SOFTWARE.
130
- */
131
- var Ye = (
132
- /** @class */
133
- function(r) {
134
- A(e, r);
135
- function e() {
136
- return r !== null && r.apply(this, arguments) || this;
137
- }
138
- return e.attachTo = function(t) {
139
- return new e(t);
140
- }, e.prototype.activate = function() {
141
- this.foundation.activate();
142
- }, e.prototype.deactivate = function() {
143
- this.foundation.deactivate();
144
- }, e.prototype.setRippleCenter = function(t) {
145
- this.foundation.setRippleCenter(t);
146
- }, e.prototype.getDefaultFoundation = function() {
147
- var t = this, n = {
148
- addClass: function(i) {
149
- return t.root.classList.add(i);
150
- },
151
- removeClass: function(i) {
152
- return t.root.classList.remove(i);
153
- },
154
- hasClass: function(i) {
155
- return t.root.classList.contains(i);
156
- },
157
- setStyle: function(i, o) {
158
- return t.root.style.setProperty(i, o);
159
- },
160
- registerEventHandler: function(i, o) {
161
- return t.listen(i, o);
162
- },
163
- deregisterEventHandler: function(i, o) {
164
- return t.unlisten(i, o);
165
- }
166
- };
167
- return new Qn(n);
168
- }, e;
169
- }(et)
170
- );
171
- /**
172
- * @license
173
- * Copyright 2019 Google Inc.
174
- *
175
- * Permission is hereby granted, free of charge, to any person obtaining a copy
176
- * of this software and associated documentation files (the "Software"), to deal
177
- * in the Software without restriction, including without limitation the rights
178
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
179
- * copies of the Software, and to permit persons to whom the Software is
180
- * furnished to do so, subject to the following conditions:
181
- *
182
- * The above copyright notice and this permission notice shall be included in
183
- * all copies or substantial portions of the Software.
184
- *
185
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
186
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
187
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
188
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
189
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
190
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
191
- * THE SOFTWARE.
192
- */
193
- var Ke = {
194
- ROOT: "mdc-text-field-character-counter"
195
- }, ti = {
196
- ROOT_SELECTOR: "." + Ke.ROOT
197
- };
198
- /**
199
- * @license
200
- * Copyright 2019 Google Inc.
201
- *
202
- * Permission is hereby granted, free of charge, to any person obtaining a copy
203
- * of this software and associated documentation files (the "Software"), to deal
204
- * in the Software without restriction, including without limitation the rights
205
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
206
- * copies of the Software, and to permit persons to whom the Software is
207
- * furnished to do so, subject to the following conditions:
208
- *
209
- * The above copyright notice and this permission notice shall be included in
210
- * all copies or substantial portions of the Software.
211
- *
212
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
213
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
214
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
215
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
216
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
217
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
218
- * THE SOFTWARE.
219
- */
220
- var Je = (
221
- /** @class */
222
- function(r) {
223
- A(e, r);
224
- function e(t) {
225
- return r.call(this, c(c({}, e.defaultAdapter), t)) || this;
226
- }
227
- return Object.defineProperty(e, "cssClasses", {
228
- get: function() {
229
- return Ke;
230
- },
231
- enumerable: !1,
232
- configurable: !0
233
- }), Object.defineProperty(e, "strings", {
234
- get: function() {
235
- return ti;
236
- },
237
- enumerable: !1,
238
- configurable: !0
239
- }), Object.defineProperty(e, "defaultAdapter", {
240
- /**
241
- * See {@link MDCTextFieldCharacterCounterAdapter} for typing information on parameters and return types.
242
- */
243
- get: function() {
244
- return {
245
- setContent: function() {
246
- }
247
- };
248
- },
249
- enumerable: !1,
250
- configurable: !0
251
- }), e.prototype.setCounterValue = function(t, n) {
252
- t = Math.min(t, n), this.adapter.setContent(t + " / " + n);
253
- }, e;
254
- }(nt)
255
- );
256
- /**
257
- * @license
258
- * Copyright 2019 Google Inc.
259
- *
260
- * Permission is hereby granted, free of charge, to any person obtaining a copy
261
- * of this software and associated documentation files (the "Software"), to deal
262
- * in the Software without restriction, including without limitation the rights
263
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
264
- * copies of the Software, and to permit persons to whom the Software is
265
- * furnished to do so, subject to the following conditions:
266
- *
267
- * The above copyright notice and this permission notice shall be included in
268
- * all copies or substantial portions of the Software.
269
- *
270
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
271
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
272
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
273
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
274
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
275
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
276
- * THE SOFTWARE.
277
- */
278
- var ei = (
279
- /** @class */
280
- function(r) {
281
- A(e, r);
282
- function e() {
283
- return r !== null && r.apply(this, arguments) || this;
284
- }
285
- return e.attachTo = function(t) {
286
- return new e(t);
287
- }, Object.defineProperty(e.prototype, "foundationForTextField", {
288
- // Provided for access by MDCTextField component
289
- get: function() {
290
- return this.foundation;
291
- },
292
- enumerable: !1,
293
- configurable: !0
294
- }), e.prototype.getDefaultFoundation = function() {
295
- var t = this, n = {
296
- setContent: function(i) {
297
- t.root.textContent = i;
298
- }
299
- };
300
- return new Je(n);
301
- }, e;
302
- }(et)
303
- );
304
- /**
305
- * @license
306
- * Copyright 2016 Google Inc.
307
- *
308
- * Permission is hereby granted, free of charge, to any person obtaining a copy
309
- * of this software and associated documentation files (the "Software"), to deal
310
- * in the Software without restriction, including without limitation the rights
311
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
312
- * copies of the Software, and to permit persons to whom the Software is
313
- * furnished to do so, subject to the following conditions:
314
- *
315
- * The above copyright notice and this permission notice shall be included in
316
- * all copies or substantial portions of the Software.
317
- *
318
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
319
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
320
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
321
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
322
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
323
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
324
- * THE SOFTWARE.
325
- */
326
- var I = {
327
- ARIA_CONTROLS: "aria-controls",
328
- ARIA_DESCRIBEDBY: "aria-describedby",
329
- INPUT_SELECTOR: ".mdc-text-field__input",
330
- LABEL_SELECTOR: ".mdc-floating-label",
331
- LEADING_ICON_SELECTOR: ".mdc-text-field__icon--leading",
332
- LINE_RIPPLE_SELECTOR: ".mdc-line-ripple",
333
- OUTLINE_SELECTOR: ".mdc-notched-outline",
334
- PREFIX_SELECTOR: ".mdc-text-field__affix--prefix",
335
- SUFFIX_SELECTOR: ".mdc-text-field__affix--suffix",
336
- TRAILING_ICON_SELECTOR: ".mdc-text-field__icon--trailing"
337
- }, ht = {
338
- DISABLED: "mdc-text-field--disabled",
339
- FOCUSED: "mdc-text-field--focused",
340
- HELPER_LINE: "mdc-text-field-helper-line",
341
- INVALID: "mdc-text-field--invalid",
342
- LABEL_FLOATING: "mdc-text-field--label-floating",
343
- NO_LABEL: "mdc-text-field--no-label",
344
- OUTLINED: "mdc-text-field--outlined",
345
- ROOT: "mdc-text-field",
346
- TEXTAREA: "mdc-text-field--textarea",
347
- WITH_LEADING_ICON: "mdc-text-field--with-leading-icon",
348
- WITH_TRAILING_ICON: "mdc-text-field--with-trailing-icon"
349
- }, je = {
350
- LABEL_SCALE: 0.75
351
- }, ni = [
352
- "pattern",
353
- "min",
354
- "max",
355
- "required",
356
- "step",
357
- "minlength",
358
- "maxlength"
359
- ], ii = [
360
- "color",
361
- "date",
362
- "datetime-local",
363
- "month",
364
- "range",
365
- "time",
366
- "week"
367
- ];
368
- /**
369
- * @license
370
- * Copyright 2016 Google Inc.
371
- *
372
- * Permission is hereby granted, free of charge, to any person obtaining a copy
373
- * of this software and associated documentation files (the "Software"), to deal
374
- * in the Software without restriction, including without limitation the rights
375
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
376
- * copies of the Software, and to permit persons to whom the Software is
377
- * furnished to do so, subject to the following conditions:
378
- *
379
- * The above copyright notice and this permission notice shall be included in
380
- * all copies or substantial portions of the Software.
381
- *
382
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
383
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
384
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
385
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
386
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
387
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
388
- * THE SOFTWARE.
389
- */
390
- var Be = ["mousedown", "touchstart"], ke = ["click", "keydown"], ri = (
391
- /** @class */
392
- function(r) {
393
- A(e, r);
394
- function e(t, n) {
395
- n === void 0 && (n = {});
396
- var i = r.call(this, c(c({}, e.defaultAdapter), t)) || this;
397
- return i.isFocused_ = !1, i.receivedUserInput_ = !1, i.isValid_ = !0, i.useNativeValidation_ = !0, i.validateOnValueChange_ = !0, i.helperText_ = n.helperText, i.characterCounter_ = n.characterCounter, i.leadingIcon_ = n.leadingIcon, i.trailingIcon_ = n.trailingIcon, i.inputFocusHandler_ = function() {
398
- return i.activateFocus();
399
- }, i.inputBlurHandler_ = function() {
400
- return i.deactivateFocus();
401
- }, i.inputInputHandler_ = function() {
402
- return i.handleInput();
403
- }, i.setPointerXOffset_ = function(o) {
404
- return i.setTransformOrigin(o);
405
- }, i.textFieldInteractionHandler_ = function() {
406
- return i.handleTextFieldInteraction();
407
- }, i.validationAttributeChangeHandler_ = function(o) {
408
- return i.handleValidationAttributeChange(o);
409
- }, i;
410
- }
411
- return Object.defineProperty(e, "cssClasses", {
412
- get: function() {
413
- return ht;
414
- },
415
- enumerable: !1,
416
- configurable: !0
417
- }), Object.defineProperty(e, "strings", {
418
- get: function() {
419
- return I;
420
- },
421
- enumerable: !1,
422
- configurable: !0
423
- }), Object.defineProperty(e, "numbers", {
424
- get: function() {
425
- return je;
426
- },
427
- enumerable: !1,
428
- configurable: !0
429
- }), Object.defineProperty(e.prototype, "shouldAlwaysFloat_", {
430
- get: function() {
431
- var t = this.getNativeInput_().type;
432
- return ii.indexOf(t) >= 0;
433
- },
434
- enumerable: !1,
435
- configurable: !0
436
- }), Object.defineProperty(e.prototype, "shouldFloat", {
437
- get: function() {
438
- return this.shouldAlwaysFloat_ || this.isFocused_ || !!this.getValue() || this.isBadInput_();
439
- },
440
- enumerable: !1,
441
- configurable: !0
442
- }), Object.defineProperty(e.prototype, "shouldShake", {
443
- get: function() {
444
- return !this.isFocused_ && !this.isValid() && !!this.getValue();
445
- },
446
- enumerable: !1,
447
- configurable: !0
448
- }), Object.defineProperty(e, "defaultAdapter", {
449
- /**
450
- * See {@link MDCTextFieldAdapter} for typing information on parameters and
451
- * return types.
452
- */
453
- get: function() {
454
- return {
455
- addClass: function() {
456
- },
457
- removeClass: function() {
458
- },
459
- hasClass: function() {
460
- return !0;
461
- },
462
- setInputAttr: function() {
463
- },
464
- removeInputAttr: function() {
465
- },
466
- registerTextFieldInteractionHandler: function() {
467
- },
468
- deregisterTextFieldInteractionHandler: function() {
469
- },
470
- registerInputInteractionHandler: function() {
471
- },
472
- deregisterInputInteractionHandler: function() {
473
- },
474
- registerValidationAttributeChangeHandler: function() {
475
- return new MutationObserver(function() {
476
- });
477
- },
478
- deregisterValidationAttributeChangeHandler: function() {
479
- },
480
- getNativeInput: function() {
481
- return null;
482
- },
483
- isFocused: function() {
484
- return !1;
485
- },
486
- activateLineRipple: function() {
487
- },
488
- deactivateLineRipple: function() {
489
- },
490
- setLineRippleTransformOrigin: function() {
491
- },
492
- shakeLabel: function() {
493
- },
494
- floatLabel: function() {
495
- },
496
- setLabelRequired: function() {
497
- },
498
- hasLabel: function() {
499
- return !1;
500
- },
501
- getLabelWidth: function() {
502
- return 0;
503
- },
504
- hasOutline: function() {
505
- return !1;
506
- },
507
- notchOutline: function() {
508
- },
509
- closeOutline: function() {
510
- }
511
- };
512
- },
513
- enumerable: !1,
514
- configurable: !0
515
- }), e.prototype.init = function() {
516
- var t = this;
517
- this.adapter.hasLabel() && this.getNativeInput_().required && this.adapter.setLabelRequired(!0), this.adapter.isFocused() ? this.inputFocusHandler_() : this.adapter.hasLabel() && this.shouldFloat && (this.notchOutline(!0), this.adapter.floatLabel(!0), this.styleFloating_(!0)), this.adapter.registerInputInteractionHandler("focus", this.inputFocusHandler_), this.adapter.registerInputInteractionHandler("blur", this.inputBlurHandler_), this.adapter.registerInputInteractionHandler("input", this.inputInputHandler_), Be.forEach(function(n) {
518
- t.adapter.registerInputInteractionHandler(n, t.setPointerXOffset_);
519
- }), ke.forEach(function(n) {
520
- t.adapter.registerTextFieldInteractionHandler(n, t.textFieldInteractionHandler_);
521
- }), this.validationObserver_ = this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler_), this.setCharacterCounter_(this.getValue().length);
522
- }, e.prototype.destroy = function() {
523
- var t = this;
524
- this.adapter.deregisterInputInteractionHandler("focus", this.inputFocusHandler_), this.adapter.deregisterInputInteractionHandler("blur", this.inputBlurHandler_), this.adapter.deregisterInputInteractionHandler("input", this.inputInputHandler_), Be.forEach(function(n) {
525
- t.adapter.deregisterInputInteractionHandler(n, t.setPointerXOffset_);
526
- }), ke.forEach(function(n) {
527
- t.adapter.deregisterTextFieldInteractionHandler(n, t.textFieldInteractionHandler_);
528
- }), this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver_);
529
- }, e.prototype.handleTextFieldInteraction = function() {
530
- var t = this.adapter.getNativeInput();
531
- t && t.disabled || (this.receivedUserInput_ = !0);
532
- }, e.prototype.handleValidationAttributeChange = function(t) {
533
- var n = this;
534
- t.some(function(i) {
535
- return ni.indexOf(i) > -1 ? (n.styleValidity_(!0), n.adapter.setLabelRequired(n.getNativeInput_().required), !0) : !1;
536
- }), t.indexOf("maxlength") > -1 && this.setCharacterCounter_(this.getValue().length);
537
- }, e.prototype.notchOutline = function(t) {
538
- if (!(!this.adapter.hasOutline() || !this.adapter.hasLabel()))
539
- if (t) {
540
- var n = this.adapter.getLabelWidth() * je.LABEL_SCALE;
541
- this.adapter.notchOutline(n);
542
- } else
543
- this.adapter.closeOutline();
544
- }, e.prototype.activateFocus = function() {
545
- this.isFocused_ = !0, this.styleFocused_(this.isFocused_), this.adapter.activateLineRipple(), this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating_(this.shouldFloat), this.adapter.shakeLabel(this.shouldShake)), this.helperText_ && (this.helperText_.isPersistent() || !this.helperText_.isValidation() || !this.isValid_) && this.helperText_.showToScreenReader();
546
- }, e.prototype.setTransformOrigin = function(t) {
547
- if (!(this.isDisabled() || this.adapter.hasOutline())) {
548
- var n = t.touches, i = n ? n[0] : t, o = i.target.getBoundingClientRect(), s = i.clientX - o.left;
549
- this.adapter.setLineRippleTransformOrigin(s);
550
- }
551
- }, e.prototype.handleInput = function() {
552
- this.autoCompleteFocus(), this.setCharacterCounter_(this.getValue().length);
553
- }, e.prototype.autoCompleteFocus = function() {
554
- this.receivedUserInput_ || this.activateFocus();
555
- }, e.prototype.deactivateFocus = function() {
556
- this.isFocused_ = !1, this.adapter.deactivateLineRipple();
557
- var t = this.isValid();
558
- this.styleValidity_(t), this.styleFocused_(this.isFocused_), this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating_(this.shouldFloat), this.adapter.shakeLabel(this.shouldShake)), this.shouldFloat || (this.receivedUserInput_ = !1);
559
- }, e.prototype.getValue = function() {
560
- return this.getNativeInput_().value;
561
- }, e.prototype.setValue = function(t) {
562
- if (this.getValue() !== t && (this.getNativeInput_().value = t), this.setCharacterCounter_(t.length), this.validateOnValueChange_) {
563
- var n = this.isValid();
564
- this.styleValidity_(n);
565
- }
566
- this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating_(this.shouldFloat), this.validateOnValueChange_ && this.adapter.shakeLabel(this.shouldShake));
567
- }, e.prototype.isValid = function() {
568
- return this.useNativeValidation_ ? this.isNativeInputValid_() : this.isValid_;
569
- }, e.prototype.setValid = function(t) {
570
- this.isValid_ = t, this.styleValidity_(t);
571
- var n = !t && !this.isFocused_ && !!this.getValue();
572
- this.adapter.hasLabel() && this.adapter.shakeLabel(n);
573
- }, e.prototype.setValidateOnValueChange = function(t) {
574
- this.validateOnValueChange_ = t;
575
- }, e.prototype.getValidateOnValueChange = function() {
576
- return this.validateOnValueChange_;
577
- }, e.prototype.setUseNativeValidation = function(t) {
578
- this.useNativeValidation_ = t;
579
- }, e.prototype.isDisabled = function() {
580
- return this.getNativeInput_().disabled;
581
- }, e.prototype.setDisabled = function(t) {
582
- this.getNativeInput_().disabled = t, this.styleDisabled_(t);
583
- }, e.prototype.setHelperTextContent = function(t) {
584
- this.helperText_ && this.helperText_.setContent(t);
585
- }, e.prototype.setLeadingIconAriaLabel = function(t) {
586
- this.leadingIcon_ && this.leadingIcon_.setAriaLabel(t);
587
- }, e.prototype.setLeadingIconContent = function(t) {
588
- this.leadingIcon_ && this.leadingIcon_.setContent(t);
589
- }, e.prototype.setTrailingIconAriaLabel = function(t) {
590
- this.trailingIcon_ && this.trailingIcon_.setAriaLabel(t);
591
- }, e.prototype.setTrailingIconContent = function(t) {
592
- this.trailingIcon_ && this.trailingIcon_.setContent(t);
593
- }, e.prototype.setCharacterCounter_ = function(t) {
594
- if (this.characterCounter_) {
595
- var n = this.getNativeInput_().maxLength;
596
- if (n === -1)
597
- throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");
598
- this.characterCounter_.setCounterValue(t, n);
599
- }
600
- }, e.prototype.isBadInput_ = function() {
601
- return this.getNativeInput_().validity.badInput || !1;
602
- }, e.prototype.isNativeInputValid_ = function() {
603
- return this.getNativeInput_().validity.valid;
604
- }, e.prototype.styleValidity_ = function(t) {
605
- var n = e.cssClasses.INVALID;
606
- if (t ? this.adapter.removeClass(n) : this.adapter.addClass(n), this.helperText_) {
607
- this.helperText_.setValidity(t);
608
- var i = this.helperText_.isValidation();
609
- if (!i)
610
- return;
611
- var o = this.helperText_.isVisible(), s = this.helperText_.getId();
612
- o && s ? this.adapter.setInputAttr(I.ARIA_DESCRIBEDBY, s) : this.adapter.removeInputAttr(I.ARIA_DESCRIBEDBY);
613
- }
614
- }, e.prototype.styleFocused_ = function(t) {
615
- var n = e.cssClasses.FOCUSED;
616
- t ? this.adapter.addClass(n) : this.adapter.removeClass(n);
617
- }, e.prototype.styleDisabled_ = function(t) {
618
- var n = e.cssClasses, i = n.DISABLED, o = n.INVALID;
619
- t ? (this.adapter.addClass(i), this.adapter.removeClass(o)) : this.adapter.removeClass(i), this.leadingIcon_ && this.leadingIcon_.setDisabled(t), this.trailingIcon_ && this.trailingIcon_.setDisabled(t);
620
- }, e.prototype.styleFloating_ = function(t) {
621
- var n = e.cssClasses.LABEL_FLOATING;
622
- t ? this.adapter.addClass(n) : this.adapter.removeClass(n);
623
- }, e.prototype.getNativeInput_ = function() {
624
- var t = this.adapter ? this.adapter.getNativeInput() : null;
625
- return t || {
626
- disabled: !1,
627
- maxLength: -1,
628
- required: !1,
629
- type: "input",
630
- validity: {
631
- badInput: !1,
632
- valid: !0
633
- },
634
- value: ""
635
- };
636
- }, e;
637
- }(nt)
638
- );
639
- /**
640
- * @license
641
- * Copyright 2016 Google Inc.
642
- *
643
- * Permission is hereby granted, free of charge, to any person obtaining a copy
644
- * of this software and associated documentation files (the "Software"), to deal
645
- * in the Software without restriction, including without limitation the rights
646
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
647
- * copies of the Software, and to permit persons to whom the Software is
648
- * furnished to do so, subject to the following conditions:
649
- *
650
- * The above copyright notice and this permission notice shall be included in
651
- * all copies or substantial portions of the Software.
652
- *
653
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
654
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
655
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
656
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
657
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
658
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
659
- * THE SOFTWARE.
660
- */
661
- var L = {
662
- HELPER_TEXT_PERSISTENT: "mdc-text-field-helper-text--persistent",
663
- HELPER_TEXT_VALIDATION_MSG: "mdc-text-field-helper-text--validation-msg",
664
- ROOT: "mdc-text-field-helper-text"
665
- }, W = {
666
- ARIA_HIDDEN: "aria-hidden",
667
- ROLE: "role",
668
- ROOT_SELECTOR: "." + L.ROOT
669
- };
670
- /**
671
- * @license
672
- * Copyright 2017 Google Inc.
673
- *
674
- * Permission is hereby granted, free of charge, to any person obtaining a copy
675
- * of this software and associated documentation files (the "Software"), to deal
676
- * in the Software without restriction, including without limitation the rights
677
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
678
- * copies of the Software, and to permit persons to whom the Software is
679
- * furnished to do so, subject to the following conditions:
680
- *
681
- * The above copyright notice and this permission notice shall be included in
682
- * all copies or substantial portions of the Software.
683
- *
684
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
685
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
686
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
687
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
688
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
689
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
690
- * THE SOFTWARE.
691
- */
692
- var Qe = (
693
- /** @class */
694
- function(r) {
695
- A(e, r);
696
- function e(t) {
697
- return r.call(this, c(c({}, e.defaultAdapter), t)) || this;
698
- }
699
- return Object.defineProperty(e, "cssClasses", {
700
- get: function() {
701
- return L;
702
- },
703
- enumerable: !1,
704
- configurable: !0
705
- }), Object.defineProperty(e, "strings", {
706
- get: function() {
707
- return W;
708
- },
709
- enumerable: !1,
710
- configurable: !0
711
- }), Object.defineProperty(e, "defaultAdapter", {
712
- /**
713
- * See {@link MDCTextFieldHelperTextAdapter} for typing information on parameters and return types.
714
- */
715
- get: function() {
716
- return {
717
- addClass: function() {
718
- },
719
- removeClass: function() {
720
- },
721
- hasClass: function() {
722
- return !1;
723
- },
724
- getAttr: function() {
725
- return null;
726
- },
727
- setAttr: function() {
728
- },
729
- removeAttr: function() {
730
- },
731
- setContent: function() {
732
- }
733
- };
734
- },
735
- enumerable: !1,
736
- configurable: !0
737
- }), e.prototype.getId = function() {
738
- return this.adapter.getAttr("id");
739
- }, e.prototype.isVisible = function() {
740
- return this.adapter.getAttr(W.ARIA_HIDDEN) !== "true";
741
- }, e.prototype.setContent = function(t) {
742
- this.adapter.setContent(t);
743
- }, e.prototype.isPersistent = function() {
744
- return this.adapter.hasClass(L.HELPER_TEXT_PERSISTENT);
745
- }, e.prototype.setPersistent = function(t) {
746
- t ? this.adapter.addClass(L.HELPER_TEXT_PERSISTENT) : this.adapter.removeClass(L.HELPER_TEXT_PERSISTENT);
747
- }, e.prototype.isValidation = function() {
748
- return this.adapter.hasClass(L.HELPER_TEXT_VALIDATION_MSG);
749
- }, e.prototype.setValidation = function(t) {
750
- t ? this.adapter.addClass(L.HELPER_TEXT_VALIDATION_MSG) : this.adapter.removeClass(L.HELPER_TEXT_VALIDATION_MSG);
751
- }, e.prototype.showToScreenReader = function() {
752
- this.adapter.removeAttr(W.ARIA_HIDDEN);
753
- }, e.prototype.setValidity = function(t) {
754
- var n = this.adapter.hasClass(L.HELPER_TEXT_PERSISTENT), i = this.adapter.hasClass(L.HELPER_TEXT_VALIDATION_MSG), o = i && !t;
755
- o ? (this.showToScreenReader(), this.adapter.setAttr(W.ROLE, "alert")) : this.adapter.removeAttr(W.ROLE), !n && !o && this.hide_();
756
- }, e.prototype.hide_ = function() {
757
- this.adapter.setAttr(W.ARIA_HIDDEN, "true");
758
- }, e;
759
- }(nt)
760
- );
761
- /**
762
- * @license
763
- * Copyright 2017 Google Inc.
764
- *
765
- * Permission is hereby granted, free of charge, to any person obtaining a copy
766
- * of this software and associated documentation files (the "Software"), to deal
767
- * in the Software without restriction, including without limitation the rights
768
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
769
- * copies of the Software, and to permit persons to whom the Software is
770
- * furnished to do so, subject to the following conditions:
771
- *
772
- * The above copyright notice and this permission notice shall be included in
773
- * all copies or substantial portions of the Software.
774
- *
775
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
776
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
777
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
778
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
779
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
780
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
781
- * THE SOFTWARE.
782
- */
783
- var tn = (
784
- /** @class */
785
- function(r) {
786
- A(e, r);
787
- function e() {
788
- return r !== null && r.apply(this, arguments) || this;
789
- }
790
- return e.attachTo = function(t) {
791
- return new e(t);
792
- }, Object.defineProperty(e.prototype, "foundationForTextField", {
793
- // Provided for access by MDCTextField component
794
- get: function() {
795
- return this.foundation;
796
- },
797
- enumerable: !1,
798
- configurable: !0
799
- }), e.prototype.getDefaultFoundation = function() {
800
- var t = this, n = {
801
- addClass: function(i) {
802
- return t.root.classList.add(i);
803
- },
804
- removeClass: function(i) {
805
- return t.root.classList.remove(i);
806
- },
807
- hasClass: function(i) {
808
- return t.root.classList.contains(i);
809
- },
810
- getAttr: function(i) {
811
- return t.root.getAttribute(i);
812
- },
813
- setAttr: function(i, o) {
814
- return t.root.setAttribute(i, o);
815
- },
816
- removeAttr: function(i) {
817
- return t.root.removeAttribute(i);
818
- },
819
- setContent: function(i) {
820
- t.root.textContent = i;
821
- }
822
- };
823
- return new Qe(n);
824
- }, e;
825
- }(et)
826
- );
827
- /**
828
- * @license
829
- * Copyright 2016 Google Inc.
830
- *
831
- * Permission is hereby granted, free of charge, to any person obtaining a copy
832
- * of this software and associated documentation files (the "Software"), to deal
833
- * in the Software without restriction, including without limitation the rights
834
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
835
- * copies of the Software, and to permit persons to whom the Software is
836
- * furnished to do so, subject to the following conditions:
837
- *
838
- * The above copyright notice and this permission notice shall be included in
839
- * all copies or substantial portions of the Software.
840
- *
841
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
842
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
843
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
844
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
845
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
846
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
847
- * THE SOFTWARE.
848
- */
849
- var Me = {
850
- ICON_EVENT: "MDCTextField:icon",
851
- ICON_ROLE: "button"
852
- }, ai = {
853
- ROOT: "mdc-text-field__icon"
854
- };
855
- /**
856
- * @license
857
- * Copyright 2017 Google Inc.
858
- *
859
- * Permission is hereby granted, free of charge, to any person obtaining a copy
860
- * of this software and associated documentation files (the "Software"), to deal
861
- * in the Software without restriction, including without limitation the rights
862
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
863
- * copies of the Software, and to permit persons to whom the Software is
864
- * furnished to do so, subject to the following conditions:
865
- *
866
- * The above copyright notice and this permission notice shall be included in
867
- * all copies or substantial portions of the Software.
868
- *
869
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
870
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
871
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
872
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
873
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
874
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
875
- * THE SOFTWARE.
876
- */
877
- var Ue = ["click", "keydown"], qe = (
878
- /** @class */
879
- function(r) {
880
- A(e, r);
881
- function e(t) {
882
- var n = r.call(this, c(c({}, e.defaultAdapter), t)) || this;
883
- return n.savedTabIndex_ = null, n.interactionHandler_ = function(i) {
884
- return n.handleInteraction(i);
885
- }, n;
886
- }
887
- return Object.defineProperty(e, "strings", {
888
- get: function() {
889
- return Me;
890
- },
891
- enumerable: !1,
892
- configurable: !0
893
- }), Object.defineProperty(e, "cssClasses", {
894
- get: function() {
895
- return ai;
896
- },
897
- enumerable: !1,
898
- configurable: !0
899
- }), Object.defineProperty(e, "defaultAdapter", {
900
- /**
901
- * See {@link MDCTextFieldIconAdapter} for typing information on parameters and return types.
902
- */
903
- get: function() {
904
- return {
905
- getAttr: function() {
906
- return null;
907
- },
908
- setAttr: function() {
909
- },
910
- removeAttr: function() {
911
- },
912
- setContent: function() {
913
- },
914
- registerInteractionHandler: function() {
915
- },
916
- deregisterInteractionHandler: function() {
917
- },
918
- notifyIconAction: function() {
919
- }
920
- };
921
- },
922
- enumerable: !1,
923
- configurable: !0
924
- }), e.prototype.init = function() {
925
- var t = this;
926
- this.savedTabIndex_ = this.adapter.getAttr("tabindex"), Ue.forEach(function(n) {
927
- t.adapter.registerInteractionHandler(n, t.interactionHandler_);
928
- });
929
- }, e.prototype.destroy = function() {
930
- var t = this;
931
- Ue.forEach(function(n) {
932
- t.adapter.deregisterInteractionHandler(n, t.interactionHandler_);
933
- });
934
- }, e.prototype.setDisabled = function(t) {
935
- this.savedTabIndex_ && (t ? (this.adapter.setAttr("tabindex", "-1"), this.adapter.removeAttr("role")) : (this.adapter.setAttr("tabindex", this.savedTabIndex_), this.adapter.setAttr("role", Me.ICON_ROLE)));
936
- }, e.prototype.setAriaLabel = function(t) {
937
- this.adapter.setAttr("aria-label", t);
938
- }, e.prototype.setContent = function(t) {
939
- this.adapter.setContent(t);
940
- }, e.prototype.handleInteraction = function(t) {
941
- var n = t.key === "Enter" || t.keyCode === 13;
942
- (t.type === "click" || n) && (t.preventDefault(), this.adapter.notifyIconAction());
943
- }, e;
944
- }(nt)
945
- );
946
- /**
947
- * @license
948
- * Copyright 2017 Google Inc.
949
- *
950
- * Permission is hereby granted, free of charge, to any person obtaining a copy
951
- * of this software and associated documentation files (the "Software"), to deal
952
- * in the Software without restriction, including without limitation the rights
953
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
954
- * copies of the Software, and to permit persons to whom the Software is
955
- * furnished to do so, subject to the following conditions:
956
- *
957
- * The above copyright notice and this permission notice shall be included in
958
- * all copies or substantial portions of the Software.
959
- *
960
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
961
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
962
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
963
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
964
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
965
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
966
- * THE SOFTWARE.
967
- */
968
- var oi = (
969
- /** @class */
970
- function(r) {
971
- A(e, r);
972
- function e() {
973
- return r !== null && r.apply(this, arguments) || this;
974
- }
975
- return e.attachTo = function(t) {
976
- return new e(t);
977
- }, Object.defineProperty(e.prototype, "foundationForTextField", {
978
- // Provided for access by MDCTextField component
979
- get: function() {
980
- return this.foundation;
981
- },
982
- enumerable: !1,
983
- configurable: !0
984
- }), e.prototype.getDefaultFoundation = function() {
985
- var t = this, n = {
986
- getAttr: function(i) {
987
- return t.root.getAttribute(i);
988
- },
989
- setAttr: function(i, o) {
990
- return t.root.setAttribute(i, o);
991
- },
992
- removeAttr: function(i) {
993
- return t.root.removeAttribute(i);
994
- },
995
- setContent: function(i) {
996
- t.root.textContent = i;
997
- },
998
- registerInteractionHandler: function(i, o) {
999
- return t.listen(i, o);
1000
- },
1001
- deregisterInteractionHandler: function(i, o) {
1002
- return t.unlisten(i, o);
1003
- },
1004
- notifyIconAction: function() {
1005
- return t.emit(
1006
- qe.strings.ICON_EVENT,
1007
- {},
1008
- !0
1009
- /* shouldBubble */
1010
- );
1011
- }
1012
- };
1013
- return new qe(n);
1014
- }, e;
1015
- }(et)
1016
- );
1017
- /**
1018
- * @license
1019
- * Copyright 2016 Google Inc.
1020
- *
1021
- * Permission is hereby granted, free of charge, to any person obtaining a copy
1022
- * of this software and associated documentation files (the "Software"), to deal
1023
- * in the Software without restriction, including without limitation the rights
1024
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1025
- * copies of the Software, and to permit persons to whom the Software is
1026
- * furnished to do so, subject to the following conditions:
1027
- *
1028
- * The above copyright notice and this permission notice shall be included in
1029
- * all copies or substantial portions of the Software.
1030
- *
1031
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1032
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1033
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1034
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1035
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1036
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1037
- * THE SOFTWARE.
1038
- */
1039
- var li = (
1040
- /** @class */
1041
- function(r) {
1042
- A(e, r);
1043
- function e() {
1044
- return r !== null && r.apply(this, arguments) || this;
1045
- }
1046
- return e.attachTo = function(t) {
1047
- return new e(t);
1048
- }, e.prototype.initialize = function(t, n, i, o, s, h, f) {
1049
- t === void 0 && (t = function(p, q) {
1050
- return new we(p, q);
1051
- }), n === void 0 && (n = function(p) {
1052
- return new Ye(p);
1053
- }), i === void 0 && (i = function(p) {
1054
- return new tn(p);
1055
- }), o === void 0 && (o = function(p) {
1056
- return new ei(p);
1057
- }), s === void 0 && (s = function(p) {
1058
- return new oi(p);
1059
- }), h === void 0 && (h = function(p) {
1060
- return new zn(p);
1061
- }), f === void 0 && (f = function(p) {
1062
- return new Zn(p);
1063
- }), this.input_ = this.root.querySelector(I.INPUT_SELECTOR);
1064
- var x = this.root.querySelector(I.LABEL_SELECTOR);
1065
- this.label_ = x ? h(x) : null;
1066
- var T = this.root.querySelector(I.LINE_RIPPLE_SELECTOR);
1067
- this.lineRipple_ = T ? n(T) : null;
1068
- var it = this.root.querySelector(I.OUTLINE_SELECTOR);
1069
- this.outline_ = it ? f(it) : null;
1070
- var rt = Qe.strings, P = this.root.nextElementSibling, $ = P && P.classList.contains(ht.HELPER_LINE), R = $ && P && P.querySelector(rt.ROOT_SELECTOR);
1071
- this.helperText_ = R ? i(R) : null;
1072
- var z = Je.strings, V = this.root.querySelector(z.ROOT_SELECTOR);
1073
- !V && $ && P && (V = P.querySelector(z.ROOT_SELECTOR)), this.characterCounter_ = V ? o(V) : null;
1074
- var Z = this.root.querySelector(I.LEADING_ICON_SELECTOR);
1075
- this.leadingIcon_ = Z ? s(Z) : null;
1076
- var H = this.root.querySelector(I.TRAILING_ICON_SELECTOR);
1077
- this.trailingIcon_ = H ? s(H) : null, this.prefix_ = this.root.querySelector(I.PREFIX_SELECTOR), this.suffix_ = this.root.querySelector(I.SUFFIX_SELECTOR), this.ripple = this.createRipple_(t);
1078
- }, e.prototype.destroy = function() {
1079
- this.ripple && this.ripple.destroy(), this.lineRipple_ && this.lineRipple_.destroy(), this.helperText_ && this.helperText_.destroy(), this.characterCounter_ && this.characterCounter_.destroy(), this.leadingIcon_ && this.leadingIcon_.destroy(), this.trailingIcon_ && this.trailingIcon_.destroy(), this.label_ && this.label_.destroy(), this.outline_ && this.outline_.destroy(), r.prototype.destroy.call(this);
1080
- }, e.prototype.initialSyncWithDOM = function() {
1081
- this.disabled = this.input_.disabled;
1082
- }, Object.defineProperty(e.prototype, "value", {
1083
- get: function() {
1084
- return this.foundation.getValue();
1085
- },
1086
- /**
1087
- * @param value The value to set on the input.
1088
- */
1089
- set: function(t) {
1090
- this.foundation.setValue(t);
1091
- },
1092
- enumerable: !1,
1093
- configurable: !0
1094
- }), Object.defineProperty(e.prototype, "disabled", {
1095
- get: function() {
1096
- return this.foundation.isDisabled();
1097
- },
1098
- /**
1099
- * @param disabled Sets the Text Field disabled or enabled.
1100
- */
1101
- set: function(t) {
1102
- this.foundation.setDisabled(t);
1103
- },
1104
- enumerable: !1,
1105
- configurable: !0
1106
- }), Object.defineProperty(e.prototype, "valid", {
1107
- get: function() {
1108
- return this.foundation.isValid();
1109
- },
1110
- /**
1111
- * @param valid Sets the Text Field valid or invalid.
1112
- */
1113
- set: function(t) {
1114
- this.foundation.setValid(t);
1115
- },
1116
- enumerable: !1,
1117
- configurable: !0
1118
- }), Object.defineProperty(e.prototype, "required", {
1119
- get: function() {
1120
- return this.input_.required;
1121
- },
1122
- /**
1123
- * @param required Sets the Text Field to required.
1124
- */
1125
- set: function(t) {
1126
- this.input_.required = t;
1127
- },
1128
- enumerable: !1,
1129
- configurable: !0
1130
- }), Object.defineProperty(e.prototype, "pattern", {
1131
- get: function() {
1132
- return this.input_.pattern;
1133
- },
1134
- /**
1135
- * @param pattern Sets the input element's validation pattern.
1136
- */
1137
- set: function(t) {
1138
- this.input_.pattern = t;
1139
- },
1140
- enumerable: !1,
1141
- configurable: !0
1142
- }), Object.defineProperty(e.prototype, "minLength", {
1143
- get: function() {
1144
- return this.input_.minLength;
1145
- },
1146
- /**
1147
- * @param minLength Sets the input element's minLength.
1148
- */
1149
- set: function(t) {
1150
- this.input_.minLength = t;
1151
- },
1152
- enumerable: !1,
1153
- configurable: !0
1154
- }), Object.defineProperty(e.prototype, "maxLength", {
1155
- get: function() {
1156
- return this.input_.maxLength;
1157
- },
1158
- /**
1159
- * @param maxLength Sets the input element's maxLength.
1160
- */
1161
- set: function(t) {
1162
- t < 0 ? this.input_.removeAttribute("maxLength") : this.input_.maxLength = t;
1163
- },
1164
- enumerable: !1,
1165
- configurable: !0
1166
- }), Object.defineProperty(e.prototype, "min", {
1167
- get: function() {
1168
- return this.input_.min;
1169
- },
1170
- /**
1171
- * @param min Sets the input element's min.
1172
- */
1173
- set: function(t) {
1174
- this.input_.min = t;
1175
- },
1176
- enumerable: !1,
1177
- configurable: !0
1178
- }), Object.defineProperty(e.prototype, "max", {
1179
- get: function() {
1180
- return this.input_.max;
1181
- },
1182
- /**
1183
- * @param max Sets the input element's max.
1184
- */
1185
- set: function(t) {
1186
- this.input_.max = t;
1187
- },
1188
- enumerable: !1,
1189
- configurable: !0
1190
- }), Object.defineProperty(e.prototype, "step", {
1191
- get: function() {
1192
- return this.input_.step;
1193
- },
1194
- /**
1195
- * @param step Sets the input element's step.
1196
- */
1197
- set: function(t) {
1198
- this.input_.step = t;
1199
- },
1200
- enumerable: !1,
1201
- configurable: !0
1202
- }), Object.defineProperty(e.prototype, "helperTextContent", {
1203
- /**
1204
- * Sets the helper text element content.
1205
- */
1206
- set: function(t) {
1207
- this.foundation.setHelperTextContent(t);
1208
- },
1209
- enumerable: !1,
1210
- configurable: !0
1211
- }), Object.defineProperty(e.prototype, "leadingIconAriaLabel", {
1212
- /**
1213
- * Sets the aria label of the leading icon.
1214
- */
1215
- set: function(t) {
1216
- this.foundation.setLeadingIconAriaLabel(t);
1217
- },
1218
- enumerable: !1,
1219
- configurable: !0
1220
- }), Object.defineProperty(e.prototype, "leadingIconContent", {
1221
- /**
1222
- * Sets the text content of the leading icon.
1223
- */
1224
- set: function(t) {
1225
- this.foundation.setLeadingIconContent(t);
1226
- },
1227
- enumerable: !1,
1228
- configurable: !0
1229
- }), Object.defineProperty(e.prototype, "trailingIconAriaLabel", {
1230
- /**
1231
- * Sets the aria label of the trailing icon.
1232
- */
1233
- set: function(t) {
1234
- this.foundation.setTrailingIconAriaLabel(t);
1235
- },
1236
- enumerable: !1,
1237
- configurable: !0
1238
- }), Object.defineProperty(e.prototype, "trailingIconContent", {
1239
- /**
1240
- * Sets the text content of the trailing icon.
1241
- */
1242
- set: function(t) {
1243
- this.foundation.setTrailingIconContent(t);
1244
- },
1245
- enumerable: !1,
1246
- configurable: !0
1247
- }), Object.defineProperty(e.prototype, "useNativeValidation", {
1248
- /**
1249
- * Enables or disables the use of native validation. Use this for custom validation.
1250
- * @param useNativeValidation Set this to false to ignore native input validation.
1251
- */
1252
- set: function(t) {
1253
- this.foundation.setUseNativeValidation(t);
1254
- },
1255
- enumerable: !1,
1256
- configurable: !0
1257
- }), Object.defineProperty(e.prototype, "prefixText", {
1258
- /**
1259
- * Gets the text content of the prefix, or null if it does not exist.
1260
- */
1261
- get: function() {
1262
- return this.prefix_ ? this.prefix_.textContent : null;
1263
- },
1264
- /**
1265
- * Sets the text content of the prefix, if it exists.
1266
- */
1267
- set: function(t) {
1268
- this.prefix_ && (this.prefix_.textContent = t);
1269
- },
1270
- enumerable: !1,
1271
- configurable: !0
1272
- }), Object.defineProperty(e.prototype, "suffixText", {
1273
- /**
1274
- * Gets the text content of the suffix, or null if it does not exist.
1275
- */
1276
- get: function() {
1277
- return this.suffix_ ? this.suffix_.textContent : null;
1278
- },
1279
- /**
1280
- * Sets the text content of the suffix, if it exists.
1281
- */
1282
- set: function(t) {
1283
- this.suffix_ && (this.suffix_.textContent = t);
1284
- },
1285
- enumerable: !1,
1286
- configurable: !0
1287
- }), e.prototype.focus = function() {
1288
- this.input_.focus();
1289
- }, e.prototype.layout = function() {
1290
- var t = this.foundation.shouldFloat;
1291
- this.foundation.notchOutline(t);
1292
- }, e.prototype.getDefaultFoundation = function() {
1293
- var t = c(c(c(c(c({}, this.getRootAdapterMethods_()), this.getInputAdapterMethods_()), this.getLabelAdapterMethods_()), this.getLineRippleAdapterMethods_()), this.getOutlineAdapterMethods_());
1294
- return new ri(t, this.getFoundationMap_());
1295
- }, e.prototype.getRootAdapterMethods_ = function() {
1296
- var t = this;
1297
- return {
1298
- addClass: function(n) {
1299
- return t.root.classList.add(n);
1300
- },
1301
- removeClass: function(n) {
1302
- return t.root.classList.remove(n);
1303
- },
1304
- hasClass: function(n) {
1305
- return t.root.classList.contains(n);
1306
- },
1307
- registerTextFieldInteractionHandler: function(n, i) {
1308
- t.listen(n, i);
1309
- },
1310
- deregisterTextFieldInteractionHandler: function(n, i) {
1311
- t.unlisten(n, i);
1312
- },
1313
- registerValidationAttributeChangeHandler: function(n) {
1314
- var i = function(h) {
1315
- return h.map(function(f) {
1316
- return f.attributeName;
1317
- }).filter(function(f) {
1318
- return f;
1319
- });
1320
- }, o = new MutationObserver(function(h) {
1321
- return n(i(h));
1322
- }), s = { attributes: !0 };
1323
- return o.observe(t.input_, s), o;
1324
- },
1325
- deregisterValidationAttributeChangeHandler: function(n) {
1326
- n.disconnect();
1327
- }
1328
- };
1329
- }, e.prototype.getInputAdapterMethods_ = function() {
1330
- var t = this;
1331
- return {
1332
- getNativeInput: function() {
1333
- return t.input_;
1334
- },
1335
- setInputAttr: function(n, i) {
1336
- t.input_.setAttribute(n, i);
1337
- },
1338
- removeInputAttr: function(n) {
1339
- t.input_.removeAttribute(n);
1340
- },
1341
- isFocused: function() {
1342
- return document.activeElement === t.input_;
1343
- },
1344
- registerInputInteractionHandler: function(n, i) {
1345
- t.input_.addEventListener(n, i, pt());
1346
- },
1347
- deregisterInputInteractionHandler: function(n, i) {
1348
- t.input_.removeEventListener(n, i, pt());
1349
- }
1350
- };
1351
- }, e.prototype.getLabelAdapterMethods_ = function() {
1352
- var t = this;
1353
- return {
1354
- floatLabel: function(n) {
1355
- return t.label_ && t.label_.float(n);
1356
- },
1357
- getLabelWidth: function() {
1358
- return t.label_ ? t.label_.getWidth() : 0;
1359
- },
1360
- hasLabel: function() {
1361
- return !!t.label_;
1362
- },
1363
- shakeLabel: function(n) {
1364
- return t.label_ && t.label_.shake(n);
1365
- },
1366
- setLabelRequired: function(n) {
1367
- return t.label_ && t.label_.setRequired(n);
1368
- }
1369
- };
1370
- }, e.prototype.getLineRippleAdapterMethods_ = function() {
1371
- var t = this;
1372
- return {
1373
- activateLineRipple: function() {
1374
- t.lineRipple_ && t.lineRipple_.activate();
1375
- },
1376
- deactivateLineRipple: function() {
1377
- t.lineRipple_ && t.lineRipple_.deactivate();
1378
- },
1379
- setLineRippleTransformOrigin: function(n) {
1380
- t.lineRipple_ && t.lineRipple_.setRippleCenter(n);
1381
- }
1382
- };
1383
- }, e.prototype.getOutlineAdapterMethods_ = function() {
1384
- var t = this;
1385
- return {
1386
- closeOutline: function() {
1387
- return t.outline_ && t.outline_.closeNotch();
1388
- },
1389
- hasOutline: function() {
1390
- return !!t.outline_;
1391
- },
1392
- notchOutline: function(n) {
1393
- return t.outline_ && t.outline_.notch(n);
1394
- }
1395
- };
1396
- }, e.prototype.getFoundationMap_ = function() {
1397
- return {
1398
- characterCounter: this.characterCounter_ ? this.characterCounter_.foundationForTextField : void 0,
1399
- helperText: this.helperText_ ? this.helperText_.foundationForTextField : void 0,
1400
- leadingIcon: this.leadingIcon_ ? this.leadingIcon_.foundationForTextField : void 0,
1401
- trailingIcon: this.trailingIcon_ ? this.trailingIcon_.foundationForTextField : void 0
1402
- };
1403
- }, e.prototype.createRipple_ = function(t) {
1404
- var n = this, i = this.root.classList.contains(ht.TEXTAREA), o = this.root.classList.contains(ht.OUTLINED);
1405
- if (i || o)
1406
- return null;
1407
- var s = c(c({}, we.createAdapter(this)), { isSurfaceActive: function() {
1408
- return Kn(n.input_, ":active");
1409
- }, registerInteractionHandler: function(h, f) {
1410
- return n.input_.addEventListener(h, f, pt());
1411
- }, deregisterInteractionHandler: function(h, f) {
1412
- return n.input_.removeEventListener(h, f, pt());
1413
- } });
1414
- return t(this.root, new Jn(s));
1415
- }, e;
1416
- }(et)
1417
- ), si = {
1418
- /**
1419
- *
1420
- *
1421
- * Defaults to **null**.
1422
- */
1423
- activated: a.bool,
1424
- /**
1425
- * The css class name to be passed through to the component markup.
1426
- *
1427
- * Defaults to **undefined**.
1428
- */
1429
- className: a.string,
1430
- /**
1431
- *
1432
- *
1433
- * Defaults to **null**.
1434
- */
1435
- rippleCenter: a.string
1436
- }, ui = {
1437
- activated: null,
1438
- className: void 0,
1439
- rippleCenter: null
1440
- }, di = ["activated", "rippleCenter", "className"], Lt = ui, Rt = /* @__PURE__ */ At(function(r, e) {
1441
- var t = r.activated, n = t === void 0 ? Lt.activated : t, i = r.rippleCenter, o = i === void 0 ? Lt.rippleCenter : i, s = r.className, h = s === void 0 ? Lt.className : s, f = Ot(r, di), x = O(), T = O();
1442
- return Ze(e, function() {
1443
- return T.current;
1444
- }, []), g(function() {
1445
- return x.current = Ye.attachTo(T.current), function() {
1446
- x.current.destroy();
1447
- };
1448
- }, [T]), g(function() {
1449
- n ? x.current.activate() : x.current.deactivate();
1450
- }, [n]), g(function() {
1451
- o && x.current.setRippleCenter(o);
1452
- }, [o]), /* @__PURE__ */ u.createElement("div", tt({
1453
- ref: T,
1454
- className: U("lmnt", "mdc-line-ripple", h)
1455
- }, f));
1456
- });
1457
- Rt.displayName = "LineRipple";
1458
- Rt.propTypes = si;
1459
- var ci = ["wrap", "children"], en = /* @__PURE__ */ At(function(r, e) {
1460
- var t = r.wrap, n = r.children, i = Ot(r, ci);
1461
- return t ? /* @__PURE__ */ u.createElement("span", tt({
1462
- ref: e,
1463
- className: "mdc-text-field__resizer"
1464
- }, i), n) : n;
1465
- });
1466
- en.displayName = "TextfieldSpanShim";
1467
- var fi = {
1468
- /**
1469
- * For dense textfield this aligns the contents of the text-field to left or right
1470
- *
1471
- * Defaults to **'left'**.
1472
- */
1473
- alignment: a.oneOf(["left", "right"]),
1474
- /**
1475
- * @deprecated _Use `fullWidth` instead._
1476
- *
1477
- * Applies a full-width style where the Textfield will fill its container.
1478
- *
1479
- * Defaults to **undefined**.
1480
- */
1481
- block: F(a.bool, "Textfield", "Use `fullWidth` instead."),
1482
- /**
1483
- * The css class name to be passed through to the component markup.
1484
- *
1485
- * Defaults to **undefined**.
1486
- */
1487
- className: a.string,
1488
- /**
1489
- * @deprecated _See `containerProps`._
1490
- *
1491
- * Add a custom class to the `Textfield` container.
1492
- *
1493
- * Defaults to **undefined**.
1494
- */
1495
- containerClass: F(a.string, "Textfield", "See `containerProps`."),
1496
- /**
1497
- * Properties to be added to the container of the textfield.
1498
- *
1499
- * Defaults to **undefined**.
1500
- */
1501
- containerProps: a.object,
1502
- /**
1503
- * Enables a character count. _Warning_ requires `maxlength` to be set.
1504
- *
1505
- * Defaults to **false**.
1506
- */
1507
- counter: a.bool,
1508
- /**
1509
- * The starting value of the Textfield when working in uncontrolled mode.
1510
- *
1511
- * Defaults to **undefined**.
1512
- */
1513
- defaultValue: a.oneOfType([a.string, a.number]),
1514
- /**
1515
- * The size of the Textfield will be reduced.
1516
- *
1517
- * Defaults to **false**.
1518
- */
1519
- dense: a.bool,
1520
- /**
1521
- * Textfield will be disabled.
1522
- *
1523
- * Defaults to **false**.
1524
- */
1525
- disabled: a.bool,
1526
- /**
1527
- * @deprecated _Use `variant='embedded'_
1528
- *
1529
- * An unfilled, non-outlined and full-width variant of Textfield, intended to be embedded in other components such as TopAppBar or TableHeader.
1530
- *
1531
- * Defaults to **undefined**.
1532
- */
1533
- embedded: F(a.bool, "Textfield", 'Use `variant="embedded"'),
1534
- /**
1535
- * @deprecated _Use variant='filled' instead._
1536
- *
1537
- * Apply filled style to the Textfield. Previously called primary.
1538
- *
1539
- * Defaults to **undefined**.
1540
- */
1541
- filled: F(a.bool, "Textfield", 'Use variant="filled" instead.'),
1542
- /**
1543
- * Sets the Textfield to the focused state.
1544
- *
1545
- * Defaults to **false**.
1546
- */
1547
- focused: a.bool,
1548
- /**
1549
- * The Textfield will expand to 100% width.
1550
- *
1551
- * Defaults to **false**.
1552
- */
1553
- fullWidth: a.bool,
1554
- /**
1555
- * Helper text to be displayed below Textfield, by default only visible on focus.
1556
- *
1557
- * Defaults to **null**.
1558
- */
1559
- helperText: a.node,
1560
- /**
1561
- * Randomly generated id for the helper text container element. May be overwritten.
1562
- *
1563
- * Defaults to **undefined**.
1564
- */
1565
- helperTextId: a.string,
1566
- /**
1567
- * Set the helper text to be permanently visible.
1568
- *
1569
- * Defaults to **false**.
1570
- */
1571
- helperTextPersistent: a.bool,
1572
- /**
1573
- * Set the helper text to use validation styles. Helper text changes with `valid` (e.g., helper text will appear red when `valid` is set to 'false').
1574
- *
1575
- * Defaults to **false**.
1576
- */
1577
- helperTextValidation: a.bool,
1578
- /**
1579
- * Randomly generated id for the input element. May be overwritten.
1580
- *
1581
- * Defaults to **undefined**.
1582
- */
1583
- id: a.string,
1584
- /**
1585
- * Floating input label. Note: full-width Textfields do not support floating labels - any label on a full-width Textfield will be automatically mapped to a placeholder.
1586
- *
1587
- * Defaults to **null**.
1588
- */
1589
- label: a.string,
1590
- /**
1591
- * Randomly generated id for the label element. May be overwritten.
1592
- *
1593
- * Defaults to **undefined**.
1594
- */
1595
- labelId: a.string,
1596
- /**
1597
- * Custom content to appear before the input.
1598
- *
1599
- * Defaults to **null**.
1600
- */
1601
- leadingContent: a.node,
1602
- /**
1603
- * Adds the given Icon or Icon Button to the left of the Textfield. Expects the name of a valid Material.io icon, however in React an icon or icon button component may be passed in instead for more control,
1604
- *
1605
- * Defaults to **null**.
1606
- */
1607
- leadingIcon: a.oneOfType([a.string, a.node]),
1608
- /**
1609
- * @deprecated _Use `maxlength` instead. The case of this prop has changed to be more consistent._
1610
- *
1611
- * Restricts the number of characters that can be entered, best used with counter.
1612
- *
1613
- * Defaults to **undefined**.
1614
- */
1615
- maxLength: F(a.number, "Textfield", "Use `maxlength` instead. The case of this prop has changed to be more consistent."),
1616
- /**
1617
- * Restricts the number of characters that can be entered, best used with counter.
1618
- *
1619
- * Defaults to **null**.
1620
- */
1621
- maxlength: Gn(a.number, "Textfield", "counter"),
1622
- /**
1623
- * Prevents resizing when using `textarea`.
1624
- *
1625
- * Defaults to **true**.
1626
- */
1627
- noResize: a.bool,
1628
- /**
1629
- * Fired when focus leaves the input.
1630
- *
1631
- * Defaults to **null**.
1632
- */
1633
- onBlur: a.func,
1634
- /**
1635
- * Fired when each character is entered into the Textfield.
1636
- *
1637
- * Defaults to **null**.
1638
- */
1639
- onChange: a.func,
1640
- /**
1641
- * Fired when the input gains focus.
1642
- *
1643
- * Defaults to **null**.
1644
- */
1645
- onFocus: a.func,
1646
- /**
1647
- * @deprecated _Use `variant='outlined'` instead_
1648
- *
1649
- * Apply outlined style to the Textfield. Previously called secondary.
1650
- *
1651
- * Defaults to **undefined**.
1652
- */
1653
- outlined: F(a.bool, "Textfield", 'Use `variant="outlined"` instead'),
1654
- /**
1655
- * Non-floating label text, will be replaced when the user starts typing.
1656
- *
1657
- * Defaults to **null**.
1658
- */
1659
- placeholder: a.string,
1660
- /**
1661
- * Text that will appear before the label or value of the Textfield. It will be shown on focus. An example use-case might be a currency symbol such as `$`. _Warning:_ This cannot be used with `leadingIcon` or `textarea`.
1662
- *
1663
- * Defaults to **null**.
1664
- */
1665
- prefixText: a.string,
1666
- /**
1667
- * @deprecated _This feature is no longer supported. Use `variant='filled'` instead._
1668
- *
1669
- * Enable filled styling.
1670
- *
1671
- * Defaults to **undefined**.
1672
- */
1673
- primary: F(a.bool, "Textfield", 'This feature is no longer supported. Use `variant="filled"` instead.'),
1674
- /**
1675
- * @deprecated _Use `variant='embedded'`_
1676
- *
1677
- * Enabled search bar styling, including a full width style.
1678
- *
1679
- * Defaults to **undefined**.
1680
- */
1681
- search: F(a.bool, "Textfield", 'Use `variant="embedded"`'),
1682
- /**
1683
- * @deprecated _Use `variant='outlined'` instead._
1684
- *
1685
- * Apply secondary style to the Textfield.
1686
- *
1687
- * Defaults to **undefined**.
1688
- */
1689
- secondary: F(a.bool, "Textfield", 'Use `variant="outlined"` instead.'),
1690
- /**
1691
- * Text that will appear after the label or value of the Textfield. It will be shown on focus. An example use-case might be `.00` if handling currency. _Warning:_ This cannot be used with `trailingIcon` or `textarea`.
1692
- *
1693
- * Defaults to **null**.
1694
- */
1695
- suffixText: a.string,
1696
- /**
1697
- * Enabled multi-line text input. _Note_ `textarea` cannot be used with the embedded variant.
1698
- *
1699
- * Defaults to **false**.
1700
- */
1701
- textarea: a.bool,
1702
- /**
1703
- * If defined, a Tooltip will appear on the Textfield. Useful to show the full value, if the value is too long for the Textfield width. The object should be the needed Tooltip properties. Tooltip `text` prop will be set to the current value of the Textfield. See Tooltip docs for available props.
1704
- *
1705
- * Defaults to **null**.
1706
- */
1707
- tooltip: a.oneOfType([a.bool, a.object]),
1708
- /**
1709
- * Custom content to appear after the input.
1710
- *
1711
- * Defaults to **null**.
1712
- */
1713
- trailingContent: a.node,
1714
- /**
1715
- * Adds the given Icon or Icon Button to the right of the Textfield . Expects the name of a valid Material.io icon, however in React an icon icon button component may be passed in instead for more control.
1716
- *
1717
- * Defaults to **null**.
1718
- */
1719
- trailingIcon: a.oneOfType([a.string, a.node]),
1720
- /**
1721
- * Support for built-in input types. Browser support for some advanced types such as color or date may be limited or appear differently between browsers. _Note_ the `Datepicker` component should be preferred over the built-in date/time types as it offers more consistency and features._Note_ Slider type is not support, please use the Element `Slider` component instead.
1722
- *
1723
- * Defaults to **'text'**.
1724
- */
1725
- type: a.oneOf(["button", "checkbox", "color", "date", "datetime-local", "email", "file", "hidden", "image", "month", "number", "password", "radio", "range", "reset", "search", "submit", "tel", "text", "time", "url", "week"]),
1726
- /**
1727
- * Applies an invalid style to the Textfield.
1728
- *
1729
- * Defaults to **true**.
1730
- */
1731
- valid: a.bool,
1732
- /**
1733
- * The current value of the Textfield component.
1734
- *
1735
- * Defaults to **undefined**.
1736
- */
1737
- value: a.oneOfType([a.string, a.number]),
1738
- /**
1739
- * Applies the selected styling to the Textfield. _Note_ `textarea` does not support the `embedded` variant.
1740
- *
1741
- * Defaults to **'filled'**.
1742
- */
1743
- variant: a.oneOf(["filled", "outlined", "embedded"])
1744
- }, pi = {
1745
- alignment: "left",
1746
- block: void 0,
1747
- className: void 0,
1748
- containerClass: void 0,
1749
- containerProps: void 0,
1750
- counter: !1,
1751
- defaultValue: void 0,
1752
- dense: !1,
1753
- disabled: !1,
1754
- embedded: void 0,
1755
- filled: void 0,
1756
- focused: !1,
1757
- fullWidth: !1,
1758
- helperText: null,
1759
- helperTextId: void 0,
1760
- helperTextPersistent: !1,
1761
- helperTextValidation: !1,
1762
- id: void 0,
1763
- label: null,
1764
- labelId: void 0,
1765
- leadingContent: null,
1766
- leadingIcon: null,
1767
- maxLength: void 0,
1768
- maxlength: null,
1769
- noResize: !0,
1770
- onBlur: null,
1771
- outlined: void 0,
1772
- placeholder: null,
1773
- prefixText: null,
1774
- primary: void 0,
1775
- search: void 0,
1776
- secondary: void 0,
1777
- suffixText: null,
1778
- textarea: !1,
1779
- tooltip: null,
1780
- trailingContent: null,
1781
- trailingIcon: null,
1782
- type: "text",
1783
- valid: !0,
1784
- value: void 0,
1785
- variant: "filled"
1786
- }, hi = ["alignment", "block", "className", "containerClass", "containerProps", "containerStyle", "counter", "defaultValue", "dense", "disabled", "embedded", "filled", "focused", "fullWidth", "helperText", "helperTextId", "helperTextPersistent", "helperTextValidation", "id", "label", "labelId", "leadingContent", "leadingIcon", "maxLength", "maxlength", "noResize", "onBlur", "outlined", "placeholder", "prefixText", "primary", "search", "secondary", "suffixText", "textarea", "tooltip", "trailingContent", "trailingIcon", "type", "valid", "value", "variant"];
1787
- function Xe(r, e) {
1788
- var t = qn(r);
1789
- if (Ve) {
1790
- var n = Ve(r);
1791
- e && (n = Xn(n).call(n, function(i) {
1792
- return We(r, i).enumerable;
1793
- })), t.push.apply(t, n);
1794
- }
1795
- return t;
1796
- }
1797
- function S(r) {
1798
- for (var e = 1; e < arguments.length; e++) {
1799
- var t, n, i = arguments[e] != null ? arguments[e] : {};
1800
- e % 2 ? Fe(t = Xe(Object(i), !0)).call(t, function(o) {
1801
- kn(r, o, i[o]);
1802
- }) : Pe ? Mn(r, Pe(i)) : Fe(n = Xe(Object(i))).call(n, function(o) {
1803
- Un(r, o, We(i, o));
1804
- });
1805
- }
1806
- return r;
1807
- }
1808
- var Ge = function(r, e) {
1809
- return r ? /* @__PURE__ */ u.createElement("div", {
1810
- className: "mdc-text-field-character-counter"
1811
- }, "0 / ", e) : null;
1812
- }, _i = function(r) {
1813
- var e = S({}, r), t = e.type, n = S({}, t), i = n.displayName;
1814
- return typeof r == "string" ? /* @__PURE__ */ u.createElement(ze, {
1815
- role: "button",
1816
- className: "mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--leading",
1817
- icon: r
1818
- }) : $e(r, {
1819
- className: U("mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--leading", i === "IconButton" && "lmnt-text-field__icon-button--leading"),
1820
- dense: i === "IconButton" ? !0 : void 0,
1821
- role: "button"
1822
- });
1823
- }, gi = function(r) {
1824
- var e = S({}, r), t = e.type, n = S({}, t), i = n.displayName;
1825
- return typeof r == "string" ? /* @__PURE__ */ u.createElement(ze, {
1826
- className: "mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--trailing",
1827
- icon: r
1828
- }) : $e(r, {
1829
- className: U("mdc-text-field__icon lmnt-text-field__icon mdc-text-field__icon--trailing", i === "IconButton" && "lmnt-text-field__icon-button--trailing"),
1830
- dense: i === "IconButton" ? !0 : void 0,
1831
- role: i === "IconButton" ? "button" : null
1832
- });
1833
- }, l = pi, nn = /* @__PURE__ */ At(function(r, e) {
1834
- var t = r.alignment, n = t === void 0 ? l.alignment : t, i = r.block, o = i === void 0 ? l.block : i, s = r.className, h = s === void 0 ? l.className : s, f = r.containerClass, x = f === void 0 ? l.containerClass : f, T = r.containerProps, it = T === void 0 ? l.containerProps : T, rt = r.containerStyle, P = rt === void 0 ? l.containerStyle : rt, $ = r.counter, R = $ === void 0 ? l.counter : $, z = r.defaultValue, V = z === void 0 ? l.defaultValue : z, Z = r.dense, H = Z === void 0 ? l.dense : Z, p = r.disabled, q = p === void 0 ? l.disabled : p, Nt = r.embedded, Ft = Nt === void 0 ? l.embedded : Nt, Pt = r.filled, rn = Pt === void 0 ? l.filled : Pt, Vt = r.focused, St = Vt === void 0 ? l.focused : Vt, Ht = r.fullWidth, an = Ht === void 0 ? l.fullWidth : Ht, Dt = r.helperText, b = Dt === void 0 ? l.helperText : Dt, wt = r.helperTextId, on = wt === void 0 ? l.helperTextId : wt, jt = r.helperTextPersistent, at = jt === void 0 ? l.helperTextPersistent : jt, Bt = r.helperTextValidation, _t = Bt === void 0 ? l.helperTextValidation : Bt, kt = r.id, ln = kt === void 0 ? l.id : kt, Mt = r.label, D = Mt === void 0 ? l.label : Mt, Ut = r.labelId, sn = Ut === void 0 ? l.labelId : Ut, qt = r.leadingContent, un = qt === void 0 ? l.leadingContent : qt, Xt = r.leadingIcon, Y = Xt === void 0 ? l.leadingIcon : Xt, Gt = r.maxLength, gt = Gt === void 0 ? l.maxLength : Gt, Wt = r.maxlength, ot = Wt === void 0 ? l.maxlength : Wt, $t = r.noResize, lt = $t === void 0 ? l.noResize : $t, zt = r.onBlur, Zt = zt === void 0 ? l.onBlur : zt, Yt = r.outlined, dn = Yt === void 0 ? l.outlined : Yt, Kt = r.placeholder, cn = Kt === void 0 ? l.placeholder : Kt, Jt = r.prefixText, Qt = Jt === void 0 ? l.prefixText : Jt, te = r.primary, fn = te === void 0 ? l.primary : te, ee = r.search, pn = ee === void 0 ? l.search : ee, ne = r.secondary, hn = ne === void 0 ? l.secondary : ne, ie = r.suffixText, re = ie === void 0 ? l.suffixText : ie, ae = r.textarea, v = ae === void 0 ? l.textarea : ae, oe = r.tooltip, y = oe === void 0 ? l.tooltip : oe, le = r.trailingContent, _n = le === void 0 ? l.trailingContent : le, se = r.trailingIcon, K = se === void 0 ? l.trailingIcon : se, ue = r.type, de = ue === void 0 ? l.type : ue, ce = r.valid, st = ce === void 0 ? l.valid : ce, fe = r.value, N = fe === void 0 ? l.value : fe, pe = r.variant, vt = pe === void 0 ? l.variant : pe, mt = Ot(r, hi), he = y && wn(y) === "object" ? y : {}, gn = he.hoisted, _e = he.position, ge = _e === void 0 ? "bottom" : _e, vn = k(function() {
1835
- return ln || Ct();
1836
- }), mn = B(vn, 1), ut = mn[0], bn = k(function() {
1837
- return on || Ct();
1838
- }), yn = B(bn, 1), bt = yn[0], In = k(function() {
1839
- return sn || Ct();
1840
- }), xn = B(In, 1), yt = xn[0], Tn = k(!0), ve = B(Tn, 2), me = ve[0], En = ve[1], Cn = k(!1), be = B(Cn, 2), It = be[0], Ln = be[1], On = k(ot), ye = B(On, 2), w = ye[0], An = ye[1], Rn = k(St || !1), Ie = B(Rn, 2), Nn = Ie[0], xe = Ie[1], Fn = b || R && w, Pn = v ? "textarea" : "input", Te = O(), j = O(), m = O(), xt = O(), Ee = O(), Tt = O(), dt = O(), J = O(), Vn = (K || Y) && !v, X = Yn(function() {
1841
- return st ?? !0;
1842
- }, [st]), G = !v && (Ft || pn || vt === "embedded"), ct = !Ft && (dn || hn || vt === "outlined"), ft = !ct && !G && (fn || rn || vt === "filled"), Q = G || an || o, Et = !G && !!D && !H;
1843
- g(function() {
1844
- return m.current = li.attachTo(xt.current), function() {
1845
- m.current.destroy();
1846
- };
1847
- }, [It]), Ze(e, function() {
1848
- return {
1849
- mdc: m.current,
1850
- input: Ee.current,
1851
- container: Tt.current,
1852
- label: xt.current
1853
- };
1854
- }), g(function() {
1855
- return b && typeof b == "string" && (j.current = new tn(Te.current)), function() {
1856
- j.current && j.current.destroy();
1857
- };
1858
- }, [b]), g(function() {
1859
- if (b) {
1860
- var d, _, E, C;
1861
- (d = j.current) === null || d === void 0 || d.foundation.setValidation(_t), (_ = j.current) === null || _ === void 0 || _.foundation.setValidity(X), (E = j.current) === null || E === void 0 || E.foundation.setPersistent(at), (C = j.current) === null || C === void 0 || C.foundation.setContent(b);
1862
- }
1863
- }, [b, at, _t, X]), g(function() {
1864
- V || (m.current.value = N || N === 0 ? N : ""), m.current.valid = X;
1865
- }, [m, N, X, V]), g(function() {
1866
- m.current.disabled = q;
1867
- }, [m, q]), g(function() {
1868
- An(gt && !ot ? gt : ot);
1869
- }, [ot, gt]), g(function() {
1870
- Ln(w > 0 && R);
1871
- }, [w, R]), g(function() {
1872
- var d = Q || R || b;
1873
- En(d);
1874
- }, [Q, R, b]);
1875
- var Sn = function() {
1876
- st !== void 0 && N !== null && (m.current.valid = st);
1877
- }, Hn = function(d) {
1878
- xe(!1), Zt && Zt(d), Sn();
1879
- }, Dn = function(d) {
1880
- xe(!0), mt.onFocus && mt.onFocus(d);
1881
- }, Ce = function() {
1882
- m.current.value = "", m.current.valid = X;
1883
- };
1884
- g(function() {
1885
- return jn() ? (window.addEventListener("reset", Ce), function() {
1886
- window.removeEventListener("reset", Ce);
1887
- }) : function() {
1888
- };
1889
- }, []), g(function() {
1890
- if (y) {
1891
- var d = [{
1892
- name: "flip",
1893
- options: {
1894
- enabled: !0,
1895
- padding: {
1896
- bottom: 32,
1897
- top: 32
1898
- }
1899
- }
1900
- }, {
1901
- name: "offset",
1902
- options: {
1903
- offset: [0, 12]
1904
- }
1905
- }];
1906
- J.current = Bn(Tt.current, dt.current, {
1907
- placement: ge,
1908
- modifiers: d
1909
- });
1910
- }
1911
- return function() {
1912
- var _;
1913
- (_ = J.current) === null || _ === void 0 || _.destroy();
1914
- };
1915
- }, [ge, gn, y]);
1916
- var Le = De(function() {
1917
- if (N) {
1918
- var d = m.current.input_;
1919
- if (d.offsetWidth < d.scrollWidth) {
1920
- var _, E, C;
1921
- (_ = dt.current) === null || _ === void 0 || _.setAttribute("data-show", ""), (E = J.current) === null || E === void 0 || E.setOptions(function(Ae) {
1922
- var Re;
1923
- return S(S({}, Ae), {}, {
1924
- modifiers: Ne(Re = []).call(Re, Se(Ae.modifiers), [{
1925
- name: "eventListeners",
1926
- enabled: !0
1927
- }])
1928
- });
1929
- }), (C = J.current) === null || C === void 0 || C.update();
1930
- }
1931
- }
1932
- }, [N]), Oe = De(function() {
1933
- var d, _;
1934
- (d = dt.current) === null || d === void 0 || d.removeAttribute("data-show"), (_ = J.current) === null || _ === void 0 || _.setOptions(function(E) {
1935
- var C;
1936
- return S(S({}, E), {}, {
1937
- modifiers: Ne(C = []).call(C, Se(E.modifiers), [{
1938
- name: "eventListeners",
1939
- enabled: !1
1940
- }])
1941
- });
1942
- });
1943
- }, []);
1944
- return /* @__PURE__ */ u.createElement("div", tt({
1945
- ref: Tt,
1946
- style: P,
1947
- className: U("lmnt", "lmnt-text-field--container", Q && "lmnt-text-field--container-full-width", !Q && me && "lmnt-text-field--container-to-content-width", !me && "lmnt-text-field-inline-container", x)
1948
- }, it, {
1949
- onMouseEnter: y && Le,
1950
- onFocus: y && Le,
1951
- onMouseLeave: y && Oe,
1952
- onBlur: y && Oe
1953
- }), un, /* @__PURE__ */ u.createElement("label", {
1954
- htmlFor: ut,
1955
- ref: xt,
1956
- className: U(["lmnt", "mdc-text-field", "lmnt-text-field", G && "lmnt-text-field--embedded", Q && "lmnt-text-field--full-width", Vn && "lmnt-text-field--with-icon", !X && "mdc-text-field--invalid", q && "mdc-text-field--disabled", St && "mdc-text-field--focused", !Et && "mdc-text-field--no-label", Y && !v && "mdc-text-field--with-leading-icon", v && "mdc-text-field--textarea", v && R && w && !lt && "mdc-text-field--with-internal-counter", K && !v && "mdc-text-field--with-trailing-icon", ft && "mdc-text-field--filled", ct && "mdc-text-field--outlined", H && "lmnt-text-field--dense", h])
1957
- }, ft && /* @__PURE__ */ u.createElement("span", {
1958
- className: "mdc-text-field__ripple"
1959
- }), Y && !v && _i(Y), Qt && !Y && !v && /* @__PURE__ */ u.createElement("span", {
1960
- className: "mdc-text-field__affix mdc-text-field__affix--prefix"
1961
- }, Qt), /* @__PURE__ */ u.createElement(en, {
1962
- wrap: !lt && v
1963
- }, /* @__PURE__ */ u.createElement(Pn, tt({
1964
- "aria-controls": bt,
1965
- "aria-describedby": bt,
1966
- "aria-labelledby": yt,
1967
- className: U("mdc-text-field__input", H && n === "right" && "lmnt-text-field--alignment-right", de === "color" && "lmnt-text-field__input--color"),
1968
- disabled: q,
1969
- id: ut,
1970
- type: de,
1971
- onBlur: Hn,
1972
- onFocus: Dn,
1973
- defaultValue: V,
1974
- placeholder: ct && !Nn ? "" : cn || (G && D ? D : "") || (H && D ? D : ""),
1975
- maxLength: w,
1976
- ref: Ee,
1977
- value: N
1978
- }, mt)), !lt && Ge(It, w)), K && !v && gi(K), re && !K && !v && /* @__PURE__ */ u.createElement("span", {
1979
- className: "mdc-text-field__affix mdc-text-field__affix--suffix"
1980
- }, re), ct && /* @__PURE__ */ u.createElement(Wn, null, Et && /* @__PURE__ */ u.createElement(He, {
1981
- id: yt,
1982
- htmlFor: ut
1983
- }, D)), ft && Et && /* @__PURE__ */ u.createElement(He, {
1984
- id: yt,
1985
- htmlFor: ut
1986
- }, D), (ft || G) && /* @__PURE__ */ u.createElement(Rt, null)), _n, Fn && /* @__PURE__ */ u.createElement("div", {
1987
- className: "mdc-text-field-helper-line"
1988
- }, b && /* @__PURE__ */ u.createElement("div", {
1989
- ref: Te,
1990
- id: bt,
1991
- "aria-hidden": at ? "false" : "true",
1992
- className: U(["mdc-text-field-helper-text", at && "mdc-text-field-helper-text--persistent", _t && "mdc-text-field-helper-text--validation-msg"])
1993
- }, b), lt && Ge(It, w)), y && /* @__PURE__ */ u.createElement($n, tt({
1994
- role: "tooltip"
1995
- }, y, {
1996
- ref: dt,
1997
- text: N
1998
- })));
1999
- });
2000
- nn.displayName = "Textfield";
2001
- nn.propTypes = fi;
2002
- export {
2003
- nn as n
2004
- };