@covalent/components 8.1.0 → 8.2.0

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 (193) hide show
  1. package/_commonjsHelpers-ZPn_iTGj.mjs +28 -0
  2. package/_commonjsHelpers-fFrWAeZI.js +1 -0
  3. package/action-ribbon.js +2 -3
  4. package/action-ribbon.mjs +9 -10
  5. package/alert.js +2 -3
  6. package/alert.mjs +9 -10
  7. package/app-shell/app-shell.d.ts +6 -1
  8. package/app-shell/app-shell.d.ts.map +1 -1
  9. package/app-shell.js +3 -4
  10. package/app-shell.mjs +65 -51
  11. package/{base-element-67ae173f.mjs → base-element--jaKdI-8.mjs} +2 -2
  12. package/{base-element-58a3f9ea.js → base-element-atp_8bvP.js} +1 -1
  13. package/button.js +2 -3
  14. package/button.mjs +15 -16
  15. package/card.js +2 -3
  16. package/card.mjs +4 -5
  17. package/check-list-item.js +10 -12
  18. package/check-list-item.mjs +65 -65
  19. package/checkbox.js +1 -2
  20. package/checkbox.mjs +23 -25
  21. package/chip-M5Vb5Kd6.js +492 -0
  22. package/chip-m2mKzWQT.mjs +3115 -0
  23. package/chip-set.js +75 -0
  24. package/chip-set.mjs +531 -0
  25. package/chip.js +1 -0
  26. package/chip.mjs +12 -0
  27. package/circular-progress.js +1 -1
  28. package/circular-progress.mjs +7 -7
  29. package/{class-map-4b94b017.mjs → class-map-YPXv0Hj4.mjs} +1 -1
  30. package/{class-map-b5efe8da.js → class-map-wtcW44Of.js} +1 -1
  31. package/code-snippet.js +12 -1
  32. package/code-snippet.mjs +12251 -7
  33. package/{dialog-82b03745.js → dialog-SpbwRuWY.js} +6 -7
  34. package/{dialog-3ca1b701.mjs → dialog-tIMorfuj.mjs} +60 -62
  35. package/dialog.js +1 -1
  36. package/dialog.mjs +10 -10
  37. package/{directive-helpers-0ce1f995.js → directive-helpers--rJ2jf3N.js} +1 -1
  38. package/{directive-helpers-e3ea6592.mjs → directive-helpers-9566lOOl.mjs} +1 -1
  39. package/drawer.js +2 -3
  40. package/drawer.mjs +11 -12
  41. package/empty-state.js +1 -2
  42. package/empty-state.mjs +5 -6
  43. package/{event-options-78d6cf94.mjs → event-options-0xzSdemG.mjs} +1 -1
  44. package/{event-options-3f5eb195.js → event-options-2TJPtsKy.js} +1 -1
  45. package/expansion-panel-item.js +24 -0
  46. package/expansion-panel-item.mjs +106 -0
  47. package/expansion-panel.js +7 -0
  48. package/expansion-panel.mjs +59 -0
  49. package/{form-element-c553d6f5.js → form-element-5s8gft-A.js} +1 -1
  50. package/{form-element-ffcf59ff.mjs → form-element-gM33WEq3.mjs} +4 -4
  51. package/formfield.js +79 -0
  52. package/formfield.mjs +275 -0
  53. package/{foundation-786bf879.js → foundation-1Vzfdey_.js} +1 -1
  54. package/{foundation-39dc72d2.mjs → foundation-3Wg80pI7.mjs} +1 -1
  55. package/icon-button.js +2 -3
  56. package/icon-button.mjs +14 -15
  57. package/icon-check-toggle.js +4 -5
  58. package/icon-check-toggle.mjs +22 -24
  59. package/icon-radio-toggle.js +4 -5
  60. package/icon-radio-toggle.mjs +25 -27
  61. package/icon.js +1 -5
  62. package/icon.mjs +15 -21
  63. package/{if-defined-c367f208.mjs → if-defined-BH_l2PVl.mjs} +1 -1
  64. package/{if-defined-f1c45245.js → if-defined-lAIUwAsA.js} +1 -1
  65. package/index.js +1 -568
  66. package/index.mjs +124 -3741
  67. package/{inert.esm-359d4581.mjs → inert.esm-vhZXthJr.mjs} +1 -1
  68. package/linear-progress.js +2 -3
  69. package/linear-progress.mjs +12 -13
  70. package/list/check-list-item.d.ts.map +1 -1
  71. package/list/radio-list-item.d.ts.map +1 -1
  72. package/list-item-F2e6aWaj.mjs +11 -0
  73. package/list-item-Ze98reWt.js +5 -0
  74. package/list-item.js +7 -1
  75. package/list-item.mjs +37 -16
  76. package/list.js +3 -8
  77. package/list.mjs +31 -37
  78. package/menu.js +1 -5
  79. package/menu.mjs +28 -34
  80. package/{mwc-checkbox.css-b3434429.js → mwc-checkbox.css-JOD-Qh-9.js} +42 -2
  81. package/{mwc-checkbox.css-8f4f1a9b.mjs → mwc-checkbox.css-c44nPIEs.mjs} +198 -3
  82. package/{mwc-drawer-base-135de8a5.mjs → mwc-drawer-base-8e_1aSuf.mjs} +24 -26
  83. package/{mwc-drawer-base-798b11f8.js → mwc-drawer-base-Fv3JVYPS.js} +5 -5
  84. package/{mwc-icon-bf656cf5.mjs → mwc-icon-eaW72Ei7.mjs} +6 -5
  85. package/{mwc-icon-f87639bc.js → mwc-icon-r2y4-AXI.js} +2 -2
  86. package/{mwc-line-ripple-directive-b24a914e.mjs → mwc-line-ripple-directive-Q_HMRGPE.mjs} +6 -6
  87. package/{mwc-line-ripple-directive-a6b39a3c.js → mwc-line-ripple-directive-iRoAkPnW.js} +1 -1
  88. package/{mwc-list-item.css-b0009fc7.mjs → mwc-list-item.css-d-SHhq7Q.mjs} +199 -7
  89. package/{mwc-list-item.css-25adc0c4.js → mwc-list-item.css-yJ5bjNGc.js} +28 -5
  90. package/mwc-list.css-DjU8XB1m.js +111 -0
  91. package/{mwc-list-base-76e37212.mjs → mwc-list.css-_OVL_dbR.mjs} +213 -212
  92. package/{mwc-menu-base-c4bc88ea.mjs → mwc-menu.css-cKtc1ZD4.mjs} +74 -75
  93. package/mwc-menu.css-qavo4jer.js +190 -0
  94. package/{mwc-radio-base-a374fbd9.mjs → mwc-radio.css-_lt-Vcvl.mjs} +123 -117
  95. package/mwc-radio.css-h_Wv0Eag.js +105 -0
  96. package/{mwc-slider.css-c7107d94.js → mwc-slider.css-lCfMVbO5.js} +1 -1
  97. package/{mwc-slider.css-8b6f275c.mjs → mwc-slider.css-md7hPAE7.mjs} +11 -11
  98. package/{mwc-tab-base-be0c887f.mjs → mwc-tab.css-lT5vTf5I.mjs} +127 -123
  99. package/{mwc-tab-base-f28722aa.js → mwc-tab.css-q4Jsbyp5.js} +26 -22
  100. package/{mwc-top-app-bar-base-aec60f27.js → mwc-top-app-bar-base-8qOIX1me.js} +3 -3
  101. package/{mwc-top-app-bar-base-55da3fe4.mjs → mwc-top-app-bar-base-nm6mdCR3.mjs} +12 -13
  102. package/nav-list-item.js +6 -7
  103. package/nav-list-item.mjs +38 -39
  104. package/package.json +16 -1
  105. package/{query-d843aa92.mjs → query-1WmuF6Bq.mjs} +1 -1
  106. package/{query-assigned-nodes-99eae71d.js → query-assigned-nodes-1p7z6CEm.js} +1 -1
  107. package/{query-assigned-nodes-df691e78.mjs → query-assigned-nodes-6yHI5ePh.mjs} +1 -1
  108. package/{query-680f1868.js → query-duvhtfSs.js} +1 -1
  109. package/radio-list-item.js +10 -12
  110. package/radio-list-item.mjs +62 -62
  111. package/radio.js +1 -2
  112. package/radio.mjs +23 -25
  113. package/{ripple-handlers-f37f21cf.mjs → ripple-handlers-BwaZu9Ps.mjs} +16 -17
  114. package/{ripple-handlers-5d5b21db.js → ripple-handlers-HeGhXgD2.js} +8 -8
  115. package/select.js +10 -15
  116. package/select.mjs +139 -147
  117. package/side-sheet.js +1 -2
  118. package/side-sheet.mjs +11 -12
  119. package/slider-range.js +1 -1
  120. package/slider-range.mjs +14 -14
  121. package/slider.js +1 -1
  122. package/slider.mjs +16 -16
  123. package/snackbar.js +10 -11
  124. package/snackbar.mjs +34 -36
  125. package/{state-0974a8e5.js → state-LqPxt99W.js} +1 -1
  126. package/{state-b5e865db.mjs → state-inNZe6rL.mjs} +1 -1
  127. package/status-header-item.js +1 -2
  128. package/status-header-item.mjs +3 -4
  129. package/status-header.js +2 -3
  130. package/status-header.mjs +4 -5
  131. package/{style-map-88d2563f.js → style-map-66_3wrLx.js} +1 -1
  132. package/{style-map-bc3ed3e0.mjs → style-map-8yp6DGeh.mjs} +2 -2
  133. package/style.css +1 -1
  134. package/switch.js +2 -3
  135. package/switch.mjs +15 -16
  136. package/tab-bar.js +18 -22
  137. package/tab-bar.mjs +195 -203
  138. package/tab.js +1 -6
  139. package/tab.mjs +26 -32
  140. package/text-lockup.js +1 -2
  141. package/text-lockup.mjs +8 -9
  142. package/textarea.js +15 -19
  143. package/textarea.mjs +59 -65
  144. package/textfield/textfield.d.ts +1 -0
  145. package/textfield/textfield.d.ts.map +1 -1
  146. package/textfield-7aU1kEO6.mjs +936 -0
  147. package/textfield-jvevIGSw.js +136 -0
  148. package/textfield.js +3 -7
  149. package/textfield.mjs +33 -36
  150. package/toolbar.js +1 -2
  151. package/toolbar.mjs +9 -10
  152. package/tooltip.js +2 -3
  153. package/tooltip.mjs +9 -10
  154. package/top-app-bar-fixed.js +6 -6
  155. package/top-app-bar-fixed.mjs +27 -28
  156. package/{top-app-bar-f83386e0.mjs → top-app-bar-h0V-USh_.mjs} +2 -3
  157. package/{top-app-bar-a531c1b4.js → top-app-bar-qcW2ucE3.js} +2 -3
  158. package/top-app-bar.js +1 -1
  159. package/top-app-bar.mjs +9 -9
  160. package/tree-list-item.js +1 -2
  161. package/tree-list-item.mjs +6 -7
  162. package/tree-list.js +1 -2
  163. package/tree-list.mjs +2 -3
  164. package/{tslib.es6-f3e988cd.mjs → tslib.es6-S8SvF2K1.mjs} +5 -5
  165. package/typography.js +1 -2
  166. package/typography.mjs +3 -4
  167. package/code-snippet-2137b11c.js +0 -13
  168. package/code-snippet-ccca324f.mjs +0 -12278
  169. package/list-item-04b6ffa1.js +0 -8
  170. package/list-item-1c4f9e23.mjs +0 -32
  171. package/mwc-checkbox-base-3d8c9549.js +0 -41
  172. package/mwc-checkbox-base-f10fd709.mjs +0 -198
  173. package/mwc-list-base-400b00e2.js +0 -111
  174. package/mwc-list-item-base-297d86b0.js +0 -28
  175. package/mwc-list-item-base-fe4398c3.mjs +0 -202
  176. package/mwc-menu-base-c75ca473.js +0 -190
  177. package/mwc-radio-base-913e02e2.js +0 -101
  178. package/mwc-radio.css-4e140252.js +0 -5
  179. package/mwc-radio.css-7454bb11.mjs +0 -10
  180. package/textfield-62e16cc2.js +0 -133
  181. package/textfield-63d1859a.mjs +0 -932
  182. /package/{aria-property-849c8816.js → aria-property-52VAcg_f.js} +0 -0
  183. /package/{aria-property-fa2717fe.mjs → aria-property-wYjPNXcK.mjs} +0 -0
  184. /package/{inert.esm-2cee6f2e.js → inert.esm-TSRtlTFV.js} +0 -0
  185. /package/{observer-a096ab43.js → observer-LlGBroG9.js} +0 -0
  186. /package/{observer-be7b92e2.mjs → observer-cKAgu-MI.mjs} +0 -0
  187. /package/{property-9b6ea53b.mjs → property-K7hFBmOi.mjs} +0 -0
  188. /package/{property-57f6f6fe.js → property-iZpLBvy-.js} +0 -0
  189. /package/{query-assigned-elements-f623705d.js → query-assigned-elements-j_5ZiL65.js} +0 -0
  190. /package/{query-assigned-elements-4a39219d.mjs → query-assigned-elements-yFWOzcsT.mjs} +0 -0
  191. /package/{tslib.es6-98719205.js → tslib.es6-5xG0QhxF.js} +0 -0
  192. /package/{utils-a8190a39.js → utils-W3ENJhq-.js} +0 -0
  193. /package/{utils-2932417c.mjs → utils-xAXEDL0Y.mjs} +0 -0
