@covalent/components 6.4.0 → 6.4.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.
- package/action-ribbon.js +6 -6
- package/action-ribbon.mjs +24 -23
- package/alert.js +4 -4
- package/alert.mjs +28 -27
- package/app-shell.js +4 -4
- package/app-shell.mjs +10 -10
- package/{base-element-67ae173f.mjs → base-element-c3dc926e.mjs} +2 -2
- package/{base-element-58a3f9ea.js → base-element-d5abe37a.js} +1 -1
- package/button.js +4 -4
- package/button.mjs +13 -13
- package/card.js +8 -8
- package/card.mjs +4 -4
- package/check-list-item.js +3 -3
- package/check-list-item.mjs +16 -16
- package/checkbox.js +1 -1
- package/checkbox.mjs +15 -15
- package/circular-progress.js +7 -7
- package/circular-progress.mjs +6 -6
- package/class-map-08c84aeb.mjs +62 -0
- package/class-map-50b8edb4.js +9 -0
- package/code-snippet.js +9 -9
- package/code-snippet.mjs +1213 -1276
- package/{dialog-9ac44447.mjs → dialog-85c21333.mjs} +39 -39
- package/{dialog-79036d60.js → dialog-8ee07177.js} +4 -4
- package/dialog.js +1 -1
- package/dialog.mjs +8 -8
- package/{directive-helpers-e3ea6592.mjs → directive-helpers-725a181d.mjs} +3 -3
- package/{directive-helpers-0ce1f995.js → directive-helpers-fce8cf91.js} +2 -2
- package/drawer.js +1 -1
- package/drawer.mjs +8 -8
- package/empty-state.js +7 -7
- package/empty-state.mjs +4 -4
- package/{event-options-78d6cf94.mjs → event-options-3937d997.mjs} +1 -1
- package/{event-options-3f5eb195.js → event-options-7bc382d8.js} +1 -1
- package/{form-element-bd973124.mjs → form-element-6dbd7afa.mjs} +4 -4
- package/{form-element-ead758d4.js → form-element-d4e7bcdb.js} +2 -2
- package/foundation-2334d146.mjs +60 -0
- package/{foundation-62d4413d.js → foundation-3f55a9dc.js} +3 -24
- package/{foundation-3f556da7.mjs → foundation-c580100a.mjs} +28 -78
- package/foundation-e830bd94.js +22 -0
- package/icon-button.js +5 -5
- package/icon-button.mjs +12 -12
- package/icon-check-toggle.js +5 -5
- package/icon-check-toggle.mjs +15 -15
- package/icon-radio-toggle.js +4 -4
- package/icon-radio-toggle.mjs +15 -15
- package/icon.js +1 -1
- package/icon.mjs +3 -3
- package/{if-defined-c367f208.mjs → if-defined-639ed018.mjs} +1 -1
- package/if-defined-cb12d481.js +5 -0
- package/index.js +1 -1
- package/index.mjs +121 -120
- package/linear-progress.js +6 -6
- package/linear-progress.mjs +13 -13
- package/{list-066f5de4.mjs → list-d616957b.mjs} +3 -3
- package/{list-05db7fed.js → list-defdaa3b.js} +2 -2
- package/list-expansion.js +4 -4
- package/list-expansion.mjs +25 -25
- package/{list-item-8da7ba96.js → list-item-3fa66f09.js} +3 -3
- package/{list-item-ba77097d.mjs → list-item-d5c05e10.mjs} +6 -6
- package/list-item.js +1 -1
- package/list-item.mjs +13 -13
- package/list.js +1 -1
- package/list.mjs +15 -15
- package/menu.js +1 -1
- package/menu.mjs +15 -15
- package/{mwc-checkbox-base-3da36456.mjs → mwc-checkbox-base-10e977f2.mjs} +21 -21
- package/{mwc-checkbox-base-d46c7666.js → mwc-checkbox-base-435c1f1d.js} +9 -9
- package/{mwc-checkbox.css-b3434429.js → mwc-checkbox.css-956e3d6c.js} +1 -1
- package/{mwc-checkbox.css-8f4f1a9b.mjs → mwc-checkbox.css-b7abc7fd.mjs} +1 -1
- package/{mwc-drawer-base-fe660bdf.mjs → mwc-drawer-base-b2b772c3.mjs} +10 -10
- package/{mwc-drawer-base-8eecb1de.js → mwc-drawer-base-f44fcf34.js} +6 -6
- package/{mwc-icon-8c9cd0c9.js → mwc-icon-b96fb867.js} +2 -2
- package/{mwc-icon-ba18383d.mjs → mwc-icon-c7013880.mjs} +2 -2
- package/{mwc-line-ripple-directive-d1cf9570.js → mwc-line-ripple-directive-a97ce725.js} +3 -3
- package/{mwc-line-ripple-directive-ffce2cff.mjs → mwc-line-ripple-directive-c3e1f04a.mjs} +6 -6
- package/{mwc-list-base-cb3500b4.js → mwc-list-base-7d5f7278.js} +4 -4
- package/{mwc-list-base-32d4ac31.mjs → mwc-list-base-c0f8af1c.mjs} +9 -9
- package/{mwc-list-item-base-4a4d1e1b.js → mwc-list-item-base-803b9771.js} +8 -8
- package/{mwc-list-item-base-8654347d.mjs → mwc-list-item-base-acef0223.mjs} +7 -7
- package/{mwc-list-item.css-25adc0c4.js → mwc-list-item.css-401e2407.js} +1 -1
- package/{mwc-list-item.css-b0009fc7.mjs → mwc-list-item.css-b5481d96.mjs} +1 -1
- package/{mwc-menu-base-572a76b9.mjs → mwc-menu-base-8970b43d.mjs} +11 -11
- package/{mwc-menu-base-f14ec544.js → mwc-menu-base-ac49fe54.js} +17 -17
- package/{mwc-radio-base-470b4fcc.js → mwc-radio-base-442d495a.js} +4 -4
- package/{mwc-radio-base-9446d39b.mjs → mwc-radio-base-c29e6f42.mjs} +11 -11
- package/{mwc-radio.css-4e140252.js → mwc-radio.css-388ad26d.js} +1 -1
- package/{mwc-radio.css-7454bb11.mjs → mwc-radio.css-4694aa9c.mjs} +1 -1
- package/{mwc-slider.css-10adbaf8.mjs → mwc-slider.css-336f809b.mjs} +12 -12
- package/{mwc-slider.css-9dd57b10.js → mwc-slider.css-48f02f1e.js} +11 -11
- package/{mwc-tab-base-fc3ffb43.js → mwc-tab-base-1a19b299.js} +13 -13
- package/{mwc-tab-base-4ba47acc.mjs → mwc-tab-base-7fb3d339.mjs} +14 -14
- package/{mwc-top-app-bar-base-0304e67f.js → mwc-top-app-bar-base-14e0a018.js} +8 -8
- package/{mwc-top-app-bar-base-adc4168a.mjs → mwc-top-app-bar-base-79c87e69.mjs} +24 -22
- package/nav-list-item.js +2 -2
- package/nav-list-item.mjs +13 -13
- package/package.json +1 -1
- package/{property-57f6f6fe.js → property-074570d1.js} +1 -1
- package/{property-9b6ea53b.mjs → property-ca27685b.mjs} +9 -9
- package/{query-d843aa92.mjs → query-1e7846ea.mjs} +1 -1
- package/{query-680f1868.js → query-2ba749b7.js} +1 -1
- package/query-assigned-elements-07e38f46.js +33 -0
- package/{query-assigned-elements-4a39219d.mjs → query-assigned-elements-514e5265.mjs} +152 -153
- package/{query-assigned-nodes-99eae71d.js → query-assigned-nodes-9ec0fa5f.js} +1 -1
- package/{query-assigned-nodes-df691e78.mjs → query-assigned-nodes-bea12e0c.mjs} +1 -1
- package/radio-list-item.js +3 -3
- package/radio-list-item.mjs +18 -18
- package/radio.js +1 -1
- package/radio.mjs +15 -15
- package/{ripple-handlers-c82b1232.js → ripple-handlers-2176f137.js} +5 -5
- package/{ripple-handlers-321219b8.mjs → ripple-handlers-227497d3.mjs} +10 -10
- package/select.js +10 -10
- package/select.mjs +20 -20
- package/side-sheet.js +2 -2
- package/side-sheet.mjs +21 -21
- package/slider-range.js +7 -7
- package/slider-range.mjs +13 -13
- package/slider.js +3 -3
- package/slider.mjs +15 -15
- package/snackbar.js +6 -6
- package/snackbar.mjs +12 -12
- package/{state-b5e865db.mjs → state-6f7e570d.mjs} +1 -1
- package/state-949232e6.js +5 -0
- package/status-header-item.js +3 -3
- package/status-header-item.mjs +15 -15
- package/status-header.js +2 -2
- package/status-header.mjs +3 -3
- package/style-map-2cb0fb63.mjs +40 -0
- package/style-map-3056a771.js +5 -0
- package/style.css +1 -1
- package/switch.js +8 -8
- package/switch.mjs +13 -13
- package/tab-bar.js +5 -5
- package/tab-bar.mjs +16 -16
- package/tab.js +1 -1
- package/tab.mjs +12 -12
- package/text-lockup.js +4 -4
- package/text-lockup.mjs +7 -7
- package/textarea.js +4 -4
- package/textarea.mjs +26 -26
- package/{textfield-2cee5a1a.mjs → textfield-276b0ded.mjs} +14 -14
- package/{textfield-0993c163.js → textfield-507c6a06.js} +12 -12
- package/textfield.js +1 -1
- package/textfield.mjs +14 -14
- package/toolbar.js +1 -1
- package/toolbar.mjs +8 -8
- package/tooltip/tooltip.d.ts.map +1 -1
- package/tooltip.js +11 -32
- package/tooltip.mjs +516 -611
- package/{top-app-bar-a531c1b4.js → top-app-bar-34e85527.js} +1 -1
- package/{top-app-bar-f83386e0.mjs → top-app-bar-a236c3bc.mjs} +1 -1
- package/top-app-bar-fixed.js +5 -89
- package/top-app-bar-fixed.mjs +37 -279
- package/top-app-bar.js +1 -1
- package/top-app-bar.mjs +9 -9
- package/tree-list-item.js +7 -7
- package/tree-list-item.mjs +6 -6
- package/tree-list.js +2 -2
- package/tree-list.mjs +1 -1
- package/tslib.es6-6b53b818.js +1 -0
- package/tslib.es6-b5e819a6.mjs +82 -0
- package/typography.js +3 -3
- package/typography.mjs +2 -2
- package/{utils-2932417c.mjs → utils-dc65fdc9.mjs} +2 -2
- package/class-map-4b94b017.mjs +0 -62
- package/class-map-b5efe8da.js +0 -9
- package/if-defined-f1c45245.js +0 -5
- package/query-assigned-elements-f623705d.js +0 -31
- package/state-0974a8e5.js +0 -5
- package/style-map-88d2563f.js +0 -5
- package/style-map-bc3ed3e0.mjs +0 -44
- package/tslib.es6-e6a11c8a.js +0 -1
- package/tslib.es6-f1eaf65c.mjs +0 -82
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const
|
1
|
+
"use strict";const o=require("./tslib.es6-6b53b818.js"),A=require("./query-assigned-elements-07e38f46.js"),K=require("./mwc-list-base-7d5f7278.js"),U=require("./base-element-d5abe37a.js"),E=require("./observer-a096ab43.js"),N=require("./utils-a8190a39.js"),a=require("./property-074570d1.js"),v=require("./state-949232e6.js"),F=require("./query-2ba749b7.js"),P=require("./class-map-50b8edb4.js"),j=require("./style-map-3056a771.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2021 Google LLC
|
4
4
|
* SPDX-LIcense-Identifier: Apache-2.0
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* @license
|
7
7
|
* Copyright 2020 Google LLC
|
8
8
|
* SPDX-License-Identifier: Apache-2.0
|
9
|
-
*/let k=class extends K.ListBase{};k.styles=[W];k=
|
9
|
+
*/let k=class extends K.ListBase{};k.styles=[W];k=o.__decorate([A.e("mwc-list")],k);/**
|
10
10
|
* @license
|
11
11
|
* Copyright 2018 Google Inc.
|
12
12
|
*
|
@@ -48,7 +48,7 @@
|
|
48
48
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
49
49
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
50
50
|
* THE SOFTWARE.
|
51
|
-
*/var q=function(){function n(
|
51
|
+
*/var q=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}();/**
|
52
52
|
* @license
|
53
53
|
* Copyright 2018 Google Inc.
|
54
54
|
*
|
@@ -69,19 +69,19 @@
|
|
69
69
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
70
70
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
71
71
|
* THE SOFTWARE.
|
72
|
-
*/var V=function(n){
|
72
|
+
*/var V=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 X},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return Q},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return L},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()},L.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()},L.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",f=this.getHorizontalOriginOffset(i),M=this.getVerticalOriginOffset(i),y=this.measurements,I=y.anchorSize,S=y.surfaceSize,p=(e={},e[c]=f,e[r]=M,e);I.width/S.width>L.ANCHOR_TO_MENU_SURFACE_WIDTH_RATIO&&(c="center"),(this.isHoistedElement||this.isFixedPosition)&&this.adjustPositionForHoistedElement(p),this.adapter.setTransformOrigin(c+" "+r),this.adapter.setPosition(p),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,f=t.numbers.MARGIN_TO_EDGE,M=this.hasBit(this.anchorCorner,l.BOTTOM),y,I;M?(y=s.top-f+this.anchorMargin.bottom,I=s.bottom-f-this.anchorMargin.bottom):(y=s.top-f+this.anchorMargin.top,I=s.bottom-f+r.height-this.anchorMargin.top);var S=I-c.height>0;!S&&y>I+this.openBottomBias&&(e=this.setBit(e,l.BOTTOM));var p=this.adapter.isRtl(),T=this.hasBit(this.anchorCorner,l.FLIP_RTL),_=this.hasBit(this.anchorCorner,l.RIGHT)||this.hasBit(e,l.RIGHT),C=!1;p&&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 D=w-c.width>0,G=B-c.width>0,$=this.hasBit(e,l.FLIP_RTL)&&this.hasBit(e,l.RIGHT);return G&&$&&p||!D&&$?e=this.unsetBit(e,l.RIGHT):(D&&C&&p||D&&!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),f=t.numbers.MARGIN_TO_EDGE;return r?(s=i.top+this.anchorMargin.top-f,c||(s+=this.measurements.anchorSize.height)):(s=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-f,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,f=r.viewportDistance,M=r.surfaceSize,y=r.viewportSize,I=Object.keys(e);try{for(var S=o.__values(I),p=S.next();!p.done;p=S.next()){var T=p.value,_=e[T]||0;if(this.isHorizontallyCenteredOnViewport&&(T==="left"||T==="right")){e[T]=(y.width-M.width)/2;continue}_+=f[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{p&&!p.done&&(s=S.return)&&s.call(S)}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()},L.TOUCH_EVENT_WAIT_MS)},t.prototype.hasBit=function(e,i){return Boolean(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}(q);const Y=V;/**
|
73
73
|
* @license
|
74
74
|
* Copyright 2020 Google LLC
|
75
75
|
* SPDX-License-Identifier: Apache-2.0
|
76
|
-
*/const Z={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 U.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=Y,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
|
76
|
+
*/const Z={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 U.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=Y,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.y`
|
77
77
|
<div
|
78
|
-
class=${P.o(
|
79
|
-
style="${j.
|
78
|
+
class=${P.o(t)}
|
79
|
+
style="${j.i(e)}"
|
80
80
|
@keydown=${this.onKeydown}
|
81
81
|
@opened=${this.registerBodyClick}
|
82
82
|
@closed=${this.deregisterBodyClick}>
|
83
83
|
${this.renderContent()}
|
84
|
-
</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.
|
84
|
+
</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.y`<slot></slot>`}createAdapter(){return Object.assign(Object.assign({},N.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:()=>N.doesElementContainFocus(this),saveFocus:()=>{const t=N.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.e({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(n)})],h.prototype,"absolute",void 0);o.__decorate([a.e({type:Boolean})],h.prototype,"fullwidth",void 0);o.__decorate([a.e({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(n)})],h.prototype,"fixed",void 0);o.__decorate([a.e({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.e({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.e({type:Boolean}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(n)})],h.prototype,"quick",void 0);o.__decorate([a.e({type:Boolean,reflect:!0}),E.observer(function(n,t){this.onOpenChanged(n,t)})],h.prototype,"open",void 0);o.__decorate([a.e({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.e({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.e({type:String}),E.observer(function(n){if(this.mdcFoundation&&n){let t=Z[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);/**
|
85
85
|
* @license
|
86
86
|
* Copyright 2021 Google LLC
|
87
87
|
* SPDX-LIcense-Identifier: Apache-2.0
|
@@ -89,7 +89,7 @@
|
|
89
89
|
* @license
|
90
90
|
* Copyright 2020 Google LLC
|
91
91
|
* SPDX-License-Identifier: Apache-2.0
|
92
|
-
*/let z=class extends h{};z.styles=[J];z=
|
92
|
+
*/let z=class extends h{};z.styles=[J];z=o.__decorate([A.e("mwc-menu-surface")],z);/**
|
93
93
|
* @license
|
94
94
|
* Copyright 2018 Google Inc.
|
95
95
|
*
|
@@ -110,7 +110,7 @@
|
|
110
110
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
111
111
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
112
112
|
* THE SOFTWARE.
|
113
|
-
*/var H={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},x={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"},
|
113
|
+
*/var H={MENU_SELECTED_LIST_ITEM:"mdc-menu-item--selected",MENU_SELECTION_GROUP:"mdc-menu__selection-group",ROOT:"mdc-menu"},x={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"},ee={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={}));/**
|
114
114
|
* @license
|
115
115
|
* Copyright 2018 Google Inc.
|
116
116
|
*
|
@@ -152,11 +152,11 @@
|
|
152
152
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
153
153
|
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
154
154
|
* THE SOFTWARE.
|
155
|
-
*/var
|
155
|
+
*/var te=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 x},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return ee},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,x.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)},V.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,x.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,x.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,x.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(e,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(e,x.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}(q);const ie=te;/**
|
156
156
|
* @license
|
157
157
|
* Copyright 2020 Google LLC
|
158
158
|
* SPDX-License-Identifier: Apache-2.0
|
159
|
-
*/class u extends U.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=
|
159
|
+
*/class u extends U.BaseElement{constructor(){super(...arguments),this.mdcFoundationClass=ie,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.y`
|
160
160
|
<mwc-menu-surface
|
161
161
|
?hidden=${!this.open}
|
162
162
|
.anchor=${this.anchor}
|
@@ -170,21 +170,21 @@
|
|
170
170
|
.fullwidth=${this.fullwidth}
|
171
171
|
.menuCorner=${this.menuCorner}
|
172
172
|
?stayOpenOnBodyClick=${this.stayOpenOnBodyClick}
|
173
|
-
class=${P.o(
|
173
|
+
class=${P.o(t)}
|
174
174
|
@closed=${this.onClosed}
|
175
175
|
@opened=${this.onOpened}
|
176
176
|
@keydown=${this.onKeydown}>
|
177
177
|
${this.renderList()}
|
178
|
-
</mwc-menu-surface>`}getSurfaceClasses(){return{"mdc-menu":!0,"mdc-menu-surface":!0}}renderList(){const
|
178
|
+
</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.y`
|
179
179
|
<mwc-list
|
180
180
|
rootTabbable
|
181
181
|
.innerAriaLabel=${this.innerAriaLabel}
|
182
182
|
.innerRole=${this.innerRole}
|
183
183
|
.multi=${this.multi}
|
184
|
-
class=${P.o(
|
185
|
-
.itemRoles=${
|
184
|
+
class=${P.o(e)}
|
185
|
+
.itemRoles=${t}
|
186
186
|
.wrapFocus=${this.wrapFocus}
|
187
187
|
.activatable=${this.activatable}
|
188
188
|
@action=${this.onAction}>
|
189
189
|
<slot></slot>
|
190
|
-
</mwc-list>`}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(e
|
190
|
+
</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.e({type:Object})],u.prototype,"anchor",void 0);o.__decorate([a.e({type:Boolean,reflect:!0})],u.prototype,"open",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"quick",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"wrapFocus",void 0);o.__decorate([a.e({type:String})],u.prototype,"innerRole",void 0);o.__decorate([a.e({type:String})],u.prototype,"innerAriaLabel",void 0);o.__decorate([a.e({type:String})],u.prototype,"corner",void 0);o.__decorate([a.e({type:Number})],u.prototype,"x",void 0);o.__decorate([a.e({type:Number})],u.prototype,"y",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"absolute",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"multi",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"activatable",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"fixed",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"forceGroupSelection",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"fullwidth",void 0);o.__decorate([a.e({type:String})],u.prototype,"menuCorner",void 0);o.__decorate([a.e({type:Boolean})],u.prototype,"stayOpenOnBodyClick",void 0);o.__decorate([a.e({type:String}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setDefaultFocusState(b[n])})],u.prototype,"defaultFocus",void 0);exports.MenuBase=u;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const r=require("./tslib.es6-
|
1
|
+
"use strict";const r=require("./tslib.es6-6b53b818.js"),p=require("./ripple-handlers-2176f137.js"),f=require("./aria-property-849c8816.js"),v=require("./form-element-d4e7bcdb.js"),m=require("./observer-a096ab43.js"),c=require("./query-assigned-elements-07e38f46.js"),a=require("./property-074570d1.js"),d=require("./state-949232e6.js"),g=require("./event-options-7bc382d8.js"),b=require("./query-2ba749b7.js"),_=require("./class-map-50b8edb4.js"),u=require("./if-defined-cb12d481.js"),y=require("./utils-a8190a39.js");/**
|
2
2
|
* @license
|
3
3
|
* Copyright 2020 Google LLC
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
@@ -69,9 +69,9 @@
|
|
69
69
|
* @license
|
70
70
|
* Copyright 2018 Google LLC
|
71
71
|
* SPDX-License-Identifier: Apache-2.0
|
72
|
-
*/class i extends v.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=S,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 t,s;const n=this._checked;e!==n&&(this._checked=e,this.formElement&&(this.formElement.checked=e),(t=this._selectionController)===null||t===void 0||t.update(this),e===!1&&((s=this.formElement)===null||s===void 0||s.blur()),this.requestUpdate("checked",n),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(e){this.formElement.value=e}renderRipple(){return this.shouldRenderRipple?c.
|
72
|
+
*/class i extends v.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=S,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 t,s;const n=this._checked;e!==n&&(this._checked=e,this.formElement&&(this.formElement.checked=e),(t=this._selectionController)===null||t===void 0||t.update(this),e===!1&&((s=this.formElement)===null||s===void 0||s.blur()),this.requestUpdate("checked",n),this.dispatchEvent(new Event("checked",{bubbles:!0,composed:!0})))}_handleUpdatedValue(e){this.formElement.value=e}renderRipple(){return this.shouldRenderRipple?c.y`<mwc-ripple unbounded accent
|
73
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({},y.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 c.
|
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({},y.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 c.y`
|
75
75
|
<div class="mdc-radio ${_.o(e)}">
|
76
76
|
<input
|
77
77
|
tabindex="${this.formElementTabIndex}"
|
@@ -98,4 +98,4 @@
|
|
98
98
|
<div class="mdc-radio__inner-circle"></div>
|
99
99
|
</div>
|
100
100
|
${this.renderRipple()}
|
101
|
-
</div>`}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),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}}r.__decorate([b.i(".mdc-radio")],i.prototype,"mdcRoot",void 0);r.__decorate([b.i("input")],i.prototype,"formElement",void 0);r.__decorate([d.t()],i.prototype,"useStateLayerCustomProperties",void 0);r.__decorate([a.
|
101
|
+
</div>`}handleRippleMouseDown(e){const t=()=>{window.removeEventListener("mouseup",t),this.handleRippleDeactivate()};window.addEventListener("mouseup",t),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}}r.__decorate([b.i(".mdc-radio")],i.prototype,"mdcRoot",void 0);r.__decorate([b.i("input")],i.prototype,"formElement",void 0);r.__decorate([d.t()],i.prototype,"useStateLayerCustomProperties",void 0);r.__decorate([a.e({type:Boolean})],i.prototype,"global",void 0);r.__decorate([a.e({type:Boolean,reflect:!0})],i.prototype,"checked",null);r.__decorate([a.e({type:Boolean}),m.observer(function(o){this.mdcFoundation.setDisabled(o)})],i.prototype,"disabled",void 0);r.__decorate([a.e({type:String}),m.observer(function(o){this._handleUpdatedValue(o)})],i.prototype,"value",void 0);r.__decorate([a.e({type:String})],i.prototype,"name",void 0);r.__decorate([a.e({type:Boolean})],i.prototype,"reducedTouchTarget",void 0);r.__decorate([a.e({type:Number})],i.prototype,"formElementTabIndex",void 0);r.__decorate([d.t()],i.prototype,"focused",void 0);r.__decorate([d.t()],i.prototype,"shouldRenderRipple",void 0);r.__decorate([p.e("mwc-ripple")],i.prototype,"ripple",void 0);r.__decorate([f.ariaProperty,a.e({attribute:"aria-label"})],i.prototype,"ariaLabel",void 0);r.__decorate([f.ariaProperty,a.e({attribute:"aria-labelledby"})],i.prototype,"ariaLabelledBy",void 0);r.__decorate([g.e({passive:!0})],i.prototype,"handleRippleTouchStart",null);exports.RadioBase=i;
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import {
|
2
|
-
import { e as g, R as y } from "./ripple-handlers-
|
1
|
+
import { a as v, b as c, _ as i } from "./tslib.es6-b5e819a6.mjs";
|
2
|
+
import { e as g, R as y } from "./ripple-handlers-227497d3.mjs";
|
3
3
|
import { a as f } from "./aria-property-fa2717fe.mjs";
|
4
|
-
import { F as R } from "./form-element-
|
4
|
+
import { F as R } from "./form-element-6dbd7afa.mjs";
|
5
5
|
import { o as m } from "./observer-be7b92e2.mjs";
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import { t as l } from "./state-
|
9
|
-
import { e as C } from "./event-options-
|
10
|
-
import { i as b } from "./query-
|
11
|
-
import { o as E } from "./class-map-
|
12
|
-
import { l as h } from "./if-defined-
|
13
|
-
import { a as k } from "./utils-
|
6
|
+
import { y as u } from "./query-assigned-elements-514e5265.mjs";
|
7
|
+
import { e as a } from "./property-ca27685b.mjs";
|
8
|
+
import { t as l } from "./state-6f7e570d.mjs";
|
9
|
+
import { e as C } from "./event-options-3937d997.mjs";
|
10
|
+
import { i as b } from "./query-1e7846ea.mjs";
|
11
|
+
import { o as E } from "./class-map-08c84aeb.mjs";
|
12
|
+
import { l as h } from "./if-defined-639ed018.mjs";
|
13
|
+
import { a as k } from "./utils-dc65fdc9.mjs";
|
14
14
|
/**
|
15
15
|
* @license
|
16
16
|
* Copyright 2020 Google LLC
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import {
|
2
|
-
import { e as H, R as O } from "./ripple-handlers-
|
1
|
+
import { a as F, b as x, _ as o } from "./tslib.es6-b5e819a6.mjs";
|
2
|
+
import { e as H, R as O } from "./ripple-handlers-227497d3.mjs";
|
3
3
|
import { a as w } from "./aria-property-fa2717fe.mjs";
|
4
|
-
import { F as B } from "./form-element-
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import { t as b } from "./state-
|
8
|
-
import { i as y } from "./query-
|
9
|
-
import { o as P } from "./class-map-
|
10
|
-
import { l as R } from "./if-defined-
|
11
|
-
import {
|
4
|
+
import { F as B } from "./form-element-6dbd7afa.mjs";
|
5
|
+
import { y as _, b as g, i as $ } from "./query-assigned-elements-514e5265.mjs";
|
6
|
+
import { e as f } from "./property-ca27685b.mjs";
|
7
|
+
import { t as b } from "./state-6f7e570d.mjs";
|
8
|
+
import { i as y } from "./query-1e7846ea.mjs";
|
9
|
+
import { o as P } from "./class-map-08c84aeb.mjs";
|
10
|
+
import { l as R } from "./if-defined-639ed018.mjs";
|
11
|
+
import { i as W } from "./style-map-2cb0fb63.mjs";
|
12
12
|
/**
|
13
13
|
* @license
|
14
14
|
* Copyright 2020 Google Inc.
|
@@ -127,7 +127,7 @@ var V = {
|
|
127
127
|
}
|
128
128
|
};
|
129
129
|
function K(s) {
|
130
|
-
return
|
130
|
+
return Boolean(s.document) && typeof s.document.createElement == "function";
|
131
131
|
}
|
132
132
|
function L(s, i) {
|
133
133
|
if (K(s) && i in V) {
|
@@ -675,7 +675,7 @@ var M = typeof window < "u", G = (
|
|
675
675
|
this.adapter.deregisterWindowEventHandler("resize", this.resizeListener), i.SUPPORTS_POINTER_EVENTS ? (this.adapter.deregisterEventHandler("pointerdown", this.pointerdownListener), this.adapter.deregisterEventHandler("pointerup", this.pointerupListener)) : (this.adapter.deregisterEventHandler("mousedown", this.mousedownOrTouchstartListener), this.adapter.deregisterEventHandler("touchstart", this.mousedownOrTouchstartListener)), this.isRange && (this.adapter.deregisterThumbEventHandler(r.START, "mouseenter", this.thumbMouseenterListener), this.adapter.deregisterThumbEventHandler(r.START, "mouseleave", this.thumbMouseleaveListener), this.adapter.deregisterInputEventHandler(r.START, "change", this.inputStartChangeListener), this.adapter.deregisterInputEventHandler(r.START, "focus", this.inputStartFocusListener), this.adapter.deregisterInputEventHandler(r.START, "blur", this.inputStartBlurListener)), this.adapter.deregisterThumbEventHandler(r.END, "mouseenter", this.thumbMouseenterListener), this.adapter.deregisterThumbEventHandler(r.END, "mouseleave", this.thumbMouseleaveListener), this.adapter.deregisterInputEventHandler(r.END, "change", this.inputEndChangeListener), this.adapter.deregisterInputEventHandler(r.END, "focus", this.inputEndFocusListener), this.adapter.deregisterInputEventHandler(r.END, "blur", this.inputEndBlurListener);
|
676
676
|
}, i.prototype.handlePointerup = function() {
|
677
677
|
this.handleUp(), this.adapter.deregisterEventHandler("pointermove", this.moveListener);
|
678
|
-
}, i.SUPPORTS_POINTER_EVENTS = M &&
|
678
|
+
}, i.SUPPORTS_POINTER_EVENTS = M && Boolean(window.PointerEvent) && // #setPointerCapture is buggy on iOS, so we can't use pointer events
|
679
679
|
// until the following bug is fixed:
|
680
680
|
// https://bugs.webkit.org/show_bug.cgi?id=220196
|
681
681
|
!q(), i;
|