@hortiview/default-components 1.5.0 → 1.5.2

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