@@ -1,932 +0,0 @@
1
- import { _ as H, a as C, b, f as a } from "./tslib.es6-f3e988cd.mjs";
2
- import { f as $, l as w } from "./mwc-line-ripple-directive-b24a914e.mjs";
3
- import { F as B } from "./form-element-ffcf59ff.mjs";
4
- import { o as E } from "./observer-be7b92e2.mjs";
5
- import { T as x, A as U, x as c } from "./query-assigned-elements-4a39219d.mjs";
6
- import { n as l } from "./property-9b6ea53b.mjs";
7
- import { t as I } from "./state-b5e865db.mjs";
8
- import { e as _ } from "./event-options-78d6cf94.mjs";
9
- import { i as y } from "./query-d843aa92.mjs";
10
- import { e as T, i as M, t as v, o as L } from "./class-map-4b94b017.mjs";
11
- import { l as u } from "./if-defined-c367f208.mjs";
12
- import { e as k, a as S } from "./directive-helpers-e3ea6592.mjs";
13
- import { a as D } from "./utils-2932417c.mjs";
14
- /**
15
- * @license
16
- * Copyright 2016 Google Inc.
17
- *
18
- * Permission is hereby granted, free of charge, to any person obtaining a copy
19
- * of this software and associated documentation files (the "Software"), to deal
20
- * in the Software without restriction, including without limitation the rights
21
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
22
- * copies of the Software, and to permit persons to whom the Software is
23
- * furnished to do so, subject to the following conditions:
24
- *
25
- * The above copyright notice and this permission notice shall be included in
26
- * all copies or substantial portions of the Software.
27
- *
28
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
29
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
30
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
31
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
32
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
33
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
34
- * THE SOFTWARE.
35
- */
36
- var j = (
37
- /** @class */
38
- function() {
39
- function s(e) {
40
- e === void 0 && (e = {}), this.adapter = e;
41
- }
42
- return Object.defineProperty(s, "cssClasses", {
43
- get: function() {
44
- return {};
45
- },
46
- enumerable: !1,
47
- configurable: !0
48
- }), Object.defineProperty(s, "strings", {
49
- get: function() {
50
- return {};
51
- },
52
- enumerable: !1,
53
- configurable: !0
54
- }), Object.defineProperty(s, "numbers", {
55
- get: function() {
56
- return {};
57
- },
58
- enumerable: !1,
59
- configurable: !0
60
- }), Object.defineProperty(s, "defaultAdapter", {
61
- get: function() {
62
- return {};
63
- },
64
- enumerable: !1,
65
- configurable: !0
66
- }), s.prototype.init = function() {
67
- }, s.prototype.destroy = function() {
68
- }, s;
69
- }()
70
- );
71
- /**
72
- * @license
73
- * Copyright 2016 Google Inc.
74
- *
75
- * Permission is hereby granted, free of charge, to any person obtaining a copy
76
- * of this software and associated documentation files (the "Software"), to deal
77
- * in the Software without restriction, including without limitation the rights
78
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
79
- * copies of the Software, and to permit persons to whom the Software is
80
- * furnished to do so, subject to the following conditions:
81
- *
82
- * The above copyright notice and this permission notice shall be included in
83
- * all copies or substantial portions of the Software.
84
- *
85
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
86
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
87
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
88
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
89
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
90
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
91
- * THE SOFTWARE.
92
- */
93
- var F = {
94
- ARIA_CONTROLS: "aria-controls",
95
- ARIA_DESCRIBEDBY: "aria-describedby",
96
- INPUT_SELECTOR: ".mdc-text-field__input",
97
- LABEL_SELECTOR: ".mdc-floating-label",
98
- LEADING_ICON_SELECTOR: ".mdc-text-field__icon--leading",
99
- LINE_RIPPLE_SELECTOR: ".mdc-line-ripple",
100
- OUTLINE_SELECTOR: ".mdc-notched-outline",
101
- PREFIX_SELECTOR: ".mdc-text-field__affix--prefix",
102
- SUFFIX_SELECTOR: ".mdc-text-field__affix--suffix",
103
- TRAILING_ICON_SELECTOR: ".mdc-text-field__icon--trailing"
104
- }, P = {
105
- DISABLED: "mdc-text-field--disabled",
106
- FOCUSED: "mdc-text-field--focused",
107
- HELPER_LINE: "mdc-text-field-helper-line",
108
- INVALID: "mdc-text-field--invalid",
109
- LABEL_FLOATING: "mdc-text-field--label-floating",
110
- NO_LABEL: "mdc-text-field--no-label",
111
- OUTLINED: "mdc-text-field--outlined",
112
- ROOT: "mdc-text-field",
113
- TEXTAREA: "mdc-text-field--textarea",
114
- WITH_LEADING_ICON: "mdc-text-field--with-leading-icon",
115
- WITH_TRAILING_ICON: "mdc-text-field--with-trailing-icon",
116
- WITH_INTERNAL_COUNTER: "mdc-text-field--with-internal-counter"
117
- }, O = {
118
- LABEL_SCALE: 0.75
119
- }, q = [
120
- "pattern",
121
- "min",
122
- "max",
123
- "required",
124
- "step",
125
- "minlength",
126
- "maxlength"
127
- ], z = [
128
- "color",
129
- "date",
130
- "datetime-local",
131
- "month",
132
- "range",
133
- "time",
134
- "week"
135
- ];
136
- /**
137
- * @license
138
- * Copyright 2016 Google Inc.
139
- *
140
- * Permission is hereby granted, free of charge, to any person obtaining a copy
141
- * of this software and associated documentation files (the "Software"), to deal
142
- * in the Software without restriction, including without limitation the rights
143
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
144
- * copies of the Software, and to permit persons to whom the Software is
145
- * furnished to do so, subject to the following conditions:
146
- *
147
- * The above copyright notice and this permission notice shall be included in
148
- * all copies or substantial portions of the Software.
149
- *
150
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
151
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
152
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
153
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
154
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
155
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
156
- * THE SOFTWARE.
157
- */
158
- var A = ["mousedown", "touchstart"], V = ["click", "keydown"], X = (
159
- /** @class */
160
- function(s) {
161
- H(e, s);
162
- function e(t, i) {
163
- i === void 0 && (i = {});
164
- var n = s.call(this, C(C({}, e.defaultAdapter), t)) || this;
165
- return n.isFocused = !1, n.receivedUserInput = !1, n.valid = !0, n.useNativeValidation = !0, n.validateOnValueChange = !0, n.helperText = i.helperText, n.characterCounter = i.characterCounter, n.leadingIcon = i.leadingIcon, n.trailingIcon = i.trailingIcon, n.inputFocusHandler = function() {
166
- n.activateFocus();
167
- }, n.inputBlurHandler = function() {
168
- n.deactivateFocus();
169
- }, n.inputInputHandler = function() {
170
- n.handleInput();
171
- }, n.setPointerXOffset = function(o) {
172
- n.setTransformOrigin(o);
173
- }, n.textFieldInteractionHandler = function() {
174
- n.handleTextFieldInteraction();
175
- }, n.validationAttributeChangeHandler = function(o) {
176
- n.handleValidationAttributeChange(o);
177
- }, n;
178
- }
179
- return Object.defineProperty(e, "cssClasses", {
180
- get: function() {
181
- return P;
182
- },
183
- enumerable: !1,
184
- configurable: !0
185
- }), Object.defineProperty(e, "strings", {
186
- get: function() {
187
- return F;
188
- },
189
- enumerable: !1,
190
- configurable: !0
191
- }), Object.defineProperty(e, "numbers", {
192
- get: function() {
193
- return O;
194
- },
195
- enumerable: !1,
196
- configurable: !0
197
- }), Object.defineProperty(e.prototype, "shouldAlwaysFloat", {
198
- get: function() {
199
- var t = this.getNativeInput().type;
200
- return z.indexOf(t) >= 0;
201
- },
202
- enumerable: !1,
203
- configurable: !0
204
- }), Object.defineProperty(e.prototype, "shouldFloat", {
205
- get: function() {
206
- return this.shouldAlwaysFloat || this.isFocused || !!this.getValue() || this.isBadInput();
207
- },
208
- enumerable: !1,
209
- configurable: !0
210
- }), Object.defineProperty(e.prototype, "shouldShake", {
211
- get: function() {
212
- return !this.isFocused && !this.isValid() && !!this.getValue();
213
- },
214
- enumerable: !1,
215
- configurable: !0
216
- }), Object.defineProperty(e, "defaultAdapter", {
217
- /**
218
- * See {@link MDCTextFieldAdapter} for typing information on parameters and
219
- * return types.
220
- */
221
- get: function() {
222
- return {
223
- addClass: function() {
224
- },
225
- removeClass: function() {
226
- },
227
- hasClass: function() {
228
- return !0;
229
- },
230
- setInputAttr: function() {
231
- },
232
- removeInputAttr: function() {
233
- },
234
- registerTextFieldInteractionHandler: function() {
235
- },
236
- deregisterTextFieldInteractionHandler: function() {
237
- },
238
- registerInputInteractionHandler: function() {
239
- },
240
- deregisterInputInteractionHandler: function() {
241
- },
242
- registerValidationAttributeChangeHandler: function() {
243
- return new MutationObserver(function() {
244
- });
245
- },
246
- deregisterValidationAttributeChangeHandler: function() {
247
- },
248
- getNativeInput: function() {
249
- return null;
250
- },
251
- isFocused: function() {
252
- return !1;
253
- },
254
- activateLineRipple: function() {
255
- },
256
- deactivateLineRipple: function() {
257
- },
258
- setLineRippleTransformOrigin: function() {
259
- },
260
- shakeLabel: function() {
261
- },
262
- floatLabel: function() {
263
- },
264
- setLabelRequired: function() {
265
- },
266
- hasLabel: function() {
267
- return !1;
268
- },
269
- getLabelWidth: function() {
270
- return 0;
271
- },
272
- hasOutline: function() {
273
- return !1;
274
- },
275
- notchOutline: function() {
276
- },
277
- closeOutline: function() {
278
- }
279
- };
280
- },
281
- enumerable: !1,
282
- configurable: !0
283
- }), e.prototype.init = function() {
284
- var t, i, n, o;
285
- 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);
286
- try {
287
- for (var d = b(A), h = d.next(); !h.done; h = d.next()) {
288
- var f = h.value;
289
- this.adapter.registerInputInteractionHandler(f, this.setPointerXOffset);
290
- }
291
- } catch (g) {
292
- t = { error: g };
293
- } finally {
294
- try {
295
- h && !h.done && (i = d.return) && i.call(d);
296
- } finally {
297
- if (t)
298
- throw t.error;
299
- }
300
- }
301
- try {
302
- for (var m = b(V), p = m.next(); !p.done; p = m.next()) {
303
- var f = p.value;
304
- this.adapter.registerTextFieldInteractionHandler(f, this.textFieldInteractionHandler);
305
- }
306
- } catch (g) {
307
- n = { error: g };
308
- } finally {
309
- try {
310
- p && !p.done && (o = m.return) && o.call(m);
311
- } finally {
312
- if (n)
313
- throw n.error;
314
- }
315
- }
316
- this.validationObserver = this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler), this.setcharacterCounter(this.getValue().length);
317
- }, e.prototype.destroy = function() {
318
- var t, i, n, o;
319
- this.adapter.deregisterInputInteractionHandler("focus", this.inputFocusHandler), this.adapter.deregisterInputInteractionHandler("blur", this.inputBlurHandler), this.adapter.deregisterInputInteractionHandler("input", this.inputInputHandler);
320
- try {
321
- for (var d = b(A), h = d.next(); !h.done; h = d.next()) {
322
- var f = h.value;
323
- this.adapter.deregisterInputInteractionHandler(f, this.setPointerXOffset);
324
- }
325
- } catch (g) {
326
- t = { error: g };
327
- } finally {
328
- try {
329
- h && !h.done && (i = d.return) && i.call(d);
330
- } finally {
331
- if (t)
332
- throw t.error;
333
- }
334
- }
335
- try {
336
- for (var m = b(V), p = m.next(); !p.done; p = m.next()) {
337
- var f = p.value;
338
- this.adapter.deregisterTextFieldInteractionHandler(f, this.textFieldInteractionHandler);
339
- }
340
- } catch (g) {
341
- n = { error: g };
342
- } finally {
343
- try {
344
- p && !p.done && (o = m.return) && o.call(m);
345
- } finally {
346
- if (n)
347
- throw n.error;
348
- }
349
- }
350
- this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver);
351
- }, e.prototype.handleTextFieldInteraction = function() {
352
- var t = this.adapter.getNativeInput();
353
- t && t.disabled || (this.receivedUserInput = !0);
354
- }, e.prototype.handleValidationAttributeChange = function(t) {
355
- var i = this;
356
- t.some(function(n) {
357
- return q.indexOf(n) > -1 ? (i.styleValidity(!0), i.adapter.setLabelRequired(i.getNativeInput().required), !0) : !1;
358
- }), t.indexOf("maxlength") > -1 && this.setcharacterCounter(this.getValue().length);
359
- }, e.prototype.notchOutline = function(t) {
360
- if (!(!this.adapter.hasOutline() || !this.adapter.hasLabel()))
361
- if (t) {
362
- var i = this.adapter.getLabelWidth() * O.LABEL_SCALE;
363
- this.adapter.notchOutline(i);
364
- } else
365
- this.adapter.closeOutline();
366
- }, e.prototype.activateFocus = function() {
367
- 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.valid) && this.helperText.showToScreenReader();
368
- }, e.prototype.setTransformOrigin = function(t) {
369
- if (!(this.isDisabled() || this.adapter.hasOutline())) {
370
- var i = t.touches, n = i ? i[0] : t, o = n.target.getBoundingClientRect(), d = n.clientX - o.left;
371
- this.adapter.setLineRippleTransformOrigin(d);
372
- }
373
- }, e.prototype.handleInput = function() {
374
- this.autoCompleteFocus(), this.setcharacterCounter(this.getValue().length);
375
- }, e.prototype.autoCompleteFocus = function() {
376
- this.receivedUserInput || this.activateFocus();
377
- }, e.prototype.deactivateFocus = function() {
378
- this.isFocused = !1, this.adapter.deactivateLineRipple();
379
- var t = this.isValid();
380
- 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);
381
- }, e.prototype.getValue = function() {
382
- return this.getNativeInput().value;
383
- }, e.prototype.setValue = function(t) {
384
- if (this.getValue() !== t && (this.getNativeInput().value = t), this.setcharacterCounter(t.length), this.validateOnValueChange) {
385
- var i = this.isValid();
386
- this.styleValidity(i);
387
- }
388
- this.adapter.hasLabel() && (this.notchOutline(this.shouldFloat), this.adapter.floatLabel(this.shouldFloat), this.styleFloating(this.shouldFloat), this.validateOnValueChange && this.adapter.shakeLabel(this.shouldShake));
389
- }, e.prototype.isValid = function() {
390
- return this.useNativeValidation ? this.isNativeInputValid() : this.valid;
391
- }, e.prototype.setValid = function(t) {
392
- this.valid = t, this.styleValidity(t);
393
- var i = !t && !this.isFocused && !!this.getValue();
394
- this.adapter.hasLabel() && this.adapter.shakeLabel(i);
395
- }, e.prototype.setValidateOnValueChange = function(t) {
396
- this.validateOnValueChange = t;
397
- }, e.prototype.getValidateOnValueChange = function() {
398
- return this.validateOnValueChange;
399
- }, e.prototype.setUseNativeValidation = function(t) {
400
- this.useNativeValidation = t;
401
- }, e.prototype.isDisabled = function() {
402
- return this.getNativeInput().disabled;
403
- }, e.prototype.setDisabled = function(t) {
404
- this.getNativeInput().disabled = t, this.styleDisabled(t);
405
- }, e.prototype.setHelperTextContent = function(t) {
406
- this.helperText && this.helperText.setContent(t);
407
- }, e.prototype.setLeadingIconAriaLabel = function(t) {
408
- this.leadingIcon && this.leadingIcon.setAriaLabel(t);
409
- }, e.prototype.setLeadingIconContent = function(t) {
410
- this.leadingIcon && this.leadingIcon.setContent(t);
411
- }, e.prototype.setTrailingIconAriaLabel = function(t) {
412
- this.trailingIcon && this.trailingIcon.setAriaLabel(t);
413
- }, e.prototype.setTrailingIconContent = function(t) {
414
- this.trailingIcon && this.trailingIcon.setContent(t);
415
- }, e.prototype.setcharacterCounter = function(t) {
416
- if (this.characterCounter) {
417
- var i = this.getNativeInput().maxLength;
418
- if (i === -1)
419
- throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");
420
- this.characterCounter.setCounterValue(t, i);
421
- }
422
- }, e.prototype.isBadInput = function() {
423
- return this.getNativeInput().validity.badInput || !1;
424
- }, e.prototype.isNativeInputValid = function() {
425
- return this.getNativeInput().validity.valid;
426
- }, e.prototype.styleValidity = function(t) {
427
- var i = e.cssClasses.INVALID;
428
- if (t ? this.adapter.removeClass(i) : this.adapter.addClass(i), this.helperText) {
429
- this.helperText.setValidity(t);
430
- var n = this.helperText.isValidation();
431
- if (!n)
432
- return;
433
- var o = this.helperText.isVisible(), d = this.helperText.getId();
434
- o && d ? this.adapter.setInputAttr(F.ARIA_DESCRIBEDBY, d) : this.adapter.removeInputAttr(F.ARIA_DESCRIBEDBY);
435
- }
436
- }, e.prototype.styleFocused = function(t) {
437
- var i = e.cssClasses.FOCUSED;
438
- t ? this.adapter.addClass(i) : this.adapter.removeClass(i);
439
- }, e.prototype.styleDisabled = function(t) {
440
- var i = e.cssClasses, n = i.DISABLED, o = i.INVALID;
441
- t ? (this.adapter.addClass(n), this.adapter.removeClass(o)) : this.adapter.removeClass(n), this.leadingIcon && this.leadingIcon.setDisabled(t), this.trailingIcon && this.trailingIcon.setDisabled(t);
442
- }, e.prototype.styleFloating = function(t) {
443
- var i = e.cssClasses.LABEL_FLOATING;
444
- t ? this.adapter.addClass(i) : this.adapter.removeClass(i);
445
- }, e.prototype.getNativeInput = function() {
446
- var t = this.adapter ? this.adapter.getNativeInput() : null;
447
- return t || {
448
- disabled: !1,
449
- maxLength: -1,
450
- required: !1,
451
- type: "input",
452
- validity: {
453
- badInput: !1,
454
- valid: !0
455
- },
456
- value: ""
457
- };
458
- }, e;
459
- }(j)
460
- );
461
- const G = X;
462
- /**
463
- * @license
464
- * Copyright 2020 Google LLC
465
- * SPDX-License-Identifier: BSD-3-Clause
466
- */
467
- const Y = T(class extends M {
468
- constructor(s) {
469
- if (super(s), s.type !== v.PROPERTY && s.type !== v.ATTRIBUTE && s.type !== v.BOOLEAN_ATTRIBUTE)
470
- throw Error("The `live` directive is not allowed on child or event bindings");
471
- if (!k(s))
472
- throw Error("`live` bindings can only contain a single expression");
473
- }
474
- render(s) {
475
- return s;
476
- }
477
- update(s, [e]) {
478
- if (e === x || e === U)
479
- return e;
480
- const t = s.element, i = s.name;
481
- if (s.type === v.PROPERTY) {
482
- if (e === t[i])
483
- return x;
484
- } else if (s.type === v.BOOLEAN_ATTRIBUTE) {
485
- if (!!e === t.hasAttribute(i))
486
- return x;
487
- } else if (s.type === v.ATTRIBUTE && t.getAttribute(i) === e + "")
488
- return x;
489
- return S(s), e;
490
- }
491
- });
492
- /**
493
- * @license
494
- * Copyright 2019 Google LLC
495
- * SPDX-License-Identifier: Apache-2.0
496
- */
497
- const W = ["touchstart", "touchmove", "scroll", "mousewheel"], R = (s = {}) => {
498
- const e = {};
499
- for (const t in s)
500
- e[t] = s[t];
501
- return Object.assign({ badInput: !1, customError: !1, patternMismatch: !1, rangeOverflow: !1, rangeUnderflow: !1, stepMismatch: !1, tooLong: !1, tooShort: !1, typeMismatch: !1, valid: !0, valueMissing: !1 }, e);
502
- };
503
- class r extends B {
504
- constructor() {
505
- super(...arguments), this.mdcFoundationClass = G, this.value = "", this.type = "text", this.placeholder = "", this.label = "", this.icon = "", this.iconTrailing = "", this.disabled = !1, this.required = !1, this.minLength = -1, this.maxLength = -1, this.outlined = !1, this.helper = "", this.validateOnInitialRender = !1, this.validationMessage = "", this.autoValidate = !1, this.pattern = "", this.min = "", this.max = "", this.step = null, this.size = null, this.helperPersistent = !1, this.charCounter = !1, this.endAligned = !1, this.prefix = "", this.suffix = "", this.name = "", this.readOnly = !1, this.autocapitalize = "", this.outlineOpen = !1, this.outlineWidth = 0, this.isUiValid = !0, this.focused = !1, this._validity = R(), this.validityTransform = null;
506
- }
507
- get validity() {
508
- return this._checkValidity(this.value), this._validity;
509
- }
510
- get willValidate() {
511
- return this.formElement.willValidate;
512
- }
513
- get selectionStart() {
514
- return this.formElement.selectionStart;
515
- }
516
- get selectionEnd() {
517
- return this.formElement.selectionEnd;
518
- }
519
- focus() {
520
- const e = new CustomEvent("focus");
521
- this.formElement.dispatchEvent(e), this.formElement.focus();
522
- }
523
- blur() {
524
- const e = new CustomEvent("blur");
525
- this.formElement.dispatchEvent(e), this.formElement.blur();
526
- }
527
- select() {
528
- this.formElement.select();
529
- }
530
- setSelectionRange(e, t, i) {
531
- this.formElement.setSelectionRange(e, t, i);
532
- }
533
- update(e) {
534
- e.has("autoValidate") && this.mdcFoundation && this.mdcFoundation.setValidateOnValueChange(this.autoValidate), e.has("value") && typeof this.value != "string" && (this.value = `${this.value}`), super.update(e);
535
- }
536
- setFormData(e) {
537
- this.name && e.append(this.name, this.value);
538
- }
539
- /** @soyTemplate */
540
- render() {
541
- const e = this.charCounter && this.maxLength !== -1, t = !!this.helper || !!this.validationMessage || e, i = {
542
- "mdc-text-field--disabled": this.disabled,
543
- "mdc-text-field--no-label": !this.label,
544
- "mdc-text-field--filled": !this.outlined,
545
- "mdc-text-field--outlined": this.outlined,
546
- "mdc-text-field--with-leading-icon": this.icon,
547
- "mdc-text-field--with-trailing-icon": this.iconTrailing,
548
- "mdc-text-field--end-aligned": this.endAligned
549
- };
550
- return c`
551
- <label class="mdc-text-field ${L(i)}">
552
- ${this.renderRipple()}
553
- ${this.outlined ? this.renderOutline() : this.renderLabel()}
554
- ${this.renderLeadingIcon()}
555
- ${this.renderPrefix()}
556
- ${this.renderInput(t)}
557
- ${this.renderSuffix()}
558
- ${this.renderTrailingIcon()}
559
- ${this.renderLineRipple()}
560
- </label>
561
- ${this.renderHelperText(t, e)}
562
- `;
563
- }
564
- updated(e) {
565
- e.has("value") && e.get("value") !== void 0 && (this.mdcFoundation.setValue(this.value), this.autoValidate && this.reportValidity());
566
- }
567
- /** @soyTemplate */
568
- renderRipple() {
569
- return this.outlined ? "" : c`
570
- <span class="mdc-text-field__ripple"></span>
571
- `;
572
- }
573
- /** @soyTemplate */
574
- renderOutline() {
575
- return this.outlined ? c`
576
- <mwc-notched-outline
577
- .width=${this.outlineWidth}
578
- .open=${this.outlineOpen}
579
- class="mdc-notched-outline">
580
- ${this.renderLabel()}
581
- </mwc-notched-outline>` : "";
582
- }
583
- /** @soyTemplate */
584
- renderLabel() {
585
- return this.label ? c`
586
- <span
587
- .floatingLabelFoundation=${$(this.label)}
588
- id="label">${this.label}</span>
589
- ` : "";
590
- }
591
- /** @soyTemplate */
592
- renderLeadingIcon() {
593
- return this.icon ? this.renderIcon(this.icon) : "";
594
- }
595
- /** @soyTemplate */
596
- renderTrailingIcon() {
597
- return this.iconTrailing ? this.renderIcon(this.iconTrailing, !0) : "";
598
- }
599
- /** @soyTemplate */
600
- renderIcon(e, t = !1) {
601
- return c`<i class="material-icons mdc-text-field__icon ${L({
602
- "mdc-text-field__icon--leading": !t,
603
- "mdc-text-field__icon--trailing": t
604
- })}">${e}</i>`;
605
- }
606
- /** @soyTemplate */
607
- renderPrefix() {
608
- return this.prefix ? this.renderAffix(this.prefix) : "";
609
- }
610
- /** @soyTemplate */
611
- renderSuffix() {
612
- return this.suffix ? this.renderAffix(this.suffix, !0) : "";
613
- }
614
- /** @soyTemplate */
615
- renderAffix(e, t = !1) {
616
- return c`<span class="mdc-text-field__affix ${L({
617
- "mdc-text-field__affix--prefix": !t,
618
- "mdc-text-field__affix--suffix": t
619
- })}">
620
- ${e}</span>`;
621
- }
622
- /** @soyTemplate */
623
- renderInput(e) {
624
- const t = this.minLength === -1 ? void 0 : this.minLength, i = this.maxLength === -1 ? void 0 : this.maxLength, n = this.autocapitalize ? this.autocapitalize : void 0, o = this.validationMessage && !this.isUiValid, d = this.label ? "label" : void 0, h = e ? "helper-text" : void 0, f = this.focused || this.helperPersistent || o ? "helper-text" : void 0;
625
- return c`
626
- <input
627
- aria-labelledby=${u(d)}
628
- aria-controls="${u(h)}"
629
- aria-describedby="${u(f)}"
630
- class="mdc-text-field__input"
631
- type="${this.type}"
632
- .value="${Y(this.value)}"
633
- ?disabled="${this.disabled}"
634
- placeholder="${this.placeholder}"
635
- ?required="${this.required}"
636
- ?readonly="${this.readOnly}"
637
- minlength="${u(t)}"
638
- maxlength="${u(i)}"
639
- pattern="${u(this.pattern ? this.pattern : void 0)}"
640
- min="${u(this.min === "" ? void 0 : this.min)}"
641
- max="${u(this.max === "" ? void 0 : this.max)}"
642
- step="${u(this.step === null ? void 0 : this.step)}"
643
- size="${u(this.size === null ? void 0 : this.size)}"
644
- name="${u(this.name === "" ? void 0 : this.name)}"
645
- inputmode="${u(this.inputMode)}"
646
- autocapitalize="${u(n)}"
647
- @input="${this.handleInputChange}"
648
- @focus="${this.onInputFocus}"
649
- @blur="${this.onInputBlur}">`;
650
- }
651
- /** @soyTemplate */
652
- renderLineRipple() {
653
- return this.outlined ? "" : c`
654
- <span .lineRippleFoundation=${w()}></span>
655
- `;
656
- }
657
- /** @soyTemplate */
658
- renderHelperText(e, t) {
659
- const i = this.validationMessage && !this.isUiValid, n = {
660
- "mdc-text-field-helper-text--persistent": this.helperPersistent,
661
- "mdc-text-field-helper-text--validation-msg": i
662
- }, o = this.focused || this.helperPersistent || i ? void 0 : "true", d = i ? this.validationMessage : this.helper;
663
- return e ? c`
664
- <div class="mdc-text-field-helper-line">
665
- <div id="helper-text"
666
- aria-hidden="${u(o)}"
667
- class="mdc-text-field-helper-text ${L(n)}"
668
- >${d}</div>
669
- ${this.renderCharCounter(t)}
670
- </div>` : "";
671
- }
672
- /** @soyTemplate */
673
- renderCharCounter(e) {
674
- const t = Math.min(this.value.length, this.maxLength);
675
- return e ? c`
676
- <span class="mdc-text-field-character-counter"
677
- >${t} / ${this.maxLength}</span>` : "";
678
- }
679
- onInputFocus() {
680
- this.focused = !0;
681
- }
682
- onInputBlur() {
683
- this.focused = !1, this.reportValidity();
684
- }
685
- checkValidity() {
686
- const e = this._checkValidity(this.value);
687
- if (!e) {
688
- const t = new Event("invalid", { bubbles: !1, cancelable: !0 });
689
- this.dispatchEvent(t);
690
- }
691
- return e;
692
- }
693
- reportValidity() {
694
- const e = this.checkValidity();
695
- return this.mdcFoundation.setValid(e), this.isUiValid = e, e;
696
- }
697
- _checkValidity(e) {
698
- const t = this.formElement.validity;
699
- let i = R(t);
700
- if (this.validityTransform) {
701
- const n = this.validityTransform(e, i);
702
- i = Object.assign(Object.assign({}, i), n), this.mdcFoundation.setUseNativeValidation(!1);
703
- } else
704
- this.mdcFoundation.setUseNativeValidation(!0);
705
- return this._validity = i, this._validity.valid;
706
- }
707
- setCustomValidity(e) {
708
- this.validationMessage = e, this.formElement.setCustomValidity(e);
709
- }
710
- handleInputChange() {
711
- this.value = this.formElement.value;
712
- }
713
- createAdapter() {
714
- return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, this.getRootAdapterMethods()), this.getInputAdapterMethods()), this.getLabelAdapterMethods()), this.getLineRippleAdapterMethods()), this.getOutlineAdapterMethods());
715
- }
716
- getRootAdapterMethods() {
717
- return Object.assign({ registerTextFieldInteractionHandler: (e, t) => this.addEventListener(e, t), deregisterTextFieldInteractionHandler: (e, t) => this.removeEventListener(e, t), registerValidationAttributeChangeHandler: (e) => {
718
- const t = (o) => o.map((d) => d.attributeName).filter((d) => d), i = new MutationObserver((o) => {
719
- e(t(o));
720
- }), n = { attributes: !0 };
721
- return i.observe(this.formElement, n), i;
722
- }, deregisterValidationAttributeChangeHandler: (e) => e.disconnect() }, D(this.mdcRoot));
723
- }
724
- getInputAdapterMethods() {
725
- return {
726
- getNativeInput: () => this.formElement,
727
- // since HelperTextFoundation is not used, aria-describedby a11y logic
728
- // is implemented in render method instead of these adapter methods
729
- setInputAttr: () => {
730
- },
731
- removeInputAttr: () => {
732
- },
733
- isFocused: () => this.shadowRoot ? this.shadowRoot.activeElement === this.formElement : !1,
734
- registerInputInteractionHandler: (e, t) => this.formElement.addEventListener(e, t, { passive: e in W }),
735
- deregisterInputInteractionHandler: (e, t) => this.formElement.removeEventListener(e, t)
736
- };
737
- }
738
- getLabelAdapterMethods() {
739
- return {
740
- floatLabel: (e) => this.labelElement && this.labelElement.floatingLabelFoundation.float(e),
741
- getLabelWidth: () => this.labelElement ? this.labelElement.floatingLabelFoundation.getWidth() : 0,
742
- hasLabel: () => !!this.labelElement,
743
- shakeLabel: (e) => this.labelElement && this.labelElement.floatingLabelFoundation.shake(e),
744
- setLabelRequired: (e) => {
745
- this.labelElement && this.labelElement.floatingLabelFoundation.setRequired(e);
746
- }
747
- };
748
- }
749
- getLineRippleAdapterMethods() {
750
- return {
751
- activateLineRipple: () => {
752
- this.lineRippleElement && this.lineRippleElement.lineRippleFoundation.activate();
753
- },
754
- deactivateLineRipple: () => {
755
- this.lineRippleElement && this.lineRippleElement.lineRippleFoundation.deactivate();
756
- },
757
- setLineRippleTransformOrigin: (e) => {
758
- this.lineRippleElement && this.lineRippleElement.lineRippleFoundation.setRippleCenter(e);
759
- }
760
- };
761
- }
762
- // tslint:disable:ban-ts-ignore
763
- async getUpdateComplete() {
764
- var e;
765
- const t = await super.getUpdateComplete();
766
- return await ((e = this.outlineElement) === null || e === void 0 ? void 0 : e.updateComplete), t;
767
- }
768
- // tslint:enable:ban-ts-ignore
769
- firstUpdated() {
770
- var e;
771
- super.firstUpdated(), this.mdcFoundation.setValidateOnValueChange(this.autoValidate), this.validateOnInitialRender && this.reportValidity(), (e = this.outlineElement) === null || e === void 0 || e.updateComplete.then(() => {
772
- var t;
773
- this.outlineWidth = ((t = this.labelElement) === null || t === void 0 ? void 0 : t.floatingLabelFoundation.getWidth()) || 0;
774
- });
775
- }
776
- getOutlineAdapterMethods() {
777
- return {
778
- closeOutline: () => this.outlineElement && (this.outlineOpen = !1),
779
- hasOutline: () => !!this.outlineElement,
780
- notchOutline: (e) => {
781
- this.outlineElement && !this.outlineOpen && (this.outlineWidth = e, this.outlineOpen = !0);
782
- }
783
- };
784
- }
785
- async layout() {
786
- await this.updateComplete;
787
- const e = this.labelElement;
788
- if (!e) {
789
- this.outlineOpen = !1;
790
- return;
791
- }
792
- const t = !!this.label && !!this.value;
793
- if (e.floatingLabelFoundation.float(t), !this.outlined)
794
- return;
795
- this.outlineOpen = t, await this.updateComplete;
796
- const i = e.floatingLabelFoundation.getWidth();
797
- this.outlineOpen && (this.outlineWidth = i, await this.updateComplete);
798
- }
799
- }
800
- a([
801
- y(".mdc-text-field")
802
- ], r.prototype, "mdcRoot", void 0);
803
- a([
804
- y("input")
805
- ], r.prototype, "formElement", void 0);
806
- a([
807
- y(".mdc-floating-label")
808
- ], r.prototype, "labelElement", void 0);
809
- a([
810
- y(".mdc-line-ripple")
811
- ], r.prototype, "lineRippleElement", void 0);
812
- a([
813
- y("mwc-notched-outline")
814
- ], r.prototype, "outlineElement", void 0);
815
- a([
816
- y(".mdc-notched-outline__notch")
817
- ], r.prototype, "notchElement", void 0);
818
- a([
819
- l({ type: String })
820
- ], r.prototype, "value", void 0);
821
- a([
822
- l({ type: String })
823
- ], r.prototype, "type", void 0);
824
- a([
825
- l({ type: String })
826
- ], r.prototype, "placeholder", void 0);
827
- a([
828
- l({ type: String }),
829
- E(function(s, e) {
830
- e !== void 0 && this.label !== e && this.layout();
831
- })
832
- ], r.prototype, "label", void 0);
833
- a([
834
- l({ type: String })
835
- ], r.prototype, "icon", void 0);
836
- a([
837
- l({ type: String })
838
- ], r.prototype, "iconTrailing", void 0);
839
- a([
840
- l({ type: Boolean, reflect: !0 })
841
- ], r.prototype, "disabled", void 0);
842
- a([
843
- l({ type: Boolean })
844
- ], r.prototype, "required", void 0);
845
- a([
846
- l({ type: Number })
847
- ], r.prototype, "minLength", void 0);
848
- a([
849
- l({ type: Number })
850
- ], r.prototype, "maxLength", void 0);
851
- a([
852
- l({ type: Boolean, reflect: !0 }),
853
- E(function(s, e) {
854
- e !== void 0 && this.outlined !== e && this.layout();
855
- })
856
- ], r.prototype, "outlined", void 0);
857
- a([
858
- l({ type: String })
859
- ], r.prototype, "helper", void 0);
860
- a([
861
- l({ type: Boolean })
862
- ], r.prototype, "validateOnInitialRender", void 0);
863
- a([
864
- l({ type: String })
865
- ], r.prototype, "validationMessage", void 0);
866
- a([
867
- l({ type: Boolean })
868
- ], r.prototype, "autoValidate", void 0);
869
- a([
870
- l({ type: String })
871
- ], r.prototype, "pattern", void 0);
872
- a([
873
- l({ type: String })
874
- ], r.prototype, "min", void 0);
875
- a([
876
- l({ type: String })
877
- ], r.prototype, "max", void 0);
878
- a([
879
- l({ type: String })
880
- ], r.prototype, "step", void 0);
881
- a([
882
- l({ type: Number })
883
- ], r.prototype, "size", void 0);
884
- a([
885
- l({ type: Boolean })
886
- ], r.prototype, "helperPersistent", void 0);
887
- a([
888
- l({ type: Boolean })
889
- ], r.prototype, "charCounter", void 0);
890
- a([
891
- l({ type: Boolean })
892
- ], r.prototype, "endAligned", void 0);
893
- a([
894
- l({ type: String })
895
- ], r.prototype, "prefix", void 0);
896
- a([
897
- l({ type: String })
898
- ], r.prototype, "suffix", void 0);
899
- a([
900
- l({ type: String })
901
- ], r.prototype, "name", void 0);
902
- a([
903
- l({ type: String })
904
- ], r.prototype, "inputMode", void 0);
905
- a([
906
- l({ type: Boolean })
907
- ], r.prototype, "readOnly", void 0);
908
- a([
909
- l({ type: String })
910
- ], r.prototype, "autocapitalize", void 0);
911
- a([
912
- I()
913
- ], r.prototype, "outlineOpen", void 0);
914
- a([
915
- I()
916
- ], r.prototype, "outlineWidth", void 0);
917
- a([
918
- I()
919
- ], r.prototype, "isUiValid", void 0);
920
- a([
921
- I()
922
- ], r.prototype, "focused", void 0);
923
- a([
924
- _({ passive: !0 })
925
- ], r.prototype, "handleInputChange", null);
926
- const oe = `:host{--mdc-text-field-label-ink-color: var(--mdc-theme-text-secondary-on-background);--mdc-text-field-ink-color: var(--mdc-theme-text-secondary-on-background);--mdc-text-field-fill-color: var(--mdc-theme-surface-canvas);--mdc-text-field-idle-line-color: var(--mdc-theme-border);--mdc-text-field-hover-line-color: var(--mdc-theme-text-icon-on-background);--mdc-text-field-outlined-idle-border-color: var(--mdc-theme-border);--mdc-text-field-outlined-hover-border-color: var(--mdc-theme-text-icon-on-background)}.mdc-text-field:not(.mdc-text-field--disabled) .mdc-text-field__icon{color:var(--mdc-theme-text-icon-on-background)}
927
- `;
928
- export {
929
- r as T,
930
- Y as l,
931
- oe as s
932
- };