@covalent/components 8.23.1 → 9.0.0-beta.1

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