@covalent/components 8.2.0 → 8.2.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 (185) hide show
  1. package/action-ribbon.js +3 -2
  2. package/action-ribbon.mjs +10 -9
  3. package/alert.js +3 -2
  4. package/alert.mjs +10 -9
  5. package/app-shell.js +2 -1
  6. package/app-shell.mjs +20 -19
  7. package/{base-element-atp_8bvP.js → base-element-58a3f9ea.js} +1 -1
  8. package/{base-element--jaKdI-8.mjs → base-element-67ae173f.mjs} +2 -2
  9. package/button.js +3 -2
  10. package/button.mjs +16 -15
  11. package/card.js +3 -2
  12. package/card.mjs +5 -4
  13. package/check-list-item.js +15 -11
  14. package/check-list-item.mjs +68 -62
  15. package/checkbox.js +2 -1
  16. package/checkbox.mjs +25 -23
  17. package/circular-progress.js +1 -1
  18. package/circular-progress.mjs +7 -7
  19. package/{class-map-YPXv0Hj4.mjs → class-map-4b94b017.mjs} +1 -1
  20. package/{class-map-wtcW44Of.js → class-map-b5efe8da.js} +1 -1
  21. package/code-snippet-2137b11c.js +13 -0
  22. package/code-snippet-ccca324f.mjs +12278 -0
  23. package/code-snippet.js +1 -12
  24. package/code-snippet.mjs +7 -12251
  25. package/{dialog-tIMorfuj.mjs → dialog-3ca1b701.mjs} +62 -60
  26. package/{dialog-SpbwRuWY.js → dialog-82b03745.js} +7 -6
  27. package/dialog.js +1 -1
  28. package/dialog.mjs +10 -10
  29. package/{directive-helpers--rJ2jf3N.js → directive-helpers-0ce1f995.js} +1 -1
  30. package/{directive-helpers-9566lOOl.mjs → directive-helpers-e3ea6592.mjs} +1 -1
  31. package/drawer.js +3 -2
  32. package/drawer.mjs +12 -11
  33. package/empty-state.js +2 -1
  34. package/empty-state.mjs +6 -5
  35. package/{event-options-2TJPtsKy.js → event-options-3f5eb195.js} +1 -1
  36. package/{event-options-0xzSdemG.mjs → event-options-78d6cf94.mjs} +1 -1
  37. package/{form-element-5s8gft-A.js → form-element-c553d6f5.js} +1 -1
  38. package/{form-element-gM33WEq3.mjs → form-element-ffcf59ff.mjs} +4 -4
  39. package/{foundation-3Wg80pI7.mjs → foundation-39dc72d2.mjs} +1 -1
  40. package/{foundation-1Vzfdey_.js → foundation-786bf879.js} +1 -1
  41. package/icon-button.js +3 -2
  42. package/icon-button.mjs +15 -14
  43. package/icon-check-toggle.js +5 -4
  44. package/icon-check-toggle.mjs +24 -22
  45. package/icon-radio-toggle.js +5 -4
  46. package/icon-radio-toggle.mjs +27 -25
  47. package/icon.js +5 -1
  48. package/icon.mjs +21 -15
  49. package/{if-defined-BH_l2PVl.mjs → if-defined-c367f208.mjs} +1 -1
  50. package/{if-defined-lAIUwAsA.js → if-defined-f1c45245.js} +1 -1
  51. package/index.js +560 -1
  52. package/index.mjs +3654 -124
  53. package/{inert.esm-vhZXthJr.mjs → inert.esm-359d4581.mjs} +1 -1
  54. package/linear-progress.js +3 -2
  55. package/linear-progress.mjs +13 -12
  56. package/{mwc-list-item.css-d-SHhq7Q.mjs → list-item-1fc0d619.mjs} +9 -199
  57. package/{mwc-list-item.css-yJ5bjNGc.js → list-item-209613bf.js} +6 -28
  58. package/list-item.js +3 -3
  59. package/list-item.mjs +25 -25
  60. package/list.js +8 -3
  61. package/list.mjs +37 -31
  62. package/menu.js +5 -1
  63. package/menu.mjs +34 -28
  64. package/mwc-checkbox-base-3d8c9549.js +41 -0
  65. package/mwc-checkbox-base-f10fd709.mjs +198 -0
  66. package/{mwc-checkbox.css-c44nPIEs.mjs → mwc-checkbox.css-8f4f1a9b.mjs} +3 -198
  67. package/{mwc-checkbox.css-JOD-Qh-9.js → mwc-checkbox.css-b3434429.js} +2 -42
  68. package/{mwc-drawer-base-8e_1aSuf.mjs → mwc-drawer-base-135de8a5.mjs} +26 -24
  69. package/{mwc-drawer-base-Fv3JVYPS.js → mwc-drawer-base-798b11f8.js} +5 -5
  70. package/{mwc-icon-eaW72Ei7.mjs → mwc-icon-bf656cf5.mjs} +5 -6
  71. package/{mwc-icon-r2y4-AXI.js → mwc-icon-f87639bc.js} +2 -2
  72. package/{mwc-line-ripple-directive-iRoAkPnW.js → mwc-line-ripple-directive-a6b39a3c.js} +1 -1
  73. package/{mwc-line-ripple-directive-Q_HMRGPE.mjs → mwc-line-ripple-directive-b24a914e.mjs} +6 -6
  74. package/mwc-list-base-400b00e2.js +111 -0
  75. package/{mwc-list.css-_OVL_dbR.mjs → mwc-list-base-76e37212.mjs} +212 -213
  76. package/mwc-list-item-base-297d86b0.js +28 -0
  77. package/mwc-list-item-base-fe4398c3.mjs +202 -0
  78. package/{mwc-menu.css-cKtc1ZD4.mjs → mwc-menu-base-c4bc88ea.mjs} +75 -74
  79. package/mwc-menu-base-c75ca473.js +190 -0
  80. package/mwc-radio-base-913e02e2.js +101 -0
  81. package/{mwc-radio.css-_lt-Vcvl.mjs → mwc-radio-base-a374fbd9.mjs} +117 -123
  82. package/mwc-radio.css-4e140252.js +5 -0
  83. package/mwc-radio.css-7454bb11.mjs +10 -0
  84. package/{mwc-slider.css-md7hPAE7.mjs → mwc-slider.css-8b6f275c.mjs} +11 -11
  85. package/{mwc-slider.css-lCfMVbO5.js → mwc-slider.css-c7107d94.js} +1 -1
  86. package/{mwc-tab.css-lT5vTf5I.mjs → mwc-tab-base-be0c887f.mjs} +123 -127
  87. package/{mwc-tab.css-q4Jsbyp5.js → mwc-tab-base-f28722aa.js} +22 -26
  88. package/{mwc-top-app-bar-base-nm6mdCR3.mjs → mwc-top-app-bar-base-55da3fe4.mjs} +13 -12
  89. package/{mwc-top-app-bar-base-8qOIX1me.js → mwc-top-app-bar-base-aec60f27.js} +3 -3
  90. package/nav-list-item.js +6 -5
  91. package/nav-list-item.mjs +38 -37
  92. package/package.json +1 -1
  93. package/{query-duvhtfSs.js → query-680f1868.js} +1 -1
  94. package/{query-assigned-nodes-1p7z6CEm.js → query-assigned-nodes-99eae71d.js} +1 -1
  95. package/{query-assigned-nodes-6yHI5ePh.mjs → query-assigned-nodes-df691e78.mjs} +1 -1
  96. package/{query-1WmuF6Bq.mjs → query-d843aa92.mjs} +1 -1
  97. package/radio-list-item.js +13 -9
  98. package/radio-list-item.mjs +64 -58
  99. package/radio.js +2 -1
  100. package/radio.mjs +25 -23
  101. package/{ripple-handlers-HeGhXgD2.js → ripple-handlers-5d5b21db.js} +8 -8
  102. package/{ripple-handlers-BwaZu9Ps.mjs → ripple-handlers-f37f21cf.mjs} +17 -16
  103. package/select.js +15 -10
  104. package/select.mjs +147 -139
  105. package/side-sheet.js +2 -1
  106. package/side-sheet.mjs +12 -11
  107. package/slider-range.js +1 -1
  108. package/slider-range.mjs +14 -14
  109. package/slider.js +1 -1
  110. package/slider.mjs +16 -16
  111. package/snackbar.js +11 -10
  112. package/snackbar.mjs +36 -34
  113. package/{state-LqPxt99W.js → state-0974a8e5.js} +1 -1
  114. package/{state-inNZe6rL.mjs → state-b5e865db.mjs} +1 -1
  115. package/status-header-item.js +2 -1
  116. package/status-header-item.mjs +4 -3
  117. package/status-header.js +3 -2
  118. package/status-header.mjs +5 -4
  119. package/{style-map-66_3wrLx.js → style-map-88d2563f.js} +1 -1
  120. package/{style-map-8yp6DGeh.mjs → style-map-bc3ed3e0.mjs} +2 -2
  121. package/style.css +1 -1
  122. package/switch.js +3 -2
  123. package/switch.mjs +16 -15
  124. package/tab-bar.js +22 -18
  125. package/tab-bar.mjs +203 -195
  126. package/tab.js +6 -1
  127. package/tab.mjs +32 -26
  128. package/text-lockup.js +2 -1
  129. package/text-lockup.mjs +9 -8
  130. package/textarea.js +19 -15
  131. package/textarea.mjs +65 -59
  132. package/textfield-62e16cc2.js +133 -0
  133. package/textfield-63d1859a.mjs +932 -0
  134. package/textfield.js +7 -3
  135. package/textfield.mjs +36 -30
  136. package/toolbar.js +2 -1
  137. package/toolbar.mjs +10 -9
  138. package/tooltip.js +3 -2
  139. package/tooltip.mjs +10 -9
  140. package/{top-app-bar-qcW2ucE3.js → top-app-bar-a531c1b4.js} +3 -2
  141. package/{top-app-bar-h0V-USh_.mjs → top-app-bar-f83386e0.mjs} +3 -2
  142. package/top-app-bar-fixed.js +6 -6
  143. package/top-app-bar-fixed.mjs +28 -27
  144. package/top-app-bar.js +1 -1
  145. package/top-app-bar.mjs +9 -9
  146. package/tree-list-item.js +2 -1
  147. package/tree-list-item.mjs +7 -6
  148. package/tree-list.js +2 -1
  149. package/tree-list.mjs +3 -2
  150. package/{tslib.es6-S8SvF2K1.mjs → tslib.es6-f3e988cd.mjs} +5 -5
  151. package/typography.js +2 -1
  152. package/typography.mjs +4 -3
  153. package/_commonjsHelpers-ZPn_iTGj.mjs +0 -28
  154. package/_commonjsHelpers-fFrWAeZI.js +0 -1
  155. package/chip-M5Vb5Kd6.js +0 -492
  156. package/chip-m2mKzWQT.mjs +0 -3115
  157. package/chip-set.js +0 -75
  158. package/chip-set.mjs +0 -531
  159. package/chip.js +0 -1
  160. package/chip.mjs +0 -12
  161. package/expansion-panel-item.js +0 -24
  162. package/expansion-panel-item.mjs +0 -106
  163. package/expansion-panel.js +0 -7
  164. package/expansion-panel.mjs +0 -59
  165. package/formfield.js +0 -79
  166. package/formfield.mjs +0 -275
  167. package/list-item-F2e6aWaj.mjs +0 -11
  168. package/list-item-Ze98reWt.js +0 -5
  169. package/mwc-list.css-DjU8XB1m.js +0 -111
  170. package/mwc-menu.css-qavo4jer.js +0 -190
  171. package/mwc-radio.css-h_Wv0Eag.js +0 -105
  172. package/textfield-7aU1kEO6.mjs +0 -936
  173. package/textfield-jvevIGSw.js +0 -136
  174. /package/{aria-property-52VAcg_f.js → aria-property-849c8816.js} +0 -0
  175. /package/{aria-property-wYjPNXcK.mjs → aria-property-fa2717fe.mjs} +0 -0
  176. /package/{inert.esm-TSRtlTFV.js → inert.esm-2cee6f2e.js} +0 -0
  177. /package/{observer-LlGBroG9.js → observer-a096ab43.js} +0 -0
  178. /package/{observer-cKAgu-MI.mjs → observer-be7b92e2.mjs} +0 -0
  179. /package/{property-iZpLBvy-.js → property-57f6f6fe.js} +0 -0
  180. /package/{property-K7hFBmOi.mjs → property-9b6ea53b.mjs} +0 -0
  181. /package/{query-assigned-elements-yFWOzcsT.mjs → query-assigned-elements-4a39219d.mjs} +0 -0
  182. /package/{query-assigned-elements-j_5ZiL65.js → query-assigned-elements-f623705d.js} +0 -0
  183. /package/{tslib.es6-5xG0QhxF.js → tslib.es6-98719205.js} +0 -0
  184. /package/{utils-xAXEDL0Y.mjs → utils-2932417c.mjs} +0 -0
  185. /package/{utils-W3ENJhq-.js → utils-a8190a39.js} +0 -0
