@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,133 +0,0 @@
1
- "use strict";const a=require("./tslib.es6-98719205.js"),L=require("./mwc-line-ripple-directive-a6b39a3c.js"),R=require("./form-element-c553d6f5.js"),A=require("./observer-a096ab43.js"),u=require("./query-assigned-elements-f623705d.js"),l=require("./property-57f6f6fe.js"),b=require("./state-0974a8e5.js"),E=require("./event-options-3f5eb195.js"),y=require("./query-680f1868.js"),p=require("./class-map-b5efe8da.js"),h=require("./if-defined-f1c45245.js"),I=require("./directive-helpers-0ce1f995.js"),H=require("./utils-a8190a39.js");/**
2
- * @license
3
- * Copyright 2016 Google Inc.
4
- *
5
- * Permission is hereby granted, free of charge, to any person obtaining a copy
6
- * of this software and associated documentation files (the "Software"), to deal
7
- * in the Software without restriction, including without limitation the rights
8
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- * copies of the Software, and to permit persons to whom the Software is
10
- * furnished to do so, subject to the following conditions:
11
- *
12
- * The above copyright notice and this permission notice shall be included in
13
- * all copies or substantial portions of the Software.
14
- *
15
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- * THE SOFTWARE.
22
- */var $=function(){function s(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(s,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(s,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(s,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(s,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),s.prototype.init=function(){},s.prototype.destroy=function(){},s}();/**
23
- * @license
24
- * Copyright 2016 Google Inc.
25
- *
26
- * Permission is hereby granted, free of charge, to any person obtaining a copy
27
- * of this software and associated documentation files (the "Software"), to deal
28
- * in the Software without restriction, including without limitation the rights
29
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
30
- * copies of the Software, and to permit persons to whom the Software is
31
- * furnished to do so, subject to the following conditions:
32
- *
33
- * The above copyright notice and this permission notice shall be included in
34
- * all copies or substantial portions of the Software.
35
- *
36
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
37
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
38
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
39
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
40
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
41
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
42
- * THE SOFTWARE.
43
- */var x={ARIA_CONTROLS:"aria-controls",ARIA_DESCRIBEDBY:"aria-describedby",INPUT_SELECTOR:".mdc-text-field__input",LABEL_SELECTOR:".mdc-floating-label",LEADING_ICON_SELECTOR:".mdc-text-field__icon--leading",LINE_RIPPLE_SELECTOR:".mdc-line-ripple",OUTLINE_SELECTOR:".mdc-notched-outline",PREFIX_SELECTOR:".mdc-text-field__affix--prefix",SUFFIX_SELECTOR:".mdc-text-field__affix--suffix",TRAILING_ICON_SELECTOR:".mdc-text-field__icon--trailing"},w={DISABLED:"mdc-text-field--disabled",FOCUSED:"mdc-text-field--focused",HELPER_LINE:"mdc-text-field-helper-line",INVALID:"mdc-text-field--invalid",LABEL_FLOATING:"mdc-text-field--label-floating",NO_LABEL:"mdc-text-field--no-label",OUTLINED:"mdc-text-field--outlined",ROOT:"mdc-text-field",TEXTAREA:"mdc-text-field--textarea",WITH_LEADING_ICON:"mdc-text-field--with-leading-icon",WITH_TRAILING_ICON:"mdc-text-field--with-trailing-icon",WITH_INTERNAL_COUNTER:"mdc-text-field--with-internal-counter"},_={LABEL_SCALE:.75},B=["pattern","min","max","required","step","minlength","maxlength"],U=["color","date","datetime-local","month","range","time","week"];/**
44
- * @license
45
- * Copyright 2016 Google Inc.
46
- *
47
- * Permission is hereby granted, free of charge, to any person obtaining a copy
48
- * of this software and associated documentation files (the "Software"), to deal
49
- * in the Software without restriction, including without limitation the rights
50
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
- * copies of the Software, and to permit persons to whom the Software is
52
- * furnished to do so, subject to the following conditions:
53
- *
54
- * The above copyright notice and this permission notice shall be included in
55
- * all copies or substantial portions of the Software.
56
- *
57
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
63
- * THE SOFTWARE.
64
- */var F=["mousedown","touchstart"],C=["click","keydown"],T=function(s){a.__extends(e,s);function e(t,i){i===void 0&&(i={});var n=s.call(this,a.__assign(a.__assign({},e.defaultAdapter),t))||this;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(){n.activateFocus()},n.inputBlurHandler=function(){n.deactivateFocus()},n.inputInputHandler=function(){n.handleInput()},n.setPointerXOffset=function(o){n.setTransformOrigin(o)},n.textFieldInteractionHandler=function(){n.handleTextFieldInteraction()},n.validationAttributeChangeHandler=function(o){n.handleValidationAttributeChange(o)},n}return Object.defineProperty(e,"cssClasses",{get:function(){return w},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return _},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldAlwaysFloat",{get:function(){var t=this.getNativeInput().type;return U.indexOf(t)>=0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldFloat",{get:function(){return this.shouldAlwaysFloat||this.isFocused||!!this.getValue()||this.isBadInput()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shouldShake",{get:function(){return!this.isFocused&&!this.isValid()&&!!this.getValue()},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!0},setInputAttr:function(){},removeInputAttr:function(){},registerTextFieldInteractionHandler:function(){},deregisterTextFieldInteractionHandler:function(){},registerInputInteractionHandler:function(){},deregisterInputInteractionHandler:function(){},registerValidationAttributeChangeHandler:function(){return new MutationObserver(function(){})},deregisterValidationAttributeChangeHandler:function(){},getNativeInput:function(){return null},isFocused:function(){return!1},activateLineRipple:function(){},deactivateLineRipple:function(){},setLineRippleTransformOrigin:function(){},shakeLabel:function(){},floatLabel:function(){},setLabelRequired:function(){},hasLabel:function(){return!1},getLabelWidth:function(){return 0},hasOutline:function(){return!1},notchOutline:function(){},closeOutline:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t,i,n,o;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);try{for(var d=a.__values(F),c=d.next();!c.done;c=d.next()){var m=c.value;this.adapter.registerInputInteractionHandler(m,this.setPointerXOffset)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(t)throw t.error}}try{for(var v=a.__values(C),f=v.next();!f.done;f=v.next()){var m=f.value;this.adapter.registerTextFieldInteractionHandler(m,this.textFieldInteractionHandler)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}this.validationObserver=this.adapter.registerValidationAttributeChangeHandler(this.validationAttributeChangeHandler),this.setcharacterCounter(this.getValue().length)},e.prototype.destroy=function(){var t,i,n,o;this.adapter.deregisterInputInteractionHandler("focus",this.inputFocusHandler),this.adapter.deregisterInputInteractionHandler("blur",this.inputBlurHandler),this.adapter.deregisterInputInteractionHandler("input",this.inputInputHandler);try{for(var d=a.__values(F),c=d.next();!c.done;c=d.next()){var m=c.value;this.adapter.deregisterInputInteractionHandler(m,this.setPointerXOffset)}}catch(g){t={error:g}}finally{try{c&&!c.done&&(i=d.return)&&i.call(d)}finally{if(t)throw t.error}}try{for(var v=a.__values(C),f=v.next();!f.done;f=v.next()){var m=f.value;this.adapter.deregisterTextFieldInteractionHandler(m,this.textFieldInteractionHandler)}}catch(g){n={error:g}}finally{try{f&&!f.done&&(o=v.return)&&o.call(v)}finally{if(n)throw n.error}}this.adapter.deregisterValidationAttributeChangeHandler(this.validationObserver)},e.prototype.handleTextFieldInteraction=function(){var t=this.adapter.getNativeInput();t&&t.disabled||(this.receivedUserInput=!0)},e.prototype.handleValidationAttributeChange=function(t){var i=this;t.some(function(n){return B.indexOf(n)>-1?(i.styleValidity(!0),i.adapter.setLabelRequired(i.getNativeInput().required),!0):!1}),t.indexOf("maxlength")>-1&&this.setcharacterCounter(this.getValue().length)},e.prototype.notchOutline=function(t){if(!(!this.adapter.hasOutline()||!this.adapter.hasLabel()))if(t){var i=this.adapter.getLabelWidth()*_.LABEL_SCALE;this.adapter.notchOutline(i)}else this.adapter.closeOutline()},e.prototype.activateFocus=function(){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()},e.prototype.setTransformOrigin=function(t){if(!(this.isDisabled()||this.adapter.hasOutline())){var i=t.touches,n=i?i[0]:t,o=n.target.getBoundingClientRect(),d=n.clientX-o.left;this.adapter.setLineRippleTransformOrigin(d)}},e.prototype.handleInput=function(){this.autoCompleteFocus(),this.setcharacterCounter(this.getValue().length)},e.prototype.autoCompleteFocus=function(){this.receivedUserInput||this.activateFocus()},e.prototype.deactivateFocus=function(){this.isFocused=!1,this.adapter.deactivateLineRipple();var t=this.isValid();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)},e.prototype.getValue=function(){return this.getNativeInput().value},e.prototype.setValue=function(t){if(this.getValue()!==t&&(this.getNativeInput().value=t),this.setcharacterCounter(t.length),this.validateOnValueChange){var i=this.isValid();this.styleValidity(i)}this.adapter.hasLabel()&&(this.notchOutline(this.shouldFloat),this.adapter.floatLabel(this.shouldFloat),this.styleFloating(this.shouldFloat),this.validateOnValueChange&&this.adapter.shakeLabel(this.shouldShake))},e.prototype.isValid=function(){return this.useNativeValidation?this.isNativeInputValid():this.valid},e.prototype.setValid=function(t){this.valid=t,this.styleValidity(t);var i=!t&&!this.isFocused&&!!this.getValue();this.adapter.hasLabel()&&this.adapter.shakeLabel(i)},e.prototype.setValidateOnValueChange=function(t){this.validateOnValueChange=t},e.prototype.getValidateOnValueChange=function(){return this.validateOnValueChange},e.prototype.setUseNativeValidation=function(t){this.useNativeValidation=t},e.prototype.isDisabled=function(){return this.getNativeInput().disabled},e.prototype.setDisabled=function(t){this.getNativeInput().disabled=t,this.styleDisabled(t)},e.prototype.setHelperTextContent=function(t){this.helperText&&this.helperText.setContent(t)},e.prototype.setLeadingIconAriaLabel=function(t){this.leadingIcon&&this.leadingIcon.setAriaLabel(t)},e.prototype.setLeadingIconContent=function(t){this.leadingIcon&&this.leadingIcon.setContent(t)},e.prototype.setTrailingIconAriaLabel=function(t){this.trailingIcon&&this.trailingIcon.setAriaLabel(t)},e.prototype.setTrailingIconContent=function(t){this.trailingIcon&&this.trailingIcon.setContent(t)},e.prototype.setcharacterCounter=function(t){if(this.characterCounter){var i=this.getNativeInput().maxLength;if(i===-1)throw new Error("MDCTextFieldFoundation: Expected maxlength html property on text input or textarea.");this.characterCounter.setCounterValue(t,i)}},e.prototype.isBadInput=function(){return this.getNativeInput().validity.badInput||!1},e.prototype.isNativeInputValid=function(){return this.getNativeInput().validity.valid},e.prototype.styleValidity=function(t){var i=e.cssClasses.INVALID;if(t?this.adapter.removeClass(i):this.adapter.addClass(i),this.helperText){this.helperText.setValidity(t);var n=this.helperText.isValidation();if(!n)return;var o=this.helperText.isVisible(),d=this.helperText.getId();o&&d?this.adapter.setInputAttr(x.ARIA_DESCRIBEDBY,d):this.adapter.removeInputAttr(x.ARIA_DESCRIBEDBY)}},e.prototype.styleFocused=function(t){var i=e.cssClasses.FOCUSED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.styleDisabled=function(t){var i=e.cssClasses,n=i.DISABLED,o=i.INVALID;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)},e.prototype.styleFloating=function(t){var i=e.cssClasses.LABEL_FLOATING;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.getNativeInput=function(){var t=this.adapter?this.adapter.getNativeInput():null;return t||{disabled:!1,maxLength:-1,required:!1,type:"input",validity:{badInput:!1,valid:!0},value:""}},e}($);const M=T;/**
65
- * @license
66
- * Copyright 2020 Google LLC
67
- * SPDX-License-Identifier: BSD-3-Clause
68
- */const V=p.e(class extends p.i{constructor(s){if(super(s),s.type!==p.t.PROPERTY&&s.type!==p.t.ATTRIBUTE&&s.type!==p.t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!I.e(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[e]){if(e===u.T||e===u.A)return e;const t=s.element,i=s.name;if(s.type===p.t.PROPERTY){if(e===t[i])return u.T}else if(s.type===p.t.BOOLEAN_ATTRIBUTE){if(!!e===t.hasAttribute(i))return u.T}else if(s.type===p.t.ATTRIBUTE&&t.getAttribute(i)===e+"")return u.T;return I.a(s),e}});/**
69
- * @license
70
- * Copyright 2019 Google LLC
71
- * SPDX-License-Identifier: Apache-2.0
72
- */const q=["touchstart","touchmove","scroll","mousewheel"],O=(s={})=>{const e={};for(const t in s)e[t]=s[t];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)};class r extends R.FormElement{constructor(){super(...arguments),this.mdcFoundationClass=M,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=O(),this.validityTransform=null}get validity(){return this._checkValidity(this.value),this._validity}get willValidate(){return this.formElement.willValidate}get selectionStart(){return this.formElement.selectionStart}get selectionEnd(){return this.formElement.selectionEnd}focus(){const e=new CustomEvent("focus");this.formElement.dispatchEvent(e),this.formElement.focus()}blur(){const e=new CustomEvent("blur");this.formElement.dispatchEvent(e),this.formElement.blur()}select(){this.formElement.select()}setSelectionRange(e,t,i){this.formElement.setSelectionRange(e,t,i)}update(e){e.has("autoValidate")&&this.mdcFoundation&&this.mdcFoundation.setValidateOnValueChange(this.autoValidate),e.has("value")&&typeof this.value!="string"&&(this.value=`${this.value}`),super.update(e)}setFormData(e){this.name&&e.append(this.name,this.value)}render(){const e=this.charCounter&&this.maxLength!==-1,t=!!this.helper||!!this.validationMessage||e,i={"mdc-text-field--disabled":this.disabled,"mdc-text-field--no-label":!this.label,"mdc-text-field--filled":!this.outlined,"mdc-text-field--outlined":this.outlined,"mdc-text-field--with-leading-icon":this.icon,"mdc-text-field--with-trailing-icon":this.iconTrailing,"mdc-text-field--end-aligned":this.endAligned};return u.x`
73
- <label class="mdc-text-field ${p.o(i)}">
74
- ${this.renderRipple()}
75
- ${this.outlined?this.renderOutline():this.renderLabel()}
76
- ${this.renderLeadingIcon()}
77
- ${this.renderPrefix()}
78
- ${this.renderInput(t)}
79
- ${this.renderSuffix()}
80
- ${this.renderTrailingIcon()}
81
- ${this.renderLineRipple()}
82
- </label>
83
- ${this.renderHelperText(t,e)}
84
- `}updated(e){e.has("value")&&e.get("value")!==void 0&&(this.mdcFoundation.setValue(this.value),this.autoValidate&&this.reportValidity())}renderRipple(){return this.outlined?"":u.x`
85
- <span class="mdc-text-field__ripple"></span>
86
- `}renderOutline(){return this.outlined?u.x`
87
- <mwc-notched-outline
88
- .width=${this.outlineWidth}
89
- .open=${this.outlineOpen}
90
- class="mdc-notched-outline">
91
- ${this.renderLabel()}
92
- </mwc-notched-outline>`:""}renderLabel(){return this.label?u.x`
93
- <span
94
- .floatingLabelFoundation=${L.floatingLabel(this.label)}
95
- id="label">${this.label}</span>
96
- `:""}renderLeadingIcon(){return this.icon?this.renderIcon(this.icon):""}renderTrailingIcon(){return this.iconTrailing?this.renderIcon(this.iconTrailing,!0):""}renderIcon(e,t=!1){const i={"mdc-text-field__icon--leading":!t,"mdc-text-field__icon--trailing":t};return u.x`<i class="material-icons mdc-text-field__icon ${p.o(i)}">${e}</i>`}renderPrefix(){return this.prefix?this.renderAffix(this.prefix):""}renderSuffix(){return this.suffix?this.renderAffix(this.suffix,!0):""}renderAffix(e,t=!1){const i={"mdc-text-field__affix--prefix":!t,"mdc-text-field__affix--suffix":t};return u.x`<span class="mdc-text-field__affix ${p.o(i)}">
97
- ${e}</span>`}renderInput(e){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,c=e?"helper-text":void 0,m=this.focused||this.helperPersistent||o?"helper-text":void 0;return u.x`
98
- <input
99
- aria-labelledby=${h.l(d)}
100
- aria-controls="${h.l(c)}"
101
- aria-describedby="${h.l(m)}"
102
- class="mdc-text-field__input"
103
- type="${this.type}"
104
- .value="${V(this.value)}"
105
- ?disabled="${this.disabled}"
106
- placeholder="${this.placeholder}"
107
- ?required="${this.required}"
108
- ?readonly="${this.readOnly}"
109
- minlength="${h.l(t)}"
110
- maxlength="${h.l(i)}"
111
- pattern="${h.l(this.pattern?this.pattern:void 0)}"
112
- min="${h.l(this.min===""?void 0:this.min)}"
113
- max="${h.l(this.max===""?void 0:this.max)}"
114
- step="${h.l(this.step===null?void 0:this.step)}"
115
- size="${h.l(this.size===null?void 0:this.size)}"
116
- name="${h.l(this.name===""?void 0:this.name)}"
117
- inputmode="${h.l(this.inputMode)}"
118
- autocapitalize="${h.l(n)}"
119
- @input="${this.handleInputChange}"
120
- @focus="${this.onInputFocus}"
121
- @blur="${this.onInputBlur}">`}renderLineRipple(){return this.outlined?"":u.x`
122
- <span .lineRippleFoundation=${L.lineRipple()}></span>
123
- `}renderHelperText(e,t){const i=this.validationMessage&&!this.isUiValid,n={"mdc-text-field-helper-text--persistent":this.helperPersistent,"mdc-text-field-helper-text--validation-msg":i},o=this.focused||this.helperPersistent||i?void 0:"true",d=i?this.validationMessage:this.helper;return e?u.x`
124
- <div class="mdc-text-field-helper-line">
125
- <div id="helper-text"
126
- aria-hidden="${h.l(o)}"
127
- class="mdc-text-field-helper-text ${p.o(n)}"
128
- >${d}</div>
129
- ${this.renderCharCounter(t)}
130
- </div>`:""}renderCharCounter(e){const t=Math.min(this.value.length,this.maxLength);return e?u.x`
131
- <span class="mdc-text-field-character-counter"
132
- >${t} / ${this.maxLength}</span>`:""}onInputFocus(){this.focused=!0}onInputBlur(){this.focused=!1,this.reportValidity()}checkValidity(){const e=this._checkValidity(this.value);if(!e){const t=new Event("invalid",{bubbles:!1,cancelable:!0});this.dispatchEvent(t)}return e}reportValidity(){const e=this.checkValidity();return this.mdcFoundation.setValid(e),this.isUiValid=e,e}_checkValidity(e){const t=this.formElement.validity;let i=O(t);if(this.validityTransform){const n=this.validityTransform(e,i);i=Object.assign(Object.assign({},i),n),this.mdcFoundation.setUseNativeValidation(!1)}else this.mdcFoundation.setUseNativeValidation(!0);return this._validity=i,this._validity.valid}setCustomValidity(e){this.validationMessage=e,this.formElement.setCustomValidity(e)}handleInputChange(){this.value=this.formElement.value}createAdapter(){return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},this.getRootAdapterMethods()),this.getInputAdapterMethods()),this.getLabelAdapterMethods()),this.getLineRippleAdapterMethods()),this.getOutlineAdapterMethods())}getRootAdapterMethods(){return Object.assign({registerTextFieldInteractionHandler:(e,t)=>this.addEventListener(e,t),deregisterTextFieldInteractionHandler:(e,t)=>this.removeEventListener(e,t),registerValidationAttributeChangeHandler:e=>{const t=o=>o.map(d=>d.attributeName).filter(d=>d),i=new MutationObserver(o=>{e(t(o))}),n={attributes:!0};return i.observe(this.formElement,n),i},deregisterValidationAttributeChangeHandler:e=>e.disconnect()},H.addHasRemoveClass(this.mdcRoot))}getInputAdapterMethods(){return{getNativeInput:()=>this.formElement,setInputAttr:()=>{},removeInputAttr:()=>{},isFocused:()=>this.shadowRoot?this.shadowRoot.activeElement===this.formElement:!1,registerInputInteractionHandler:(e,t)=>this.formElement.addEventListener(e,t,{passive:e in q}),deregisterInputInteractionHandler:(e,t)=>this.formElement.removeEventListener(e,t)}}getLabelAdapterMethods(){return{floatLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.float(e),getLabelWidth:()=>this.labelElement?this.labelElement.floatingLabelFoundation.getWidth():0,hasLabel:()=>!!this.labelElement,shakeLabel:e=>this.labelElement&&this.labelElement.floatingLabelFoundation.shake(e),setLabelRequired:e=>{this.labelElement&&this.labelElement.floatingLabelFoundation.setRequired(e)}}}getLineRippleAdapterMethods(){return{activateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.activate()},deactivateLineRipple:()=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.deactivate()},setLineRippleTransformOrigin:e=>{this.lineRippleElement&&this.lineRippleElement.lineRippleFoundation.setRippleCenter(e)}}}async getUpdateComplete(){var e;const t=await super.getUpdateComplete();return await((e=this.outlineElement)===null||e===void 0?void 0:e.updateComplete),t}firstUpdated(){var e;super.firstUpdated(),this.mdcFoundation.setValidateOnValueChange(this.autoValidate),this.validateOnInitialRender&&this.reportValidity(),(e=this.outlineElement)===null||e===void 0||e.updateComplete.then(()=>{var t;this.outlineWidth=((t=this.labelElement)===null||t===void 0?void 0:t.floatingLabelFoundation.getWidth())||0})}getOutlineAdapterMethods(){return{closeOutline:()=>this.outlineElement&&(this.outlineOpen=!1),hasOutline:()=>!!this.outlineElement,notchOutline:e=>{this.outlineElement&&!this.outlineOpen&&(this.outlineWidth=e,this.outlineOpen=!0)}}}async layout(){await this.updateComplete;const e=this.labelElement;if(!e){this.outlineOpen=!1;return}const t=!!this.label&&!!this.value;if(e.floatingLabelFoundation.float(t),!this.outlined)return;this.outlineOpen=t,await this.updateComplete;const i=e.floatingLabelFoundation.getWidth();this.outlineOpen&&(this.outlineWidth=i,await this.updateComplete)}}a.__decorate([y.i(".mdc-text-field")],r.prototype,"mdcRoot",void 0);a.__decorate([y.i("input")],r.prototype,"formElement",void 0);a.__decorate([y.i(".mdc-floating-label")],r.prototype,"labelElement",void 0);a.__decorate([y.i(".mdc-line-ripple")],r.prototype,"lineRippleElement",void 0);a.__decorate([y.i("mwc-notched-outline")],r.prototype,"outlineElement",void 0);a.__decorate([y.i(".mdc-notched-outline__notch")],r.prototype,"notchElement",void 0);a.__decorate([l.n({type:String})],r.prototype,"value",void 0);a.__decorate([l.n({type:String})],r.prototype,"type",void 0);a.__decorate([l.n({type:String})],r.prototype,"placeholder",void 0);a.__decorate([l.n({type:String}),A.observer(function(s,e){e!==void 0&&this.label!==e&&this.layout()})],r.prototype,"label",void 0);a.__decorate([l.n({type:String})],r.prototype,"icon",void 0);a.__decorate([l.n({type:String})],r.prototype,"iconTrailing",void 0);a.__decorate([l.n({type:Boolean,reflect:!0})],r.prototype,"disabled",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"required",void 0);a.__decorate([l.n({type:Number})],r.prototype,"minLength",void 0);a.__decorate([l.n({type:Number})],r.prototype,"maxLength",void 0);a.__decorate([l.n({type:Boolean,reflect:!0}),A.observer(function(s,e){e!==void 0&&this.outlined!==e&&this.layout()})],r.prototype,"outlined",void 0);a.__decorate([l.n({type:String})],r.prototype,"helper",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"validateOnInitialRender",void 0);a.__decorate([l.n({type:String})],r.prototype,"validationMessage",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"autoValidate",void 0);a.__decorate([l.n({type:String})],r.prototype,"pattern",void 0);a.__decorate([l.n({type:String})],r.prototype,"min",void 0);a.__decorate([l.n({type:String})],r.prototype,"max",void 0);a.__decorate([l.n({type:String})],r.prototype,"step",void 0);a.__decorate([l.n({type:Number})],r.prototype,"size",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"helperPersistent",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"charCounter",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"endAligned",void 0);a.__decorate([l.n({type:String})],r.prototype,"prefix",void 0);a.__decorate([l.n({type:String})],r.prototype,"suffix",void 0);a.__decorate([l.n({type:String})],r.prototype,"name",void 0);a.__decorate([l.n({type:String})],r.prototype,"inputMode",void 0);a.__decorate([l.n({type:Boolean})],r.prototype,"readOnly",void 0);a.__decorate([l.n({type:String})],r.prototype,"autocapitalize",void 0);a.__decorate([b.t()],r.prototype,"outlineOpen",void 0);a.__decorate([b.t()],r.prototype,"outlineWidth",void 0);a.__decorate([b.t()],r.prototype,"isUiValid",void 0);a.__decorate([b.t()],r.prototype,"focused",void 0);a.__decorate([E.e({passive:!0})],r.prototype,"handleInputChange",null);const k=`: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)}
133
- `;exports.TextFieldBase=r;exports.l=V;exports.styles=k;