@covalent/components 6.3.0 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/action-ribbon.js +6 -6
- package/action-ribbon.mjs +23 -24
- package/alert.js +4 -4
- package/alert.mjs +27 -28
- package/app-shell.js +4 -4
- package/app-shell.mjs +10 -10
- package/{base-element-d5abe37a.js → base-element-58a3f9ea.js} +1 -1
- package/{base-element-c3dc926e.mjs → base-element-67ae173f.mjs} +2 -2
- 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-4b94b017.mjs +62 -0
- package/class-map-b5efe8da.js +9 -0
- package/code-snippet.js +9 -9
- package/code-snippet.mjs +1276 -1213
- package/{dialog-8ee07177.js → dialog-79036d60.js} +4 -4
- package/{dialog-85c21333.mjs → dialog-9ac44447.mjs} +39 -39
- package/dialog.js +1 -1
- package/dialog.mjs +8 -8
- package/{directive-helpers-fce8cf91.js → directive-helpers-0ce1f995.js} +2 -2
- package/{directive-helpers-725a181d.mjs → directive-helpers-e3ea6592.mjs} +3 -3
- 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-7bc382d8.js → event-options-3f5eb195.js} +1 -1
- package/{event-options-3937d997.mjs → event-options-78d6cf94.mjs} +1 -1
- package/{form-element-6dbd7afa.mjs → form-element-bd973124.mjs} +4 -4
- package/{form-element-d4e7bcdb.js → form-element-ead758d4.js} +2 -2
- package/{foundation-c580100a.mjs → foundation-3f556da7.mjs} +78 -28
- package/{foundation-3f55a9dc.js → foundation-62d4413d.js} +24 -3
- 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-639ed018.mjs → if-defined-c367f208.mjs} +1 -1
- package/if-defined-f1c45245.js +5 -0
- package/index.js +1 -1
- package/index.mjs +120 -121
- package/linear-progress.js +6 -6
- package/linear-progress.mjs +13 -13
- package/{list-defdaa3b.js → list-05db7fed.js} +2 -2
- package/{list-d616957b.mjs → list-066f5de4.mjs} +3 -3
- package/list-expansion.js +4 -4
- package/list-expansion.mjs +25 -25
- package/{list-item-3fa66f09.js → list-item-8da7ba96.js} +3 -3
- package/{list-item-d5c05e10.mjs → list-item-ba77097d.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-10e977f2.mjs → mwc-checkbox-base-3da36456.mjs} +21 -21
- package/{mwc-checkbox-base-435c1f1d.js → mwc-checkbox-base-d46c7666.js} +9 -9
- package/{mwc-checkbox.css-b7abc7fd.mjs → mwc-checkbox.css-8f4f1a9b.mjs} +1 -1
- package/{mwc-checkbox.css-956e3d6c.js → mwc-checkbox.css-b3434429.js} +1 -1
- package/{mwc-drawer-base-f44fcf34.js → mwc-drawer-base-8eecb1de.js} +6 -6
- package/{mwc-drawer-base-b2b772c3.mjs → mwc-drawer-base-fe660bdf.mjs} +10 -10
- package/{mwc-icon-b96fb867.js → mwc-icon-8c9cd0c9.js} +2 -2
- package/{mwc-icon-c7013880.mjs → mwc-icon-ba18383d.mjs} +2 -2
- package/{mwc-line-ripple-directive-a97ce725.js → mwc-line-ripple-directive-d1cf9570.js} +3 -3
- package/{mwc-line-ripple-directive-c3e1f04a.mjs → mwc-line-ripple-directive-ffce2cff.mjs} +6 -6
- package/{mwc-list-base-c0f8af1c.mjs → mwc-list-base-32d4ac31.mjs} +9 -9
- package/{mwc-list-base-7d5f7278.js → mwc-list-base-cb3500b4.js} +4 -4
- package/{mwc-list-item-base-803b9771.js → mwc-list-item-base-4a4d1e1b.js} +8 -8
- package/{mwc-list-item-base-acef0223.mjs → mwc-list-item-base-8654347d.mjs} +7 -7
- package/{mwc-list-item.css-401e2407.js → mwc-list-item.css-25adc0c4.js} +1 -1
- package/{mwc-list-item.css-b5481d96.mjs → mwc-list-item.css-b0009fc7.mjs} +1 -1
- package/{mwc-menu-base-8970b43d.mjs → mwc-menu-base-572a76b9.mjs} +11 -11
- package/{mwc-menu-base-ac49fe54.js → mwc-menu-base-f14ec544.js} +17 -17
- package/{mwc-radio-base-442d495a.js → mwc-radio-base-470b4fcc.js} +4 -4
- package/{mwc-radio-base-c29e6f42.mjs → mwc-radio-base-9446d39b.mjs} +11 -11
- package/{mwc-radio.css-388ad26d.js → mwc-radio.css-4e140252.js} +1 -1
- package/{mwc-radio.css-4694aa9c.mjs → mwc-radio.css-7454bb11.mjs} +1 -1
- package/{mwc-slider.css-336f809b.mjs → mwc-slider.css-10adbaf8.mjs} +12 -12
- package/{mwc-slider.css-48f02f1e.js → mwc-slider.css-9dd57b10.js} +11 -11
- package/{mwc-tab-base-7fb3d339.mjs → mwc-tab-base-4ba47acc.mjs} +14 -14
- package/{mwc-tab-base-1a19b299.js → mwc-tab-base-fc3ffb43.js} +13 -13
- package/{mwc-top-app-bar-base-14e0a018.js → mwc-top-app-bar-base-0304e67f.js} +8 -8
- package/{mwc-top-app-bar-base-79c87e69.mjs → mwc-top-app-bar-base-adc4168a.mjs} +22 -24
- package/nav-list-item.js +2 -2
- package/nav-list-item.mjs +13 -13
- package/package.json +1 -1
- package/{property-074570d1.js → property-57f6f6fe.js} +1 -1
- package/{property-ca27685b.mjs → property-9b6ea53b.mjs} +9 -9
- package/{query-2ba749b7.js → query-680f1868.js} +1 -1
- package/{query-assigned-elements-514e5265.mjs → query-assigned-elements-4a39219d.mjs} +153 -152
- package/query-assigned-elements-f623705d.js +31 -0
- package/{query-assigned-nodes-9ec0fa5f.js → query-assigned-nodes-99eae71d.js} +1 -1
- package/{query-assigned-nodes-bea12e0c.mjs → query-assigned-nodes-df691e78.mjs} +1 -1
- package/{query-1e7846ea.mjs → query-d843aa92.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-227497d3.mjs → ripple-handlers-321219b8.mjs} +10 -10
- package/{ripple-handlers-2176f137.js → ripple-handlers-c82b1232.js} +5 -5
- 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-0974a8e5.js +5 -0
- package/{state-6f7e570d.mjs → state-b5e865db.mjs} +1 -1
- 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-88d2563f.js +5 -0
- package/style-map-bc3ed3e0.mjs +44 -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-507c6a06.js → textfield-0993c163.js} +12 -12
- package/{textfield-276b0ded.mjs → textfield-2cee5a1a.mjs} +14 -14
- 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 +32 -11
- package/tooltip.mjs +611 -516
- package/{top-app-bar-34e85527.js → top-app-bar-a531c1b4.js} +1 -1
- package/{top-app-bar-a236c3bc.mjs → top-app-bar-f83386e0.mjs} +1 -1
- package/top-app-bar-fixed.js +89 -5
- package/top-app-bar-fixed.mjs +279 -37
- 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-e6a11c8a.js +1 -0
- package/tslib.es6-f1eaf65c.mjs +82 -0
- package/typography.js +3 -3
- package/typography.mjs +2 -2
- package/{utils-dc65fdc9.mjs → utils-2932417c.mjs} +2 -2
- package/class-map-08c84aeb.mjs +0 -62
- package/class-map-50b8edb4.js +0 -9
- package/foundation-2334d146.mjs +0 -60
- package/foundation-e830bd94.js +0 -22
- package/if-defined-cb12d481.js +0 -5
- package/query-assigned-elements-07e38f46.js +0 -33
- package/state-949232e6.js +0 -5
- package/style-map-2cb0fb63.mjs +0 -40
- package/style-map-3056a771.js +0 -5
- package/tslib.es6-6b53b818.js +0 -1
- package/tslib.es6-b5e819a6.mjs +0 -82
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";const
|
1
|
+
"use strict";const s=require("./tslib.es6-e6a11c8a.js"),A=require("./query-assigned-elements-f623705d.js"),K=require("./mwc-list-base-cb3500b4.js"),U=require("./base-element-58a3f9ea.js"),E=require("./observer-a096ab43.js"),N=require("./utils-a8190a39.js"),a=require("./property-57f6f6fe.js"),v=require("./state-0974a8e5.js"),F=require("./query-680f1868.js"),P=require("./class-map-b5efe8da.js"),j=require("./style-map-88d2563f.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=s.__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(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}();/**
|
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){s.__extends(e,n);function e(t){var i=n.call(this,s.__assign(s.__assign({},e.defaultAdapter),t))||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(e,"cssClasses",{get:function(){return X},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return Q},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return L},enumerable:!1,configurable:!0}),Object.defineProperty(e,"Corner",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"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}),e.prototype.init=function(){var t=e.cssClasses,i=t.ROOT,o=t.OPEN;if(!this.adapter.hasClass(i))throw new Error(i+" class required in root element.");this.adapter.hasClass(o)&&(this.isSurfaceOpen=!0)},e.prototype.destroy=function(){clearTimeout(this.openAnimationEndTimerId),clearTimeout(this.closeAnimationEndTimerId),cancelAnimationFrame(this.animationRequestId)},e.prototype.setAnchorCorner=function(t){this.anchorCorner=t},e.prototype.flipCornerHorizontally=function(){this.originCorner=this.originCorner^l.RIGHT},e.prototype.setAnchorMargin=function(t){this.anchorMargin.top=t.top||0,this.anchorMargin.right=t.right||0,this.anchorMargin.bottom=t.bottom||0,this.anchorMargin.left=t.left||0},e.prototype.setIsHoisted=function(t){this.isHoistedElement=t},e.prototype.setFixedPosition=function(t){this.isFixedPosition=t},e.prototype.isFixed=function(){return this.isFixedPosition},e.prototype.setAbsolutePosition=function(t,i){this.position.x=this.isFinite(t)?t:0,this.position.y=this.isFinite(i)?i:0},e.prototype.setIsHorizontallyCenteredOnViewport=function(t){this.isHorizontallyCenteredOnViewport=t},e.prototype.setQuickOpen=function(t){this.isQuickOpen=t},e.prototype.setMaxHeight=function(t){this.maxHeight=t},e.prototype.setOpenBottomBias=function(t){this.openBottomBias=t},e.prototype.isOpen=function(){return this.isSurfaceOpen},e.prototype.open=function(){var t=this;this.isSurfaceOpen||(this.adapter.notifyOpening(),this.adapter.saveFocus(),this.isQuickOpen?(this.isSurfaceOpen=!0,this.adapter.addClass(e.cssClasses.OPEN),this.dimensions=this.adapter.getInnerDimensions(),this.autoposition(),this.adapter.notifyOpen()):(this.adapter.addClass(e.cssClasses.ANIMATING_OPEN),this.animationRequestId=requestAnimationFrame(function(){t.dimensions=t.adapter.getInnerDimensions(),t.autoposition(),t.adapter.addClass(e.cssClasses.OPEN),t.openAnimationEndTimerId=setTimeout(function(){t.openAnimationEndTimerId=0,t.adapter.removeClass(e.cssClasses.ANIMATING_OPEN),t.adapter.notifyOpen()},L.TRANSITION_OPEN_DURATION)}),this.isSurfaceOpen=!0))},e.prototype.close=function(t){var i=this;if(t===void 0&&(t=!1),!!this.isSurfaceOpen){if(this.adapter.notifyClosing(),this.isQuickOpen){this.isSurfaceOpen=!1,t||this.maybeRestoreFocus(),this.adapter.removeClass(e.cssClasses.OPEN),this.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),this.adapter.notifyClose();return}this.adapter.addClass(e.cssClasses.ANIMATING_CLOSED),requestAnimationFrame(function(){i.adapter.removeClass(e.cssClasses.OPEN),i.adapter.removeClass(e.cssClasses.IS_OPEN_BELOW),i.closeAnimationEndTimerId=setTimeout(function(){i.closeAnimationEndTimerId=0,i.adapter.removeClass(e.cssClasses.ANIMATING_CLOSED),i.adapter.notifyClose()},L.TRANSITION_CLOSE_DURATION)}),this.isSurfaceOpen=!1,t||this.maybeRestoreFocus()}},e.prototype.handleBodyClick=function(t){var i=t.target;this.adapter.isElementInContainer(i)||this.close()},e.prototype.handleKeydown=function(t){var i=t.keyCode,o=t.key,r=o==="Escape"||i===27;r&&this.close()},e.prototype.autoposition=function(){var t;this.measurements=this.getAutoLayoutmeasurements();var i=this.getoriginCorner(),o=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=(t={},t[c]=f,t[r]=M,t);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(o?o+"px":""),this.hasBit(i,l.BOTTOM)||this.adapter.addClass(e.cssClasses.IS_OPEN_BELOW)},e.prototype.getAutoLayoutmeasurements=function(){var t=this.adapter.getAnchorDimensions(),i=this.adapter.getBodyDimensions(),o=this.adapter.getWindowDimensions(),r=this.adapter.getWindowScroll();return t||(t={top:this.position.y,right:this.position.x,bottom:this.position.y,left:this.position.x,width:0,height:0}),{anchorSize:t,bodySize:i,surfaceSize:this.dimensions,viewportDistance:{top:t.top,right:o.width-t.right,bottom:o.height-t.bottom,left:t.left},viewportSize:o,windowScroll:r}},e.prototype.getoriginCorner=function(){var t=this.originCorner,i=this.measurements,o=i.viewportDistance,r=i.anchorSize,c=i.surfaceSize,f=e.numbers.MARGIN_TO_EDGE,M=this.hasBit(this.anchorCorner,l.BOTTOM),y,I;M?(y=o.top-f+this.anchorMargin.bottom,I=o.bottom-f-this.anchorMargin.bottom):(y=o.top-f+this.anchorMargin.top,I=o.bottom-f+r.height-this.anchorMargin.top);var S=I-c.height>0;!S&&y>I+this.openBottomBias&&(t=this.setBit(t,l.BOTTOM));var p=this.adapter.isRtl(),T=this.hasBit(this.anchorCorner,l.FLIP_RTL),_=this.hasBit(this.anchorCorner,l.RIGHT)||this.hasBit(t,l.RIGHT),C=!1;p&&T?C=!_:C=_;var w,B;C?(w=o.left+r.width+this.anchorMargin.right,B=o.right-this.anchorMargin.right):(w=o.left+this.anchorMargin.left,B=o.right+r.width-this.anchorMargin.left);var D=w-c.width>0,G=B-c.width>0,$=this.hasBit(t,l.FLIP_RTL)&&this.hasBit(t,l.RIGHT);return G&&$&&p||!D&&$?t=this.unsetBit(t,l.RIGHT):(D&&C&&p||D&&!C&&_||!G&&w>=B)&&(t=this.setBit(t,l.RIGHT)),t},e.prototype.getMenuSurfaceMaxHeight=function(t){if(this.maxHeight>0)return this.maxHeight;var i=this.measurements.viewportDistance,o=0,r=this.hasBit(t,l.BOTTOM),c=this.hasBit(this.anchorCorner,l.BOTTOM),f=e.numbers.MARGIN_TO_EDGE;return r?(o=i.top+this.anchorMargin.top-f,c||(o+=this.measurements.anchorSize.height)):(o=i.bottom-this.anchorMargin.bottom+this.measurements.anchorSize.height-f,c&&(o-=this.measurements.anchorSize.height)),o},e.prototype.getHorizontalOriginOffset=function(t){var i=this.measurements.anchorSize,o=this.hasBit(t,l.RIGHT),r=this.hasBit(this.anchorCorner,l.RIGHT);if(o){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},e.prototype.getVerticalOriginOffset=function(t){var i=this.measurements.anchorSize,o=this.hasBit(t,l.BOTTOM),r=this.hasBit(this.anchorCorner,l.BOTTOM),c=0;return o?c=r?i.height-this.anchorMargin.top:-this.anchorMargin.bottom:c=r?i.height+this.anchorMargin.bottom:this.anchorMargin.top,c},e.prototype.adjustPositionForHoistedElement=function(t){var i,o,r=this.measurements,c=r.windowScroll,f=r.viewportDistance,M=r.surfaceSize,y=r.viewportSize,I=Object.keys(t);try{for(var S=s.__values(I),p=S.next();!p.done;p=S.next()){var T=p.value,_=t[T]||0;if(this.isHorizontallyCenteredOnViewport&&(T==="left"||T==="right")){t[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),t[T]=_}}catch(C){i={error:C}}finally{try{p&&!p.done&&(o=S.return)&&o.call(S)}finally{if(i)throw i.error}}},e.prototype.maybeRestoreFocus=function(){var t=this,i=this.adapter.isFocused(),o=this.adapter.getOwnerDocument?this.adapter.getOwnerDocument():document,r=o.activeElement&&this.adapter.isElementInContainer(o.activeElement);(i||r)&&setTimeout(function(){t.adapter.restoreFocus()},L.TOUCH_EVENT_WAIT_MS)},e.prototype.hasBit=function(t,i){return!!(t&i)},e.prototype.setBit=function(t,i){return t|i},e.prototype.unsetBit=function(t,i){return t^i},e.prototype.isFinite=function(t){return typeof t=="number"&&isFinite(t)},e}(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 e=this.getRootClasses(),t=this.getRootStyles();return A.x`
|
77
77
|
<div
|
78
|
-
class=${P.o(
|
79
|
-
style="${j.
|
78
|
+
class=${P.o(e)}
|
79
|
+
style="${j.o(t)}"
|
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.x`<slot></slot>`}createAdapter(){return Object.assign(Object.assign({},N.addHasRemoveClass(this.mdcRoot)),{hasAnchor:()=>!!this.anchor,notifyClose:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("closed",e);this.open=!1,this.mdcRoot.dispatchEvent(t)},notifyClosing:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("closing",e);this.mdcRoot.dispatchEvent(t)},notifyOpen:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("opened",e);this.open=!0,this.mdcRoot.dispatchEvent(t)},notifyOpening:()=>{const e={bubbles:!0,composed:!0},t=new CustomEvent("opening",e);this.mdcRoot.dispatchEvent(t)},isElementInContainer:()=>!1,isRtl:()=>this.mdcRoot?getComputedStyle(this.mdcRoot).direction==="rtl":!1,setTransformOrigin:e=>{this.mdcRoot&&(this.styleTransformOrigin=e)},isFocused:()=>N.doesElementContainFocus(this),saveFocus:()=>{const e=N.deepActiveElementPath(),t=e.length;t||(this.previouslyFocused=null),this.previouslyFocused=e[t-1]},restoreFocus:()=>{this.previouslyFocused&&"focus"in this.previouslyFocused&&this.previouslyFocused.focus()},getInnerDimensions:()=>{const e=this.mdcRoot;return e?{width:e.offsetWidth,height:e.offsetHeight}:{width:0,height:0}},getAnchorDimensions:()=>{const e=this.anchor;return e?e.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:e=>{this.mdcRoot&&(this.styleLeft="left"in e?`${e.left}px`:"",this.styleRight="right"in e?`${e.right}px`:"",this.styleTop="top"in e?`${e.top}px`:"",this.styleBottom="bottom"in e?`${e.bottom}px`:"")},setMaxHeight:async e=>{this.mdcRoot&&(this.styleMaxHeight=e,await this.updateComplete,this.styleMaxHeight=`var(--mdc-menu-max-height, ${e})`)}})}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onBodyClick(e){if(this.stayOpenOnBodyClick)return;e.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(e,t){this.mdcFoundation&&(e?this.mdcFoundation.open():t!==void 0&&this.mdcFoundation.close())}close(){this.open=!1}show(){this.open=!0}}s.__decorate([F.i(".mdc-menu-surface")],h.prototype,"mdcRoot",void 0);s.__decorate([F.i("slot")],h.prototype,"slotElement",void 0);s.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.fixed&&this.mdcFoundation.setIsHoisted(n)})],h.prototype,"absolute",void 0);s.__decorate([a.n({type:Boolean})],h.prototype,"fullwidth",void 0);s.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&!this.absolute&&this.mdcFoundation.setFixedPosition(n)})],h.prototype,"fixed",void 0);s.__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);s.__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);s.__decorate([a.n({type:Boolean}),E.observer(function(n){this.mdcFoundation&&this.mdcFoundation.setQuickOpen(n)})],h.prototype,"quick",void 0);s.__decorate([a.n({type:Boolean,reflect:!0}),E.observer(function(n,e){this.onOpenChanged(n,e)})],h.prototype,"open",void 0);s.__decorate([a.n({type:Boolean})],h.prototype,"stayOpenOnBodyClick",void 0);s.__decorate([v.t(),E.observer(function(n){this.mdcFoundation&&(n?this.mdcFoundation.setAnchorCorner(n):this.mdcFoundation.setAnchorCorner(n))})],h.prototype,"bitwiseCorner",void 0);s.__decorate([a.n({type:String}),E.observer(function(n){if(this.mdcFoundation){const e=n==="START"||n==="END",t=this.previousMenuCorner===null,i=!t&&n!==this.previousMenuCorner;e&&(i||t&&n==="END")&&(this.bitwiseCorner=this.bitwiseCorner^l.RIGHT,this.mdcFoundation.flipCornerHorizontally(),this.previousMenuCorner=n)}})],h.prototype,"menuCorner",void 0);s.__decorate([a.n({type:String}),E.observer(function(n){if(this.mdcFoundation&&n){let e=Z[n];this.menuCorner==="END"&&(e=e^l.RIGHT),this.bitwiseCorner=e}})],h.prototype,"corner",void 0);s.__decorate([v.t()],h.prototype,"styleTop",void 0);s.__decorate([v.t()],h.prototype,"styleLeft",void 0);s.__decorate([v.t()],h.prototype,"styleRight",void 0);s.__decorate([v.t()],h.prototype,"styleBottom",void 0);s.__decorate([v.t()],h.prototype,"styleMaxHeight",void 0);s.__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=s.__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"},tt={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 et=function(n){s.__extends(e,n);function e(t){var i=n.call(this,s.__assign(s.__assign({},e.defaultAdapter),t))||this;return i.closeAnimationEndTimerId=0,i.defaultFocusState=b.LIST_ROOT,i.selectedIndex=-1,i}return Object.defineProperty(e,"cssClasses",{get:function(){return H},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return x},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return tt},enumerable:!1,configurable:!0}),Object.defineProperty(e,"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}),e.prototype.destroy=function(){this.closeAnimationEndTimerId&&clearTimeout(this.closeAnimationEndTimerId),this.adapter.closeSurface()},e.prototype.handleKeydown=function(t){var i=t.key,o=t.keyCode,r=i==="Tab"||o===9;r&&this.adapter.closeSurface(!0)},e.prototype.handleItemAction=function(t){var i=this,o=this.adapter.getElementIndex(t);if(!(o<0)){this.adapter.notifySelected({index:o});var r=this.adapter.getAttributeFromElementAtIndex(o,x.SKIP_RESTORE_FOCUS)==="true";this.adapter.closeSurface(r),this.closeAnimationEndTimerId=setTimeout(function(){var c=i.adapter.getElementIndex(t);c>=0&&i.adapter.isSelectableItemAtIndex(c)&&i.setSelectedIndex(c)},V.numbers.TRANSITION_CLOSE_DURATION)}},e.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}},e.prototype.setDefaultFocusState=function(t){this.defaultFocusState=t},e.prototype.getSelectedIndex=function(){return this.selectedIndex},e.prototype.setSelectedIndex=function(t){if(this.validatedIndex(t),!this.adapter.isSelectableItemAtIndex(t))throw new Error("MDCMenuFoundation: No selection group at specified index.");var i=this.adapter.getSelectedSiblingOfItemAtIndex(t);i>=0&&(this.adapter.removeAttributeFromElementAtIndex(i,x.ARIA_CHECKED_ATTR),this.adapter.removeClassFromElementAtIndex(i,H.MENU_SELECTED_LIST_ITEM)),this.adapter.addClassToElementAtIndex(t,H.MENU_SELECTED_LIST_ITEM),this.adapter.addAttributeToElementAtIndex(t,x.ARIA_CHECKED_ATTR,"true"),this.selectedIndex=t},e.prototype.setEnabled=function(t,i){this.validatedIndex(t),i?(this.adapter.removeClassFromElementAtIndex(t,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.ARIA_DISABLED_ATTR,"false")):(this.adapter.addClassToElementAtIndex(t,d.LIST_ITEM_DISABLED_CLASS),this.adapter.addAttributeToElementAtIndex(t,x.ARIA_DISABLED_ATTR,"true"))},e.prototype.validatedIndex=function(t){var i=this.adapter.getMenuItemCount(),o=t>=0&&t<i;if(!o)throw new Error("MDCMenuFoundation: No list item at specified index.")},e}(q);const it=et;/**
|
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=it,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 e=this.listElement;return e?e.items:[]}get index(){const e=this.listElement;return e?e.index:-1}get selected(){const e=this.listElement;return e?e.selected:null}render(){return this.renderSurface()}renderSurface(){const e=this.getSurfaceClasses();return A.x`
|
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(e)}
|
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 e=this.innerRole==="menu"?"menuitem":"option",t=this.renderListClasses();return A.x`
|
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(t)}
|
185
|
+
.itemRoles=${e}
|
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:(t
|
190
|
+
</mwc-list>`}renderListClasses(){return{"mdc-deprecated-list":!0}}createAdapter(){return{addClassToElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&(t==="mdc-menu-item--selected"?this.forceGroupSelection&&!o.selected&&i.toggle(e,!0):o.classList.add(t))},removeClassFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&(t==="mdc-menu-item--selected"?o.selected&&i.toggle(e,!1):o.classList.remove(t))},addAttributeToElementAtIndex:(e,t,i)=>{const o=this.listElement;if(!o)return;const r=o.items[e];r&&r.setAttribute(t,i)},removeAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return;const o=i.items[e];o&&o.removeAttribute(t)},getAttributeFromElementAtIndex:(e,t)=>{const i=this.listElement;if(!i)return null;const o=i.items[e];return o?o.getAttribute(t):null},elementContainsClass:(e,t)=>e.classList.contains(t),closeSurface:()=>{this.open=!1},getElementIndex:e=>{const t=this.listElement;return t?t.items.indexOf(e):-1},notifySelected:()=>{},getMenuItemCount:()=>{const e=this.listElement;return e?e.items.length:0},focusItemAtIndex:e=>{const t=this.listElement;if(!t)return;const i=t.items[e];i&&i.focus()},focusListRoot:()=>{this.listElement&&this.listElement.focus()},getSelectedSiblingOfItemAtIndex:e=>{const t=this.listElement;if(!t)return-1;const i=t.items[e];if(!i||!i.group)return-1;for(let o=0;o<t.items.length;o++){if(o===e)continue;const r=t.items[o];if(r.selected&&r.group===i.group)return o}return-1},isSelectableItemAtIndex:e=>{const t=this.listElement;if(!t)return!1;const i=t.items[e];return i?i.hasAttribute("group"):!1}}}onKeydown(e){this.mdcFoundation&&this.mdcFoundation.handleKeydown(e)}onAction(e){const t=this.listElement;if(this.mdcFoundation&&t){const i=e.detail.index,o=t.items[i];o&&this.mdcFoundation.handleItemAction(o)}}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 e=this.listElement;e&&(this._listUpdateComplete=e.updateComplete,await this._listUpdateComplete)}select(e){const t=this.listElement;t&&t.select(e)}close(){this.open=!1}show(){this.open=!0}getFocusedItemIndex(){const e=this.listElement;return e?e.getFocusedItemIndex():-1}focusItemAtIndex(e){const t=this.listElement;t&&t.focusItemAtIndex(e)}layout(e=!0){const t=this.listElement;t&&t.layout(e)}}s.__decorate([F.i(".mdc-menu")],u.prototype,"mdcRoot",void 0);s.__decorate([F.i("slot")],u.prototype,"slotElement",void 0);s.__decorate([a.n({type:Object})],u.prototype,"anchor",void 0);s.__decorate([a.n({type:Boolean,reflect:!0})],u.prototype,"open",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"quick",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"wrapFocus",void 0);s.__decorate([a.n({type:String})],u.prototype,"innerRole",void 0);s.__decorate([a.n({type:String})],u.prototype,"innerAriaLabel",void 0);s.__decorate([a.n({type:String})],u.prototype,"corner",void 0);s.__decorate([a.n({type:Number})],u.prototype,"x",void 0);s.__decorate([a.n({type:Number})],u.prototype,"y",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"absolute",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"multi",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"activatable",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"fixed",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"forceGroupSelection",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"fullwidth",void 0);s.__decorate([a.n({type:String})],u.prototype,"menuCorner",void 0);s.__decorate([a.n({type:Boolean})],u.prototype,"stayOpenOnBodyClick",void 0);s.__decorate([a.n({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-e6a11c8a.js"),p=require("./ripple-handlers-c82b1232.js"),f=require("./aria-property-849c8816.js"),v=require("./form-element-ead758d4.js"),m=require("./observer-a096ab43.js"),c=require("./query-assigned-elements-f623705d.js"),a=require("./property-57f6f6fe.js"),d=require("./state-0974a8e5.js"),g=require("./event-options-3f5eb195.js"),b=require("./query-680f1868.js"),_=require("./class-map-b5efe8da.js"),u=require("./if-defined-f1c45245.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.x`<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.x`
|
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.n({type:Boolean})],i.prototype,"global",void 0);r.__decorate([a.n({type:Boolean,reflect:!0})],i.prototype,"checked",null);r.__decorate([a.n({type:Boolean}),m.observer(function(o){this.mdcFoundation.setDisabled(o)})],i.prototype,"disabled",void 0);r.__decorate([a.n({type:String}),m.observer(function(o){this._handleUpdatedValue(o)})],i.prototype,"value",void 0);r.__decorate([a.n({type:String})],i.prototype,"name",void 0);r.__decorate([a.n({type:Boolean})],i.prototype,"reducedTouchTarget",void 0);r.__decorate([a.n({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.n({attribute:"aria-label"})],i.prototype,"ariaLabel",void 0);r.__decorate([f.ariaProperty,a.n({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 { _ as v, a as c, b as i } from "./tslib.es6-f1eaf65c.mjs";
|
2
|
+
import { e as g, R as y } from "./ripple-handlers-321219b8.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-bd973124.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 { x as u } from "./query-assigned-elements-4a39219d.mjs";
|
7
|
+
import { n as a } from "./property-9b6ea53b.mjs";
|
8
|
+
import { t as l } from "./state-b5e865db.mjs";
|
9
|
+
import { e as C } from "./event-options-78d6cf94.mjs";
|
10
|
+
import { i as b } from "./query-d843aa92.mjs";
|
11
|
+
import { o as E } from "./class-map-4b94b017.mjs";
|
12
|
+
import { l as h } from "./if-defined-c367f208.mjs";
|
13
|
+
import { a as k } from "./utils-2932417c.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 { _ as F, a as x, b as o } from "./tslib.es6-f1eaf65c.mjs";
|
2
|
+
import { e as H, R as O } from "./ripple-handlers-321219b8.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-bd973124.mjs";
|
5
|
+
import { x as _, A as g, i as $ } from "./query-assigned-elements-4a39219d.mjs";
|
6
|
+
import { n as f } from "./property-9b6ea53b.mjs";
|
7
|
+
import { t as b } from "./state-b5e865db.mjs";
|
8
|
+
import { i as y } from "./query-d843aa92.mjs";
|
9
|
+
import { o as P } from "./class-map-4b94b017.mjs";
|
10
|
+
import { l as R } from "./if-defined-c367f208.mjs";
|
11
|
+
import { o as W } from "./style-map-bc3ed3e0.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 !!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 && !!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;
|