@@ -1,111 +0,0 @@
1
- "use strict";const h=require("./tslib.es6-5xG0QhxF.js"),F=require("./query-assigned-elements-j_5ZiL65.js"),B=require("./mwc-list-item.css-yJ5bjNGc.js"),K=require("./base-element-atp_8bvP.js"),C=require("./observer-LlGBroG9.js"),D=require("./utils-W3ENJhq-.js"),A=require("./property-iZpLBvy-.js"),V=require("./query-duvhtfSs.js"),k=require("./query-assigned-nodes-1p7z6CEm.js"),W=require("./if-defined-lAIUwAsA.js");/**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */let w=class extends B.ListItemBase{};w.styles=[B.styles];w=h.__decorate([F.e("mwc-list-item")],w);/**
6
- * @license
7
- * Copyright 2016 Google Inc.
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in
17
- * all copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- * THE SOFTWARE.
26
- */var X=function(){function n(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(n,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),n.prototype.init=function(){},n.prototype.destroy=function(){},n}();/**
27
- * @license
28
- * Copyright 2020 Google Inc.
29
- *
30
- * Permission is hereby granted, free of charge, to any person obtaining a copy
31
- * of this software and associated documentation files (the "Software"), to deal
32
- * in the Software without restriction, including without limitation the rights
33
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
- * copies of the Software, and to permit persons to whom the Software is
35
- * furnished to do so, subject to the following conditions:
36
- *
37
- * The above copyright notice and this permission notice shall be included in
38
- * all copies or substantial portions of the Software.
39
- *
40
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46
- * THE SOFTWARE.
47
- */var d={UNKNOWN:"Unknown",BACKSPACE:"Backspace",ENTER:"Enter",SPACEBAR:"Spacebar",PAGE_UP:"PageUp",PAGE_DOWN:"PageDown",END:"End",HOME:"Home",ARROW_LEFT:"ArrowLeft",ARROW_UP:"ArrowUp",ARROW_RIGHT:"ArrowRight",ARROW_DOWN:"ArrowDown",DELETE:"Delete",ESCAPE:"Escape",TAB:"Tab"},l=new Set;l.add(d.BACKSPACE);l.add(d.ENTER);l.add(d.SPACEBAR);l.add(d.PAGE_UP);l.add(d.PAGE_DOWN);l.add(d.END);l.add(d.HOME);l.add(d.ARROW_LEFT);l.add(d.ARROW_UP);l.add(d.ARROW_RIGHT);l.add(d.ARROW_DOWN);l.add(d.DELETE);l.add(d.ESCAPE);l.add(d.TAB);var m={BACKSPACE:8,ENTER:13,SPACEBAR:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ESCAPE:27,TAB:9},c=new Map;c.set(m.BACKSPACE,d.BACKSPACE);c.set(m.ENTER,d.ENTER);c.set(m.SPACEBAR,d.SPACEBAR);c.set(m.PAGE_UP,d.PAGE_UP);c.set(m.PAGE_DOWN,d.PAGE_DOWN);c.set(m.END,d.END);c.set(m.HOME,d.HOME);c.set(m.ARROW_LEFT,d.ARROW_LEFT);c.set(m.ARROW_UP,d.ARROW_UP);c.set(m.ARROW_RIGHT,d.ARROW_RIGHT);c.set(m.ARROW_DOWN,d.ARROW_DOWN);c.set(m.DELETE,d.DELETE);c.set(m.ESCAPE,d.ESCAPE);c.set(m.TAB,d.TAB);var T=new Set;T.add(d.PAGE_UP);T.add(d.PAGE_DOWN);T.add(d.END);T.add(d.HOME);T.add(d.ARROW_LEFT);T.add(d.ARROW_UP);T.add(d.ARROW_RIGHT);T.add(d.ARROW_DOWN);function S(n){var e=n.key;if(l.has(e))return e;var t=c.get(n.keyCode);return t||d.UNKNOWN}/**
48
- * @license
49
- * Copyright 2018 Google Inc.
50
- *
51
- * Permission is hereby granted, free of charge, to any person obtaining a copy
52
- * of this software and associated documentation files (the "Software"), to deal
53
- * in the Software without restriction, including without limitation the rights
54
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55
- * copies of the Software, and to permit persons to whom the Software is
56
- * furnished to do so, subject to the following conditions:
57
- *
58
- * The above copyright notice and this permission notice shall be included in
59
- * all copies or substantial portions of the Software.
60
- *
61
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67
- * THE SOFTWARE.
68
- */var b,I,r={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"};b={},b[""+r.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",b[""+r.LIST_ITEM_CLASS]="mdc-list-item",b[""+r.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",b[""+r.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",b[""+r.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",b[""+r.ROOT]="mdc-list";var L=(I={},I[""+r.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",I[""+r.LIST_ITEM_CLASS]="mdc-deprecated-list-item",I[""+r.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",I[""+r.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",I[""+r.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",I[""+r.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",I[""+r.ROOT]="mdc-deprecated-list",I),v={ACTION_EVENT:"MDCList:action",SELECTION_CHANGE_EVENT:"MDCList:selectionChange",ARIA_CHECKED:"aria-checked",ARIA_CHECKED_CHECKBOX_SELECTOR:'[role="checkbox"][aria-checked="true"]',ARIA_CHECKED_RADIO_SELECTOR:'[role="radio"][aria-checked="true"]',ARIA_CURRENT:"aria-current",ARIA_DISABLED:"aria-disabled",ARIA_ORIENTATION:"aria-orientation",ARIA_ORIENTATION_HORIZONTAL:"horizontal",ARIA_ROLE_CHECKBOX_SELECTOR:'[role="checkbox"]',ARIA_SELECTED:"aria-selected",ARIA_INTERACTIVE_ROLES_SELECTOR:'[role="listbox"], [role="menu"]',ARIA_MULTI_SELECTABLE_SELECTOR:'[aria-multiselectable="true"]',CHECKBOX_RADIO_SELECTOR:'input[type="checkbox"], input[type="radio"]',CHECKBOX_SELECTOR:'input[type="checkbox"]',CHILD_ELEMENTS_TO_TOGGLE_TABINDEX:`
69
- .`+r.LIST_ITEM_CLASS+` button:not(:disabled),
70
- .`+r.LIST_ITEM_CLASS+` a,
71
- .`+L[r.LIST_ITEM_CLASS]+` button:not(:disabled),
72
- .`+L[r.LIST_ITEM_CLASS]+` a
73
- `,DEPRECATED_SELECTOR:".mdc-deprecated-list",FOCUSABLE_CHILD_ELEMENTS:`
74
- .`+r.LIST_ITEM_CLASS+` button:not(:disabled),
75
- .`+r.LIST_ITEM_CLASS+` a,
76
- .`+r.LIST_ITEM_CLASS+` input[type="radio"]:not(:disabled),
77
- .`+r.LIST_ITEM_CLASS+` input[type="checkbox"]:not(:disabled),
78
- .`+L[r.LIST_ITEM_CLASS]+` button:not(:disabled),
79
- .`+L[r.LIST_ITEM_CLASS]+` a,
80
- .`+L[r.LIST_ITEM_CLASS]+` input[type="radio"]:not(:disabled),
81
- .`+L[r.LIST_ITEM_CLASS]+` input[type="checkbox"]:not(:disabled)
82
- `,RADIO_SELECTOR:'input[type="radio"]',SELECTED_ITEM_SELECTOR:'[aria-selected="true"], [aria-current="true"]'},u={UNSET_INDEX:-1,TYPEAHEAD_BUFFER_CLEAR_TIMEOUT_MS:300};/**
83
- * @license
84
- * Copyright 2020 Google LLC
85
- * SPDX-License-Identifier: Apache-2.0
86
- */const M=(n,e)=>n-e,G=(n,e)=>{const t=Array.from(n),i=Array.from(e),s={added:[],removed:[]},o=t.sort(M),a=i.sort(M);let E=0,g=0;for(;E<o.length||g<a.length;){const _=o[E],p=a[g];if(_===p){E++,g++;continue}if(_!==void 0&&(p===void 0||_<p)){s.removed.push(_),E++;continue}if(p!==void 0&&(_===void 0||p<_)){s.added.push(p),g++;continue}}return s},q=["input","button","textarea","select"];function y(n){return n instanceof Set}const N=n=>{const e=n===u.UNSET_INDEX?new Set:n;return y(e)?new Set(e):new Set([e])};class P extends X{constructor(e){super(Object.assign(Object.assign({},P.defaultAdapter),e)),this.isMulti_=!1,this.wrapFocus_=!1,this.isVertical_=!0,this.selectedIndex_=u.UNSET_INDEX,this.focusedItemIndex_=u.UNSET_INDEX,this.useActivatedClass_=!1,this.ariaCurrentAttrValue_=null}static get strings(){return v}static get numbers(){return u}static get defaultAdapter(){return{focusItemAtIndex:()=>{},getFocusedElementIndex:()=>0,getListItemCount:()=>0,isFocusInsideList:()=>!1,isRootFocused:()=>!1,notifyAction:()=>{},notifySelected:()=>{},getSelectedStateForElementIndex:()=>!1,setDisabledStateForElementIndex:()=>{},getDisabledStateForElementIndex:()=>!1,setSelectedStateForElementIndex:()=>{},setActivatedStateForElementIndex:()=>{},setTabIndexForElementIndex:()=>{},setAttributeForElementIndex:()=>{},getAttributeForElementIndex:()=>null}}setWrapFocus(e){this.wrapFocus_=e}setMulti(e){this.isMulti_=e;const t=this.selectedIndex_;if(e){if(!y(t)){const i=t===u.UNSET_INDEX;this.selectedIndex_=i?new Set:new Set([t])}}else if(y(t))if(t.size){const i=Array.from(t).sort(M);this.selectedIndex_=i[0]}else this.selectedIndex_=u.UNSET_INDEX}setVerticalOrientation(e){this.isVertical_=e}setUseActivatedClass(e){this.useActivatedClass_=e}getSelectedIndex(){return this.selectedIndex_}setSelectedIndex(e){this.isIndexValid_(e)&&(this.isMulti_?this.setMultiSelectionAtIndex_(N(e)):this.setSingleSelectionAtIndex_(e))}handleFocusIn(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,0)}handleFocusOut(e,t){t>=0&&this.adapter.setTabIndexForElementIndex(t,-1),setTimeout(()=>{this.adapter.isFocusInsideList()||this.setTabindexToFirstSelectedItem_()},0)}handleKeydown(e,t,i){const s=S(e)==="ArrowLeft",o=S(e)==="ArrowUp",a=S(e)==="ArrowRight",E=S(e)==="ArrowDown",g=S(e)==="Home",_=S(e)==="End",p=S(e)==="Enter",H=S(e)==="Spacebar";if(this.adapter.isRootFocused()){o||_?(e.preventDefault(),this.focusLastElement()):(E||g)&&(e.preventDefault(),this.focusFirstElement());return}let x=this.adapter.getFocusedElementIndex();if(x===-1&&(x=i,x<0))return;let R;if(this.isVertical_&&E||!this.isVertical_&&a)this.preventDefaultEvent(e),R=this.focusNextElement(x);else if(this.isVertical_&&o||!this.isVertical_&&s)this.preventDefaultEvent(e),R=this.focusPrevElement(x);else if(g)this.preventDefaultEvent(e),R=this.focusFirstElement();else if(_)this.preventDefaultEvent(e),R=this.focusLastElement();else if((p||H)&&t){const U=e.target;if(U&&U.tagName==="A"&&p)return;this.preventDefaultEvent(e),this.setSelectedIndexOnAction_(x,!0)}this.focusedItemIndex_=x,R!==void 0&&(this.setTabindexAtIndex_(R),this.focusedItemIndex_=R)}handleSingleSelection(e,t,i){e!==u.UNSET_INDEX&&(this.setSelectedIndexOnAction_(e,t,i),this.setTabindexAtIndex_(e),this.focusedItemIndex_=e)}focusNextElement(e){const t=this.adapter.getListItemCount();let i=e+1;if(i>=t)if(this.wrapFocus_)i=0;else return e;return this.adapter.focusItemAtIndex(i),i}focusPrevElement(e){let t=e-1;if(t<0)if(this.wrapFocus_)t=this.adapter.getListItemCount()-1;else return e;return this.adapter.focusItemAtIndex(t),t}focusFirstElement(){return this.adapter.focusItemAtIndex(0),0}focusLastElement(){const e=this.adapter.getListItemCount()-1;return this.adapter.focusItemAtIndex(e),e}setEnabled(e,t){this.isIndexValid_(e)&&this.adapter.setDisabledStateForElementIndex(e,!t)}preventDefaultEvent(e){const i=`${e.target.tagName}`.toLowerCase();q.indexOf(i)===-1&&e.preventDefault()}setSingleSelectionAtIndex_(e,t=!0){this.selectedIndex_!==e&&(this.selectedIndex_!==u.UNSET_INDEX&&(this.adapter.setSelectedStateForElementIndex(this.selectedIndex_,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(this.selectedIndex_,!1)),t&&this.adapter.setSelectedStateForElementIndex(e,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(e,!0),this.setAriaForSingleSelectionAtIndex_(e),this.selectedIndex_=e,this.adapter.notifySelected(e))}setMultiSelectionAtIndex_(e,t=!0){const i=N(this.selectedIndex_),s=G(i,e);if(!(!s.removed.length&&!s.added.length)){for(const o of s.removed)t&&this.adapter.setSelectedStateForElementIndex(o,!1),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(o,!1);for(const o of s.added)t&&this.adapter.setSelectedStateForElementIndex(o,!0),this.useActivatedClass_&&this.adapter.setActivatedStateForElementIndex(o,!0);this.selectedIndex_=e,this.adapter.notifySelected(e,s)}}setAriaForSingleSelectionAtIndex_(e){this.selectedIndex_===u.UNSET_INDEX&&(this.ariaCurrentAttrValue_=this.adapter.getAttributeForElementIndex(e,v.ARIA_CURRENT));const t=this.ariaCurrentAttrValue_!==null,i=t?v.ARIA_CURRENT:v.ARIA_SELECTED;this.selectedIndex_!==u.UNSET_INDEX&&this.adapter.setAttributeForElementIndex(this.selectedIndex_,i,"false");const s=t?this.ariaCurrentAttrValue_:"true";this.adapter.setAttributeForElementIndex(e,i,s)}setTabindexAtIndex_(e){this.focusedItemIndex_===u.UNSET_INDEX&&e!==0?this.adapter.setTabIndexForElementIndex(0,-1):this.focusedItemIndex_>=0&&this.focusedItemIndex_!==e&&this.adapter.setTabIndexForElementIndex(this.focusedItemIndex_,-1),this.adapter.setTabIndexForElementIndex(e,0)}setTabindexToFirstSelectedItem_(){let e=0;typeof this.selectedIndex_=="number"&&this.selectedIndex_!==u.UNSET_INDEX?e=this.selectedIndex_:y(this.selectedIndex_)&&this.selectedIndex_.size>0&&(e=Math.min(...this.selectedIndex_)),this.setTabindexAtIndex_(e)}isIndexValid_(e){if(e instanceof Set){if(!this.isMulti_)throw new Error("MDCListFoundation: Array of index is only supported for checkbox based list");if(e.size===0)return!0;{let t=!1;for(const i of e)if(t=this.isIndexInRange_(i),t)break;return t}}else if(typeof e=="number"){if(this.isMulti_)throw new Error("MDCListFoundation: Expected array of index for checkbox based list but got number: "+e);return e===u.UNSET_INDEX||this.isIndexInRange_(e)}else return!1}isIndexInRange_(e){const t=this.adapter.getListItemCount();return e>=0&&e<t}setSelectedIndexOnAction_(e,t,i){if(this.adapter.getDisabledStateForElementIndex(e))return;let s=e;this.isMulti_&&(s=new Set([e])),this.isIndexValid_(s)&&(this.isMulti_?this.toggleMultiAtIndex(e,i,t):t||i?this.setSingleSelectionAtIndex_(e,t):this.selectedIndex_===e&&this.setSingleSelectionAtIndex_(u.UNSET_INDEX),t&&this.adapter.notifyAction(e))}toggleMultiAtIndex(e,t,i=!0){let s=!1;t===void 0?s=!this.adapter.getSelectedStateForElementIndex(e):s=t;const o=N(this.selectedIndex_);s?o.add(e):o.delete(e),this.setMultiSelectionAtIndex_(o,i)}}/**
87
- * @license
88
- * Copyright 2020 Google LLC
89
- * SPDX-License-Identifier: Apache-2.0
90
- */function z(n,e=50){let t;return function(i=!0){clearTimeout(t),t=setTimeout(()=>{n(i)},e)}}const O=n=>n.hasAttribute("mwc-list-item");function $(){const n=this.itemsReadyResolver;this.itemsReady=new Promise(e=>this.itemsReadyResolver=e),n()}class f extends K.BaseElement{constructor(){super(),this.mdcAdapter=null,this.mdcFoundationClass=P,this.activatable=!1,this.multi=!1,this.wrapFocus=!1,this.itemRoles=null,this.innerRole=null,this.innerAriaLabel=null,this.rootTabbable=!1,this.previousTabindex=null,this.noninteractive=!1,this.itemsReadyResolver=()=>{},this.itemsReady=Promise.resolve([]),this.items_=[];const e=z(this.layout.bind(this));this.debouncedLayout=(t=!0)=>{$.call(this),e(t)}}async getUpdateComplete(){const e=await super.getUpdateComplete();return await this.itemsReady,e}get items(){return this.items_}updateItems(){var e;const t=(e=this.assignedElements)!==null&&e!==void 0?e:[],i=[];for(const a of t)O(a)&&(i.push(a),a._managingList=this),a.hasAttribute("divider")&&!a.hasAttribute("role")&&a.setAttribute("role","separator");this.items_=i;const s=new Set;if(this.items_.forEach((a,E)=>{this.itemRoles?a.setAttribute("role",this.itemRoles):a.removeAttribute("role"),a.selected&&s.add(E)}),this.multi)this.select(s);else{const a=s.size?s.entries().next().value[1]:-1;this.select(a)}const o=new Event("items-updated",{bubbles:!0,composed:!0});this.dispatchEvent(o)}get selected(){const e=this.index;if(!y(e))return e===-1?null:this.items[e];const t=[];for(const i of e)t.push(this.items[i]);return t}get index(){return this.mdcFoundation?this.mdcFoundation.getSelectedIndex():-1}render(){const e=this.innerRole===null?void 0:this.innerRole,t=this.innerAriaLabel===null?void 0:this.innerAriaLabel,i=this.rootTabbable?"0":"-1";return F.x`
91
- <!-- @ts-ignore -->
92
- <ul
93
- tabindex=${i}
94
- role="${W.l(e)}"
95
- aria-label="${W.l(t)}"
96
- class="mdc-deprecated-list"
97
- @keydown=${this.onKeydown}
98
- @focusin=${this.onFocusIn}
99
- @focusout=${this.onFocusOut}
100
- @request-selected=${this.onRequestSelected}
101
- @list-item-rendered=${this.onListItemConnected}>
102
- <slot></slot>
103
- ${this.renderPlaceholder()}
104
- </ul>
105
- `}renderPlaceholder(){var e;const t=(e=this.assignedElements)!==null&&e!==void 0?e:[];return this.emptyMessage!==void 0&&t.length===0?F.x`
106
- <mwc-list-item noninteractive>${this.emptyMessage}</mwc-list-item>
107
- `:null}firstUpdated(){super.firstUpdated(),this.items.length||(this.mdcFoundation.setMulti(this.multi),this.layout())}onFocusIn(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusIn(e,t)}}onFocusOut(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e);this.mdcFoundation.handleFocusOut(e,t)}}onKeydown(e){if(this.mdcFoundation&&this.mdcRoot){const t=this.getIndexOfTarget(e),i=e.target,s=O(i);this.mdcFoundation.handleKeydown(e,s,t)}}onRequestSelected(e){if(this.mdcFoundation){let t=this.getIndexOfTarget(e);if(t===-1&&(this.layout(),t=this.getIndexOfTarget(e),t===-1)||this.items[t].disabled)return;const s=e.detail.selected,o=e.detail.source;this.mdcFoundation.handleSingleSelection(t,o==="interaction",s),e.stopPropagation()}}getIndexOfTarget(e){const t=this.items,i=e.composedPath();for(const s of i){let o=-1;if(D.isNodeElement(s)&&O(s)&&(o=t.indexOf(s)),o!==-1)return o}return-1}createAdapter(){return this.mdcAdapter={getListItemCount:()=>this.mdcRoot?this.items.length:0,getFocusedElementIndex:this.getFocusedItemIndex,getAttributeForElementIndex:(e,t)=>{if(!this.mdcRoot)return"";const s=this.items[e];return s?s.getAttribute(t):""},setAttributeForElementIndex:(e,t,i)=>{if(!this.mdcRoot)return;const s=this.items[e];s&&s.setAttribute(t,i)},focusItemAtIndex:e=>{const t=this.items[e];t&&t.focus()},setTabIndexForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.tabindex=t)},notifyAction:e=>{const t={bubbles:!0,composed:!0};t.detail={index:e};const i=new CustomEvent("action",t);this.dispatchEvent(i)},notifySelected:(e,t)=>{const i={bubbles:!0,composed:!0};i.detail={index:e,diff:t};const s=new CustomEvent("selected",i);this.dispatchEvent(s)},isFocusInsideList:()=>D.doesElementContainFocus(this),isRootFocused:()=>{const e=this.mdcRoot;return e.getRootNode().activeElement===e},setDisabledStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.disabled=t)},getDisabledStateForElementIndex:e=>{const t=this.items[e];return t?t.disabled:!1},setSelectedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.selected=t)},getSelectedStateForElementIndex:e=>{const t=this.items[e];return t?t.selected:!1},setActivatedStateForElementIndex:(e,t)=>{const i=this.items[e];i&&(i.activated=t)}},this.mdcAdapter}selectUi(e,t=!1){const i=this.items[e];i&&(i.selected=!0,i.activated=t)}deselectUi(e){const t=this.items[e];t&&(t.selected=!1,t.activated=!1)}select(e){this.mdcFoundation&&this.mdcFoundation.setSelectedIndex(e)}toggle(e,t){this.multi&&this.mdcFoundation.toggleMultiAtIndex(e,t)}onListItemConnected(e){const t=e.target;this.layout(this.items.indexOf(t)===-1)}layout(e=!0){e&&this.updateItems();const t=this.items[0];for(const i of this.items)i.tabindex=-1;t&&(this.noninteractive?this.previousTabindex||(this.previousTabindex=t):t.tabindex=0),this.itemsReadyResolver()}getFocusedItemIndex(){if(!this.mdcRoot||!this.items.length)return-1;const e=D.deepActiveElementPath();if(!e.length)return-1;for(let t=e.length-1;t>=0;t--){const i=e[t];if(O(i))return this.items.indexOf(i)}return-1}focusItemAtIndex(e){for(const t of this.items)if(t.tabindex===0){t.tabindex=-1;break}this.items[e].tabindex=0,this.items[e].focus()}focus(){const e=this.mdcRoot;e&&e.focus()}blur(){const e=this.mdcRoot;e&&e.blur()}}h.__decorate([A.n({type:String})],f.prototype,"emptyMessage",void 0);h.__decorate([V.i(".mdc-deprecated-list")],f.prototype,"mdcRoot",void 0);h.__decorate([k.o("",!0,"*")],f.prototype,"assignedElements",void 0);h.__decorate([k.o("",!0,'[tabindex="0"]')],f.prototype,"tabbableElements",void 0);h.__decorate([A.n({type:Boolean}),C.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setUseActivatedClass(n)})],f.prototype,"activatable",void 0);h.__decorate([A.n({type:Boolean}),C.observer(function(n,e){this.mdcFoundation&&this.mdcFoundation.setMulti(n),e!==void 0&&this.layout()})],f.prototype,"multi",void 0);h.__decorate([A.n({type:Boolean}),C.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setWrapFocus(n)})],f.prototype,"wrapFocus",void 0);h.__decorate([A.n({type:String}),C.observer(function(n,e){e!==void 0&&this.updateItems()})],f.prototype,"itemRoles",void 0);h.__decorate([A.n({type:String})],f.prototype,"innerRole",void 0);h.__decorate([A.n({type:String})],f.prototype,"innerAriaLabel",void 0);h.__decorate([A.n({type:Boolean})],f.prototype,"rootTabbable",void 0);h.__decorate([A.n({type:Boolean,reflect:!0}),C.observer(function(n){var e,t;if(n){const i=(t=(e=this.tabbableElements)===null||e===void 0?void 0:e[0])!==null&&t!==void 0?t:null;this.previousTabindex=i,i&&i.setAttribute("tabindex","-1")}else!n&&this.previousTabindex&&(this.previousTabindex.setAttribute("tabindex","0"),this.previousTabindex=null)})],f.prototype,"noninteractive",void 0);/**
108
- * @license
109
- * Copyright 2021 Google LLC
110
- * SPDX-LIcense-Identifier: Apache-2.0
111
- */const j=F.i`@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{display:block}.mdc-deprecated-list{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto, sans-serif;font-family:var(--mdc-typography-subtitle1-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:1rem;font-size:var(--mdc-typography-subtitle1-font-size, 1rem);line-height:1.75rem;line-height:var(--mdc-typography-subtitle1-line-height, 1.75rem);font-weight:400;font-weight:var(--mdc-typography-subtitle1-font-weight, 400);letter-spacing:0.009375em;letter-spacing:var(--mdc-typography-subtitle1-letter-spacing, 0.009375em);text-decoration:inherit;text-decoration:var(--mdc-typography-subtitle1-text-decoration, inherit);text-transform:inherit;text-transform:var(--mdc-typography-subtitle1-text-transform, inherit);line-height:1.5rem;margin:0;padding:8px 0;list-style-type:none;color:rgba(0, 0, 0, 0.87);color:var(--mdc-theme-text-primary-on-background, rgba(0, 0, 0, 0.87));padding:var(--mdc-list-vertical-padding, 8px) 0}.mdc-deprecated-list:focus{outline:none}.mdc-deprecated-list-item{height:48px}.mdc-deprecated-list--dense{padding-top:4px;padding-bottom:4px;font-size:.812rem}.mdc-deprecated-list ::slotted([divider]){height:0;margin:0;border:none;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgba(0, 0, 0, 0.12)}.mdc-deprecated-list ::slotted([divider][padded]){margin:0 var(--mdc-list-side-padding, 16px)}.mdc-deprecated-list ::slotted([divider][inset]){margin-left:var(--mdc-list-inset-margin, 72px);margin-right:0;width:calc( 100% - var(--mdc-list-inset-margin, 72px) )}[dir=rtl] .mdc-deprecated-list ::slotted([divider][inset]),.mdc-deprecated-list ::slotted([divider][inset][dir=rtl]){margin-left:0;margin-right:var(--mdc-list-inset-margin, 72px)}.mdc-deprecated-list ::slotted([divider][inset][padded]){width:calc( 100% - var(--mdc-list-inset-margin, 72px) - var(--mdc-list-side-padding, 16px) )}.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:40px}.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 20px}.mdc-deprecated-list--two-line.mdc-deprecated-list--dense ::slotted([mwc-list-item]),.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list-item]){height:60px}.mdc-deprecated-list--avatar-list.mdc-deprecated-list--dense ::slotted([mwc-list]){--mdc-list-item-graphic-size: 36px}:host([noninteractive]){pointer-events:none;cursor:default}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text){display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::before{display:inline-block;width:0;height:24px;content:"";vertical-align:0}.mdc-deprecated-list--dense ::slotted(.mdc-deprecated-list-item__primary-text)::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}`;exports.ListBase=f;exports.styles=j;
@@ -1,190 +0,0 @@
1
- "use strict";const o=require("./tslib.es6-5xG0QhxF.js"),A=require("./query-assigned-elements-j_5ZiL65.js"),U=require("./mwc-list.css-DjU8XB1m.js"),q=require("./base-element-atp_8bvP.js"),E=require("./observer-LlGBroG9.js"),D=require("./utils-W3ENJhq-.js"),a=require("./property-iZpLBvy-.js"),v=require("./state-LqPxt99W.js"),F=require("./query-duvhtfSs.js"),P=require("./class-map-wtcW44Of.js"),j=require("./style-map-66_3wrLx.js");/**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */let k=class extends U.ListBase{};k.styles=[U.styles];k=o.__decorate([A.e("mwc-list")],k);/**
6
- * @license
7
- * Copyright 2018 Google Inc.
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in
17
- * all copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- * THE SOFTWARE.
26
- */var W={ANCHOR:"mdc-menu-surface--anchor",ANIMATING_CLOSED:"mdc-menu-surface--animating-closed",ANIMATING_OPEN:"mdc-menu-surface--animating-open",FIXED:"mdc-menu-surface--fixed",IS_OPEN_BELOW:"mdc-menu-surface--is-open-below",OPEN:"mdc-menu-surface--open",ROOT:"mdc-menu-surface"},X={CLOSED_EVENT:"MDCMenuSurface:closed",CLOSING_EVENT:"MDCMenuSurface:closing",OPENED_EVENT:"MDCMenuSurface:opened",OPENING_EVENT:"MDCMenuSurface:opening",FOCUSABLE_ELEMENTS:["button:not(:disabled)",'[href]:not([aria-disabled="true"])',"input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)",'[tabindex]:not([tabindex="-1"]):not([aria-disabled="true"])'].join(", ")},x={TRANSITION_OPEN_DURATION:120,TRANSITION_CLOSE_DURATION:75,MARGIN_TO_EDGE:32,ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO:.67,TOUCH_EVENT_WAIT_MS:30},l;(function(n){n[n.BOTTOM=1]="BOTTOM",n[n.CENTER=2]="CENTER",n[n.RIGHT=4]="RIGHT",n[n.FLIP_RTL=8]="FLIP_RTL"})(l||(l={}));var m;(function(n){n[n.TOP_LEFT=0]="TOP_LEFT",n[n.TOP_RIGHT=4]="TOP_RIGHT",n[n.BOTTOM_LEFT=1]="BOTTOM_LEFT",n[n.BOTTOM_RIGHT=5]="BOTTOM_RIGHT",n[n.TOP_START=8]="TOP_START",n[n.TOP_END=12]="TOP_END",n[n.BOTTOM_START=9]="BOTTOM_START",n[n.BOTTOM_END=13]="BOTTOM_END"})(m||(m={}));/**
27
- * @license
28
- * Copyright 2016 Google Inc.
29
- *
30
- * Permission is hereby granted, free of charge, to any person obtaining a copy
31
- * of this software and associated documentation files (the "Software"), to deal
32
- * in the Software without restriction, including without limitation the rights
33
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
- * copies of the Software, and to permit persons to whom the Software is
35
- * furnished to do so, subject to the following conditions:
36
- *
37
- * The above copyright notice and this permission notice shall be included in
38
- * all copies or substantial portions of the Software.
39
- *
40
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46
- * THE SOFTWARE.
47
- */var V=function(){function n(t){t===void 0&&(t={}),this.adapter=t}return Object.defineProperty(n,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(n,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),n.prototype.init=function(){},n.prototype.destroy=function(){},n}();/**
48
- * @license
49
- * Copyright 2018 Google Inc.
50
- *
51
- * Permission is hereby granted, free of charge, to any person obtaining a copy
52
- * of this software and associated documentation files (the "Software"), to deal
53
- * in the Software without restriction, including without limitation the rights
54
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55
- * copies of the Software, and to permit persons to whom the Software is
56
- * furnished to do so, subject to the following conditions:
57
- *
58
- * The above copyright notice and this permission notice shall be included in
59
- * all copies or substantial portions of the Software.
60
- *
61
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67
- * THE SOFTWARE.
68
- */var K=function(n){o.__extends(t,n);function t(e){var i=n.call(this,o.__assign(o.__assign({},t.defaultAdapter),e))||this;return i.isSurfaceOpen=!1,i.isQuickOpen=!1,i.isHoistedElement=!1,i.isFixedPosition=!1,i.isHorizontallyCenteredOnViewport=!1,i.maxHeight=0,i.openBottomBias=0,i.openAnimationEndTimerId=0,i.closeAnimationEndTimerId=0,i.animationRequestId=0,i.anchorCorner=m.TOP_START,i.originCorner=m.TOP_START,i.anchorMargin={top:0,right:0,bottom:0,left:0},i.position={x:0,y:0},i}return Object.defineProperty(t,"cssClasses",{get:function(){return W},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(t,"Corner",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},hasClass:function(){return!1},hasAnchor:function(){return!1},isElementInContainer:function(){return!1},isFocused:function(){return!1},isRtl:function(){return!1},getInnerDimensions:function(){return{height:0,width:0}},getAnchorDimensions:function(){return null},getWindowDimensions:function(){return{height:0,width:0}},getBodyDimensions:function(){return{height:0,width:0}},getWindowScroll:function(){return{x:0,y:0}},setPosition:function(){},setMaxHeight:function(){},setTransformOrigin:function(){},saveFocus:function(){},restoreFocus:function(){},notifyClose:function(){},notifyClosing:function(){},notifyOpen:function(){},notifyOpening:function(){}}},enumerable:!1,configurable:!0}),t.prototype.init=function(){var e=t.cssClasses,i=e.ROOT,s=e.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(s)&&(this.isSurfaceOpen=!0)},t.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},t.prototype.setAnchorCorner=function(e){this.anchorCorner=e},t.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^l.RIGHT},t.prototype.setAnchorMargin=function(e){this.anchorMargin.top=e.top||0,this.anchorMargin.right=e.right||0,this.anchorMargin.bottom=e.bottom||0,this.anchorMargin.left=e.left||0},t.prototype.setIsHoisted=function(e){this.isHoistedElement=e},t.prototype.setFixedPosition=function(e){this.isFixedPosition=e},t.prototype.isFixed=function(){return this.isFixedPosition},t.prototype.setAbsolutePosition=function(e,i){this.position.x=this.isFinite(e)?e:0,this.position.y=this.isFinite(i)?i:0},t.prototype.setIsHorizontallyCenteredOnViewport=function(e){this.isHorizontallyCenteredOnViewport=e},t.prototype.setQuickOpen=function(e){this.isQuickOpen=e},t.prototype.setMaxHeight=function(e){this.maxHeight=e},t.prototype.setOpenBottomBias=function(e){this.openBottomBias=e},t.prototype.isOpen=function(){return this.isSurfaceOpen},t.prototype.open=function(){var e=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(t.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(t.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){e.dimensions=e.adapter.getInnerDimensions(),e.autoposition(),e.adapter.addClass(t.cssClasses.OPEN),e.openAnimationEndTimerId=setTimeout(function(){e.openAnimationEndTimerId=0,e.adapter.removeClass(t.cssClasses.ANIMATING_OPEN),e.adapter.notifyOpen()},x.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},t.prototype.close=function(e){var i=this;if(e===void 0&&(e=!1),!!this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen){this.isSurfaceOpen=!1,e||this.maybeRestoreFocus(),this.adapter.removeClass(t.cssClasses.OPEN),this.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose();return}this.adapter.addClass(t.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){i.adapter.removeClass(t.cssClasses.OPEN),i.adapter.removeClass(t.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout(function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(t.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()},x.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,e||this.maybeRestoreFocus()}},t.prototype.handleBodyClick=function(e){var i=e.target;this.adapter.isElementInContainer(i)||this.close()},t.prototype.handleKeydown=function(e){var i=e.keyCode,s=e.key,r=s==="Escape"||i===27;r&&this.close()},t.prototype.autoposition=function(){var e;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),s=this.getMenuSurfaceMaxHeight(i),r=this.hasBit(i,l.BOTTOM)?"bottom":"top",c=this.hasBit(i,l.RIGHT)?"right":"left",p=this.getHorizontalOriginOffset(i),M=this.getVerticalOriginOffset(i),I=this.measurements,S=I.anchorSize,g=I.surfaceSize,f=(e={},e[c]=p,e[r]=M,e);S.width/g.width>x.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(c="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(f),this.adapter.setTransformOrigin(c+" "+r),this.adapter.setPosition(f),this.adapter.setMaxHeight(s?s+"px":""),this.hasBit(i,l.BOTTOM)||this.adapter.addClass(t.cssClasses.IS_OPEN_BELOW)},t.prototype.getAutoLayoutmeasurements=function(){var e=this.adapter.getAnchorDimensions(),i=this.adapter.getBodyDimensions(),s=this.adapter.getWindowDimensions(),r=this.adapter.getWindowScroll();return e||(e={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:e,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:e.top,right:s.width-e.right,bottom:s.height-e.bottom,left:e.left},viewportSize:s,windowScroll:r}},t.prototype.getoriginCorner=function(){var e=this.originCorner,i=this.measurements,s=i.viewportDistance,r=i.anchorSize,c=i.surfaceSize,p=t.numbers.MARGIN_TO_EDGE,M=this.hasBit(this.anchorCorner,l.BOTTOM),I,S;M?(I=s.top-p+this.anchorMargin.bottom,S=s.bottom-p-this.anchorMargin.bottom):(I=s.top-p+this.anchorMargin.top,S=s.bottom-p+r.height-this.anchorMargin.top);var g=S-c.height>0;!g&&I>S+this.openBottomBias&&(e=this.setBit(e,l.BOTTOM));var f=this.adapter.isRtl(),T=this.hasBit(this.anchorCorner,l.FLIP_RTL),_=this.hasBit(this.anchorCorner,l.RIGHT)||this.hasBit(e,l.RIGHT),C=!1;f&&T?C=!_:C=_;var w,B;C?(w=s.left+r.width+this.anchorMargin.right,B=s.right-this.anchorMargin.right):(w=s.left+this.anchorMargin.left,B=s.right+r.width-this.anchorMargin.left);var N=w-c.width>0,G=B-c.width>0,$=this.hasBit(e,l.FLIP_RTL)&&this.hasBit(e,l.RIGHT);return G&&$&&f||!N&&$?e=this.unsetBit(e,l.RIGHT):(N&&C&&f||N&&!C&&_||!G&&w>=B)&&(e=this.setBit(e,l.RIGHT)),e},t.prototype.getMenuSurfaceMaxHeight=function(e){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,s=0,r=this.hasBit(e,l.BOTTOM),c=this.hasBit(this.anchorCorner,l.BOTTOM),p=t.numbers.MARGIN_TO_EDGE;return r?(s=i.top+this.anchorMargin.top-p,c||(s+=this.measurements.anchorSize.height)):(s=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-p,c&&(s-=this.measurements.anchorSize.height)),s},t.prototype.getHorizontalOriginOffset=function(e){var i=this.measurements.anchorSize,s=this.hasBit(e,l.RIGHT),r=this.hasBit(this.anchorCorner,l.RIGHT);if(s){var c=r?i.width-this.anchorMargin.left:this.anchorMargin.right;return this.isHoistedElement||this.isFixedPosition?c-(this.measurements.viewportSize.width-this.measurements.bodySize.width):c}return r?i.width-this.anchorMargin.right:this.anchorMargin.left},t.prototype.getVerticalOriginOffset=function(e){var i=this.measurements.anchorSize,s=this.hasBit(e,l.BOTTOM),r=this.hasBit(this.anchorCorner,l.BOTTOM),c=0;return s?c=r?i.height-this.anchorMargin.top:-this.anchorMargin.bottom:c=r?i.height+this.anchorMargin.bottom:this.anchorMargin.top,c},t.prototype.adjustPositionForHoistedElement=function(e){var i,s,r=this.measurements,c=r.windowScroll,p=r.viewportDistance,M=r.surfaceSize,I=r.viewportSize,S=Object.keys(e);try{for(var g=o.__values(S),f=g.next();!f.done;f=g.next()){var T=f.value,_=e[T]||0;if(this.isHorizontallyCenteredOnViewport&&(T==="left"||T==="right")){e[T]=(I.width-M.width)/2;continue}_+=p[T],this.isFixedPosition||(T==="top"?_+=c.y:T==="bottom"?_-=c.y:T==="left"?_+=c.x:_-=c.x),e[T]=_}}catch(C){i={error:C}}finally{try{f&&!f.done&&(s=g.return)&&s.call(g)}finally{if(i)throw i.error}}},t.prototype.maybeRestoreFocus=function(){var e=this,i=this.adapter.isFocused(),s=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,r=s.activeElement&&this.adapter.isElementInContainer(s.activeElement);(i||r)&&setTimeout(function(){e.adapter.restoreFocus()},x.TOUCH_EVENT_WAIT_MS)},t.prototype.hasBit=function(e,i){return!!(e&i)},t.prototype.setBit=function(e,i){return e|i},t.prototype.unsetBit=function(e,i){return e^i},t.prototype.isFinite=function(e){return typeof e=="number"&&isFinite(e)},t}(V);/**
69
- * @license
70
- * Copyright 2020 Google LLC
71
- * SPDX-License-Identifier: Apache-2.0
72
- */const Q={TOP_LEFT:m.TOP_LEFT,TOP_RIGHT:m.TOP_RIGHT,BOTTOM_LEFT:m.BOTTOM_LEFT,BOTTOM_RIGHT:m.BOTTOM_RIGHT,TOP_START:m.TOP_START,TOP_END:m.TOP_END,BOTTOM_START:m.BOTTOM_START,BOTTOM_END:m.BOTTOM_END};class h extends q.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=K,this.absolute=!1,this.fullwidth=!1,this.fixed=!1,this.x=null,this.y=null,this.quick=!1,this.open=!1,this.stayOpenOnBodyClick=!1,this.bitwiseCorner=m.TOP_START,this.previousMenuCorner=null,this.menuCorner="START",this.corner="TOP_START",this.styleTop="",this.styleLeft="",this.styleRight="",this.styleBottom="",this.styleMaxHeight="",this.styleTransformOrigin="",this.anchor=null,this.previouslyFocused=null,this.previousAnchor=null,this.onBodyClickBound=()=>{}}render(){return this.renderSurface()}renderSurface(){const t=this.getRootClasses(),e=this.getRootStyles();return A.x`
73
- <div
74
- class=${P.o(t)}
75
- style="${j.o(e)}"
76
- @keydown=${this.onKeydown}
77
- @opened=${this.registerBodyClick}
78
- @closed=${this.deregisterBodyClick}>
79
- ${this.renderContent()}
80
- </div>`}getRootClasses(){return{"mdc-menu-surface":!0,"mdc-menu-surface--fixed":this.fixed,"mdc-menu-surface--fullwidth":this.fullwidth}}getRootStyles(){return{top:this.styleTop,left:this.styleLeft,right:this.styleRight,bottom:this.styleBottom,"max-height":this.styleMaxHeight,"transform-origin":this.styleTransformOrigin}}renderContent(){return A.x`<slot></slot>`}createAdapter(){return Object.assign(Object.assign({},D.addHasRemoveClass(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const t={bubbles:!0,composed:!0},e=new CustomEvent("closed",t);this.open=!1,this.mdcRoot.dispatchEvent(e)},notifyClosing:()=>{const t={bubbles:!0,composed:!0},e=new CustomEvent("closing",t);this.mdcRoot.dispatchEvent(e)},notifyOpen:()=>{const t={bubbles:!0,composed:!0},e=new CustomEvent("opened",t);this.open=!0,this.mdcRoot.dispatchEvent(e)},notifyOpening:()=>{const t={bubbles:!0,composed:!0},e=new CustomEvent("opening",t);this.mdcRoot.dispatchEvent(e)},isElementInContainer:()=>!1,isRtl:()=>this.mdcRoot?getComputedStyle(this.mdcRoot).direction==="rtl":!1,setTransformOrigin:t=>{this.mdcRoot&&(this.styleTransformOrigin=t)},isFocused:()=>D.doesElementContainFocus(this),saveFocus:()=>{const t=D.deepActiveElementPath(),e=t.length;e||(this.previouslyFocused=null),this.previouslyFocused=t[e-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const t=this.mdcRoot;return t?{width:t.offsetWidth,height:t.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const t=this.anchor;return t?t.getBoundingClientRect():null},getBodyDimensions:()=>({width:document.body.clientWidth,height:document.body.clientHeight}),getWindowDimensions:()=>({width:window.innerWidth,height:window.innerHeight}),getWindowScroll:()=>({x:window.pageXOffset,y:window.pageYOffset}),setPosition:t=>{this.mdcRoot&&(this.styleLeft="left"in t?`${t.left}px`:"",this.styleRight="right"in t?`${t.right}px`:"",this.styleTop="top"in t?`${t.top}px`:"",this.styleBottom="bottom"in t?`${t.bottom}px`:"")},setMaxHeight:async t=>{this.mdcRoot&&(this.styleMaxHeight=t,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${t})`)}})}onKeydown(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}onBodyClick(t){if(this.stayOpenOnBodyClick)return;t.composedPath().indexOf(this)===-1&&this.close()}registerBodyClick(){this.onBodyClickBound=this.onBodyClick.bind(this),document.body.addEventListener("click",this.onBodyClickBound,{passive:!0,capture:!0})}deregisterBodyClick(){document.body.removeEventListener("click",this.onBodyClickBound,{capture:!0})}onOpenChanged(t,e){this.mdcFoundation&&(t?this.mdcFoundation.open():e!==void 0&&this.mdcFoundation.close())}close(){this.open=!1}show(){this.open=!0}}o.__decorate([F.i(".mdc-menu-surface")],h.prototype,"mdcRoot",void 0);o.__decorate([F.i("slot")],h.prototype,"slotElement",void 0);o.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(n)})],h.prototype,"absolute",void 0);o.__decorate([a.n({type:Boolean})],h.prototype,"fullwidth",void 0);o.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(n)})],h.prototype,"fixed",void 0);o.__decorate([a.n({type:Number}),E.observer(function(n){this.mdcFoundation&&this.y!==null&&n!==null&&(this.mdcFoundation.setAbsolutePosition(n,this.y),this.mdcFoundation.setAnchorMargin({left:n,top:this.y,right:-n,bottom:this.y}))})],h.prototype,"x",void 0);o.__decorate([a.n({type:Number}),E.observer(function(n){this.mdcFoundation&&this.x!==null&&n!==null&&(this.mdcFoundation.setAbsolutePosition(this.x,n),this.mdcFoundation.setAnchorMargin({left:this.x,top:n,right:-this.x,bottom:n}))})],h.prototype,"y",void 0);o.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(n)})],h.prototype,"quick",void 0);o.__decorate([a.n({type:Boolean,reflect:!0}),E.observer(function(n,t){this.onOpenChanged(n,t)})],h.prototype,"open",void 0);o.__decorate([a.n({type:Boolean})],h.prototype,"stayOpenOnBodyClick",void 0);o.__decorate([v.t(),E.observer(function(n){this.mdcFoundation&&(n?this.mdcFoundation.setAnchorCorner(n):this.mdcFoundation.setAnchorCorner(n))})],h.prototype,"bitwiseCorner",void 0);o.__decorate([a.n({type:String}),E.observer(function(n){if(this.mdcFoundation){const t=n==="START"||n==="END",e=this.previousMenuCorner===null,i=!e&&n!==this.previousMenuCorner;t&&(i||e&&n==="END")&&(this.bitwiseCorner=this.bitwiseCorner^l.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=n)}})],h.prototype,"menuCorner",void 0);o.__decorate([a.n({type:String}),E.observer(function(n){if(this.mdcFoundation&&n){let t=Q[n];this.menuCorner==="END"&&(t=t^l.RIGHT),this.bitwiseCorner=t}})],h.prototype,"corner",void 0);o.__decorate([v.t()],h.prototype,"styleTop",void 0);o.__decorate([v.t()],h.prototype,"styleLeft",void 0);o.__decorate([v.t()],h.prototype,"styleRight",void 0);o.__decorate([v.t()],h.prototype,"styleBottom",void 0);o.__decorate([v.t()],h.prototype,"styleMaxHeight",void 0);o.__decorate([v.t()],h.prototype,"styleTransformOrigin",void 0);/**
81
- * @license
82
- * Copyright 2021 Google LLC
83
- * SPDX-LIcense-Identifier: Apache-2.0
84
- */const Y=A.i`.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;transition:opacity .03s linear,transform .12s cubic-bezier(0, 0, 0.2, 1),height 250ms cubic-bezier(0, 0, 0.2, 1);box-shadow:0px 5px 5px -3px rgba(0, 0, 0, 0.2),0px 8px 10px 1px rgba(0, 0, 0, 0.14),0px 3px 14px 2px rgba(0,0,0,.12);background-color:#fff;background-color:var(--mdc-theme-surface, #fff);color:#000;color:var(--mdc-theme-on-surface, #000);border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0;transition:opacity .075s linear}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}:host(:not([open])){display:none}.mdc-menu-surface{z-index:8;z-index:var(--mdc-menu-z-index, 8);min-width:112px;min-width:var(--mdc-menu-min-width, 112px)}`;/**
85
- * @license
86
- * Copyright 2020 Google LLC
87
- * SPDX-License-Identifier: Apache-2.0
88
- */let z=class extends h{};z.styles=[Y];z=o.__decorate([A.e("mwc-menu-surface")],z);/**
89
- * @license
90
- * Copyright 2018 Google Inc.
91
- *
92
- * Permission is hereby granted, free of charge, to any person obtaining a copy
93
- * of this software and associated documentation files (the "Software"), to deal
94
- * in the Software without restriction, including without limitation the rights
95
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
96
- * copies of the Software, and to permit persons to whom the Software is
97
- * furnished to do so, subject to the following conditions:
98
- *
99
- * The above copyright notice and this permission notice shall be included in
100
- * all copies or substantial portions of the Software.
101
- *
102
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
103
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
104
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
105
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
106
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
107
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
108
- * THE SOFTWARE.
109
- */var H={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},R={ARIA_CHECKED_ATTR:"aria-checked",ARIA_DISABLED_ATTR:"aria-disabled",CHECKBOX_SELECTOR:'input[type="checkbox"]',LIST_SELECTOR:".mdc-list,.mdc-deprecated-list",SELECTED_EVENT:"MDCMenu:selected",SKIP_RESTORE_FOCUS:"data-menu-item-skip-restore-focus"},Z={FOCUS_ROOT_INDEX:-1},b;(function(n){n[n.NONE=0]="NONE",n[n.LIST_ROOT=1]="LIST_ROOT",n[n.FIRST_ITEM=2]="FIRST_ITEM",n[n.LAST_ITEM=3]="LAST_ITEM"})(b||(b={}));/**
110
- * @license
111
- * Copyright 2018 Google Inc.
112
- *
113
- * Permission is hereby granted, free of charge, to any person obtaining a copy
114
- * of this software and associated documentation files (the "Software"), to deal
115
- * in the Software without restriction, including without limitation the rights
116
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
117
- * copies of the Software, and to permit persons to whom the Software is
118
- * furnished to do so, subject to the following conditions:
119
- *
120
- * The above copyright notice and this permission notice shall be included in
121
- * all copies or substantial portions of the Software.
122
- *
123
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
124
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
125
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
126
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
127
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
128
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
129
- * THE SOFTWARE.
130
- */var O,y,d={LIST_ITEM_ACTIVATED_CLASS:"mdc-list-item--activated",LIST_ITEM_CLASS:"mdc-list-item",LIST_ITEM_DISABLED_CLASS:"mdc-list-item--disabled",LIST_ITEM_SELECTED_CLASS:"mdc-list-item--selected",LIST_ITEM_TEXT_CLASS:"mdc-list-item__text",LIST_ITEM_PRIMARY_TEXT_CLASS:"mdc-list-item__primary-text",ROOT:"mdc-list"};O={},O[""+d.LIST_ITEM_ACTIVATED_CLASS]="mdc-list-item--activated",O[""+d.LIST_ITEM_CLASS]="mdc-list-item",O[""+d.LIST_ITEM_DISABLED_CLASS]="mdc-list-item--disabled",O[""+d.LIST_ITEM_SELECTED_CLASS]="mdc-list-item--selected",O[""+d.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-list-item__primary-text",O[""+d.ROOT]="mdc-list";var L=(y={},y[""+d.LIST_ITEM_ACTIVATED_CLASS]="mdc-deprecated-list-item--activated",y[""+d.LIST_ITEM_CLASS]="mdc-deprecated-list-item",y[""+d.LIST_ITEM_DISABLED_CLASS]="mdc-deprecated-list-item--disabled",y[""+d.LIST_ITEM_SELECTED_CLASS]="mdc-deprecated-list-item--selected",y[""+d.LIST_ITEM_TEXT_CLASS]="mdc-deprecated-list-item__text",y[""+d.LIST_ITEM_PRIMARY_TEXT_CLASS]="mdc-deprecated-list-item__primary-text",y[""+d.ROOT]="mdc-deprecated-list",y);""+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+L[d.LIST_ITEM_CLASS]+L[d.LIST_ITEM_CLASS],""+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+d.LIST_ITEM_CLASS+L[d.LIST_ITEM_CLASS]+L[d.LIST_ITEM_CLASS]+L[d.LIST_ITEM_CLASS]+L[d.LIST_ITEM_CLASS];/**
131
- * @license
132
- * Copyright 2018 Google Inc.
133
- *
134
- * Permission is hereby granted, free of charge, to any person obtaining a copy
135
- * of this software and associated documentation files (the "Software"), to deal
136
- * in the Software without restriction, including without limitation the rights
137
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
138
- * copies of the Software, and to permit persons to whom the Software is
139
- * furnished to do so, subject to the following conditions:
140
- *
141
- * The above copyright notice and this permission notice shall be included in
142
- * all copies or substantial portions of the Software.
143
- *
144
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
145
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
146
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
147
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
148
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
149
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
150
- * THE SOFTWARE.
151
- */var J=function(n){o.__extends(t,n);function t(e){var i=n.call(this,o.__assign(o.__assign({},t.defaultAdapter),e))||this;return i.closeAnimationEndTimerId=0,i.defaultFocusState=b.LIST_ROOT,i.selectedIndex=-1,i}return Object.defineProperty(t,"cssClasses",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return R},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return Z},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{addClassToElementAtIndex:function(){},removeClassFromElementAtIndex:function(){},addAttributeToElementAtIndex:function(){},removeAttributeFromElementAtIndex:function(){},getAttributeFromElementAtIndex:function(){return null},elementContainsClass:function(){return!1},closeSurface:function(){},getElementIndex:function(){return-1},notifySelected:function(){},getMenuItemCount:function(){return 0},focusItemAtIndex:function(){},focusListRoot:function(){},getSelectedSiblingOfItemAtIndex:function(){return-1},isSelectableItemAtIndex:function(){return!1}}},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},t.prototype.handleKeydown=function(e){var i=e.key,s=e.keyCode,r=i==="Tab"||s===9;r&&this.adapter.closeSurface(!0)},t.prototype.handleItemAction=function(e){var i=this,s=this.adapter.getElementIndex(e);if(!(s<0)){this.adapter.notifySelected({index:s});var r=this.adapter.getAttributeFromElementAtIndex(s,R.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(r),this.closeAnimationEndTimerId=setTimeout(function(){var c=i.adapter.getElementIndex(e);c>=0&&i.adapter.isSelectableItemAtIndex(c)&&i.setSelectedIndex(c)},K.numbers.TRANSITION_CLOSE_DURATION)}},t.prototype.handleMenuSurfaceOpened=function(){switch(this.defaultFocusState){case b.FIRST_ITEM:this.adapter.focusItemAtIndex(0);break;case b.LAST_ITEM:this.adapter.focusItemAtIndex(this.adapter.getMenuItemCount()-1);break;case b.NONE:break;default:this.adapter.focusListRoot();break}},t.prototype.setDefaultFocusState=function(e){this.defaultFocusState=e},t.prototype.getSelectedIndex=function(){return this.selectedIndex},t.prototype.setSelectedIndex=function(e){if(this.validatedIndex(e),!this.adapter.isSelectableItemAtIndex(e))throw new Error("MDCMenuFoundation: No selection group at specified index.");var i=this.adapter.getSelectedSiblingOfItemAtIndex(e);i>=0&&(this.adapter.removeAttributeFromElementAtIndex(i,R.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(i,H.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(e,H.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(e,R.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=e},t.prototype.setEnabled=function(e,i){this.validatedIndex(e),i?(this.adapter.removeClassFromElementAtIndex(e,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,R.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,R.ARIA_DISABLED_ATTR,"true"))},t.prototype.validatedIndex=function(e){var i=this.adapter.getMenuItemCount(),s=e>=0&&e<i;if(!s)throw new Error("MDCMenuFoundation: No list item at specified index.")},t}(V);/**
152
- * @license
153
- * Copyright 2020 Google LLC
154
- * SPDX-License-Identifier: Apache-2.0
155
- */class u extends q.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=J,this.listElement_=null,this.anchor=null,this.open=!1,this.quick=!1,this.wrapFocus=!1,this.innerRole="menu",this.innerAriaLabel=null,this.corner="TOP_START",this.x=null,this.y=null,this.absolute=!1,this.multi=!1,this.activatable=!1,this.fixed=!1,this.forceGroupSelection=!1,this.fullwidth=!1,this.menuCorner="START",this.stayOpenOnBodyClick=!1,this.defaultFocus="LIST_ROOT",this._listUpdateComplete=null}get listElement(){return this.listElement_?this.listElement_:(this.listElement_=this.renderRoot.querySelector("mwc-list"),this.listElement_)}get items(){const t=this.listElement;return t?t.items:[]}get index(){const t=this.listElement;return t?t.index:-1}get selected(){const t=this.listElement;return t?t.selected:null}render(){return this.renderSurface()}renderSurface(){const t=this.getSurfaceClasses();return A.x`
156
- <mwc-menu-surface
157
- ?hidden=${!this.open}
158
- .anchor=${this.anchor}
159
- .open=${this.open}
160
- .quick=${this.quick}
161
- .corner=${this.corner}
162
- .x=${this.x}
163
- .y=${this.y}
164
- .absolute=${this.absolute}
165
- .fixed=${this.fixed}
166
- .fullwidth=${this.fullwidth}
167
- .menuCorner=${this.menuCorner}
168
- ?stayOpenOnBodyClick=${this.stayOpenOnBodyClick}
169
- class=${P.o(t)}
170
- @closed=${this.onClosed}
171
- @opened=${this.onOpened}
172
- @keydown=${this.onKeydown}>
173
- ${this.renderList()}
174
- </mwc-menu-surface>`}getSurfaceClasses(){return{"mdc-menu":!0,"mdc-menu-surface":!0}}renderList(){const t=this.innerRole==="menu"?"menuitem":"option",e=this.renderListClasses();return A.x`
175
- <mwc-list
176
- rootTabbable
177
- .innerAriaLabel=${this.innerAriaLabel}
178
- .innerRole=${this.innerRole}
179
- .multi=${this.multi}
180
- class=${P.o(e)}
181
- .itemRoles=${t}
182
- .wrapFocus=${this.wrapFocus}
183
- .activatable=${this.activatable}
184
- @action=${this.onAction}>
185
- <slot></slot>
186
- </mwc-list>`}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return;const s=i.items[t];s&&(e==="mdc-menu-item--selected"?this.forceGroupSelection&&!s.selected&&i.toggle(t,!0):s.classList.add(e))},removeClassFromElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return;const s=i.items[t];s&&(e==="mdc-menu-item--selected"?s.selected&&i.toggle(t,!1):s.classList.remove(e))},addAttributeToElementAtIndex:(t,e,i)=>{const s=this.listElement;if(!s)return;const r=s.items[t];r&&r.setAttribute(e,i)},removeAttributeFromElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return;const s=i.items[t];s&&s.removeAttribute(e)},getAttributeFromElementAtIndex:(t,e)=>{const i=this.listElement;if(!i)return null;const s=i.items[t];return s?s.getAttribute(e):null},elementContainsClass:(t,e)=>t.classList.contains(e),closeSurface:()=>{this.open=!1},getElementIndex:t=>{const e=this.listElement;return e?e.items.indexOf(t):-1},notifySelected:()=>{},getMenuItemCount:()=>{const t=this.listElement;return t?t.items.length:0},focusItemAtIndex:t=>{const e=this.listElement;if(!e)return;const i=e.items[t];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:t=>{const e=this.listElement;if(!e)return-1;const i=e.items[t];if(!i||!i.group)return-1;for(let s=0;s<e.items.length;s++){if(s===t)continue;const r=e.items[s];if(r.selected&&r.group===i.group)return s}return-1},isSelectableItemAtIndex:t=>{const e=this.listElement;if(!e)return!1;const i=e.items[t];return i?i.hasAttribute("group"):!1}}}onKeydown(t){this.mdcFoundation&&this.mdcFoundation.handleKeydown(t)}onAction(t){const e=this.listElement;if(this.mdcFoundation&&e){const i=t.detail.index,s=e.items[i];s&&this.mdcFoundation.handleItemAction(s)}}onOpened(){this.open=!0,this.mdcFoundation&&this.mdcFoundation.handleMenuSurfaceOpened()}onClosed(){this.open=!1}async getUpdateComplete(){return await this._listUpdateComplete,await super.getUpdateComplete()}async firstUpdated(){super.firstUpdated();const t=this.listElement;t&&(this._listUpdateComplete=t.updateComplete,await this._listUpdateComplete)}select(t){const e=this.listElement;e&&e.select(t)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const t=this.listElement;return t?t.getFocusedItemIndex():-1}focusItemAtIndex(t){const e=this.listElement;e&&e.focusItemAtIndex(t)}layout(t=!0){const e=this.listElement;e&&e.layout(t)}}o.__decorate([F.i(".mdc-menu")],u.prototype,"mdcRoot",void 0);o.__decorate([F.i("slot")],u.prototype,"slotElement",void 0);o.__decorate([a.n({type:Object})],u.prototype,"anchor",void 0);o.__decorate([a.n({type:Boolean,reflect:!0})],u.prototype,"open",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"quick",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"wrapFocus",void 0);o.__decorate([a.n({type:String})],u.prototype,"innerRole",void 0);o.__decorate([a.n({type:String})],u.prototype,"innerAriaLabel",void 0);o.__decorate([a.n({type:String})],u.prototype,"corner",void 0);o.__decorate([a.n({type:Number})],u.prototype,"x",void 0);o.__decorate([a.n({type:Number})],u.prototype,"y",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"absolute",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"multi",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"activatable",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"fixed",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"forceGroupSelection",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"fullwidth",void 0);o.__decorate([a.n({type:String})],u.prototype,"menuCorner",void 0);o.__decorate([a.n({type:Boolean})],u.prototype,"stayOpenOnBodyClick",void 0);o.__decorate([a.n({type:String}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(b[n])})],u.prototype,"defaultFocus",void 0);/**
187
- * @license
188
- * Copyright 2021 Google LLC
189
- * SPDX-LIcense-Identifier: Apache-2.0
190
- */const ee=A.i`mwc-list ::slotted([mwc-list-item]:not([twoline])),mwc-list ::slotted([noninteractive]:not([twoline])){height:var(--mdc-menu-item-height, 48px)}`;exports.MenuBase=u;exports.styles=ee;
@@ -1,105 +0,0 @@
1
- "use strict";const d=require("./tslib.es6-5xG0QhxF.js"),p=require("./ripple-handlers-HeGhXgD2.js"),_=require("./aria-property-52VAcg_f.js"),f=require("./form-element-5s8gft-A.js"),b=require("./observer-LlGBroG9.js"),n=require("./query-assigned-elements-j_5ZiL65.js"),a=require("./property-iZpLBvy-.js"),s=require("./state-LqPxt99W.js"),g=require("./event-options-2TJPtsKy.js"),h=require("./query-duvhtfSs.js"),v=require("./class-map-wtcW44Of.js"),u=require("./if-defined-lAIUwAsA.js"),k=require("./utils-W3ENJhq-.js");/**
2
- * @license
3
- * Copyright 2020 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */const m=Symbol("selection controller");class y{constructor(){this.selected=null,this.ordered=null,this.set=new Set}}class l{constructor(e){this.sets={},this.focusedSet=null,this.mouseIsDown=!1,this.updating=!1,e.addEventListener("keydown",r=>{this.keyDownHandler(r)}),e.addEventListener("mousedown",()=>{this.mousedownHandler()}),e.addEventListener("mouseup",()=>{this.mouseupHandler()})}static getController(e){const o=!("global"in e)||"global"in e&&e.global?document:e.getRootNode();let c=o[m];return c===void 0&&(c=new l(o),o[m]=c),c}keyDownHandler(e){const r=e.target;"checked"in r&&this.has(r)&&(e.key=="ArrowRight"||e.key=="ArrowDown"?this.selectNext(r):(e.key=="ArrowLeft"||e.key=="ArrowUp")&&this.selectPrevious(r))}mousedownHandler(){this.mouseIsDown=!0}mouseupHandler(){this.mouseIsDown=!1}has(e){return this.getSet(e.name).set.has(e)}selectPrevious(e){const r=this.getOrdered(e),o=r.indexOf(e),c=r[o-1]||r[r.length-1];return this.select(c),c}selectNext(e){const r=this.getOrdered(e),o=r.indexOf(e),c=r[o+1]||r[0];return this.select(c),c}select(e){e.click()}focus(e){if(this.mouseIsDown)return;const r=this.getSet(e.name),o=this.focusedSet;this.focusedSet=r,o!=r&&r.selected&&r.selected!=e&&r.selected.focus()}isAnySelected(e){const r=this.getSet(e.name);for(const o of r.set)if(o.checked)return!0;return!1}getOrdered(e){const r=this.getSet(e.name);return r.ordered||(r.ordered=Array.from(r.set),r.ordered.sort((o,c)=>o.compareDocumentPosition(c)==Node.DOCUMENT_POSITION_PRECEDING?1:0)),r.ordered}getSet(e){return this.sets[e]||(this.sets[e]=new y),this.sets[e]}register(e){const r=e.name||e.getAttribute("name")||"",o=this.getSet(r);o.set.add(e),o.ordered=null}unregister(e){const r=this.getSet(e.name);r.set.delete(e),r.ordered=null,r.selected==e&&(r.selected=null)}update(e){if(this.updating)return;this.updating=!0;const r=this.getSet(e.name);if(e.checked){for(const o of r.set)o!=e&&(o.checked=!1);r.selected=e}if(this.isAnySelected(e))for(const o of r.set){if(o.formElementTabIndex===void 0)break;o.formElementTabIndex=o.checked?0:-1}this.updating=!1}}/**
6
- * @license
7
- * Copyright 2016 Google Inc.
8
- *
9
- * Permission is hereby granted, free of charge, to any person obtaining a copy
10
- * of this software and associated documentation files (the "Software"), to deal
11
- * in the Software without restriction, including without limitation the rights
12
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
- * copies of the Software, and to permit persons to whom the Software is
14
- * furnished to do so, subject to the following conditions:
15
- *
16
- * The above copyright notice and this permission notice shall be included in
17
- * all copies or substantial portions of the Software.
18
- *
19
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25
- * THE SOFTWARE.
26
- */var x=function(){function i(e){e===void 0&&(e={}),this.adapter=e}return Object.defineProperty(i,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(i,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),i.prototype.init=function(){},i.prototype.destroy=function(){},i}();/**
27
- * @license
28
- * Copyright 2016 Google Inc.
29
- *
30
- * Permission is hereby granted, free of charge, to any person obtaining a copy
31
- * of this software and associated documentation files (the "Software"), to deal
32
- * in the Software without restriction, including without limitation the rights
33
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34
- * copies of the Software, and to permit persons to whom the Software is
35
- * furnished to do so, subject to the following conditions:
36
- *
37
- * The above copyright notice and this permission notice shall be included in
38
- * all copies or substantial portions of the Software.
39
- *
40
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
41
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
42
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
43
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
44
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
45
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
46
- * THE SOFTWARE.
47
- */var w={NATIVE_CONTROL_SELECTOR:".mdc-radio__native-control"},R={DISABLED:"mdc-radio--disabled",ROOT:"mdc-radio"};/**
48
- * @license
49
- * Copyright 2016 Google Inc.
50
- *
51
- * Permission is hereby granted, free of charge, to any person obtaining a copy
52
- * of this software and associated documentation files (the "Software"), to deal
53
- * in the Software without restriction, including without limitation the rights
54
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
55
- * copies of the Software, and to permit persons to whom the Software is
56
- * furnished to do so, subject to the following conditions:
57
- *
58
- * The above copyright notice and this permission notice shall be included in
59
- * all copies or substantial portions of the Software.
60
- *
61
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
62
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
63
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
64
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
65
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
66
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
67
- * THE SOFTWARE.
68
- */var E=function(i){d.__extends(e,i);function e(r){return i.call(this,d.__assign(d.__assign({},e.defaultAdapter),r))||this}return Object.defineProperty(e,"cssClasses",{get:function(){return R},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return w},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},removeClass:function(){},setNativeControlDisabled:function(){}}},enumerable:!1,configurable:!0}),e.prototype.setDisabled=function(r){var o=e.cssClasses.DISABLED;this.adapter.setNativeControlDisabled(r),r?this.adapter.addClass(o):this.adapter.removeClass(o)},e}(x);/**
69
- * @license
70
- * Copyright 2018 Google LLC
71
- * SPDX-License-Identifier: Apache-2.0
72
- */class t extends f.FormElement{constructor(){super(...arguments),this._checked=!1,this.useStateLayerCustomProperties=!1,this.global=!1,this.disabled=!1,this.value="on",this.name="",this.reducedTouchTarget=!1,this.mdcFoundationClass=E,this.formElementTabIndex=0,this.focused=!1,this.shouldRenderRipple=!1,this.rippleElement=null,this.rippleHandlers=new p.RippleHandlers(()=>(this.shouldRenderRipple=!0,this.ripple.then(e=>{this.rippleElement=e}),this.ripple))}get checked(){return this._checked}set checked(e){var r,o;const c=this._checked;e!==c&&(this._checked=e,this.formElement&&(this.formElement.checked=e),(r=this._selectionController)===null||r===void 0||r.update(this),e===!1&&((o=this.formElement)===null||o===void 0||o.blur()),this.requestUpdate("checked",c),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(e){this.formElement.value=e}renderRipple(){return this.shouldRenderRipple?n.x`<mwc-ripple unbounded accent
73
- .internalUseStateLayerCustomProperties="${this.useStateLayerCustomProperties}"
74
- .disabled="${this.disabled}"></mwc-ripple>`:""}get isRippleActive(){var e;return((e=this.rippleElement)===null||e===void 0?void 0:e.isActive)||!1}connectedCallback(){super.connectedCallback(),this._selectionController=l.getController(this),this._selectionController.register(this),this._selectionController.update(this)}disconnectedCallback(){this._selectionController.unregister(this),this._selectionController=void 0}focus(){this.formElement.focus()}createAdapter(){return Object.assign(Object.assign({},k.addHasRemoveClass(this.mdcRoot)),{setNativeControlDisabled:e=>{this.formElement.disabled=e}})}handleFocus(){this.focused=!0,this.handleRippleFocus()}handleClick(){this.formElement.focus()}handleBlur(){this.focused=!1,this.formElement.blur(),this.rippleHandlers.endFocus()}setFormData(e){this.name&&this.checked&&e.append(this.name,this.value)}render(){const e={"mdc-radio--touch":!this.reducedTouchTarget,"mdc-ripple-upgraded--background-focused":this.focused,"mdc-radio--disabled":this.disabled};return n.x`
75
- <div class="mdc-radio ${v.o(e)}">
76
- <input
77
- tabindex="${this.formElementTabIndex}"
78
- class="mdc-radio__native-control"
79
- type="radio"
80
- name="${this.name}"
81
- aria-label="${u.l(this.ariaLabel)}"
82
- aria-labelledby="${u.l(this.ariaLabelledBy)}"
83
- .checked="${this.checked}"
84
- .value="${this.value}"
85
- ?disabled="${this.disabled}"
86
- @change="${this.changeHandler}"
87
- @focus="${this.handleFocus}"
88
- @click="${this.handleClick}"
89
- @blur="${this.handleBlur}"
90
- @mousedown="${this.handleRippleMouseDown}"
91
- @mouseenter="${this.handleRippleMouseEnter}"
92
- @mouseleave="${this.handleRippleMouseLeave}"
93
- @touchstart="${this.handleRippleTouchStart}"
94
- @touchend="${this.handleRippleDeactivate}"
95
- @touchcancel="${this.handleRippleDeactivate}">
96
- <div class="mdc-radio__background">
97
- <div class="mdc-radio__outer-circle"></div>
98
- <div class="mdc-radio__inner-circle"></div>
99
- </div>
100
- ${this.renderRipple()}
101
- </div>`}handleRippleMouseDown(e){const r=()=>{window.removeEventListener("mouseup",r),this.handleRippleDeactivate()};window.addEventListener("mouseup",r),this.rippleHandlers.startPress(e)}handleRippleTouchStart(e){this.rippleHandlers.startPress(e)}handleRippleDeactivate(){this.rippleHandlers.endPress()}handleRippleMouseEnter(){this.rippleHandlers.startHover()}handleRippleMouseLeave(){this.rippleHandlers.endHover()}handleRippleFocus(){this.rippleHandlers.startFocus()}changeHandler(){this.checked=this.formElement.checked}}d.__decorate([h.i(".mdc-radio")],t.prototype,"mdcRoot",void 0);d.__decorate([h.i("input")],t.prototype,"formElement",void 0);d.__decorate([s.t()],t.prototype,"useStateLayerCustomProperties",void 0);d.__decorate([a.n({type:Boolean})],t.prototype,"global",void 0);d.__decorate([a.n({type:Boolean,reflect:!0})],t.prototype,"checked",null);d.__decorate([a.n({type:Boolean}),b.observer(function(i){this.mdcFoundation.setDisabled(i)})],t.prototype,"disabled",void 0);d.__decorate([a.n({type:String}),b.observer(function(i){this._handleUpdatedValue(i)})],t.prototype,"value",void 0);d.__decorate([a.n({type:String})],t.prototype,"name",void 0);d.__decorate([a.n({type:Boolean})],t.prototype,"reducedTouchTarget",void 0);d.__decorate([a.n({type:Number})],t.prototype,"formElementTabIndex",void 0);d.__decorate([s.t()],t.prototype,"focused",void 0);d.__decorate([s.t()],t.prototype,"shouldRenderRipple",void 0);d.__decorate([p.e("mwc-ripple")],t.prototype,"ripple",void 0);d.__decorate([_.ariaProperty,a.n({attribute:"aria-label"})],t.prototype,"ariaLabel",void 0);d.__decorate([_.ariaProperty,a.n({attribute:"aria-labelledby"})],t.prototype,"ariaLabelledBy",void 0);d.__decorate([g.e({passive:!0})],t.prototype,"handleRippleTouchStart",null);/**
102
- * @license
103
- * Copyright 2021 Google LLC
104
- * SPDX-LIcense-Identifier: Apache-2.0
105
- */const C=n.i`.mdc-touch-target-wrapper{display:inline}.mdc-radio{padding:calc((40px - 20px) / 2)}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.54)}.mdc-radio .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__native-control:enabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:#018786;border-color:var(--mdc-theme-secondary, #018786)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:rgba(0, 0, 0, 0.38)}.mdc-radio .mdc-radio__background::before{background-color:#018786;background-color:var(--mdc-theme-secondary, #018786)}.mdc-radio .mdc-radio__background::before{top:calc(-1 * (40px - 20px) / 2);left:calc(-1 * (40px - 20px) / 2);width:40px;height:40px}.mdc-radio .mdc-radio__native-control{top:calc((40px - 40px) / 2);right:calc((40px - 40px) / 2);left:calc((40px - 40px) / 2);width:40px;height:40px}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-radio.mdc-radio--disabled [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio.mdc-radio--disabled .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio.mdc-radio--disabled .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:GrayText}.mdc-radio.mdc-radio--disabled [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio.mdc-radio--disabled .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:GrayText}}.mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color}.mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 120ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;z-index:1}.mdc-radio--touch{margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-radio--touch .mdc-radio__native-control{top:calc((40px - 48px) / 2);right:calc((40px - 48px) / 2);left:calc((40px - 48px) / 2);width:48px;height:48px}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{pointer-events:none;border:2px solid transparent;border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring{border-color:CanvasText}}.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{content:"";border:2px solid transparent;border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-radio.mdc-ripple-upgraded--background-focused .mdc-radio__focus-ring::after,.mdc-radio:not(.mdc-ripple-upgraded):focus .mdc-radio__focus-ring::after{border-color:CanvasText}}.mdc-radio__native-control:checked+.mdc-radio__background,.mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio--disabled{cursor:default;pointer-events:none}.mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1),border-color 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-radio__native-control:disabled+.mdc-radio__background,[aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background{cursor:default}.mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 120ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 120ms 0ms cubic-bezier(0, 0, 0.2, 1)}:host{display:inline-block;outline:none}.mdc-radio{vertical-align:bottom}.mdc-radio .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unchecked-color, rgba(0, 0, 0, 0.54))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mdc-radio .mdc-radio__native-control:disabled:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}.mdc-radio [aria-disabled=true] .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mdc-radio .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-disabled-color, rgba(0, 0, 0, 0.38))}`;exports.RadioBase=t;exports.styles=C;