@angular/material 12.2.5 → 12.2.6
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/bundles/material-chips.umd.js +1 -1
- package/bundles/material-core.umd.js +2 -2
- package/bundles/material-core.umd.js.map +1 -1
- package/bundles/material-datepicker.umd.js +1 -1
- package/bundles/material-datepicker.umd.js.map +1 -1
- package/bundles/material-form-field.umd.js +1 -1
- package/bundles/material-menu.umd.js +109 -93
- package/bundles/material-menu.umd.js.map +1 -1
- package/chips/index.metadata.json +1 -1
- package/core/index.metadata.json +1 -1
- package/datepicker/_datepicker-theme.scss +1 -4
- package/esm2015/chips/chip-list.js +1 -1
- package/esm2015/core/common-behaviors/common-module.js +1 -1
- package/esm2015/core/version.js +1 -1
- package/esm2015/datepicker/date-range-input.js +2 -2
- package/esm2015/form-field/form-field.js +1 -1
- package/esm2015/menu/menu-content.js +16 -11
- package/esm2015/menu/menu-module.js +10 -20
- package/esm2015/menu/menu-trigger.js +33 -21
- package/esm2015/menu/public-api.js +2 -2
- package/fesm2015/chips.js +1 -1
- package/fesm2015/core.js +2 -2
- package/fesm2015/core.js.map +1 -1
- package/fesm2015/datepicker.js +1 -1
- package/fesm2015/datepicker.js.map +1 -1
- package/fesm2015/form-field.js +1 -1
- package/fesm2015/menu.js +57 -50
- package/fesm2015/menu.js.map +1 -1
- package/form-field/index.metadata.json +1 -1
- package/menu/index.metadata.json +1 -1
- package/menu/menu-content.d.ts +6 -4
- package/menu/menu-module.d.ts +0 -6
- package/menu/menu-trigger.d.ts +7 -2
- package/menu/public-api.d.ts +1 -1
- package/package.json +2 -2
- package/prebuilt-themes/deeppurple-amber.css +1 -1
- package/prebuilt-themes/indigo-pink.css +1 -1
- package/prebuilt-themes/pink-bluegrey.css +1 -1
- package/prebuilt-themes/purple-green.css +1 -1
- package/schematics/ng-add/index.js +1 -1
- package/schematics/ng-add/index.mjs +1 -1
|
@@ -1027,7 +1027,7 @@
|
|
|
1027
1027
|
providers: [
|
|
1028
1028
|
{ provide: MAT_FORM_FIELD, useExisting: MatFormField },
|
|
1029
1029
|
],
|
|
1030
|
-
styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
|
|
1030
|
+
styles: [".mat-form-field{display:inline-block;position:relative;text-align:left}[dir=rtl] .mat-form-field{text-align:right}.mat-form-field-wrapper{position:relative}.mat-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-form-field-prefix,.mat-form-field-suffix{white-space:nowrap;flex:none;position:relative}.mat-form-field-infix{display:block;position:relative;flex:auto;min-width:0;width:180px}.cdk-high-contrast-active .mat-form-field-infix{border-image:linear-gradient(transparent, transparent)}.mat-form-field-label-wrapper{position:absolute;left:0;box-sizing:content-box;width:100%;height:100%;overflow:hidden;pointer-events:none}[dir=rtl] .mat-form-field-label-wrapper{left:auto;right:0}.mat-form-field-label{position:absolute;left:0;font:inherit;pointer-events:none;width:100%;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),width 400ms cubic-bezier(0.25, 0.8, 0.25, 1);display:none}[dir=rtl] .mat-form-field-label{transform-origin:100% 0;left:auto;right:0}.mat-form-field-empty.mat-form-field-label,.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-label{display:block}.mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-form-field-autofill-control:-webkit-autofill+.mat-form-field-label-wrapper .mat-form-field-label{display:block;transition:none}.mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:none}.mat-form-field-can-float .mat-input-server:focus+.mat-form-field-label-wrapper .mat-form-field-label,.mat-form-field-can-float .mat-input-server[placeholder]:not(:placeholder-shown)+.mat-form-field-label-wrapper .mat-form-field-label{display:block}.mat-form-field-label:not(.mat-form-field-empty){transition:none}.mat-form-field-underline{position:absolute;width:100%;pointer-events:none;transform:scale3d(1, 1.0001, 1)}.mat-form-field-ripple{position:absolute;left:0;width:100%;transform-origin:50%;transform:scaleX(0.5);opacity:0;transition:background-color 300ms cubic-bezier(0.55, 0, 0.55, 0.2)}.mat-form-field.mat-focused .mat-form-field-ripple,.mat-form-field.mat-form-field-invalid .mat-form-field-ripple{opacity:1;transform:none;transition:transform 300ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 300ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-subscript-wrapper{position:absolute;box-sizing:border-box;width:100%;overflow:hidden}.mat-form-field-subscript-wrapper .mat-icon,.mat-form-field-label-wrapper .mat-icon{width:1em;height:1em;font-size:inherit;vertical-align:baseline}.mat-form-field-hint-wrapper{display:flex}.mat-form-field-hint-spacer{flex:1 0 1em}.mat-error{display:block}.mat-form-field-control-wrapper{position:relative}.mat-form-field-hint-end{order:1}.mat-form-field._mat-animation-noopable .mat-form-field-label,.mat-form-field._mat-animation-noopable .mat-form-field-ripple{transition:none}\n", ".mat-form-field-appearance-fill .mat-form-field-flex{border-radius:4px 4px 0 0;padding:.75em .75em 0 .75em}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-flex{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-form-field-flex{outline:dashed 3px}.mat-form-field-appearance-fill .mat-form-field-underline::before{content:\"\";display:block;position:absolute;bottom:0;height:1px;width:100%}.mat-form-field-appearance-fill .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-form-field-ripple{height:0}.mat-form-field-appearance-fill:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-fill._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}.mat-form-field-appearance-fill .mat-form-field-subscript-wrapper{padding:0 1em}\n", ".mat-input-element{font:inherit;background:transparent;color:currentColor;border:none;outline:none;padding:0;margin:0;width:100%;max-width:100%;vertical-align:bottom;text-align:inherit;box-sizing:content-box}.mat-input-element:-moz-ui-invalid{box-shadow:none}.mat-input-element::-ms-clear,.mat-input-element::-ms-reveal{display:none}.mat-input-element,.mat-input-element::-webkit-search-cancel-button,.mat-input-element::-webkit-search-decoration,.mat-input-element::-webkit-search-results-button,.mat-input-element::-webkit-search-results-decoration{-webkit-appearance:none}.mat-input-element::-webkit-contacts-auto-fill-button,.mat-input-element::-webkit-caps-lock-indicator,.mat-input-element:not([type=password])::-webkit-credentials-auto-fill-button{visibility:hidden}.mat-input-element[type=date],.mat-input-element[type=datetime],.mat-input-element[type=datetime-local],.mat-input-element[type=month],.mat-input-element[type=week],.mat-input-element[type=time]{line-height:1}.mat-input-element[type=date]::after,.mat-input-element[type=datetime]::after,.mat-input-element[type=datetime-local]::after,.mat-input-element[type=month]::after,.mat-input-element[type=week]::after,.mat-input-element[type=time]::after{content:\" \";white-space:pre;width:1px}.mat-input-element::-webkit-inner-spin-button,.mat-input-element::-webkit-calendar-picker-indicator,.mat-input-element::-webkit-clear-button{font-size:.75em}.mat-input-element::placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-moz-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-moz-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element::-webkit-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element::-webkit-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-input-element:-ms-input-placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-input-element:-ms-input-placeholder:-ms-input-placeholder{-ms-user-select:text}.mat-form-field-hide-placeholder .mat-input-element::placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-moz-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element::-webkit-input-placeholder{opacity:0}.mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{color:transparent !important;-webkit-text-fill-color:transparent;transition:none}.cdk-high-contrast-active .mat-form-field-hide-placeholder .mat-input-element:-ms-input-placeholder{opacity:0}textarea.mat-input-element{resize:vertical;overflow:auto}textarea.mat-input-element.cdk-textarea-autosize{resize:none}textarea.mat-input-element{padding:2px 0;margin:-2px 0}select.mat-input-element{-moz-appearance:none;-webkit-appearance:none;position:relative;background-color:transparent;display:inline-flex;box-sizing:border-box;padding-top:1em;top:-1em;margin-bottom:-1em}select.mat-input-element::-ms-expand{display:none}select.mat-input-element::-moz-focus-inner{border:0}select.mat-input-element:not(:disabled){cursor:pointer}select.mat-input-element::-ms-value{color:inherit;background:none}.mat-focused .cdk-high-contrast-active select.mat-input-element::-ms-value{color:inherit}.mat-form-field-type-mat-native-select .mat-form-field-infix::after{content:\"\";width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid;position:absolute;top:50%;right:0;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-form-field-type-mat-native-select .mat-form-field-infix::after{right:auto;left:0}.mat-form-field-type-mat-native-select .mat-input-element{padding-right:15px}[dir=rtl] .mat-form-field-type-mat-native-select .mat-input-element{padding-right:0;padding-left:15px}.mat-form-field-type-mat-native-select .mat-form-field-label-wrapper{max-width:calc(100% - 10px)}.mat-form-field-type-mat-native-select.mat-form-field-appearance-outline .mat-form-field-infix::after{margin-top:-5px}.mat-form-field-type-mat-native-select.mat-form-field-appearance-fill .mat-form-field-infix::after{margin-top:-10px}\n", ".mat-form-field-appearance-legacy .mat-form-field-label{transform:perspective(100px);-ms-transform:none}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon{width:1em}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button{font:inherit;vertical-align:baseline}.mat-form-field-appearance-legacy .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field-appearance-legacy .mat-form-field-suffix .mat-icon-button .mat-icon{font-size:inherit}.mat-form-field-appearance-legacy .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-legacy .mat-form-field-ripple{top:0;height:2px;overflow:hidden}.cdk-high-contrast-active .mat-form-field-appearance-legacy .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-legacy.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-legacy.mat-form-field-invalid:not(.mat-focused) .mat-form-field-ripple{height:1px}\n", ".mat-form-field-appearance-outline .mat-form-field-wrapper{margin:.25em 0}.mat-form-field-appearance-outline .mat-form-field-flex{padding:0 .75em 0 .75em;margin-top:-0.25em;position:relative}.mat-form-field-appearance-outline .mat-form-field-prefix,.mat-form-field-appearance-outline .mat-form-field-suffix{top:.25em}.mat-form-field-appearance-outline .mat-form-field-outline{display:flex;position:absolute;top:.25em;left:0;right:0;bottom:0;pointer-events:none}.mat-form-field-appearance-outline .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-end{border:1px solid currentColor;min-width:5px}.mat-form-field-appearance-outline .mat-form-field-outline-start{border-radius:5px 0 0 5px;border-right-style:none}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-start{border-right-style:solid;border-left-style:none;border-radius:0 5px 5px 0}.mat-form-field-appearance-outline .mat-form-field-outline-end{border-radius:0 5px 5px 0;border-left-style:none;flex-grow:1}[dir=rtl] .mat-form-field-appearance-outline .mat-form-field-outline-end{border-left-style:solid;border-right-style:none;border-radius:5px 0 0 5px}.mat-form-field-appearance-outline .mat-form-field-outline-gap{border-radius:.000001px;border:1px solid currentColor;border-left-style:none;border-right-style:none}.mat-form-field-appearance-outline.mat-form-field-can-float.mat-form-field-should-float .mat-form-field-outline-gap{border-top-color:transparent}.mat-form-field-appearance-outline .mat-form-field-outline-thick{opacity:0}.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-start,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-end,.mat-form-field-appearance-outline .mat-form-field-outline-thick .mat-form-field-outline-gap{border-width:2px}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline{opacity:0;transition:opacity 100ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick,.mat-form-field-appearance-outline.mat-form-field-invalid .mat-form-field-outline-thick{opacity:1}.cdk-high-contrast-active .mat-form-field-appearance-outline.mat-focused .mat-form-field-outline-thick{border:3px dashed}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline{opacity:0;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-outline:not(.mat-form-field-disabled) .mat-form-field-flex:hover .mat-form-field-outline-thick{opacity:1}.mat-form-field-appearance-outline .mat-form-field-subscript-wrapper{padding:0 1em}.mat-form-field-appearance-outline._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-start,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-end,.mat-form-field-appearance-outline._mat-animation-noopable .mat-form-field-outline-gap{transition:none}\n", ".mat-form-field-appearance-standard .mat-form-field-flex{padding-top:.75em}.mat-form-field-appearance-standard .mat-form-field-underline{height:1px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-underline{height:0;border-top:solid 1px}.mat-form-field-appearance-standard .mat-form-field-ripple{bottom:0;height:2px}.cdk-high-contrast-active .mat-form-field-appearance-standard .mat-form-field-ripple{height:0;border-top:solid 2px}.mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{background-position:0;background-color:transparent}.cdk-high-contrast-active .mat-form-field-appearance-standard.mat-form-field-disabled .mat-form-field-underline{border-top-style:dotted;border-top-width:2px}.mat-form-field-appearance-standard:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{opacity:1;transform:none;transition:opacity 600ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-form-field-appearance-standard._mat-animation-noopable:not(.mat-form-field-disabled) .mat-form-field-flex:hover~.mat-form-field-underline .mat-form-field-ripple{transition:none}\n"]
|
|
1031
1031
|
},] }
|
|
1032
1032
|
];
|
|
1033
1033
|
MatFormField.ctorParameters = function () { return [
|
|
@@ -382,24 +382,14 @@
|
|
|
382
382
|
*/
|
|
383
383
|
var transformMenu = matMenuAnimations.transformMenu;
|
|
384
384
|
|
|
385
|
-
/**
|
|
386
|
-
* @license
|
|
387
|
-
* Copyright Google LLC All Rights Reserved.
|
|
388
|
-
*
|
|
389
|
-
* Use of this source code is governed by an MIT-style license that can be
|
|
390
|
-
* found in the LICENSE file at https://angular.io/license
|
|
391
|
-
*/
|
|
392
385
|
/**
|
|
393
386
|
* Injection token that can be used to reference instances of `MatMenuContent`. It serves
|
|
394
387
|
* as alternative token to the actual `MatMenuContent` class which could cause unnecessary
|
|
395
388
|
* retention of the class and its directive metadata.
|
|
396
389
|
*/
|
|
397
390
|
var MAT_MENU_CONTENT = new core.InjectionToken('MatMenuContent');
|
|
398
|
-
/**
|
|
399
|
-
|
|
400
|
-
*/
|
|
401
|
-
var MatMenuContent = /** @class */ (function () {
|
|
402
|
-
function MatMenuContent(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document, _changeDetectorRef) {
|
|
391
|
+
var _MatMenuContentBase = /** @class */ (function () {
|
|
392
|
+
function _MatMenuContentBase(_template, _componentFactoryResolver, _appRef, _injector, _viewContainerRef, _document, _changeDetectorRef) {
|
|
403
393
|
this._template = _template;
|
|
404
394
|
this._componentFactoryResolver = _componentFactoryResolver;
|
|
405
395
|
this._appRef = _appRef;
|
|
@@ -414,7 +404,7 @@
|
|
|
414
404
|
* Attaches the content with a particular context.
|
|
415
405
|
* @docs-private
|
|
416
406
|
*/
|
|
417
|
-
|
|
407
|
+
_MatMenuContentBase.prototype.attach = function (context) {
|
|
418
408
|
if (context === void 0) { context = {}; }
|
|
419
409
|
if (!this._portal) {
|
|
420
410
|
this._portal = new portal.TemplatePortal(this._template, this._viewContainerRef);
|
|
@@ -444,25 +434,22 @@
|
|
|
444
434
|
* Detaches the content.
|
|
445
435
|
* @docs-private
|
|
446
436
|
*/
|
|
447
|
-
|
|
437
|
+
_MatMenuContentBase.prototype.detach = function () {
|
|
448
438
|
if (this._portal.isAttached) {
|
|
449
439
|
this._portal.detach();
|
|
450
440
|
}
|
|
451
441
|
};
|
|
452
|
-
|
|
442
|
+
_MatMenuContentBase.prototype.ngOnDestroy = function () {
|
|
453
443
|
if (this._outlet) {
|
|
454
444
|
this._outlet.dispose();
|
|
455
445
|
}
|
|
456
446
|
};
|
|
457
|
-
return
|
|
447
|
+
return _MatMenuContentBase;
|
|
458
448
|
}());
|
|
459
|
-
|
|
460
|
-
{ type: core.Directive
|
|
461
|
-
selector: 'ng-template[matMenuContent]',
|
|
462
|
-
providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }],
|
|
463
|
-
},] }
|
|
449
|
+
_MatMenuContentBase.decorators = [
|
|
450
|
+
{ type: core.Directive }
|
|
464
451
|
];
|
|
465
|
-
|
|
452
|
+
_MatMenuContentBase.ctorParameters = function () { return [
|
|
466
453
|
{ type: core.TemplateRef },
|
|
467
454
|
{ type: core.ComponentFactoryResolver },
|
|
468
455
|
{ type: core.ApplicationRef },
|
|
@@ -471,6 +458,22 @@
|
|
|
471
458
|
{ type: undefined, decorators: [{ type: core.Inject, args: [common.DOCUMENT,] }] },
|
|
472
459
|
{ type: core.ChangeDetectorRef }
|
|
473
460
|
]; };
|
|
461
|
+
/**
|
|
462
|
+
* Menu content that will be rendered lazily once the menu is opened.
|
|
463
|
+
*/
|
|
464
|
+
var MatMenuContent = /** @class */ (function (_super) {
|
|
465
|
+
__extends(MatMenuContent, _super);
|
|
466
|
+
function MatMenuContent() {
|
|
467
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
468
|
+
}
|
|
469
|
+
return MatMenuContent;
|
|
470
|
+
}(_MatMenuContentBase));
|
|
471
|
+
MatMenuContent.decorators = [
|
|
472
|
+
{ type: core.Directive, args: [{
|
|
473
|
+
selector: 'ng-template[matMenuContent]',
|
|
474
|
+
providers: [{ provide: MAT_MENU_CONTENT, useExisting: MatMenuContent }],
|
|
475
|
+
},] }
|
|
476
|
+
];
|
|
474
477
|
|
|
475
478
|
/**
|
|
476
479
|
* @license
|
|
@@ -1099,9 +1102,8 @@
|
|
|
1099
1102
|
/** Options for binding a passive event listener. */
|
|
1100
1103
|
var passiveEventListenerOptions = platform.normalizePassiveListenerOptions({ passive: true });
|
|
1101
1104
|
// TODO(andrewseguin): Remove the kebab versions in favor of camelCased attribute selectors
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
function MatMenuTrigger(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu,
|
|
1105
|
+
var _MatMenuTriggerBase = /** @class */ (function () {
|
|
1106
|
+
function _MatMenuTriggerBase(_overlay, _element, _viewContainerRef, scrollStrategy, parentMenu,
|
|
1105
1107
|
// `MatMenuTrigger` is commonly used in combination with a `MatMenuItem`.
|
|
1106
1108
|
// tslint:disable-next-line: lightweight-tokens
|
|
1107
1109
|
_menuItemInstance, _dir,
|
|
@@ -1132,6 +1134,7 @@
|
|
|
1132
1134
|
// Tracking input type is necessary so it's possible to only auto-focus
|
|
1133
1135
|
// the first item of the list when the menu is opened via the keyboard
|
|
1134
1136
|
this._openedBy = undefined;
|
|
1137
|
+
this._ariaHaspopup = true;
|
|
1135
1138
|
/**
|
|
1136
1139
|
* Whether focus should be restored when the menu is closed.
|
|
1137
1140
|
* Note that disabling this option can have accessibility implications
|
|
@@ -1163,7 +1166,21 @@
|
|
|
1163
1166
|
_menuItemInstance._triggersSubmenu = this.triggersSubmenu();
|
|
1164
1167
|
}
|
|
1165
1168
|
}
|
|
1166
|
-
Object.defineProperty(
|
|
1169
|
+
Object.defineProperty(_MatMenuTriggerBase.prototype, "_ariaExpanded", {
|
|
1170
|
+
get: function () {
|
|
1171
|
+
return this.menuOpen || null;
|
|
1172
|
+
},
|
|
1173
|
+
enumerable: false,
|
|
1174
|
+
configurable: true
|
|
1175
|
+
});
|
|
1176
|
+
Object.defineProperty(_MatMenuTriggerBase.prototype, "_ariaControl", {
|
|
1177
|
+
get: function () {
|
|
1178
|
+
return this.menuOpen ? this.menu.panelId : null;
|
|
1179
|
+
},
|
|
1180
|
+
enumerable: false,
|
|
1181
|
+
configurable: true
|
|
1182
|
+
});
|
|
1183
|
+
Object.defineProperty(_MatMenuTriggerBase.prototype, "_deprecatedMatMenuTriggerFor", {
|
|
1167
1184
|
/**
|
|
1168
1185
|
* @deprecated
|
|
1169
1186
|
* @breaking-change 8.0.0
|
|
@@ -1175,7 +1192,7 @@
|
|
|
1175
1192
|
enumerable: false,
|
|
1176
1193
|
configurable: true
|
|
1177
1194
|
});
|
|
1178
|
-
Object.defineProperty(
|
|
1195
|
+
Object.defineProperty(_MatMenuTriggerBase.prototype, "menu", {
|
|
1179
1196
|
/** References the menu instance that the trigger is associated with. */
|
|
1180
1197
|
get: function () { return this._menu; },
|
|
1181
1198
|
set: function (menu) {
|
|
@@ -1201,11 +1218,11 @@
|
|
|
1201
1218
|
enumerable: false,
|
|
1202
1219
|
configurable: true
|
|
1203
1220
|
});
|
|
1204
|
-
|
|
1221
|
+
_MatMenuTriggerBase.prototype.ngAfterContentInit = function () {
|
|
1205
1222
|
this._checkMenu();
|
|
1206
1223
|
this._handleHover();
|
|
1207
1224
|
};
|
|
1208
|
-
|
|
1225
|
+
_MatMenuTriggerBase.prototype.ngOnDestroy = function () {
|
|
1209
1226
|
if (this._overlayRef) {
|
|
1210
1227
|
this._overlayRef.dispose();
|
|
1211
1228
|
this._overlayRef = null;
|
|
@@ -1215,7 +1232,7 @@
|
|
|
1215
1232
|
this._closingActionsSubscription.unsubscribe();
|
|
1216
1233
|
this._hoverSubscription.unsubscribe();
|
|
1217
1234
|
};
|
|
1218
|
-
Object.defineProperty(
|
|
1235
|
+
Object.defineProperty(_MatMenuTriggerBase.prototype, "menuOpen", {
|
|
1219
1236
|
/** Whether the menu is open. */
|
|
1220
1237
|
get: function () {
|
|
1221
1238
|
return this._menuOpen;
|
|
@@ -1223,7 +1240,7 @@
|
|
|
1223
1240
|
enumerable: false,
|
|
1224
1241
|
configurable: true
|
|
1225
1242
|
});
|
|
1226
|
-
Object.defineProperty(
|
|
1243
|
+
Object.defineProperty(_MatMenuTriggerBase.prototype, "dir", {
|
|
1227
1244
|
/** The text direction of the containing app. */
|
|
1228
1245
|
get: function () {
|
|
1229
1246
|
return this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';
|
|
@@ -1232,15 +1249,15 @@
|
|
|
1232
1249
|
configurable: true
|
|
1233
1250
|
});
|
|
1234
1251
|
/** Whether the menu triggers a sub-menu or a top-level one. */
|
|
1235
|
-
|
|
1252
|
+
_MatMenuTriggerBase.prototype.triggersSubmenu = function () {
|
|
1236
1253
|
return !!(this._menuItemInstance && this._parentMaterialMenu);
|
|
1237
1254
|
};
|
|
1238
1255
|
/** Toggles the menu between the open and closed states. */
|
|
1239
|
-
|
|
1256
|
+
_MatMenuTriggerBase.prototype.toggleMenu = function () {
|
|
1240
1257
|
return this._menuOpen ? this.closeMenu() : this.openMenu();
|
|
1241
1258
|
};
|
|
1242
1259
|
/** Opens the menu. */
|
|
1243
|
-
|
|
1260
|
+
_MatMenuTriggerBase.prototype.openMenu = function () {
|
|
1244
1261
|
var _this = this;
|
|
1245
1262
|
if (this._menuOpen) {
|
|
1246
1263
|
return;
|
|
@@ -1262,14 +1279,14 @@
|
|
|
1262
1279
|
}
|
|
1263
1280
|
};
|
|
1264
1281
|
/** Closes the menu. */
|
|
1265
|
-
|
|
1282
|
+
_MatMenuTriggerBase.prototype.closeMenu = function () {
|
|
1266
1283
|
this.menu.close.emit();
|
|
1267
1284
|
};
|
|
1268
1285
|
/**
|
|
1269
1286
|
* Focuses the menu trigger.
|
|
1270
1287
|
* @param origin Source of the menu trigger's focus.
|
|
1271
1288
|
*/
|
|
1272
|
-
|
|
1289
|
+
_MatMenuTriggerBase.prototype.focus = function (origin, options) {
|
|
1273
1290
|
if (this._focusMonitor && origin) {
|
|
1274
1291
|
this._focusMonitor.focusVia(this._element, origin, options);
|
|
1275
1292
|
}
|
|
@@ -1280,12 +1297,12 @@
|
|
|
1280
1297
|
/**
|
|
1281
1298
|
* Updates the position of the menu to ensure that it fits all options within the viewport.
|
|
1282
1299
|
*/
|
|
1283
|
-
|
|
1300
|
+
_MatMenuTriggerBase.prototype.updatePosition = function () {
|
|
1284
1301
|
var _a;
|
|
1285
1302
|
(_a = this._overlayRef) === null || _a === void 0 ? void 0 : _a.updatePosition();
|
|
1286
1303
|
};
|
|
1287
1304
|
/** Closes the menu and does the necessary cleanup. */
|
|
1288
|
-
|
|
1305
|
+
_MatMenuTriggerBase.prototype._destroyMenu = function (reason) {
|
|
1289
1306
|
var _this = this;
|
|
1290
1307
|
if (!this._overlayRef || !this.menuOpen) {
|
|
1291
1308
|
return;
|
|
@@ -1330,7 +1347,7 @@
|
|
|
1330
1347
|
* This method sets the menu state to open and focuses the first item if
|
|
1331
1348
|
* the menu was opened via the keyboard.
|
|
1332
1349
|
*/
|
|
1333
|
-
|
|
1350
|
+
_MatMenuTriggerBase.prototype._initMenu = function () {
|
|
1334
1351
|
this.menu.parentMenu = this.triggersSubmenu() ? this._parentMaterialMenu : undefined;
|
|
1335
1352
|
this.menu.direction = this.dir;
|
|
1336
1353
|
this._setMenuElevation();
|
|
@@ -1338,7 +1355,7 @@
|
|
|
1338
1355
|
this._setIsMenuOpen(true);
|
|
1339
1356
|
};
|
|
1340
1357
|
/** Updates the menu elevation based on the amount of parent menus that it has. */
|
|
1341
|
-
|
|
1358
|
+
_MatMenuTriggerBase.prototype._setMenuElevation = function () {
|
|
1342
1359
|
if (this.menu.setElevation) {
|
|
1343
1360
|
var depth = 0;
|
|
1344
1361
|
var parentMenu = this.menu.parentMenu;
|
|
@@ -1350,7 +1367,7 @@
|
|
|
1350
1367
|
}
|
|
1351
1368
|
};
|
|
1352
1369
|
// set state rather than toggle to support triggers sharing a menu
|
|
1353
|
-
|
|
1370
|
+
_MatMenuTriggerBase.prototype._setIsMenuOpen = function (isOpen) {
|
|
1354
1371
|
this._menuOpen = isOpen;
|
|
1355
1372
|
this._menuOpen ? this.menuOpened.emit() : this.menuClosed.emit();
|
|
1356
1373
|
if (this.triggersSubmenu()) {
|
|
@@ -1361,7 +1378,7 @@
|
|
|
1361
1378
|
* This method checks that a valid instance of MatMenu has been passed into
|
|
1362
1379
|
* matMenuTriggerFor. If not, an exception is thrown.
|
|
1363
1380
|
*/
|
|
1364
|
-
|
|
1381
|
+
_MatMenuTriggerBase.prototype._checkMenu = function () {
|
|
1365
1382
|
if (!this.menu && (typeof ngDevMode === 'undefined' || ngDevMode)) {
|
|
1366
1383
|
throwMatMenuMissingError();
|
|
1367
1384
|
}
|
|
@@ -1370,7 +1387,7 @@
|
|
|
1370
1387
|
* This method creates the overlay from the provided menu's template and saves its
|
|
1371
1388
|
* OverlayRef so that it can be attached to the DOM when openMenu is called.
|
|
1372
1389
|
*/
|
|
1373
|
-
|
|
1390
|
+
_MatMenuTriggerBase.prototype._createOverlay = function () {
|
|
1374
1391
|
if (!this._overlayRef) {
|
|
1375
1392
|
var config = this._getOverlayConfig();
|
|
1376
1393
|
this._subscribeToPositions(config.positionStrategy);
|
|
@@ -1386,7 +1403,7 @@
|
|
|
1386
1403
|
* This method builds the configuration object needed to create the overlay, the OverlayState.
|
|
1387
1404
|
* @returns OverlayConfig
|
|
1388
1405
|
*/
|
|
1389
|
-
|
|
1406
|
+
_MatMenuTriggerBase.prototype._getOverlayConfig = function () {
|
|
1390
1407
|
return new overlay.OverlayConfig({
|
|
1391
1408
|
positionStrategy: this._overlay.position()
|
|
1392
1409
|
.flexibleConnectedTo(this._element)
|
|
@@ -1404,7 +1421,7 @@
|
|
|
1404
1421
|
* on the menu based on the new position. This ensures the animation origin is always
|
|
1405
1422
|
* correct, even if a fallback position is used for the overlay.
|
|
1406
1423
|
*/
|
|
1407
|
-
|
|
1424
|
+
_MatMenuTriggerBase.prototype._subscribeToPositions = function (position) {
|
|
1408
1425
|
var _this = this;
|
|
1409
1426
|
if (this.menu.setPositionClasses) {
|
|
1410
1427
|
position.positionChanges.subscribe(function (change) {
|
|
@@ -1419,7 +1436,7 @@
|
|
|
1419
1436
|
* so the overlay connects with the trigger correctly.
|
|
1420
1437
|
* @param positionStrategy Strategy whose position to update.
|
|
1421
1438
|
*/
|
|
1422
|
-
|
|
1439
|
+
_MatMenuTriggerBase.prototype._setPosition = function (positionStrategy) {
|
|
1423
1440
|
var _b = __read(this.menu.xPosition === 'before' ? ['end', 'start'] : ['start', 'end'], 2), originX = _b[0], originFallbackX = _b[1];
|
|
1424
1441
|
var _c = __read(this.menu.yPosition === 'above' ? ['bottom', 'top'] : ['top', 'bottom'], 2), overlayY = _c[0], overlayFallbackY = _c[1];
|
|
1425
1442
|
var _d = __read([overlayY, overlayFallbackY], 2), originY = _d[0], originFallbackY = _d[1];
|
|
@@ -1456,7 +1473,7 @@
|
|
|
1456
1473
|
]);
|
|
1457
1474
|
};
|
|
1458
1475
|
/** Returns a stream that emits whenever an action that should close the menu occurs. */
|
|
1459
|
-
|
|
1476
|
+
_MatMenuTriggerBase.prototype._menuClosingActions = function () {
|
|
1460
1477
|
var _this = this;
|
|
1461
1478
|
var backdrop = this._overlayRef.backdropClick();
|
|
1462
1479
|
var detachments = this._overlayRef.detachments();
|
|
@@ -1465,7 +1482,7 @@
|
|
|
1465
1482
|
return rxjs.merge(backdrop, parentClose, hover, detachments);
|
|
1466
1483
|
};
|
|
1467
1484
|
/** Handles mouse presses on the trigger. */
|
|
1468
|
-
|
|
1485
|
+
_MatMenuTriggerBase.prototype._handleMousedown = function (event) {
|
|
1469
1486
|
if (!a11y.isFakeMousedownFromScreenReader(event)) {
|
|
1470
1487
|
// Since right or middle button clicks won't trigger the `click` event,
|
|
1471
1488
|
// we shouldn't consider the menu as opened by mouse in those cases.
|
|
@@ -1479,7 +1496,7 @@
|
|
|
1479
1496
|
}
|
|
1480
1497
|
};
|
|
1481
1498
|
/** Handles key presses on the trigger. */
|
|
1482
|
-
|
|
1499
|
+
_MatMenuTriggerBase.prototype._handleKeydown = function (event) {
|
|
1483
1500
|
var keyCode = event.keyCode;
|
|
1484
1501
|
// Pressing enter on the trigger will trigger the click handler later.
|
|
1485
1502
|
if (keyCode === keycodes.ENTER || keyCode === keycodes.SPACE) {
|
|
@@ -1492,7 +1509,7 @@
|
|
|
1492
1509
|
}
|
|
1493
1510
|
};
|
|
1494
1511
|
/** Handles click events on the trigger. */
|
|
1495
|
-
|
|
1512
|
+
_MatMenuTriggerBase.prototype._handleClick = function (event) {
|
|
1496
1513
|
if (this.triggersSubmenu()) {
|
|
1497
1514
|
// Stop event propagation to avoid closing the parent menu.
|
|
1498
1515
|
event.stopPropagation();
|
|
@@ -1503,7 +1520,7 @@
|
|
|
1503
1520
|
}
|
|
1504
1521
|
};
|
|
1505
1522
|
/** Handles the cases where the user hovers over the trigger. */
|
|
1506
|
-
|
|
1523
|
+
_MatMenuTriggerBase.prototype._handleHover = function () {
|
|
1507
1524
|
var _this = this;
|
|
1508
1525
|
// Subscribe to changes in the hovered item in order to toggle the panel.
|
|
1509
1526
|
if (!this.triggersSubmenu() || !this._parentMaterialMenu) {
|
|
@@ -1532,7 +1549,7 @@
|
|
|
1532
1549
|
});
|
|
1533
1550
|
};
|
|
1534
1551
|
/** Gets the portal that should be attached to the overlay. */
|
|
1535
|
-
|
|
1552
|
+
_MatMenuTriggerBase.prototype._getPortal = function () {
|
|
1536
1553
|
// Note that we can avoid this check by keeping the portal on the menu panel.
|
|
1537
1554
|
// While it would be cleaner, we'd have to introduce another required method on
|
|
1538
1555
|
// `MatMenuPanel`, making it harder to consume.
|
|
@@ -1541,24 +1558,12 @@
|
|
|
1541
1558
|
}
|
|
1542
1559
|
return this._portal;
|
|
1543
1560
|
};
|
|
1544
|
-
return
|
|
1561
|
+
return _MatMenuTriggerBase;
|
|
1545
1562
|
}());
|
|
1546
|
-
|
|
1547
|
-
{ type: core.Directive
|
|
1548
|
-
selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
|
|
1549
|
-
host: {
|
|
1550
|
-
'class': 'mat-menu-trigger',
|
|
1551
|
-
'aria-haspopup': 'true',
|
|
1552
|
-
'[attr.aria-expanded]': 'menuOpen || null',
|
|
1553
|
-
'[attr.aria-controls]': 'menuOpen ? menu.panelId : null',
|
|
1554
|
-
'(mousedown)': '_handleMousedown($event)',
|
|
1555
|
-
'(keydown)': '_handleKeydown($event)',
|
|
1556
|
-
'(click)': '_handleClick($event)',
|
|
1557
|
-
},
|
|
1558
|
-
exportAs: 'matMenuTrigger'
|
|
1559
|
-
},] }
|
|
1563
|
+
_MatMenuTriggerBase.decorators = [
|
|
1564
|
+
{ type: core.Directive }
|
|
1560
1565
|
];
|
|
1561
|
-
|
|
1566
|
+
_MatMenuTriggerBase.ctorParameters = function () { return [
|
|
1562
1567
|
{ type: overlay.Overlay },
|
|
1563
1568
|
{ type: core.ElementRef },
|
|
1564
1569
|
{ type: core.ViewContainerRef },
|
|
@@ -1568,7 +1573,10 @@
|
|
|
1568
1573
|
{ type: bidi.Directionality, decorators: [{ type: core.Optional }] },
|
|
1569
1574
|
{ type: a11y.FocusMonitor }
|
|
1570
1575
|
]; };
|
|
1571
|
-
|
|
1576
|
+
_MatMenuTriggerBase.propDecorators = {
|
|
1577
|
+
_ariaExpanded: [{ type: core.HostBinding, args: ['attr.aria-expanded',] }],
|
|
1578
|
+
_ariaControl: [{ type: core.HostBinding, args: ['attr.aria-controls',] }],
|
|
1579
|
+
_ariaHaspopup: [{ type: core.HostBinding, args: ['attr.aria-haspopup',] }],
|
|
1572
1580
|
_deprecatedMatMenuTriggerFor: [{ type: core.Input, args: ['mat-menu-trigger-for',] }],
|
|
1573
1581
|
menu: [{ type: core.Input, args: ['matMenuTriggerFor',] }],
|
|
1574
1582
|
menuData: [{ type: core.Input, args: ['matMenuTriggerData',] }],
|
|
@@ -1576,8 +1584,28 @@
|
|
|
1576
1584
|
menuOpened: [{ type: core.Output }],
|
|
1577
1585
|
onMenuOpen: [{ type: core.Output }],
|
|
1578
1586
|
menuClosed: [{ type: core.Output }],
|
|
1579
|
-
onMenuClose: [{ type: core.Output }]
|
|
1587
|
+
onMenuClose: [{ type: core.Output }],
|
|
1588
|
+
_handleMousedown: [{ type: core.HostListener, args: ['mousedown', ['$event'],] }],
|
|
1589
|
+
_handleKeydown: [{ type: core.HostListener, args: ['keydown', ['$event'],] }],
|
|
1590
|
+
_handleClick: [{ type: core.HostListener, args: ['click', ['$event'],] }]
|
|
1580
1591
|
};
|
|
1592
|
+
/** Directive applied to an element that should trigger a `mat-menu`. */
|
|
1593
|
+
var MatMenuTrigger = /** @class */ (function (_super) {
|
|
1594
|
+
__extends(MatMenuTrigger, _super);
|
|
1595
|
+
function MatMenuTrigger() {
|
|
1596
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1597
|
+
}
|
|
1598
|
+
return MatMenuTrigger;
|
|
1599
|
+
}(_MatMenuTriggerBase));
|
|
1600
|
+
MatMenuTrigger.decorators = [
|
|
1601
|
+
{ type: core.Directive, args: [{
|
|
1602
|
+
selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
|
|
1603
|
+
host: {
|
|
1604
|
+
'class': 'mat-menu-trigger',
|
|
1605
|
+
},
|
|
1606
|
+
exportAs: 'matMenuTrigger'
|
|
1607
|
+
},] }
|
|
1608
|
+
];
|
|
1581
1609
|
|
|
1582
1610
|
/**
|
|
1583
1611
|
* @license
|
|
@@ -1586,25 +1614,6 @@
|
|
|
1586
1614
|
* Use of this source code is governed by an MIT-style license that can be
|
|
1587
1615
|
* found in the LICENSE file at https://angular.io/license
|
|
1588
1616
|
*/
|
|
1589
|
-
/**
|
|
1590
|
-
* Used by both the current `MatMenuModule` and the MDC `MatMenuModule`
|
|
1591
|
-
* to declare the menu-related directives.
|
|
1592
|
-
*/
|
|
1593
|
-
var _MatMenuDirectivesModule = /** @class */ (function () {
|
|
1594
|
-
function _MatMenuDirectivesModule() {
|
|
1595
|
-
}
|
|
1596
|
-
return _MatMenuDirectivesModule;
|
|
1597
|
-
}());
|
|
1598
|
-
_MatMenuDirectivesModule.decorators = [
|
|
1599
|
-
{ type: core.NgModule, args: [{
|
|
1600
|
-
exports: [MatMenuTrigger, MatMenuContent, core$1.MatCommonModule],
|
|
1601
|
-
declarations: [
|
|
1602
|
-
MatMenuTrigger,
|
|
1603
|
-
MatMenuContent,
|
|
1604
|
-
],
|
|
1605
|
-
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1606
|
-
},] }
|
|
1607
|
-
];
|
|
1608
1617
|
var MatMenuModule = /** @class */ (function () {
|
|
1609
1618
|
function MatMenuModule() {
|
|
1610
1619
|
}
|
|
@@ -1617,10 +1626,16 @@
|
|
|
1617
1626
|
core$1.MatCommonModule,
|
|
1618
1627
|
core$1.MatRippleModule,
|
|
1619
1628
|
overlay.OverlayModule,
|
|
1620
|
-
_MatMenuDirectivesModule,
|
|
1621
1629
|
],
|
|
1622
|
-
exports: [
|
|
1623
|
-
|
|
1630
|
+
exports: [
|
|
1631
|
+
scrolling.CdkScrollableModule,
|
|
1632
|
+
core$1.MatCommonModule,
|
|
1633
|
+
MatMenu,
|
|
1634
|
+
MatMenuItem,
|
|
1635
|
+
MatMenuTrigger,
|
|
1636
|
+
MatMenuContent
|
|
1637
|
+
],
|
|
1638
|
+
declarations: [MatMenu, MatMenuItem, MatMenuTrigger, MatMenuContent],
|
|
1624
1639
|
providers: [MAT_MENU_SCROLL_STRATEGY_FACTORY_PROVIDER]
|
|
1625
1640
|
},] }
|
|
1626
1641
|
];
|
|
@@ -1647,7 +1662,8 @@
|
|
|
1647
1662
|
exports.MatMenuModule = MatMenuModule;
|
|
1648
1663
|
exports.MatMenuTrigger = MatMenuTrigger;
|
|
1649
1664
|
exports._MatMenuBase = _MatMenuBase;
|
|
1650
|
-
exports.
|
|
1665
|
+
exports._MatMenuContentBase = _MatMenuContentBase;
|
|
1666
|
+
exports._MatMenuTriggerBase = _MatMenuTriggerBase;
|
|
1651
1667
|
exports.fadeInItems = fadeInItems;
|
|
1652
1668
|
exports.matMenuAnimations = matMenuAnimations;
|
|
1653
1669
|
exports.transformMenu = transformMenu;
|