@ifsworld/granite-components 4.0.0 → 4.1.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/bundles/ifsworld-granite-components.umd.js +19 -8
- package/bundles/ifsworld-granite-components.umd.js.map +1 -1
- package/bundles/ifsworld-granite-components.umd.min.js +2 -2
- package/bundles/ifsworld-granite-components.umd.min.js.map +1 -1
- package/esm2015/lib/button/button.component.js +21 -6
- package/esm2015/lib/button/button.component.js.map +1 -1
- package/esm2015/lib/button/button.component.metadata.json +1 -1
- package/fesm2015/ifsworld-granite-components.js +19 -5
- package/fesm2015/ifsworld-granite-components.js.map +1 -1
- package/ifsworld-granite-components.metadata.json +1 -1
- package/lib/button/button.component.d.ts +8 -0
- package/package.json +1 -1
- package/src/lib/core/style/_mixins.scss +13 -0
- package/src/lib/core/style/_tokens.scss +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/testing"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/a11y"),require("@angular/cdk/keycodes"),require("@angular/animations"),require("@angular/cdk/bidi"),require("@angular/cdk/platform"),require("@angular/cdk/collections"),require("@angular/cdk/table")):"function"==typeof define&&define.amd?define("@ifsworld/granite-components",["exports","@angular/core","@angular/common","@angular/cdk/coercion","rxjs","rxjs/operators","@angular/cdk/testing","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/a11y","@angular/cdk/keycodes","@angular/animations","@angular/cdk/bidi","@angular/cdk/platform","@angular/cdk/collections","@angular/cdk/table"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ifsworld=t.ifsworld||{},t.ifsworld["granite-components"]={}),t.ng.core,t.ng.common,t.ng.cdk.coercion,t.rxjs,t.rxjs.operators,t.ng.cdk.testing,t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.cdk.a11y,t.ng.cdk.keycodes,t.ng.animations,t.ng.cdk.bidi,t.ng.cdk.platform,t.ng.cdk.collections,t.ng.cdk.table)}(this,(function(t,e,n,r,o,i,a,s,c,l,u,g,d,h,p,b){"use strict";var m,v=function(){function t(t){this.element=t,this._columnSpan=null}return Object.defineProperty(t.prototype,"columnSpan",{set:function(t){this._columnSpan=t,this.updateStyles()},enumerable:!1,configurable:!0}),t.prototype.updateStyles=function(){this.setCssProperty("--columnSpan",this._columnSpan?this._columnSpan.toString():null)},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t}();v.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--columnSpan:$default-column-span;display:grid;grid-column:span var(--columnSpan,1)}"]}]}],v.ctorParameters=function(){return[{type:e.ElementRef}]},(m=t.GraniteArrangeGridOrientation||(t.GraniteArrangeGridOrientation={})).columns="columns",m.rows="rows";var f=function(){function e(n){this.element=n,this.orientation=t.GraniteArrangeGridOrientation.columns,this.classColumnOrientation=!1,this.classRowOrientation=!1,this._cols=e.defaultCols,this.destroy$=new o.Subject}return Object.defineProperty(e.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(t){throw Error("Explicitly setting rows value for arrange grid is unsupported")},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var t=this;this.arrangeGridItemComponents.changes.pipe(i.takeUntil(this.destroy$)).subscribe((function(){return t.updateStyles()})),this.updateStyles()},e.prototype.ngOnChanges=function(t){(t.orientation&&!t.orientation.isFirstChange()||t.cols&&!t.cols.isFirstChange())&&this.updateStyles()},e.prototype.ngOnDestroy=function(){this.destroy$.next()},e.prototype.updateStyles=function(){var e=(this.arrangeGridItemComponents||[]).length;this.orientation===t.GraniteArrangeGridOrientation.columns?(this._rows=Math.trunc((e-1)/(this._cols||1))+1,this.classColumnOrientation=!0,this.classRowOrientation=!1,e>0&&(this.arrangeGridItemComponents.forEach((function(t){return t.columnSpan=null})),this.arrangeGridItemComponents.last.columnSpan=this._rows*this._cols-e+1)):(this._cols=1,this._rows=e,this.classColumnOrientation=!1,this.classRowOrientation=!0),this.setCssProperty("--cols",this._cols.toString()),this.setCssProperty("--rows",this._rows.toString())},e.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},e}();f.defaultCols=2,f.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid",template:'<ng-content select="granite-arrange-grid-item"></ng-content>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["@media only screen and (min-width:960px){:host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}:host.row-orientation{grid-template-columns:auto;grid-template-rows:repeat(calc(var(--rows, 1) - 1),-webkit-max-content);grid-template-rows:repeat(calc(var(--rows, 1) - 1),max-content)}}"]}]}],f.ctorParameters=function(){return[{type:e.ElementRef}]},f.propDecorators={orientation:[{type:e.Input}],classColumnOrientation:[{type:e.HostBinding,args:["class.column-orientation"]}],classRowOrientation:[{type:e.HostBinding,args:["class.row-orientation"]}],arrangeGridItemComponents:[{type:e.ContentChildren,args:[v]}],cols:[{type:e.Input}]};var y=function(){};y.decorators=[{type:e.NgModule,args:[{declarations:[f,v],imports:[n.CommonModule],exports:[f,v]}]}];var k=function(){function t(t,e){this.element=t,this.renderer=e}return t.prototype.ngOnChanges=function(){this.updateStyles()},t.prototype.updateStyles=function(){this.setStyle("gridColumnStart",this.columnStart),this.setStyle("gridColumnEnd",this.columnEnd),this.setStyle("gridRowStart",this.rowStart),this.setStyle("gridRowEnd",this.rowEnd)},t.prototype.setStyle=function(t,e){this.renderer.setStyle(this.element.nativeElement,t,e||"")},t}();k.decorators=[{type:e.Component,args:[{selector:"granite-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}]}],k.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},k.propDecorators={columnStart:[{type:e.Input}],columnEnd:[{type:e.Input}],rowStart:[{type:e.Input}],rowEnd:[{type:e.Input}]};var _=function(){function t(t){this.element=t}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=Math.max(1,Math.round(r.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){this.updateStyles()},t.prototype.ngOnChanges=function(t){(t.cols&&!t.cols.isFirstChange()||t.rows&&!t.rows.isFirstChange())&&this.updateStyles()},t.prototype.updateStyles=function(){this.updateColumnStyles(),this.updateRowStyles()},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t.prototype.updateColumnStyles=function(){this.setCssProperty("--cols",this._cols&&this._cols.toString()||null)},t.prototype.updateRowStyles=function(){this.setCssProperty("--rows",this._rows&&this._rows.toString()||null)},t}();_.decorators=[{type:e.Component,args:[{selector:"granite-grid",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);grid-template-rows:repeat(var(--rows,1),1fr)}"]}]}],_.ctorParameters=function(){return[{type:e.ElementRef}]},_.propDecorators={cols:[{type:e.Input}],rows:[{type:e.Input}]};var w=function(){};w.decorators=[{type:e.NgModule,args:[{declarations:[_,k],imports:[n.CommonModule],exports:[_,k]}]}];var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function C(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function I(t,e,n,r){return new(n||(n=Promise))((function(o,i){function a(t){try{c(r.next(t))}catch(t){i(t)}}function s(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}c((r=r.apply(t,e||[])).next())}))}function M(t,e){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}}Object.create;function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(O(arguments[e]));return t}Object.create;function E(t,e,n){var r;n&&n.style&&null!=e&&n.style.setProperty(t,(r=e)&&(r.startsWith("granite-")||r.startsWith("fnd-"))?"var(--"+e+")":e)}var D=function(){function t(t){this.elementRef=t,this.pill=!1}return t.prototype.ngOnChanges=function(t){t.backgroundColor&&t.backgroundColor.previousValue!==t.backgroundColor.currentValue&&E("background-color",t.backgroundColor.currentValue,this.elementRef.nativeElement),t.color&&t.color.previousValue!==t.color.currentValue&&E("color",t.color.currentValue,this.elementRef.nativeElement)},t}();D.decorators=[{type:e.Component,args:[{selector:"granite-badge",exportAs:"graniteBadge",host:{class:"granite-badge","[class.granite-badge-pill]":"pill"},template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:-moz-inline-flex;display:inline-flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;align-items:center;background-color:var(--granite-color-signal-neutral);color:var(--granite-color-text-static-light);padding:calc(var(--granite-spacing-m) * .3125);border-radius:.3125rem;-webkit-padding-start:calc(var(--granite-spacing-m) * .625);padding-inline-start:calc(var(--granite-spacing-m) * .625);-webkit-padding-end:calc(var(--granite-spacing-m) * .625);padding-inline-end:calc(var(--granite-spacing-m) * .625)}:host(.granite-badge-pill){border-radius:1.5625rem}"]}]}],D.ctorParameters=function(){return[{type:e.ElementRef}]},D.propDecorators={backgroundColor:[{type:e.Input}],color:[{type:e.Input}],pill:[{type:e.Input}]};var P=function(){};P.decorators=[{type:e.NgModule,args:[{declarations:[D],imports:[n.CommonModule],exports:[D]}]}];var A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){var n=this;void 0===t&&(t={});var r=new a.HarnessPredicate(e,t);return r.addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)})),r.addOption("pill",t.pill,(function(t,e){return I(n,void 0,void 0,(function(){return M(this,(function(n){switch(n.label){case 0:return[4,t.isPill()];case 1:return[2,n.sent()===e]}}))}))})),r},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.isPill=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("granite-badge-pill")]}}))}))},e}(a.ComponentHarness);A.hostSelector="granite-badge";var B=new e.InjectionToken("GRANITE_MENU_PANEL"),z=function(){function t(t,e,n){this._elementRef=t,this._focusMonitor=e,this._parentMenu=n,this.role="menuitem",this._hovered=new o.Subject,this._focused=new o.Subject,this._triggersSubmenu=!1,this._highlighted=!1,e.monitor(this._elementRef,!1)}return t.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._hovered.complete(),this._focused.complete()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e),this._focused.next(this)},t.prototype._getHostElement=function(){return this._elementRef.nativeElement},t}();function R(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"cubic-bezier(0, 0, 0.2, 1)"}function L(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"linear"}z.decorators=[{type:e.Component,args:[{selector:"[graniteMenuItem]",template:'<ng-content></ng-content>\n <ng-container *ngIf="_triggersSubmenu">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>',exportAs:"graniteMenuItem",host:{"[attr.role]":"role","[class.granite-menu-item]":"true","[class.granite-menu-item-highlighted]":"_highlighted","[class.granite-menu-item-submenu-trigger]":"_triggersSubmenu","[class.granite-device-output-touch]":'_clientOutput?.device === "touch"',"(mouseenter)":"_hovered.next(this)"},styles:[":host{display:block;position:relative;line-height:2rem;padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:.0625rem solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:.0625rem solid var(--granite-color-border-soft)}:host.granite-device-output-touch{line-height:2rem;font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:2rem;height:2rem;font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],z.ctorParameters=function(){return[{type:e.ElementRef},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]}]},z.propDecorators={role:[{type:e.Input}]};var G=R(120),q={transformMenuDesktop:g.trigger("transformMenuDesktop",[g.state("void",g.style({opacity:0,transform:"scale(0.9)"})),g.transition("void => enter",g.group([g.query(".granite-menu-content",g.animate(L(100),g.style({opacity:1}))),g.animate(G,g.style({transform:"scale(1)"}))])),g.transition("* => void",g.animate(L(100,25),g.style({opacity:0})))])},X=300,F=R(X),j=L(X),V=L(X,200),H="1ms linear",Y=g.style({transform:"translateX(0) translateY(100%)",opacity:0}),N=g.style({opacity:1,transform:"translateX(0) translateY(0)"}),$=g.style({opacity:0,transform:"translateX(100vw) translateY(0)"}),U=g.style({opacity:1,transform:"translateX(-100vw) translateY(0)"}),K=g.style({transform:"translateX({{ xOffset }}px)"}),W=g.style({transform:"translateX(calc(-100vw + {{ xOffset }}px))"}),Q=g.style({opacity:0,transform:"translateX(0) translateY(0)"}),Z={transformMenuTouch:g.trigger("transformMenuTouch",[g.state("void",$),g.state("enter, enter-from-below",N),g.state("pan-hidden",W,{params:{xOffset:0}}),g.state("pan",K,{params:{xOffset:0}}),g.state("below-with-delay",Y),g.state("hide",U),g.transition("pan => enter, pan => enter-from-below, pan => void, enter <=> hide, enter-from-below <=> hide, pan-hidden => hide, pan-hidden => enter",g.animate(F)),g.transition("void => enter-from-below",g.sequence([g.animate(H,Y),g.animate(F,N)])),g.transition("void => enter",g.sequence([g.animate(H,$),g.animate(F,N)])),g.transition("enter => void",g.animate(F,$)),g.transition("hide => below",g.animate(j,U)),g.transition("hide => below-with-delay",g.sequence([g.animate(H,U),g.animate(V,U)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(H,N),g.animate(j,Y)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(H,N),g.animate(V,Y)]))]),transformCloseButton:g.trigger("transformCloseButton",[g.state("void, below, below-with-delay",Q),g.state("enter, enter-from-below, pan-hidden, pan, hide",N),g.transition("void => enter-from-below",g.sequence([g.animate(H,Q),g.animate(L(50,150),N)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(H,N),g.animate(L(25),Q)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(H,N),g.animate(L(50,200),Q)]))])};var J=0,tt={value:"void",params:{xOffset:0}},et=function(){function t(t){this._changeDetectorRef=t,this.closed=new e.EventEmitter,this.panelId="granite-menu-panel-"+J++,this.showBackButton=!1,this.showTitle=!1,this.showCloseButton=!1,this._transformMenu=new o.BehaviorSubject(tt),this._animationDone=new o.Subject,this._directDescendantItems=new e.QueryList,this._tabSubscription=o.Subscription.EMPTY,this._xPosition="after",this._yPosition="below",this.xOffset=0}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <granite-menu xPosition="before" #menu="graniteMenu"></granite-menu>')}(),this._xPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <granite-menu yPosition="above" #menu="graniteMenu"></granite-menu>')}(),this._yPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_panelAnimationState",{set:function(t){this._transformMenu.next({value:t,params:{xOffset:this.xOffset}})},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._updateDirectDescendants(),this._keyManager=new l.FocusKeyManager(this._directDescendantItems).withWrap(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(i.startWith(this._directDescendantItems),i.switchMap((function(t){return o.merge.apply(void 0,T(t.map((function(t){return t._focused}))))}))).subscribe((function(e){return t._keyManager.updateActiveItem(e)}))},t.prototype.ngOnDestroy=function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){var t=this;return this._directDescendantItems.changes.pipe(i.startWith(this._directDescendantItems),i.filter((function(){var e;return"touch"!==(null===(e=t._clientOutput)||void 0===e?void 0:e.device)})),i.switchMap((function(t){return o.merge.apply(void 0,T(t.map((function(t){return t._hovered}))))})))},t.prototype._handleKeydown=function(t){var e=t.key,n=this._keyManager;switch(e){case"Escape":u.hasModifierKey(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case"ArrowLeft":this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case"ArrowRight":this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case"Home":case"End":u.hasModifierKey(t)||("Home"===e?n.setFirstItemActive():n.setLastItemActive(),t.preventDefault());break;default:"ArrowUp"!==e&&"ArrowDown"!==e||n.setFocusOrigin("keyboard"),n.onKeydown(t)}},t.prototype.focusFirstItem=function(t){void 0===t&&(t="program"),this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype._updateShowTitle=function(){this.showTitle=!!this.title||this.showBackButton},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._startTouchCloseDownAnimation=function(){this._panelAnimationState="below"},t.prototype._startTouchCloseDownAnimationWithDelay=function(){this._panelAnimationState="below-with-delay"},t.prototype._startTouchCloseSideAnimation=function(){this._resetAnimation()},t.prototype._startTouchRootEnterAnimation=function(){this._panelAnimationState="enter-from-below",this.xOffset=0},t.prototype._startTouchSubmenuEnterAnimation=function(){this._panelAnimationState="enter",this.xOffset=0},t.prototype._startTouchPanAnimation=function(t){this._panelAnimationState="pan",this.xOffset=t},t.prototype._startTouchHidePanAnimation=function(t){this._panelAnimationState="pan-hidden",this.xOffset=t},t.prototype._startTouchHideAnimation=function(){this._panelAnimationState="hide",this.xOffset=0},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1},t.prototype._onAnimationStart=function(t){this._isAnimating=!0,"enter"!==t.toState&&"enter-from-below"!==t.toState||0!==this._keyManager.activeItemIndex||(t.element.scrollTop=0)},t.prototype._handleClick=function(){this.closed.emit("click")},t.prototype._handleCloseClick=function(){this.closed.emit()},t.prototype._handleBackClick=function(t){this.showBackButton&&this.closed.emit("keydown"),t.stopPropagation()},t.prototype._setDevice=function(t,e){this._clientInput=t,this._clientOutput=e,this._directDescendantItems.forEach((function(n){n._clientInput=t,n._clientOutput=e})),this._changeDetectorRef.markForCheck()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype._updateDirectDescendants=function(){var t=this;this._allItems.changes.pipe(i.startWith(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e._parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))},t}();et.decorators=[{type:e.Directive}],et.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},et.propDecorators={xPosition:[{type:e.Input}],yPosition:[{type:e.Input}],title:[{type:e.Input}],closeLabel:[{type:e.Input}],templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],_allItems:[{type:e.ContentChildren,args:[z,{descendants:!0}]}],closed:[{type:e.Output}]};var nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(et);nt.decorators=[{type:e.Component,args:[{selector:"granite-menu",template:'\x3c!--\n Using separate template part for desktop and touch output, because of\n animation triggers and slightly different content.\n--\x3e\n<ng-template>\n \x3c!-- Desktop --\x3e\n <ng-container *ngIf="_clientOutput.device === \'desktop\'">\n <div\n #menu\n class="granite-menu"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuDesktop]="_transformMenu | async"\n (@transformMenuDesktop.start)="_onAnimationStart($event)"\n (@transformMenuDesktop.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n </div>\n </div>\n </ng-container>\n\n \x3c!-- Touch --\x3e\n <ng-container *ngIf="_clientOutput?.device === \'touch\'">\n <div\n #menu\n class="granite-menu granite-device-output-touch"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuTouch]="_transformMenu | async"\n (@transformMenuTouch.start)="_onAnimationStart($event)"\n (@transformMenuTouch.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <div *ngIf="showTitle" class="header-container">\n <button\n [disabled]="!showBackButton"\n graniteMenuTouchTitleItem\n (click)="_handleBackClick($event)"\n >\n {{ title }}\n </button>\n </div>\n\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n\n <div class="footer-container"></div>\n </div>\n </div>\n\n \x3c!-- Close button --\x3e\n <div class="close" [@transformCloseButton]="_transformMenu | async">\n <button\n *ngIf="showCloseButton"\n graniteMenuTouchCloseItem\n (click)="_handleCloseClick()"\n >\n {{ closeLabel }}\n </button>\n </div>\n </ng-container>\n\n \x3c!--\n Content template shared between desktop and touch parts, as <ng-content>\n can\'t be used in two places in the same template\n --\x3e\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"graniteMenu",animations:[q.transformMenuDesktop,Z.transformMenuTouch,Z.transformCloseButton],providers:[{provide:B,useExisting:nt}],styles:[".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 2rem);outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:7rem;overflow-x:hidden;overflow-y:hidden}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu:not(.granite-device-output-touch):hover{overflow-y:auto}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar{width:var(--granite-spacing-xs)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-thumb{background-color:var(--granite-color-border-hard);border-radius:calc(var(--granite-spacing-m) * .125)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-track{background-color:var(--granite-color-background-hover)}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 2rem);outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:.25rem;-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - ($granite-base-rem * 7))}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 2rem);outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:.25rem;-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]}]}];var rt=new e.InjectionToken("GRANITE_CLIENT_INPUT"),ot=new e.InjectionToken("GRANITE_CLIENT_OUTPUT"),it={input:{devices:["mouse","keyboard"]},output:{device:"desktop"}},at={input:{devices:["touch","onscreen-keyboard"]},output:{device:"touch"}},st=h.normalizePassiveListenerOptions({passive:!0}),ct=function(){function t(t,e,n,r,i,a,s,c,l,u){var g=this;this._overlay=t,this._element=e,this._viewContainerRef=n,this._parentMenu=r,this._clientInput=i,this._clientOutput=a,this._menuItemInstance=s,this._dir=c,this._focusMonitor=l,this._isMenuOpen=!1,this._openedBy=null,this._hoverSubscription=o.Subscription.EMPTY,this._menuCloseSubscription=o.Subscription.EMPTY,this._closingActionsSubscription=o.Subscription.EMPTY,this._portal=null,this._overlayRef=null,this._touchTouchingElement=!1,this._handleTouchStart=function(){g._openedBy="touch"},this._handleOverlayTouchStart=function(t){g.menu._isAnimating||(g._touchStartTime=(new Date).getTime(),g._touchStartX=t.changedTouches[0].clientX,g._touchStartY=t.changedTouches[0].clientY,g._touchCurrentX=g._touchStartX,g._touchCurrentY=g._touchStartY,g._touchTranslateX=0,g._touchMaxX=g._overlayRef.hostElement.getBoundingClientRect().width,g._touchLockedX=null,g._touchTouchingElement=!0)},this._handleOverlayTouchMove=function(t){if(g._touchTouchingElement&&!g.menu._isAnimating&&!g._touchLockedX){if(g._touchCurrentX=t.changedTouches[0].clientX,g._touchCurrentY=t.changedTouches[0].clientY,null===g._touchLockedX){var e=Math.abs(g._touchCurrentY-g._touchStartY),n=Math.abs(g._touchCurrentX-g._touchStartX);if(n>10||e>10)return void(g._touchLockedX=e>n)}g._touchTranslateX=g._touchCurrentX-g._touchStartX,g._touchTranslateX<0?g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,-8,-4*g._touchMaxX):g._parentMenu?g._touchTranslateX>g._touchMaxX&&(g._touchTranslateX=g.easeOutExpo(g._touchTranslateX-g._touchMaxX,g._touchMaxX,8,4*g._touchMaxX)):g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,8,4*g._touchMaxX),g.animateSetMenuPosition(g._touchTranslateX)}},this._handleOverlayTouchEnd=function(){if(g._touchTouchingElement&&!g.menu._isAnimating&&(g._touchTranslateX=g._touchCurrentX-g._touchStartX,0!==g._touchTranslateX)){g._touchTouchingElement=!1,g._touchTimeTaken=(new Date).getTime()-g._touchStartTime;var t=g._touchTranslateX>g._touchMaxX/2,e=g._touchTranslateX>g._touchMaxX/10&&g._touchTimeTaken>50&&g._touchTimeTaken<300;g._parentMenu&&(e||t)?g.menu.closed.emit("keydown"):g.animateOpenMenu()}},e.nativeElement.addEventListener("touchstart",this._handleTouchStart,st),s&&(s._triggersSubmenu=this.triggersSubmenu()),this._document=u}return t.prototype.ngOnChanges=function(t){t.menu&&this._handleMenuChange()},t.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this.removeOverlayListeners(),this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,st),this._hoverSubscription.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe()},t.prototype._handleMenuChange=function(){var t=this;if(this._menuCloseSubscription.unsubscribe(),this.menu){var e=this.menu.closed;this._menuCloseSubscription=e.subscribe((function(e){if(!t.menu._isClosing){if(t.menu._isClosing=!0,"touch"===t._clientOutput.device)(t.menu._isAnimating?t.menu._animationDone:o.of([null])).pipe(i.take(1),i.delay(0,o.asapScheduler)).subscribe((function(){t.animateCloseMenu("keydown"!==e,"click"===e),t.menu._animationDone.pipe(i.take(1),i.delay(0,o.asapScheduler)).subscribe((function(){return t._destroyMenu()}))}));else t._destroyMenu();"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)}}))}},t.prototype.openMenu=function(){var t,e=this;if(!this._isMenuOpen){this._checkMenu(),this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction="rtl"===this._dir.value?"rtl":"ltr",this._parentMenu&&(this._clientInput=this._parentMenu._clientInput,this._clientOutput=this._parentMenu._clientOutput),this.menu._setDevice(this._clientInput,this._clientOutput),"touch"===this._clientOutput.device&&(this.menu.showBackButton=!!this._parentMenu,this.menu._updateShowTitle(),this.menu.closeLabel||(this.menu.closeLabel=null===(t=this._parentMenu)||void 0===t?void 0:t.closeLabel),this.menu.showCloseButton=!!this.menu.closeLabel),this.menu._isClosing=!1;var n=[];"touch"===this._clientOutput.device&&n.push("granite-overlay-pane-fill-width-bottom");var r="touch"!==this._clientOutput.device?this._overlay.scrollStrategies.reposition():void 0,o="touch"===this._clientOutput.device&&!this.triggersSubmenu();if(this._overlayRef)"touch"===this._clientOutput.device&&(this.menu._panelAnimationState="void");else{var i=new s.OverlayConfig({positionStrategy:this._positionStrategy(),backdropClass:"granite-overlay-dark-glass-backdrop",scrollStrategy:r,direction:this._dir,panelClass:n,hasBackdrop:o});this._overlayRef=this._overlay.create(i),"touch"===this._clientOutput.device&&this.addOverlayListeners()}this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new c.TemplatePortal(this.menu.templateRef,this._viewContainerRef)),this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return e.closeMenu()})),this.animateOpenMenu(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){this._isMenuOpen?this.closeMenu():this.openMenu()},t.prototype.closeMenu=function(){this.menu.closed.emit()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)},t.prototype._destroyMenu=function(){this._overlayRef&&this._isMenuOpen&&(this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),this.menu._resetAnimation(),this._setIsMenuOpen(!1))},t.prototype._handleMousedown=function(t){l.isFakeMousedownFromScreenReader(t)||("touch"!==this._openedBy&&(this._openedBy=0===t.button?"mouse":null),this.triggersSubmenu()&&!this._toggleOnSubmenuClick()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.key;this.triggersSubmenu()&&("ArrowRight"===e&&"ltr"===this._dir.value||"ArrowLeft"===e&&"rtl"===this._dir.value)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this._toggleOnSubmenuClick()?this.toggleMenu():this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&this._parentMenu&&(this._hoverSubscription=this._parentMenu._hovered().pipe(i.filter((function(){return t._openOnHover()})),i.filter((function(e){return e===t._menuItemInstance})),i.delay(0,o.asapScheduler)).subscribe((function(){t._openedBy="mouse",t.menu instanceof et&&t.menu._isAnimating?t.menu._animationDone.pipe(i.take(1),i.delay(0,o.asapScheduler),i.takeUntil(t._parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))},t.prototype._restoreFocus=function(){this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus(),this._openedBy=null},t.prototype._setIsMenuOpen=function(t){this._isMenuOpen=t,this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t&&"touch"!==this._clientOutput.device)},t.prototype._checkMenu=function(){this.menu||
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/common"),require("@angular/cdk/coercion"),require("rxjs"),require("rxjs/operators"),require("@angular/cdk/testing"),require("@angular/cdk/overlay"),require("@angular/cdk/portal"),require("@angular/cdk/a11y"),require("@angular/cdk/keycodes"),require("@angular/animations"),require("@angular/cdk/bidi"),require("@angular/cdk/platform"),require("@angular/cdk/collections"),require("@angular/cdk/table")):"function"==typeof define&&define.amd?define("@ifsworld/granite-components",["exports","@angular/core","@angular/common","@angular/cdk/coercion","rxjs","rxjs/operators","@angular/cdk/testing","@angular/cdk/overlay","@angular/cdk/portal","@angular/cdk/a11y","@angular/cdk/keycodes","@angular/animations","@angular/cdk/bidi","@angular/cdk/platform","@angular/cdk/collections","@angular/cdk/table"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).ifsworld=t.ifsworld||{},t.ifsworld["granite-components"]={}),t.ng.core,t.ng.common,t.ng.cdk.coercion,t.rxjs,t.rxjs.operators,t.ng.cdk.testing,t.ng.cdk.overlay,t.ng.cdk.portal,t.ng.cdk.a11y,t.ng.cdk.keycodes,t.ng.animations,t.ng.cdk.bidi,t.ng.cdk.platform,t.ng.cdk.collections,t.ng.cdk.table)}(this,(function(t,e,n,o,r,i,a,c,s,l,u,g,d,h,p,b){"use strict";var m,v=function(){function t(t){this.element=t,this._columnSpan=null}return Object.defineProperty(t.prototype,"columnSpan",{set:function(t){this._columnSpan=t,this.updateStyles()},enumerable:!1,configurable:!0}),t.prototype.updateStyles=function(){this.setCssProperty("--columnSpan",this._columnSpan?this._columnSpan.toString():null)},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t}();v.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--columnSpan:$default-column-span;display:grid;grid-column:span var(--columnSpan,1)}"]}]}],v.ctorParameters=function(){return[{type:e.ElementRef}]},(m=t.GraniteArrangeGridOrientation||(t.GraniteArrangeGridOrientation={})).columns="columns",m.rows="rows";var f=function(){function e(n){this.element=n,this.orientation=t.GraniteArrangeGridOrientation.columns,this.classColumnOrientation=!1,this.classRowOrientation=!1,this._cols=e.defaultCols,this.destroy$=new r.Subject}return Object.defineProperty(e.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(o.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rows",{get:function(){return this._rows},set:function(t){throw Error("Explicitly setting rows value for arrange grid is unsupported")},enumerable:!1,configurable:!0}),e.prototype.ngAfterContentInit=function(){var t=this;this.arrangeGridItemComponents.changes.pipe(i.takeUntil(this.destroy$)).subscribe((function(){return t.updateStyles()})),this.updateStyles()},e.prototype.ngOnChanges=function(t){(t.orientation&&!t.orientation.isFirstChange()||t.cols&&!t.cols.isFirstChange())&&this.updateStyles()},e.prototype.ngOnDestroy=function(){this.destroy$.next()},e.prototype.updateStyles=function(){var e=(this.arrangeGridItemComponents||[]).length;this.orientation===t.GraniteArrangeGridOrientation.columns?(this._rows=Math.trunc((e-1)/(this._cols||1))+1,this.classColumnOrientation=!0,this.classRowOrientation=!1,e>0&&(this.arrangeGridItemComponents.forEach((function(t){return t.columnSpan=null})),this.arrangeGridItemComponents.last.columnSpan=this._rows*this._cols-e+1)):(this._cols=1,this._rows=e,this.classColumnOrientation=!1,this.classRowOrientation=!0),this.setCssProperty("--cols",this._cols.toString()),this.setCssProperty("--rows",this._rows.toString())},e.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},e}();f.defaultCols=2,f.decorators=[{type:e.Component,args:[{selector:"granite-arrange-grid",template:'<ng-content select="granite-arrange-grid-item"></ng-content>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:["@media only screen and (min-width:960px){:host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);-moz-column-gap:.5rem;column-gap:.5rem;row-gap:.5rem}:host.row-orientation{grid-template-columns:auto;grid-template-rows:repeat(calc(var(--rows, 1) - 1),-webkit-max-content);grid-template-rows:repeat(calc(var(--rows, 1) - 1),max-content)}}"]}]}],f.ctorParameters=function(){return[{type:e.ElementRef}]},f.propDecorators={orientation:[{type:e.Input}],classColumnOrientation:[{type:e.HostBinding,args:["class.column-orientation"]}],classRowOrientation:[{type:e.HostBinding,args:["class.row-orientation"]}],arrangeGridItemComponents:[{type:e.ContentChildren,args:[v]}],cols:[{type:e.Input}]};var y=function(){};y.decorators=[{type:e.NgModule,args:[{declarations:[f,v],imports:[n.CommonModule],exports:[f,v]}]}];var k=function(){function t(t,e){this.element=t,this.renderer=e}return t.prototype.ngOnChanges=function(){this.updateStyles()},t.prototype.updateStyles=function(){this.setStyle("gridColumnStart",this.columnStart),this.setStyle("gridColumnEnd",this.columnEnd),this.setStyle("gridRowStart",this.rowStart),this.setStyle("gridRowEnd",this.rowEnd)},t.prototype.setStyle=function(t,e){this.renderer.setStyle(this.element.nativeElement,t,e||"")},t}();k.decorators=[{type:e.Component,args:[{selector:"granite-grid-item",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush}]}],k.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2}]},k.propDecorators={columnStart:[{type:e.Input}],columnEnd:[{type:e.Input}],rowStart:[{type:e.Input}],rowEnd:[{type:e.Input}]};var _=function(){function t(t){this.element=t}return Object.defineProperty(t.prototype,"cols",{get:function(){return this._cols},set:function(t){this._cols=Math.max(1,Math.round(o.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rows",{get:function(){return this._rows},set:function(t){this._rows=Math.max(1,Math.round(o.coerceNumberProperty(t)))},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){this.updateStyles()},t.prototype.ngOnChanges=function(t){(t.cols&&!t.cols.isFirstChange()||t.rows&&!t.rows.isFirstChange())&&this.updateStyles()},t.prototype.updateStyles=function(){this.updateColumnStyles(),this.updateRowStyles()},t.prototype.setCssProperty=function(t,e){this.element.nativeElement.style.setProperty(t,e)},t.prototype.updateColumnStyles=function(){this.setCssProperty("--cols",this._cols&&this._cols.toString()||null)},t.prototype.updateRowStyles=function(){this.setCssProperty("--rows",this._rows&&this._rows.toString()||null)},t}();_.decorators=[{type:e.Component,args:[{selector:"granite-grid",template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{--cols:1;--rows:1;display:grid;grid-template-columns:repeat(var(--cols,1),1fr);grid-template-rows:repeat(var(--rows,1),1fr)}"]}]}],_.ctorParameters=function(){return[{type:e.ElementRef}]},_.propDecorators={cols:[{type:e.Input}],rows:[{type:e.Input}]};var w=function(){};w.decorators=[{type:e.NgModule,args:[{declarations:[_,k],imports:[n.CommonModule],exports:[_,k]}]}];var x=function(t,e){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function C(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}x(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function I(t,e,n,o){return new(n||(n=Promise))((function(r,i){function a(t){try{s(o.next(t))}catch(t){i(t)}}function c(t){try{s(o.throw(t))}catch(t){i(t)}}function s(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,c)}s((o=o.apply(t,e||[])).next())}))}function M(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(r=a.trys,(r=r.length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=e.call(t,a)}catch(t){i=[6,t],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}Object.create;function S(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],o=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&o>=t.length&&(t=void 0),{value:t&&t[o++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function O(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var o,r,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function T(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(O(arguments[e]));return t}Object.create;function E(t,e,n){var o;n&&n.style&&null!=e&&n.style.setProperty(t,(o=e)&&(o.startsWith("granite-")||o.startsWith("fnd-"))?"var(--"+e+")":e)}var D=function(){function t(t){this.elementRef=t,this.pill=!1}return t.prototype.ngOnChanges=function(t){t.backgroundColor&&t.backgroundColor.previousValue!==t.backgroundColor.currentValue&&E("background-color",t.backgroundColor.currentValue,this.elementRef.nativeElement),t.color&&t.color.previousValue!==t.color.currentValue&&E("color",t.color.currentValue,this.elementRef.nativeElement)},t}();D.decorators=[{type:e.Component,args:[{selector:"granite-badge",exportAs:"graniteBadge",host:{class:"granite-badge","[class.granite-badge-pill]":"pill"},template:"<ng-content></ng-content>",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{display:-moz-inline-flex;display:inline-flex;flex-direction:row;flex-wrap:nowrap;overflow:hidden;-ms-text-overflow:ellipsis;text-overflow:ellipsis;white-space:nowrap;align-items:center;background-color:var(--granite-color-signal-neutral);color:var(--granite-color-text-static-light);padding:calc(var(--granite-spacing-m) * .3125);border-radius:.3125rem;-webkit-padding-start:calc(var(--granite-spacing-m) * .625);padding-inline-start:calc(var(--granite-spacing-m) * .625);-webkit-padding-end:calc(var(--granite-spacing-m) * .625);padding-inline-end:calc(var(--granite-spacing-m) * .625)}:host(.granite-badge-pill){border-radius:1.5625rem}"]}]}],D.ctorParameters=function(){return[{type:e.ElementRef}]},D.propDecorators={backgroundColor:[{type:e.Input}],color:[{type:e.Input}],pill:[{type:e.Input}]};var P=function(){};P.decorators=[{type:e.NgModule,args:[{declarations:[D],imports:[n.CommonModule],exports:[D]}]}];var A=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){var n=this;void 0===t&&(t={});var o=new a.HarnessPredicate(e,t);return o.addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)})),o.addOption("pill",t.pill,(function(t,e){return I(n,void 0,void 0,(function(){return M(this,(function(n){switch(n.label){case 0:return[4,t.isPill()];case 1:return[2,n.sent()===e]}}))}))})),o},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.isPill=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().hasClass("granite-badge-pill")]}}))}))},e}(a.ComponentHarness);A.hostSelector="granite-badge";var B=new e.InjectionToken("GRANITE_MENU_PANEL"),z=function(){function t(t,e,n){this._elementRef=t,this._focusMonitor=e,this._parentMenu=n,this.role="menuitem",this._hovered=new r.Subject,this._focused=new r.Subject,this._triggersSubmenu=!1,this._highlighted=!1,e.monitor(this._elementRef,!1)}return t.prototype.ngOnDestroy=function(){this._focusMonitor.stopMonitoring(this._elementRef),this._hovered.complete(),this._focused.complete()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e),this._focused.next(this)},t.prototype._getHostElement=function(){return this._elementRef.nativeElement},t}();function R(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"cubic-bezier(0, 0, 0.2, 1)"}function L(t,e){return t+"ms "+(void 0!==e?" "+e+"ms ":"")+"linear"}z.decorators=[{type:e.Component,args:[{selector:"[graniteMenuItem]",template:'<ng-content></ng-content>\n <ng-container *ngIf="_triggersSubmenu">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>',exportAs:"graniteMenuItem",host:{"[attr.role]":"role","[class.granite-menu-item]":"true","[class.granite-menu-item-highlighted]":"_highlighted","[class.granite-menu-item-submenu-trigger]":"_triggersSubmenu","[class.granite-device-output-touch]":'_clientOutput?.device === "touch"',"(mouseenter)":"_hovered.next(this)"},styles:[":host{display:block;position:relative;line-height:2rem;padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:.0625rem solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:.0625rem solid var(--granite-color-border-soft)}:host.granite-device-output-touch{line-height:2rem;font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:2rem;height:2rem;font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],z.ctorParameters=function(){return[{type:e.ElementRef},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]}]},z.propDecorators={role:[{type:e.Input}]};var G=R(120),q={transformMenuDesktop:g.trigger("transformMenuDesktop",[g.state("void",g.style({opacity:0,transform:"scale(0.9)"})),g.transition("void => enter",g.group([g.query(".granite-menu-content",g.animate(L(100),g.style({opacity:1}))),g.animate(G,g.style({transform:"scale(1)"}))])),g.transition("* => void",g.animate(L(100,25),g.style({opacity:0})))])},F=300,X=R(F),V=L(F),j=L(F,200),H="1ms linear",Y=g.style({transform:"translateX(0) translateY(100%)",opacity:0}),N=g.style({opacity:1,transform:"translateX(0) translateY(0)"}),$=g.style({opacity:0,transform:"translateX(100vw) translateY(0)"}),U=g.style({opacity:1,transform:"translateX(-100vw) translateY(0)"}),K=g.style({transform:"translateX({{ xOffset }}px)"}),W=g.style({transform:"translateX(calc(-100vw + {{ xOffset }}px))"}),Q=g.style({opacity:0,transform:"translateX(0) translateY(0)"}),Z={transformMenuTouch:g.trigger("transformMenuTouch",[g.state("void",$),g.state("enter, enter-from-below",N),g.state("pan-hidden",W,{params:{xOffset:0}}),g.state("pan",K,{params:{xOffset:0}}),g.state("below-with-delay",Y),g.state("hide",U),g.transition("pan => enter, pan => enter-from-below, pan => void, enter <=> hide, enter-from-below <=> hide, pan-hidden => hide, pan-hidden => enter",g.animate(X)),g.transition("void => enter-from-below",g.sequence([g.animate(H,Y),g.animate(X,N)])),g.transition("void => enter",g.sequence([g.animate(H,$),g.animate(X,N)])),g.transition("enter => void",g.animate(X,$)),g.transition("hide => below",g.animate(V,U)),g.transition("hide => below-with-delay",g.sequence([g.animate(H,U),g.animate(j,U)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(H,N),g.animate(V,Y)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(H,N),g.animate(j,Y)]))]),transformCloseButton:g.trigger("transformCloseButton",[g.state("void, below, below-with-delay",Q),g.state("enter, enter-from-below, pan-hidden, pan, hide",N),g.transition("void => enter-from-below",g.sequence([g.animate(H,Q),g.animate(L(50,150),N)])),g.transition("enter => below, enter-from-below => below",g.sequence([g.animate(H,N),g.animate(L(25),Q)])),g.transition("enter => below-with-delay, enter-from-below => below-with-delay",g.sequence([g.animate(H,N),g.animate(L(50,200),Q)]))])};var J=0,tt={value:"void",params:{xOffset:0}},et=function(){function t(t){this._changeDetectorRef=t,this.closed=new e.EventEmitter,this.panelId="granite-menu-panel-"+J++,this.showBackButton=!1,this.showTitle=!1,this.showCloseButton=!1,this._transformMenu=new r.BehaviorSubject(tt),this._animationDone=new r.Subject,this._directDescendantItems=new e.QueryList,this._tabSubscription=r.Subscription.EMPTY,this._xPosition="after",this._yPosition="below",this.xOffset=0}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('xPosition value must be either \'before\' or after\'.\n Example: <granite-menu xPosition="before" #menu="graniteMenu"></granite-menu>')}(),this._xPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('yPosition value must be either \'above\' or below\'.\n Example: <granite-menu yPosition="above" #menu="graniteMenu"></granite-menu>')}(),this._yPosition=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"_panelAnimationState",{set:function(t){this._transformMenu.next({value:t,params:{xOffset:this.xOffset}})},enumerable:!1,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._updateDirectDescendants(),this._keyManager=new l.FocusKeyManager(this._directDescendantItems).withWrap(),this._tabSubscription=this._keyManager.tabOut.subscribe((function(){t.closed.emit("tab")})),this._directDescendantItems.changes.pipe(i.startWith(this._directDescendantItems),i.switchMap((function(t){return r.merge.apply(void 0,T(t.map((function(t){return t._focused}))))}))).subscribe((function(e){return t._keyManager.updateActiveItem(e)}))},t.prototype.ngOnDestroy=function(){this._directDescendantItems.destroy(),this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){var t=this;return this._directDescendantItems.changes.pipe(i.startWith(this._directDescendantItems),i.filter((function(){var e;return"touch"!==(null===(e=t._clientOutput)||void 0===e?void 0:e.device)})),i.switchMap((function(t){return r.merge.apply(void 0,T(t.map((function(t){return t._hovered}))))})))},t.prototype._handleKeydown=function(t){var e=t.key,n=this._keyManager;switch(e){case"Escape":u.hasModifierKey(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case"ArrowLeft":this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case"ArrowRight":this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;case"Home":case"End":u.hasModifierKey(t)||("Home"===e?n.setFirstItemActive():n.setLastItemActive(),t.preventDefault());break;default:"ArrowUp"!==e&&"ArrowDown"!==e||n.setFocusOrigin("keyboard"),n.onKeydown(t)}},t.prototype.focusFirstItem=function(t){void 0===t&&(t="program"),this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype._updateShowTitle=function(){this.showTitle=!!this.title||this.showBackButton},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._startTouchCloseDownAnimation=function(){this._panelAnimationState="below"},t.prototype._startTouchCloseDownAnimationWithDelay=function(){this._panelAnimationState="below-with-delay"},t.prototype._startTouchCloseSideAnimation=function(){this._resetAnimation()},t.prototype._startTouchRootEnterAnimation=function(){this._panelAnimationState="enter-from-below",this.xOffset=0},t.prototype._startTouchSubmenuEnterAnimation=function(){this._panelAnimationState="enter",this.xOffset=0},t.prototype._startTouchPanAnimation=function(t){this._panelAnimationState="pan",this.xOffset=t},t.prototype._startTouchHidePanAnimation=function(t){this._panelAnimationState="pan-hidden",this.xOffset=t},t.prototype._startTouchHideAnimation=function(){this._panelAnimationState="hide",this.xOffset=0},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1},t.prototype._onAnimationStart=function(t){this._isAnimating=!0,"enter"!==t.toState&&"enter-from-below"!==t.toState||0!==this._keyManager.activeItemIndex||(t.element.scrollTop=0)},t.prototype._handleClick=function(){this.closed.emit("click")},t.prototype._handleCloseClick=function(){this.closed.emit()},t.prototype._handleBackClick=function(t){this.showBackButton&&this.closed.emit("keydown"),t.stopPropagation()},t.prototype._setDevice=function(t,e){this._clientInput=t,this._clientOutput=e,this._directDescendantItems.forEach((function(n){n._clientInput=t,n._clientOutput=e})),this._changeDetectorRef.markForCheck()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype._updateDirectDescendants=function(){var t=this;this._allItems.changes.pipe(i.startWith(this._allItems)).subscribe((function(e){t._directDescendantItems.reset(e.filter((function(e){return e._parentMenu===t}))),t._directDescendantItems.notifyOnChanges()}))},t}();et.decorators=[{type:e.Directive}],et.ctorParameters=function(){return[{type:e.ChangeDetectorRef}]},et.propDecorators={xPosition:[{type:e.Input}],yPosition:[{type:e.Input}],title:[{type:e.Input}],closeLabel:[{type:e.Input}],templateRef:[{type:e.ViewChild,args:[e.TemplateRef]}],_allItems:[{type:e.ContentChildren,args:[z,{descendants:!0}]}],closed:[{type:e.Output}]};var nt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(et);nt.decorators=[{type:e.Component,args:[{selector:"granite-menu",template:'\x3c!--\n Using separate template part for desktop and touch output, because of\n animation triggers and slightly different content.\n--\x3e\n<ng-template>\n \x3c!-- Desktop --\x3e\n <ng-container *ngIf="_clientOutput.device === \'desktop\'">\n <div\n #menu\n class="granite-menu"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuDesktop]="_transformMenu | async"\n (@transformMenuDesktop.start)="_onAnimationStart($event)"\n (@transformMenuDesktop.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n </div>\n </div>\n </ng-container>\n\n \x3c!-- Touch --\x3e\n <ng-container *ngIf="_clientOutput?.device === \'touch\'">\n <div\n #menu\n class="granite-menu granite-device-output-touch"\n tabindex="-1"\n [id]="panelId"\n [@transformMenuTouch]="_transformMenu | async"\n (@transformMenuTouch.start)="_onAnimationStart($event)"\n (@transformMenuTouch.done)="_onAnimationDone($event)"\n (click)="_handleClick()"\n (keydown)="_handleKeydown($event)"\n >\n <div class="granite-menu-content">\n <div *ngIf="showTitle" class="header-container">\n <button\n [disabled]="!showBackButton"\n graniteMenuTouchTitleItem\n (click)="_handleBackClick($event)"\n >\n {{ title }}\n </button>\n </div>\n\n <ng-container [ngTemplateOutlet]="content"></ng-container>\n\n <div class="footer-container"></div>\n </div>\n </div>\n\n \x3c!-- Close button --\x3e\n <div class="close" [@transformCloseButton]="_transformMenu | async">\n <button\n *ngIf="showCloseButton"\n graniteMenuTouchCloseItem\n (click)="_handleCloseClick()"\n >\n {{ closeLabel }}\n </button>\n </div>\n </ng-container>\n\n \x3c!--\n Content template shared between desktop and touch parts, as <ng-content>\n can\'t be used in two places in the same template\n --\x3e\n <ng-template #content>\n <ng-content></ng-content>\n </ng-template>\n</ng-template>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,exportAs:"graniteMenu",animations:[q.transformMenuDesktop,Z.transformMenuTouch,Z.transformCloseButton],providers:[{provide:B,useExisting:nt}],styles:[".granite-menu:not(.granite-device-output-touch){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 2rem);outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));min-width:7rem;overflow-x:hidden;overflow-y:hidden}.granite-menu:not(.granite-device-output-touch).ng-animating{pointer-events:none}.granite-menu:not(.granite-device-output-touch):hover{overflow-y:auto}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar{width:var(--granite-spacing-xs)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-thumb{background-color:var(--granite-color-border-hard);border-radius:calc(var(--granite-spacing-m) * .125)}.granite-menu:not(.granite-device-output-touch)::-webkit-scrollbar-track{background-color:var(--granite-color-background-hover)}.granite-menu.granite-device-output-touch{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 2rem);outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:.25rem;-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs);max-height:calc(100% - ($granite-base-rem * 7))}.granite-menu.granite-device-output-touch.ng-animating{pointer-events:none}.granite-menu.granite-device-output-touch .header-container{position:-webkit-sticky;position:sticky;top:0;background-color:var(--granite-color-background-variant);z-index:1}.granite-menu.granite-device-output-touch .footer-container{position:-webkit-sticky;position:sticky;bottom:0;height:0}.close:not(:empty){background-color:var(--granite-color-background-variant);color:var(--granite-color-text);overflow:auto;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 2rem);outline:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;filter:drop-shadow(0 16px 16px rgba(0,0,0,.08)) drop-shadow(0 4px 20px rgba(0,0,0,.1));border-radius:.25rem;-webkit-margin-start:var(--granite-spacing-xs);margin-inline-start:var(--granite-spacing-xs);-webkit-margin-end:var(--granite-spacing-xs);margin-inline-end:var(--granite-spacing-xs);-webkit-margin-after:var(--granite-spacing-xs);margin-block-end:var(--granite-spacing-xs)}.close:not(:empty).ng-animating{pointer-events:none}"]}]}];var ot=new e.InjectionToken("GRANITE_CLIENT_INPUT"),rt=new e.InjectionToken("GRANITE_CLIENT_OUTPUT"),it={input:{devices:["mouse","keyboard"]},output:{device:"desktop"}},at={input:{devices:["touch","onscreen-keyboard"]},output:{device:"touch"}},ct=h.normalizePassiveListenerOptions({passive:!0}),st=function(){function t(t,e,n,o,i,a,c,s,l,u){var g=this;this._overlay=t,this._element=e,this._viewContainerRef=n,this._parentMenu=o,this._clientInput=i,this._clientOutput=a,this._menuItemInstance=c,this._dir=s,this._focusMonitor=l,this._isMenuOpen=!1,this._openedBy=null,this._hoverSubscription=r.Subscription.EMPTY,this._menuCloseSubscription=r.Subscription.EMPTY,this._closingActionsSubscription=r.Subscription.EMPTY,this._portal=null,this._overlayRef=null,this._touchTouchingElement=!1,this._handleTouchStart=function(){g._openedBy="touch"},this._handleOverlayTouchStart=function(t){g.menu._isAnimating||(g._touchStartTime=(new Date).getTime(),g._touchStartX=t.changedTouches[0].clientX,g._touchStartY=t.changedTouches[0].clientY,g._touchCurrentX=g._touchStartX,g._touchCurrentY=g._touchStartY,g._touchTranslateX=0,g._touchMaxX=g._overlayRef.hostElement.getBoundingClientRect().width,g._touchLockedX=null,g._touchTouchingElement=!0)},this._handleOverlayTouchMove=function(t){if(g._touchTouchingElement&&!g.menu._isAnimating&&!g._touchLockedX){if(g._touchCurrentX=t.changedTouches[0].clientX,g._touchCurrentY=t.changedTouches[0].clientY,null===g._touchLockedX){var e=Math.abs(g._touchCurrentY-g._touchStartY),n=Math.abs(g._touchCurrentX-g._touchStartX);if(n>10||e>10)return void(g._touchLockedX=e>n)}g._touchTranslateX=g._touchCurrentX-g._touchStartX,g._touchTranslateX<0?g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,-8,-4*g._touchMaxX):g._parentMenu?g._touchTranslateX>g._touchMaxX&&(g._touchTranslateX=g.easeOutExpo(g._touchTranslateX-g._touchMaxX,g._touchMaxX,8,4*g._touchMaxX)):g._touchTranslateX=g.easeOutExpo(g._touchTranslateX,0,8,4*g._touchMaxX),g.animateSetMenuPosition(g._touchTranslateX)}},this._handleOverlayTouchEnd=function(){if(g._touchTouchingElement&&!g.menu._isAnimating&&(g._touchTranslateX=g._touchCurrentX-g._touchStartX,0!==g._touchTranslateX)){g._touchTouchingElement=!1,g._touchTimeTaken=(new Date).getTime()-g._touchStartTime;var t=g._touchTranslateX>g._touchMaxX/2,e=g._touchTranslateX>g._touchMaxX/10&&g._touchTimeTaken>50&&g._touchTimeTaken<300;g._parentMenu&&(e||t)?g.menu.closed.emit("keydown"):g.animateOpenMenu()}},e.nativeElement.addEventListener("touchstart",this._handleTouchStart,ct),c&&(c._triggersSubmenu=this.triggersSubmenu()),this._document=u}return t.prototype.ngOnChanges=function(t){t.menu&&this._handleMenuChange()},t.prototype.ngAfterContentInit=function(){this._checkMenu(),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this.removeOverlayListeners(),this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,ct),this._hoverSubscription.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe()},t.prototype._handleMenuChange=function(){var t=this;if(this._menuCloseSubscription.unsubscribe(),this.menu){var e=this.menu.closed;this._menuCloseSubscription=e.subscribe((function(e){if(!t.menu._isClosing){if(t.menu._isClosing=!0,"touch"===t._clientOutput.device)(t.menu._isAnimating?t.menu._animationDone:r.of([null])).pipe(i.take(1),i.delay(0,r.asapScheduler)).subscribe((function(){t.animateCloseMenu("keydown"!==e,"click"===e),t.menu._animationDone.pipe(i.take(1),i.delay(0,r.asapScheduler)).subscribe((function(){return t._destroyMenu()}))}));else t._destroyMenu();"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)}}))}},t.prototype.openMenu=function(){var t,e=this;if(!this._isMenuOpen){this._checkMenu(),this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction="rtl"===this._dir.value?"rtl":"ltr",this._parentMenu&&(this._clientInput=this._parentMenu._clientInput,this._clientOutput=this._parentMenu._clientOutput),this.menu._setDevice(this._clientInput,this._clientOutput),"touch"===this._clientOutput.device&&(this.menu.showBackButton=!!this._parentMenu,this.menu._updateShowTitle(),this.menu.closeLabel||(this.menu.closeLabel=null===(t=this._parentMenu)||void 0===t?void 0:t.closeLabel),this.menu.showCloseButton=!!this.menu.closeLabel),this.menu._isClosing=!1;var n=[];"touch"===this._clientOutput.device&&n.push("granite-overlay-pane-fill-width-bottom");var o="touch"!==this._clientOutput.device?this._overlay.scrollStrategies.reposition():void 0,r="touch"===this._clientOutput.device&&!this.triggersSubmenu();if(this._overlayRef)"touch"===this._clientOutput.device&&(this.menu._panelAnimationState="void");else{var i=new c.OverlayConfig({positionStrategy:this._positionStrategy(),backdropClass:"granite-overlay-dark-glass-backdrop",scrollStrategy:o,direction:this._dir,panelClass:n,hasBackdrop:r});this._overlayRef=this._overlay.create(i),"touch"===this._clientOutput.device&&this.addOverlayListeners()}this._portal&&this._portal.templateRef===this.menu.templateRef||(this._portal=new s.TemplatePortal(this.menu.templateRef,this._viewContainerRef)),this._overlayRef.attach(this._portal),this._closingActionsSubscription=this._menuClosingActions().subscribe((function(){return e.closeMenu()})),this.animateOpenMenu(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedBy||"program")}},t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){this._isMenuOpen?this.closeMenu():this.openMenu()},t.prototype.closeMenu=function(){this.menu.closed.emit()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)},t.prototype._destroyMenu=function(){this._overlayRef&&this._isMenuOpen&&(this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this._restoreFocus(),this.menu._resetAnimation(),this._setIsMenuOpen(!1))},t.prototype._handleMousedown=function(t){l.isFakeMousedownFromScreenReader(t)||("touch"!==this._openedBy&&(this._openedBy=0===t.button?"mouse":null),this.triggersSubmenu()&&!this._toggleOnSubmenuClick()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.key;this.triggersSubmenu()&&("ArrowRight"===e&&"ltr"===this._dir.value||"ArrowLeft"===e&&"rtl"===this._dir.value)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this._toggleOnSubmenuClick()?this.toggleMenu():this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&this._parentMenu&&(this._hoverSubscription=this._parentMenu._hovered().pipe(i.filter((function(){return t._openOnHover()})),i.filter((function(e){return e===t._menuItemInstance})),i.delay(0,r.asapScheduler)).subscribe((function(){t._openedBy="mouse",t.menu instanceof et&&t.menu._isAnimating?t.menu._animationDone.pipe(i.take(1),i.delay(0,r.asapScheduler),i.takeUntil(t._parentMenu._hovered())).subscribe((function(){return t.openMenu()})):t.openMenu()})))},t.prototype._restoreFocus=function(){this._openedBy?this.triggersSubmenu()||this.focus(this._openedBy):this.focus(),this._openedBy=null},t.prototype._setIsMenuOpen=function(t){this._isMenuOpen=t,this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t&&"touch"!==this._clientOutput.device)},t.prototype._checkMenu=function(){this.menu||
|
|
2
2
|
/**
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright Google LLC All Rights Reserved.
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* Use of this source code is governed by an MIT-style license that can be
|
|
7
7
|
* found in the LICENSE file at https://angular.io/license
|
|
8
8
|
*/
|
|
9
|
-
function(){throw Error('graniteMenuTriggerFor: must pass in an granite-menu instance.\n\n Example:\n <granite-menu #menu="graniteMenu"></granite-menu>\n <button [graniteMenuTriggerFor]="menu"></button>')}()},t.prototype._desktopPositionStrategy=function(){var t=this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".granite-menu").withPush(!1);return this._setPosition(t),t},t.prototype._setPosition=function(t){var e=O("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],r=e[1],o=O("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),i=o[0],a=o[1],s=O([i,a],2),c=s[0],l=s[1],u=O([n,r],2),g=u[0],d=u[1],h=0;this.triggersSubmenu()?(d=n="before"===this.menu.xPosition?"start":"end",r=g="end"===n?"start":"end",h="bottom"===i?0:-0):(c="top"===i?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:c,overlayX:g,overlayY:i,offsetY:h},{originX:r,originY:c,overlayX:d,overlayY:i,offsetY:h},{originX:n,originY:l,overlayX:g,overlayY:a,offsetY:-h},{originX:r,originY:l,overlayX:d,overlayY:a,offsetY:-h}])},t.prototype._menuClosingActions=function(){var t,e=this,n=null===(t=this._overlayRef)||void 0===t?void 0:t.detachments(),r=this._parentMenu?this._parentMenu.closed:o.of(),a="desktop"===this._clientOutput.device&&this._parentMenu?this._parentMenu._hovered().pipe(i.filter((function(t){return t!==e._menuItemInstance})),i.filter((function(){return e._isMenuOpen}))):o.of(),s=this._parentMenu?o.of():o.fromEvent(this._document,"click").pipe(i.filter((function(t){return t.target!==e._element.nativeElement&&null===t.target.closest(".granite-menu")})),i.filter((function(){return!e.menu._isAnimating})));return o.merge(n,a,r,s)},t.prototype._openOnHover=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype._toggleOnSubmenuClick=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&!(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype.animateOpenMenu=function(){"touch"===this._clientOutput.device?this.animateTouchOpenMenu():this.menu._startAnimation()},t.prototype.animateTouchOpenMenu=function(){this.triggersSubmenu()?(this.menu._startTouchSubmenuEnterAnimation(),this._parentMenu._startTouchHideAnimation()):this.menu._startTouchRootEnterAnimation()},t.prototype.animateCloseMenu=function(t,e){"touch"===this._clientOutput.device?this._animateTouchCloseMenu(t,e):this._parentMenu._resetAnimation()},t.prototype._animateTouchCloseMenu=function(t,e){var n;t?e?this.menu._startTouchCloseDownAnimationWithDelay():this.menu._startTouchCloseDownAnimation():(this.menu._startTouchCloseSideAnimation(),null===(n=this._parentMenu)||void 0===n||n._startTouchSubmenuEnterAnimation())},t.prototype.animateSetMenuPosition=function(t){this.menu._startTouchPanAnimation(t),this._parentMenu&&this._parentMenu._startTouchHidePanAnimation(t)},t.prototype._positionStrategy=function(){return"touch"===this._clientOutput.device?this._touchPositionStrategy():this._desktopPositionStrategy()},t.prototype._touchPositionStrategy=function(){return this._overlay.position().global()},t.prototype.addOverlayListeners=function(){this._overlayRef.hostElement.addEventListener("touchstart",this._handleOverlayTouchStart,st),this._overlayRef.hostElement.addEventListener("touchmove",this._handleOverlayTouchMove,st),this._overlayRef.hostElement.addEventListener("touchend",this._handleOverlayTouchEnd,st)},t.prototype.removeOverlayListeners=function(){this._overlayRef.hostElement.removeEventListener("touchstart",this._handleOverlayTouchStart,st),this._overlayRef.hostElement.removeEventListener("touchmove",this._handleOverlayTouchMove,st),this._overlayRef.hostElement.removeEventListener("touchend",this._handleOverlayTouchEnd,st)},t.prototype.easeOutExpo=function(t,e,n,r){return t===r?e+n:n*(1-Math.pow(2,-10*t/r))+e},t}();ct.decorators=[{type:e.Directive,args:[{selector:"[graniteMenuTriggerFor]",host:{class:"granite-menu-trigger","aria-haspopup":"true","[attr.aria-expanded]":"_isMenuOpen || null","[attr.aria-controls]":"_isMenuOpen ? menu.panelId : null","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"}}]}],ct.ctorParameters=function(){return[{type:s.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:et,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[rt]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[ot]},{type:e.Optional}]},{type:z,decorators:[{type:e.Optional},{type:e.Self}]},{type:d.Directionality,decorators:[{type:e.Optional}]},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},ct.propDecorators={menu:[{type:e.Input,args:["graniteMenuTriggerFor"]}]};var lt=function(){};lt.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchCloseItem]",template:"<ng-content></ng-content>",exportAs:"graniteMenuTouchCloseItem",host:{"[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:2rem;padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:.0625rem solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:.0625rem solid var(--granite-color-border-soft)}:host.granite-device-output-touch{line-height:2rem;font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:2rem;height:2rem;font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}];var ut=function(t){this._triggersBack=!1,this._triggersBack=!!t.parentMenu};ut.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchTitleItem]",template:'\n <ng-container *ngIf="_triggersBack">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>\n <ng-content></ng-content>\n ',exportAs:"graniteMenuTouchTitleItem",host:{"[class.granite-menu-item-title]":"true","[class.granite-menu-item-back-trigger]":"_triggersBack","[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:2rem;padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:.0625rem solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:.0625rem solid var(--granite-color-border-soft)}:host.granite-device-output-touch{line-height:2rem;font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:2rem;height:2rem;font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],ut.ctorParameters=function(){return[{type:et,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]}]};var gt=function(){this.dividerDirection="top"};gt.decorators=[{type:e.Directive,args:[{selector:"[graniteDivider]",exportAs:"graniteDivider",host:{"[class.granite-divider-top]":'dividerDirection === "top"',"[class.granite-divider-bottom]":'dividerDirection === "bottom"'}}]}],gt.propDecorators={dividerDirection:[{type:e.Input}]};var dt=function(){function t(t,e,n){this._elementRef=t,this.renderer=e,n||this.renderer.setAttribute(t.nativeElement,"aria-hidden","true")}return t.prototype.ngOnChanges=function(t){t.fontIcon&&this._updateFontIcon()},t.prototype._updateFontIcon=function(){this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&this.renderer.removeClass(this._elementRef.nativeElement,this._previousFontIconClass),this.fontIcon&&this.renderer.addClass(this._elementRef.nativeElement,this.fontIcon),this._previousFontIconClass=this.fontIcon)},t}();dt.decorators=[{type:e.Component,args:[{selector:"granite-icon",template:"<ng-content></ng-content>",host:{role:"img",class:"granite-icon"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host.granite-icon{background-repeat:no-repeat;display:inline-block;padding:0 calc(var(--granite-spacing-xs) / 2);font-size:1em;line-height:1em;position:relative;top:.1em}"]}]}],dt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:String,decorators:[{type:e.Attribute,args:["aria-hidden"]}]}]},dt.propDecorators={fontIcon:[{type:e.Input}]};var ht=function(){};ht.decorators=[{type:e.NgModule,args:[{declarations:[dt],exports:[dt]}]}];var pt=function(){};pt.decorators=[{type:e.NgModule,args:[{declarations:[nt,z,ct,lt,ut,gt],imports:[n.CommonModule,s.OverlayModule,c.PortalModule,ht],exports:[nt,z,ct,lt,ut,gt]}]}];var bt=function(t){function e(){var e=t.apply(this,T(arguments))||this;return e._documentRootLocator=e.documentRootLocatorFactory(),e}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.open=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.isOpen()];case 1:return t.sent()?[3,4]:[4,this.host()];case 2:return[4,t.sent().click()];case 3:return t.sent(),[2,this.forceStabilize()];case 4:return[2]}}))}))},e.prototype.close=function(){var t;return I(this,void 0,void 0,(function(){return M(this,(function(e){switch(e.label){case 0:return[4,this._getMenuPanel()];case 1:return[4,null===(t=e.sent())||void 0===t?void 0:t.sendKeys(a.TestKey.ESCAPE)];case 2:return e.sent(),[2,this.forceStabilize()]}}))}))},e.prototype.isOpen=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this._getMenuPanel()];case 1:return[2,!!t.sent()]}}))}))},e.prototype.getItems=function(t){return void 0===t&&(t={}),I(this,void 0,void 0,(function(){var e;return M(this,(function(n){switch(n.label){case 0:return[4,this._getPanelId()];case 1:return(e=n.sent())?[2,this._documentRootLocator.locatorForAll(mt.with(Object.assign(Object.assign({},t),{ancestor:"#"+e})))()]:[2,[]]}}))}))},e.prototype._getMenuPanel=function(){return I(this,void 0,void 0,(function(){var t;return M(this,(function(e){switch(e.label){case 0:return[4,this._getPanelId()];case 1:return[2,(t=e.sent())?this._documentRootLocator.locatorForOptional("#"+t)():null]}}))}))},e.prototype._getPanelId=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getAttribute("aria-controls")];case 2:return[2,t.sent()||null]}}))}))},e}(a.ComponentHarness);bt.hostSelector=".granite-menu-trigger";var mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.hasSubmenu=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().matchesSelector(bt.hostSelector)]}}))}))},e.prototype.getSubmenu=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.hasSubmenu()];case 1:return t.sent()?[2,new bt(this.locatorFactory)]:[2,null]}}))}))},e.prototype.click=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().click()];case 2:return t.sent(),[2,this.forceStabilize()]}}))}))},e}(a.ComponentHarness);mt.hostSelector=".granite-menu-item";var vt=function(){function t(t){this._focusMonitor=t,this.id=null,this.checked=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this.toggleChange=new e.EventEmitter,this.toggleBlur=new e.EventEmitter,this._positionBefore=!1,this._toggleSwitchDisabled=!1}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._toggleSwitchDisabled=!0)},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._onBlur=function(){this.toggleBlur.emit()},t.prototype._toggleSwitchChange=function(){this.checked=this._getInputElement().checked,this.valueChange.emit(this.checked)},t.prototype._toggleSwitchClick=function(){this.toggleChange.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();vt.decorators=[{type:e.Component,args:[{selector:"granite-toggle-switch",exportAs:"graniteToggleSwitch",host:{class:"granite-toggle-switch","[class.granite-toggle-switch-checked]":"checked","[class.granite-toggle-switch-disabled]":"disabled","[class.granite-toggle-switch-readonly]":"readonly","[class.granite-toggle-switch-label-before]":"_positionBefore"},template:'<label [attr.for]="id" class="granite-toggle-switch-label">\n <div class="granite-toggle-switch-bar">\n <input\n #input\n [id]="id"\n class="granite-toggle-switch-input cdk-visually-hidden"\n role="switch"\n type="checkbox"\n [attr.aria-checked]="checked.toString()"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [checked]="checked"\n [disabled]="_toggleSwitchDisabled"\n [readonly]="readonly"\n (click)="_toggleSwitchClick()"\n (change)="_toggleSwitchChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-toggle-switch-thumb"></div>\n </div>\n <span class="granite-toggle-switch-text"><ng-content></ng-content></span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-toggle-switch){color:var(--granite-color-text)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-bar{background-color:var(--granite-color-background-active)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{border:.0625rem solid var(--granite-color-background-active)}:host-context([dir=ltr]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=ltr] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:right}:host-context([dir=rtl]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=rtl] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:left}:host(.granite-toggle-switch-disabled) .granite-toggle-switch-label{opacity:.6}:host(.granite-toggle-switch-disabled) *,:host(.granite-toggle-switch-readonly) *{cursor:default}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-label{flex-direction:row-reverse}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}.granite-toggle-switch-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-toggle-switch-bar{width:2rem;height:1rem;border-radius:.5rem;background-color:var(--granite-color-background-inactive);transition:background-color .1s linear;position:relative}.granite-toggle-switch-bar:focus-within{box-shadow:0 0 0 .0625rem var(--granite-color-focus)}.granite-toggle-switch-thumb{width:1rem;height:1rem;border-radius:1rem;background-color:var(--granite-color-text-static-light);border:.0625rem solid var(--granite-color-background-inactive);transition:float .1s linear}:host-context([dir=ltr]) .granite-toggle-switch-thumb,html[dir=ltr] .granite-toggle-switch-thumb{float:left}:host-context([dir=rtl]) .granite-toggle-switch-thumb,html[dir=rtl] .granite-toggle-switch-thumb{float:right}.granite-toggle-switch-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s)}.granite-toggle-switch-text:empty{display:none}"]}]}],vt.ctorParameters=function(){return[{type:l.FocusMonitor}]},vt.propDecorators={id:[{type:e.Input}],checked:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],toggleChange:[{type:e.Output}],toggleBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var ft=function(){};ft.decorators=[{type:e.NgModule,args:[{declarations:[vt],exports:[vt]}]}];var yt=function(){function t(t,n){var r=this;this._focusMonitor=t,this._radioDispatcher=n,this.id=null,this.checked=!1,this.required=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.radioChange=new e.EventEmitter,this.radioBlur=new e.EventEmitter,this._positionBefore=!1,this._radioDisabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=n.listen((function(t,e){t!==r.id&&e===r.name&&(r.checked=!1)}))}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.required&&(this.required=r.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._radioDisabled=!0)},t.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._radioClick=function(t){this.radioChange.emit(null==t?void 0:t.value)},t.prototype._radioChange=function(){this.checked=this._getInputElement().checked,this._radioDispatcher.notify(this.id,this.name)},t.prototype._onBlur=function(){this.radioBlur.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();yt.decorators=[{type:e.Component,args:[{selector:"granite-radio-button",exportAs:"graniteRadioButton",host:{class:"granite-radio-button","[class.granite-radio-button-disabled]":"disabled","[class.granite-radio-button-label-before]":"_positionBefore","[class.granite-radio-button-checked]":"checked","[class.granite-radio-button-readonly]":"readonly"},template:'<label class="granite-radio-button-label">\n <div class="granite-radio-button-outer-circle">\n <input\n #input\n [id]="id"\n class="granite-radio-button-input cdk-visually-hidden"\n type="radio"\n [attr.name]="name"\n [disabled]="_radioDisabled"\n [checked]="checked"\n [readonly]="readonly"\n [required]="required"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-checked]="checked.toString()"\n [value]="value"\n (click)="_radioClick($event.target)"\n (change)="_radioChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-radio-button-inner-circle"></div>\n </div>\n <span class="granite-radio-button-text">\n <ng-content></ng-content>\n </span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:.0625rem solid var(--granite-color-focus)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;-webkit-animation:growAnimation .1s;animation:growAnimation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text)}.granite-radio-button-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s);color:var(--granite-color-text)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-margin-end:var(--granite-spacing-xl);margin-inline-end:var(--granite-spacing-xl)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:1rem;width:1rem;border-radius:50%;box-sizing:border-box;border:.0625rem solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:.625rem;height:.625rem;visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@-webkit-keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}"]}]}],yt.ctorParameters=function(){return[{type:l.FocusMonitor},{type:p.UniqueSelectionDispatcher}]},yt.propDecorators={value:[{type:e.Input}],id:[{type:e.Input}],name:[{type:e.Input}],checked:[{type:e.Input}],required:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],radioChange:[{type:e.Output}],radioBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var kt=function(){this.layout="horizontal",this.ariaLabelledby=null};kt.decorators=[{type:e.Directive}],kt.propDecorators={layout:[{type:e.Input}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}]};var _t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(kt);_t.decorators=[{type:e.Component,args:[{selector:"granite-radio-group",host:{class:"granite-radio-group","[attr.role]":'"radiogroup"',"[attr.aria-labelledby]":"ariaLabelledby","[class.granite-radio-group-layout-horizontal]":'layout === "horizontal"'},template:"<ng-content></ng-content>\n",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host(.granite-radio-group-layout-horizontal){display:flex;align-items:flex-start}"]}]}];var wt=function(){};wt.decorators=[{type:e.NgModule,args:[{declarations:[yt,_t],exports:[yt,_t]}]}];var xt=function(){function t(t){this._focusMonitor=t,this.id=null,this.checked=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this.checkboxChange=new e.EventEmitter,this.checkboxBlur=new e.EventEmitter,this._positionBefore=!1,this._checkboxDisabled=!1}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=r.coerceBooleanProperty(t.checked.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._checkboxDisabled=!0)},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._onBlur=function(){this.checkboxBlur.emit()},t.prototype._checkboxChange=function(){this.checked=this._getInputElement().checked,this.valueChange.emit(this.checked)},t.prototype._checkboxClick=function(){this.checkboxChange.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();xt.decorators=[{type:e.Component,args:[{selector:"granite-checkbox",exportAs:"graniteCheckbox",host:{class:"granite-checkbox","[class.granite-checkbox-checked]":"checked","[class.granite-checkbox-disabled]":"disabled","[class.granite-checkbox-readonly]":"readonly","[class.granite-checkbox-label-before]":"_positionBefore"},template:'<label [attr.for]="id" class="granite-checkbox-label">\n <div class="granite-checkbox-box">\n <input\n #input\n [id]="id"\n class="granite-checkbox-input cdk-visually-hidden"\n role="checkbox"\n type="checkbox"\n [attr.aria-checked]="checked.toString()"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [checked]="checked"\n [disabled]="_checkboxDisabled"\n [readonly]="readonly"\n (click)="_checkboxClick()"\n (change)="_checkboxChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-checkbox-check"></div>\n </div>\n <span class="granite-checkbox-text"><ng-content></ng-content></span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-checkbox){color:var(--granite-color-text)}:host(.granite-checkbox):not(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-label:hover .granite-checkbox-box{border-color:var(--granite-color-background-active)}:host(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-label:hover .granite-checkbox-box{background-color:var(--granite-color-background-active-hover);border-color:var(--granite-color-background-active-hover)}:host(.granite-checkbox-checked) .granite-checkbox-box{border-color:var(--granite-color-background-active);background-color:var(--granite-color-background-active)}:host(.granite-checkbox-checked) .granite-checkbox-box:focus-within{border-color:var(--granite-color-focus)}:host(.granite-checkbox-checked) .granite-checkbox-check{display:flex}:host(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-box{-webkit-animation:fadeInAnimation .2s;animation:fadeInAnimation .2s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(:not(.granite-checkbox-checked)) .granite-checkbox-box{-webkit-animation:fadeOutAnimation .2s;animation:fadeOutAnimation .2s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(.granite-checkbox-readonly.granite-checkbox-checked) .granite-checkbox-box{background-color:var(--granite-color-text);border-color:var(--granite-color-text)}:host(.granite-checkbox-readonly.granite-checkbox-checked) .granite-checkbox-box .granite-checkbox-check{border-color:var(--granite-color-background)}:host(.granite-checkbox-disabled) .granite-checkbox-box{opacity:.3;background-color:var(--granite-color-border-soft)}:host(.granite-checkbox-disabled) .granite-checkbox-label{opacity:.6}:host(.granite-checkbox-disabled) *,:host(.granite-checkbox-readonly) *{cursor:default}:host(.granite-checkbox-label-before) .granite-checkbox-label{flex-direction:row-reverse}:host(.granite-checkbox-label-before) .granite-checkbox-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}.granite-checkbox-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-checkbox-box{width:1rem;height:1rem;border:solid var(--granite-color-background-inactive);border-width:.0625rem;border-radius:.25rem;display:flex;justify-content:center;position:relative}.granite-checkbox-box:focus-within{border:.0625rem solid var(--granite-color-focus)}.granite-checkbox-check{position:relative;display:none;width:.5625rem;height:.3125rem;background-color:transparent;border:solid var(--granite-color-text-static-light);transform:rotate(-45deg);margin-top:var(--granite-spacing-xs);border-width:0 0 .125rem .125rem}.granite-checkbox-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s)}.granite-checkbox-text:empty{display:none}@-webkit-keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOutAnimation{0%{opacity:1}to{opacity:0}}@keyframes fadeOutAnimation{0%{opacity:1}to{opacity:0}}"]}]}],xt.ctorParameters=function(){return[{type:l.FocusMonitor}]},xt.propDecorators={id:[{type:e.Input}],checked:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],checkboxChange:[{type:e.Output}],checkboxBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var Ct=function(){};Ct.decorators=[{type:e.NgModule,args:[{declarations:[xt],exports:[xt]}]}];var It,Mt=function(t){void 0===t&&(t=function(){});var n=function(t){function e(){var e=t.apply(this,T(arguments))||this;return e.disabled=!1,e}return C(e,t),e.prototype.ngOnChanges=function(t){t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue))},e}(t);return n.decorators=[{type:e.Directive}],n.propDecorators={disabled:[{type:e.Input}]},n};!function(t){t.graniteButton="granite-button",t.granitePrimaryButton="granite-primary-button",t.graniteFlatButton="granite-flat-button"}(It||(It={}));var St=function(t){function e(e,n){var r,o,i=t.call(this)||this;i._focusMonitor=e,i._elementRef=n;try{for(var a=S(Object.keys(It)),s=a.next();!s.done;s=a.next()){var c=s.value;i._getHostElement().hasAttribute(c)&&i._getHostElement().classList.add(It[c])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(r)throw r.error}}return i}return C(e,t),e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e)},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e}(Mt());St.decorators=[{type:e.Component,args:[{selector:"button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton]\n ",host:{class:"granite-button-base","[class.granite-button-disabled]":"disabled","[attr.disabled]":"disabled || null"},exportAs:"graniteButton",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{border-radius:.25rem;font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-font-size-body-medium);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){border:.0625rem solid var(--granite-color-focus)}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);border:.0625rem solid transparent}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:none}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);border:.0625rem solid var(--granite-color-border-soft)}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active)}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);border:.0625rem solid transparent}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-hover);color:var(--granite-color-text)}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-selected);color:var(--granite-color-text)}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text-link);border:.0625rem solid var(--granite-color-border-soft)}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active)}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;border:.0625rem solid var(--granite-color-border-soft);pointer-events:none}"]}]}],St.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]};var Ot=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r._focusMonitor=e,r._elementRef=n,r}return C(e,t),e.prototype._anchorClick=function(t){this.disabled&&t.preventDefault()},e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e}(St);Ot.decorators=[{type:e.Component,args:[{selector:"a[graniteButton]",host:{class:"granite-button-base","[attr.tabindex]":"disabled ? -1 : 0","[class.granite-button-disabled]":"disabled"},exportAs:"graniteAnchor",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{border-radius:.25rem;font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-font-size-body-medium);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){border:.0625rem solid var(--granite-color-focus)}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);border:.0625rem solid transparent}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:none}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);border:.0625rem solid var(--granite-color-border-soft)}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active)}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);border:.0625rem solid transparent}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-hover);color:var(--granite-color-text)}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-selected);color:var(--granite-color-text)}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text-link);border:.0625rem solid var(--granite-color-border-soft)}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active)}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;border:.0625rem solid var(--granite-color-border-soft);pointer-events:none}"]}]}],Ot.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]},Ot.propDecorators={_anchorClick:[{type:e.HostListener,args:["click",["$event"]]}]};var Tt=function(){};Tt.decorators=[{type:e.NgModule,args:[{declarations:[St,Ot],exports:[St,Ot]}]}];var Et=function(){};Et.decorators=[{type:e.Directive,args:[{selector:"granite-table-column"}]}],Et.propDecorators={name:[{type:e.Input}],title:[{type:e.Input}],staticType:[{type:e.Input}],tableCellTemplateRef:[{type:e.ContentChild,args:["graniteTableCellTemplate",{static:!1}]}]};var Dt=function(){};Dt.CELL_ID_PREFIX="granite-cell";var Pt=function(){function t(){this.ariaLabel=null,this.cellIdPrefix=Dt.CELL_ID_PREFIX}return t.prototype.ngAfterContentInit=function(){this.columns=this.tableColumnsComponent.toArray(),this.renderedColumns=this.columns.map((function(t){return t.name}))},t}();Pt.decorators=[{type:e.Component,args:[{selector:"granite-table",template:'<cdk-table\n [dataSource]="dataSource"\n multiTemplateDataRows\n [trackBy]="trackBy"\n [attr.aria-label]="ariaLabel"\n>\n <ng-container\n *ngFor="let column of columns; index as columnI"\n [cdkColumnDef]="column.name"\n >\n \x3c!-- Cell Header --\x3e\n <cdk-header-cell *cdkHeaderCellDef graniteTableHeaderCell>\n {{ (column.title ? column.title : column.name) | graniteTitle }}\n </cdk-header-cell>\n\n \x3c!-- Cell Data --\x3e\n <cdk-cell\n graniteTableDataCell\n *cdkCellDef="let row; let rowI = dataIndex"\n [id]="cellIdPrefix + \'-\' + rowI + \'-\' + columnI"\n [value]="row[column.name]"\n [rowIndex]="rowI"\n [columnIndex]="columnI"\n [staticType]="column.staticType"\n [column]="column"\n [tableCellTemplateRef]="column.tableCellTemplateRef"\n [row]="row"\n ></cdk-cell>\n </ng-container>\n\n <cdk-header-row *cdkHeaderRowDef="renderedColumns"></cdk-header-row>\n <cdk-row\n *cdkRowDef="let row; let rowI = dataIndex; columns: renderedColumns"\n [attr.aria-rowindex]="rowI + 1"\n ></cdk-row>\n</cdk-table>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}cdk-table{flex-direction:column;background-color:var(--granite-color-background-variant)}cdk-header-row,cdk-row,cdk-table{display:flex}cdk-cell,cdk-header-cell{flex:1;height:2.5rem}cdk-cell{border-top:1px solid var(--granite-color-border-soft)}"]}]}],Pt.propDecorators={dataSource:[{type:e.Input}],trackBy:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],tableColumnsComponent:[{type:e.ContentChildren,args:[Et]}]};var At=function(){};At.decorators=[{type:e.Directive}],At.propDecorators={id:[{type:e.Input}],column:[{type:e.Input}]};var Bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(At);Bt.decorators=[{type:e.Component,args:[{selector:"cdk-cell[graniteTableDataCell]",template:'<span class="granite-table-data-cell-static-container">\n <ng-template\n [ngTemplateOutlet]="tableCellTemplateRef || defaultTableCellTemplate"\n [ngTemplateOutletContext]="{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }"\n ></ng-template>\n</span>\n\n<ng-template #defaultTableCellTemplate>\n <ng-container [ngSwitch]="staticType">\n <ng-container *ngSwitchCase="\'badge\'">\n <granite-badge>{{ value }}</granite-badge>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ value }}</ng-container>\n </ng-container>\n</ng-template>\n',styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-table-data-cell-static-container{padding:var(--granite-spacing-s);height:inherit;font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;color:var(--granite-color-text)}"]}]}],Bt.propDecorators={value:[{type:e.Input}],staticType:[{type:e.Input}],rowIndex:[{type:e.Input}],columnIndex:[{type:e.Input}],tableCellTemplateRef:[{type:e.Input}],row:[{type:e.Input}]};var zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(At);zt.decorators=[{type:e.Component,args:[{selector:"cdk-header-cell[graniteTableHeaderCell]",template:'<span class="granite-table-header-cell-title">\n <ng-content></ng-content>\n</span>\n',styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-table-header-cell-title{padding:var(--granite-spacing-s);height:inherit;font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;display:flex;justify-content:center;align-items:center;color:var(--granite-color-text-weak)}"]}]}];var Rt=function(){function t(){}return t.prototype.transform=function(t){return t.split(/(?=[A-Z ])/).map((function(t){return t.trim()})).filter(Boolean).map((function(t){return t.charAt(0).toLocaleUpperCase()+t.slice(1)})).join(" ")},t}();Rt.decorators=[{type:e.Pipe,args:[{name:"graniteTitle"}]}];var Lt=function(){};Lt.decorators=[{type:e.NgModule,args:[{exports:[Rt],declarations:[Rt]}]}];var Gt=function(){};Gt.decorators=[{type:e.NgModule,args:[{declarations:[Pt,Bt,zt,Et],imports:[n.CommonModule,b.CdkTableModule,P,Lt],exports:[Pt,Et]}]}];var qt=["text","number","password","textarea"],Xt=function(){function t(t){this._focusMonitor=t,this.id=null,this.name=null,this.type="text",this.value="",this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.placeholder="",this.maxlength=255,this.countcharacters=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this._supported=!0,this._empty=!1,this._passwordFieldIcon="view",this._passwordField=!1,this._currentCharCount=0,this._passwordToggled=!1}return t.prototype.ngOnInit=function(){this._validateType(),this._passwordField="password"==this.type,this._empty=null==this.value||""===this.value},t.prototype.ngOnChanges=function(t){t.required&&(this.required=r.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=r.coerceBooleanProperty(t.readonly.currentValue)),t.invalid&&(this.invalid=r.coerceBooleanProperty(t.invalid.currentValue)),t.disabled&&(this.disabled=r.coerceBooleanProperty(t.disabled.currentValue)),t.countcharacters&&(this.countcharacters=r.coerceBooleanProperty(t.countcharacters.currentValue)),t.value&&(this._empty=null==this.value||""===this.value),t.type&&this._validateType()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),"text"===this.type?this._focusMonitor.focusVia(this._getInputElement(),t,e):"textarea"===this.type&&this._focusMonitor.focusVia(this._getTextareaElement(),t,e)},t.prototype._togglePassword=function(){this._passwordToggled?(this._passwordToggled=!1,this.type="password",this._passwordFieldIcon="view"):(this._passwordToggled=!0,this.type="text",this._passwordFieldIcon="view-disabled")},t.prototype._onKeyUp=function(t){var e=t.target;this._applyCharacterCount(e.value),this._empty=null==e.value||""===e.value,this.valueChange.emit(e.value)},t.prototype._onInput=function(t){var e=t.target;this._empty=null==e.value||""===e.value,this.valueChange.emit(e.value)},t.prototype._validateType=function(){if(qt.indexOf(this.type)<0)throw this._supported=!1,Error('Input type "'+this.type+"\" isn't supported by graniteInputField.")},t.prototype._applyCharacterCount=function(t){this.countcharacters&&(this._currentCharCount=t.length,this._currentCharCount>this.maxlength&&(t=t.slice(0,this.maxlength),this._currentCharCount=this.maxlength))},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t.prototype._getTextareaElement=function(){return this._textareaElement.nativeElement},t}();Xt.decorators=[{type:e.Component,args:[{selector:"granite-input-field",exportAs:"graniteInputField",template:'<div\n *ngIf="_supported"\n class="granite-input-container"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n>\n <div\n class="granite-input-top-row"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n >\n <div\n *ngIf="prefixicon"\n class="granite-input-prepend"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n >\n <granite-icon class="granite-input-prepend-icon">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf="type != \'textarea\'; then inputElement; else textareaElement"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]="id"\n class="granite-input-base"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n [name]="name"\n [attr.type]="type"\n [required]="required"\n [readonly]="readonly"\n [disabled]="disabled"\n [placeholder]="placeholder"\n [attr.maxlength]="maxlength"\n [value]="value"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-invalid]="invalid"\n (keyup)="_onKeyUp($event)"\n (input)="_onInput($event)"\n />\n </ng-template>\n\n <button\n *ngIf="_passwordField"\n class="granite-input-append"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n (click)="_togglePassword()"\n >\n <granite-icon class="granite-input-password-toggle-icon">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]="id"\n class="granite-input-base granite-text-area"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n rows="1"\n [name]="name"\n [attr.type]="type"\n [required]="required"\n [readonly]="readonly"\n [disabled]="disabled"\n [placeholder]="placeholder"\n [value]="value"\n [attr.maxlength]="maxlength"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-required]="required"\n [attr.aria-invalid]="invalid"\n (keyup)="_onKeyUp($event)"\n (input)="_onInput($event)"\n ></textarea>\n </ng-template>\n\n <div\n class="granite-input-hover-bar"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n ></div>\n </div>\n\n <div *ngIf="countcharacters" class="granite-input-bottom-row">\n <div class="granite-input-char-count">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n',host:{class:"granite-input-field"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{transition:all .2s ease-out;width:14.5rem;box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-input-container{width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar{height:.125rem}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar.granite-input-invalid.granite-input-empty{background-color:var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:14.5rem;min-height:2rem}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-disabled .granite-input-hover-bar,.granite-input-container .granite-input-top-row.granite-input-readonly .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-s);width:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-regular)}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::-moz-placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:-moz-read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base::-moz-placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:hover::-moz-placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 -.125rem var(--granite-color-signal-failure),inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus::-moz-placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-hover-bar{height:.0625rem;background-color:var(--granite-color-border-hard);position:absolute;width:inherit;bottom:0}.granite-input-container .granite-input-top-row .granite-input-hover-bar.granite-input-invalid{background-color:var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row:focus-within .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-s);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:1rem;height:1rem;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:var(--granite-spacing-s);background-size:contain;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}"]}]}],Xt.ctorParameters=function(){return[{type:l.FocusMonitor}]},Xt.propDecorators={id:[{type:e.Input}],name:[{type:e.Input}],type:[{type:e.Input}],value:[{type:e.Input}],required:[{type:e.Input}],readonly:[{type:e.Input}],invalid:[{type:e.Input}],disabled:[{type:e.Input}],placeholder:[{type:e.Input}],prefixicon:[{type:e.Input}],maxlength:[{type:e.Input}],countcharacters:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}],_textareaElement:[{type:e.ViewChild,args:["textarea"]}]};var Ft=function(){};Ft.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,ht,Tt],declarations:[Xt],exports:[Xt]}]}];var jt=it.output,Vt=function(){};Vt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputDesktop]",providers:[{provide:ot,useValue:jt}]}]}];var Ht=at.output,Yt=function(){};Yt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputTouch]",providers:[{provide:ot,useValue:Ht}]}]}];var Nt=it.input,$t=function(){};$t.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputDesktop]",providers:[{provide:rt,useValue:Nt}]}]}];var Ut=at.input,Kt=function(){};Kt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputTouch]",providers:[{provide:rt,useValue:Ut}]}]}];var Wt=function(){};Wt.decorators=[{type:e.NgModule,args:[{declarations:[Vt,Yt,$t,Kt],exports:[Vt,Yt,$t,Kt]}]}],t.ClientInputDesktopDirective=$t,t.ClientInputTouchDirective=Kt,t.ClientOutputDesktopDirective=Vt,t.ClientOutputTouchDirective=Yt,t.GRANITE_CLIENT_INPUT=rt,t.GRANITE_CLIENT_OUTPUT=ot,t.GraniteAnchorComponent=Ot,t.GraniteArrangeGridComponent=f,t.GraniteArrangeGridItemComponent=v,t.GraniteArrangeGridModule=y,t.GraniteBadgeComponent=D,t.GraniteBadgeHarness=A,t.GraniteBadgeModule=P,t.GraniteButtonComponent=St,t.GraniteButtonModule=Tt,t.GraniteCheckboxComponent=xt,t.GraniteCheckboxModule=Ct,t.GraniteCoreModule=Wt,t.GraniteDividerDirective=gt,t.GraniteGridComponent=_,t.GraniteGridItemComponent=k,t.GraniteGridModule=w,t.GraniteIconComponent=dt,t.GraniteIconModule=ht,t.GraniteInputFieldComponent=Xt,t.GraniteInputFieldModule=Ft,t.GraniteMenuComponent=nt,t.GraniteMenuHarness=bt,t.GraniteMenuItemComponent=z,t.GraniteMenuItemHarness=mt,t.GraniteMenuModule=pt,t.GraniteMenuTouchCloseComponent=lt,t.GraniteMenuTouchTitleItemComponent=ut,t.GraniteMenuTriggerForDirective=ct,t.GraniteRadioButtonComponent=yt,t.GraniteRadioButtonModule=wt,t.GraniteRadioGroupComponent=_t,t.GraniteTableColumnDirective=Et,t.GraniteTableComponent=Pt,t.GraniteTableModule=Gt,t.GraniteToggleSwitchComponent=vt,t.GraniteToggleSwitchModule=ft,t._MenuBaseComponent=et,t.deviceDesktop=it,t.deviceTouch=at,t.disabledMixin=Mt,t.graniteMenuDesktopAnimations=q,t.graniteMenuTouchAnimations=Z,t.ɵ0=Ht,t.ɵa=B,t.ɵc=R,t.ɵd=L,t.ɵe=kt,t.ɵf=Bt,t.ɵg=At,t.ɵh=zt,t.ɵi=Lt,t.ɵj=Rt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
9
|
+
function(){throw Error('graniteMenuTriggerFor: must pass in an granite-menu instance.\n\n Example:\n <granite-menu #menu="graniteMenu"></granite-menu>\n <button [graniteMenuTriggerFor]="menu"></button>')}()},t.prototype._desktopPositionStrategy=function(){var t=this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withTransformOriginOn(".granite-menu").withPush(!1);return this._setPosition(t),t},t.prototype._setPosition=function(t){var e=O("before"===this.menu.xPosition?["end","start"]:["start","end"],2),n=e[0],o=e[1],r=O("above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],2),i=r[0],a=r[1],c=O([i,a],2),s=c[0],l=c[1],u=O([n,o],2),g=u[0],d=u[1],h=0;this.triggersSubmenu()?(d=n="before"===this.menu.xPosition?"start":"end",o=g="end"===n?"start":"end",h="bottom"===i?0:-0):(s="top"===i?"bottom":"top",l="top"===a?"bottom":"top"),t.withPositions([{originX:n,originY:s,overlayX:g,overlayY:i,offsetY:h},{originX:o,originY:s,overlayX:d,overlayY:i,offsetY:h},{originX:n,originY:l,overlayX:g,overlayY:a,offsetY:-h},{originX:o,originY:l,overlayX:d,overlayY:a,offsetY:-h}])},t.prototype._menuClosingActions=function(){var t,e=this,n=null===(t=this._overlayRef)||void 0===t?void 0:t.detachments(),o=this._parentMenu?this._parentMenu.closed:r.of(),a="desktop"===this._clientOutput.device&&this._parentMenu?this._parentMenu._hovered().pipe(i.filter((function(t){return t!==e._menuItemInstance})),i.filter((function(){return e._isMenuOpen}))):r.of(),c=this._parentMenu?r.of():r.fromEvent(this._document,"click").pipe(i.filter((function(t){return t.target!==e._element.nativeElement&&null===t.target.closest(".granite-menu")})),i.filter((function(){return!e.menu._isAnimating})));return r.merge(n,a,o,c)},t.prototype._openOnHover=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype._toggleOnSubmenuClick=function(){var t,e;return"desktop"===(null===(t=this._parentMenu._clientOutput)||void 0===t?void 0:t.device)&&!(null===(e=this._parentMenu._clientInput)||void 0===e?void 0:e.devices.includes("mouse"))},t.prototype.animateOpenMenu=function(){"touch"===this._clientOutput.device?this.animateTouchOpenMenu():this.menu._startAnimation()},t.prototype.animateTouchOpenMenu=function(){this.triggersSubmenu()?(this.menu._startTouchSubmenuEnterAnimation(),this._parentMenu._startTouchHideAnimation()):this.menu._startTouchRootEnterAnimation()},t.prototype.animateCloseMenu=function(t,e){"touch"===this._clientOutput.device?this._animateTouchCloseMenu(t,e):this._parentMenu._resetAnimation()},t.prototype._animateTouchCloseMenu=function(t,e){var n;t?e?this.menu._startTouchCloseDownAnimationWithDelay():this.menu._startTouchCloseDownAnimation():(this.menu._startTouchCloseSideAnimation(),null===(n=this._parentMenu)||void 0===n||n._startTouchSubmenuEnterAnimation())},t.prototype.animateSetMenuPosition=function(t){this.menu._startTouchPanAnimation(t),this._parentMenu&&this._parentMenu._startTouchHidePanAnimation(t)},t.prototype._positionStrategy=function(){return"touch"===this._clientOutput.device?this._touchPositionStrategy():this._desktopPositionStrategy()},t.prototype._touchPositionStrategy=function(){return this._overlay.position().global()},t.prototype.addOverlayListeners=function(){this._overlayRef.hostElement.addEventListener("touchstart",this._handleOverlayTouchStart,ct),this._overlayRef.hostElement.addEventListener("touchmove",this._handleOverlayTouchMove,ct),this._overlayRef.hostElement.addEventListener("touchend",this._handleOverlayTouchEnd,ct)},t.prototype.removeOverlayListeners=function(){this._overlayRef.hostElement.removeEventListener("touchstart",this._handleOverlayTouchStart,ct),this._overlayRef.hostElement.removeEventListener("touchmove",this._handleOverlayTouchMove,ct),this._overlayRef.hostElement.removeEventListener("touchend",this._handleOverlayTouchEnd,ct)},t.prototype.easeOutExpo=function(t,e,n,o){return t===o?e+n:n*(1-Math.pow(2,-10*t/o))+e},t}();st.decorators=[{type:e.Directive,args:[{selector:"[graniteMenuTriggerFor]",host:{class:"granite-menu-trigger","aria-haspopup":"true","[attr.aria-expanded]":"_isMenuOpen || null","[attr.aria-controls]":"_isMenuOpen ? menu.panelId : null","(mousedown)":"_handleMousedown($event)","(keydown)":"_handleKeydown($event)","(click)":"_handleClick($event)"}}]}],st.ctorParameters=function(){return[{type:c.Overlay},{type:e.ElementRef},{type:e.ViewContainerRef},{type:et,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[ot]},{type:e.Optional}]},{type:void 0,decorators:[{type:e.Inject,args:[rt]},{type:e.Optional}]},{type:z,decorators:[{type:e.Optional},{type:e.Self}]},{type:d.Directionality,decorators:[{type:e.Optional}]},{type:l.FocusMonitor},{type:void 0,decorators:[{type:e.Inject,args:[n.DOCUMENT]}]}]},st.propDecorators={menu:[{type:e.Input,args:["graniteMenuTriggerFor"]}]};var lt=function(){};lt.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchCloseItem]",template:"<ng-content></ng-content>",exportAs:"graniteMenuTouchCloseItem",host:{"[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:2rem;padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:.0625rem solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:.0625rem solid var(--granite-color-border-soft)}:host.granite-device-output-touch{line-height:2rem;font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:2rem;height:2rem;font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}];var ut=function(t){this._triggersBack=!1,this._triggersBack=!!t.parentMenu};ut.decorators=[{type:e.Component,args:[{selector:"[graniteMenuTouchTitleItem]",template:'\n <ng-container *ngIf="_triggersBack">\n <granite-icon class="caret-left">caret-left</granite-icon>\n <granite-icon class="caret-right">caret-right</granite-icon>\n </ng-container>\n <ng-content></ng-content>\n ',exportAs:"graniteMenuTouchTitleItem",host:{"[class.granite-menu-item-title]":"true","[class.granite-menu-item-back-trigger]":"_triggersBack","[class.granite-device-output-touch]":"true"},styles:[":host{display:block;position:relative;line-height:2rem;padding:0 var(--granite-spacing-s);width:100%;max-width:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:start;text-decoration:none;background-color:var(--granite-color-background-variant);color:var(--granite-color-text);font-size:var(--granite-font-size-body-small);font-family:inherit}@media (hover:hover) and (pointer:fine){:host:hover{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}@media (hover:none) and (pointer:coarse){:host:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host.cdk-keyboard-focused,:host.cdk-program-focused,:host.granite-menu-item-highlighted{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}:host granite-icon{position:absolute;font-size:var(--granite-font-size-body-small);color:inherit;top:50%;transform:translateY(-50%)}:host.granite-menu-item-submenu-trigger{-webkit-padding-end:var(--granite-spacing-l);padding-inline-end:var(--granite-spacing-l)}:host-context([dir=ltr]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon{right:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-menu-item-submenu-trigger granite-icon,html[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon{left:var(--granite-spacing-xs)}[dir=ltr] :host.granite-menu-item-submenu-trigger granite-icon.caret-left,[dir=rtl] :host.granite-menu-item-submenu-trigger granite-icon.caret-right{display:none}:host.granite-divider-top{border-top:.0625rem solid var(--granite-color-border-soft)}:host.granite-divider-bottom{border-bottom:.0625rem solid var(--granite-color-border-soft)}:host.granite-device-output-touch{line-height:2rem;font-size:var(--granite-font-size-body-small);text-align:center}:host.granite-device-output-touch,:host.granite-device-output-touch.granite-menu-item-back-trigger,:host.granite-device-output-touch.granite-menu-item-submenu-trigger{padding:0 var(--granite-spacing-l)}:host.granite-device-output-touch.granite-menu-item-title{line-height:2rem;height:2rem;font-size:var(--granite-font-size-micro);color:var(--granite-color-text-weak)}@media (hover:none) and (pointer:coarse){:host.granite-device-output-touch.granite-menu-item-title:active{background:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active)}}:host-context([dir=ltr]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{left:var(--granite-spacing-xs)}:host-context([dir=rtl]) :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon,html[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon{right:var(--granite-spacing-xs)}[dir=ltr] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-right,[dir=rtl] :host.granite-device-output-touch.granite-menu-item-back-trigger granite-icon.caret-left{display:none}"]}]}],ut.ctorParameters=function(){return[{type:et,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]}]};var gt=function(){this.dividerDirection="top"};gt.decorators=[{type:e.Directive,args:[{selector:"[graniteDivider]",exportAs:"graniteDivider",host:{"[class.granite-divider-top]":'dividerDirection === "top"',"[class.granite-divider-bottom]":'dividerDirection === "bottom"'}}]}],gt.propDecorators={dividerDirection:[{type:e.Input}]};var dt=function(){function t(t,e,n){this._elementRef=t,this.renderer=e,n||this.renderer.setAttribute(t.nativeElement,"aria-hidden","true")}return t.prototype.ngOnChanges=function(t){t.fontIcon&&this._updateFontIcon()},t.prototype._updateFontIcon=function(){this.fontIcon!==this._previousFontIconClass&&(this._previousFontIconClass&&this.renderer.removeClass(this._elementRef.nativeElement,this._previousFontIconClass),this.fontIcon&&this.renderer.addClass(this._elementRef.nativeElement,this.fontIcon),this._previousFontIconClass=this.fontIcon)},t}();dt.decorators=[{type:e.Component,args:[{selector:"granite-icon",template:"<ng-content></ng-content>",host:{role:"img",class:"granite-icon"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host.granite-icon{background-repeat:no-repeat;display:inline-block;padding:0 calc(var(--granite-spacing-xs) / 2);font-size:1em;line-height:1em;position:relative;top:.1em}"]}]}],dt.ctorParameters=function(){return[{type:e.ElementRef},{type:e.Renderer2},{type:String,decorators:[{type:e.Attribute,args:["aria-hidden"]}]}]},dt.propDecorators={fontIcon:[{type:e.Input}]};var ht=function(){};ht.decorators=[{type:e.NgModule,args:[{declarations:[dt],exports:[dt]}]}];var pt=function(){};pt.decorators=[{type:e.NgModule,args:[{declarations:[nt,z,st,lt,ut,gt],imports:[n.CommonModule,c.OverlayModule,s.PortalModule,ht],exports:[nt,z,st,lt,ut,gt]}]}];var bt=function(t){function e(){var e=t.apply(this,T(arguments))||this;return e._documentRootLocator=e.documentRootLocatorFactory(),e}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.open=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.isOpen()];case 1:return t.sent()?[3,4]:[4,this.host()];case 2:return[4,t.sent().click()];case 3:return t.sent(),[2,this.forceStabilize()];case 4:return[2]}}))}))},e.prototype.close=function(){var t;return I(this,void 0,void 0,(function(){return M(this,(function(e){switch(e.label){case 0:return[4,this._getMenuPanel()];case 1:return[4,null===(t=e.sent())||void 0===t?void 0:t.sendKeys(a.TestKey.ESCAPE)];case 2:return e.sent(),[2,this.forceStabilize()]}}))}))},e.prototype.isOpen=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this._getMenuPanel()];case 1:return[2,!!t.sent()]}}))}))},e.prototype.getItems=function(t){return void 0===t&&(t={}),I(this,void 0,void 0,(function(){var e;return M(this,(function(n){switch(n.label){case 0:return[4,this._getPanelId()];case 1:return(e=n.sent())?[2,this._documentRootLocator.locatorForAll(mt.with(Object.assign(Object.assign({},t),{ancestor:"#"+e})))()]:[2,[]]}}))}))},e.prototype._getMenuPanel=function(){return I(this,void 0,void 0,(function(){var t;return M(this,(function(e){switch(e.label){case 0:return[4,this._getPanelId()];case 1:return[2,(t=e.sent())?this._documentRootLocator.locatorForOptional("#"+t)():null]}}))}))},e.prototype._getPanelId=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().getAttribute("aria-controls")];case 2:return[2,t.sent()||null]}}))}))},e}(a.ComponentHarness);bt.hostSelector=".granite-menu-trigger";var mt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e.with=function(t){return void 0===t&&(t={}),new a.HarnessPredicate(e,t).addOption("text",t.text,(function(t,e){return a.HarnessPredicate.stringMatches(t.getText(),e)}))},e.prototype.getText=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().text()]}}))}))},e.prototype.hasSubmenu=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[2,t.sent().matchesSelector(bt.hostSelector)]}}))}))},e.prototype.getSubmenu=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.hasSubmenu()];case 1:return t.sent()?[2,new bt(this.locatorFactory)]:[2,null]}}))}))},e.prototype.click=function(){return I(this,void 0,void 0,(function(){return M(this,(function(t){switch(t.label){case 0:return[4,this.host()];case 1:return[4,t.sent().click()];case 2:return t.sent(),[2,this.forceStabilize()]}}))}))},e}(a.ComponentHarness);mt.hostSelector=".granite-menu-item";var vt=function(){function t(t){this._focusMonitor=t,this.id=null,this.checked=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this.toggleChange=new e.EventEmitter,this.toggleBlur=new e.EventEmitter,this._positionBefore=!1,this._toggleSwitchDisabled=!1}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=o.coerceBooleanProperty(t.checked.currentValue)),t.disabled&&(this.disabled=o.coerceBooleanProperty(t.disabled.currentValue)),t.readonly&&(this.readonly=o.coerceBooleanProperty(t.readonly.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._toggleSwitchDisabled=!0)},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._onBlur=function(){this.toggleBlur.emit()},t.prototype._toggleSwitchChange=function(){this.checked=this._getInputElement().checked,this.valueChange.emit(this.checked)},t.prototype._toggleSwitchClick=function(){this.toggleChange.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();vt.decorators=[{type:e.Component,args:[{selector:"granite-toggle-switch",exportAs:"graniteToggleSwitch",host:{class:"granite-toggle-switch","[class.granite-toggle-switch-checked]":"checked","[class.granite-toggle-switch-disabled]":"disabled","[class.granite-toggle-switch-readonly]":"readonly","[class.granite-toggle-switch-label-before]":"_positionBefore"},template:'<label [attr.for]="id" class="granite-toggle-switch-label">\n <div class="granite-toggle-switch-bar">\n <input\n #input\n [id]="id"\n class="granite-toggle-switch-input cdk-visually-hidden"\n role="switch"\n type="checkbox"\n [attr.aria-checked]="checked.toString()"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [checked]="checked"\n [disabled]="_toggleSwitchDisabled"\n [readonly]="readonly"\n (click)="_toggleSwitchClick()"\n (change)="_toggleSwitchChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-toggle-switch-thumb"></div>\n </div>\n <span class="granite-toggle-switch-text"><ng-content></ng-content></span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-toggle-switch){color:var(--granite-color-text)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-bar{background-color:var(--granite-color-background-active)}:host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{border:.0625rem solid var(--granite-color-background-active)}:host-context([dir=ltr]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=ltr] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:right}:host-context([dir=rtl]) :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb,html[dir=rtl] :host(.granite-toggle-switch-checked) .granite-toggle-switch-thumb{float:left}:host(.granite-toggle-switch-disabled) .granite-toggle-switch-label{opacity:.6}:host(.granite-toggle-switch-disabled) *,:host(.granite-toggle-switch-readonly) *{cursor:default}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-label{flex-direction:row-reverse}:host(.granite-toggle-switch-label-before) .granite-toggle-switch-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}.granite-toggle-switch-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-toggle-switch-bar{width:2rem;height:1rem;border-radius:.5rem;background-color:var(--granite-color-background-inactive);transition:background-color .1s linear;position:relative}.granite-toggle-switch-bar:focus-within{box-shadow:0 0 0 .0625rem var(--granite-color-focus)}.granite-toggle-switch-thumb{width:1rem;height:1rem;border-radius:1rem;background-color:var(--granite-color-text-static-light);border:.0625rem solid var(--granite-color-background-inactive);transition:float .1s linear}:host-context([dir=ltr]) .granite-toggle-switch-thumb,html[dir=ltr] .granite-toggle-switch-thumb{float:left}:host-context([dir=rtl]) .granite-toggle-switch-thumb,html[dir=rtl] .granite-toggle-switch-thumb{float:right}.granite-toggle-switch-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s)}.granite-toggle-switch-text:empty{display:none}"]}]}],vt.ctorParameters=function(){return[{type:l.FocusMonitor}]},vt.propDecorators={id:[{type:e.Input}],checked:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],toggleChange:[{type:e.Output}],toggleBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var ft=function(){};ft.decorators=[{type:e.NgModule,args:[{declarations:[vt],exports:[vt]}]}];var yt=function(){function t(t,n){var o=this;this._focusMonitor=t,this._radioDispatcher=n,this.id=null,this.checked=!1,this.required=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.radioChange=new e.EventEmitter,this.radioBlur=new e.EventEmitter,this._positionBefore=!1,this._radioDisabled=!1,this._removeUniqueSelectionListener=function(){},this._removeUniqueSelectionListener=n.listen((function(t,e){t!==o.id&&e===o.name&&(o.checked=!1)}))}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=o.coerceBooleanProperty(t.checked.currentValue)),t.required&&(this.required=o.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=o.coerceBooleanProperty(t.readonly.currentValue)),t.disabled&&(this.disabled=o.coerceBooleanProperty(t.disabled.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._radioDisabled=!0)},t.prototype.ngOnDestroy=function(){this._removeUniqueSelectionListener()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._radioClick=function(t){this.radioChange.emit(null==t?void 0:t.value)},t.prototype._radioChange=function(){this.checked=this._getInputElement().checked,this._radioDispatcher.notify(this.id,this.name)},t.prototype._onBlur=function(){this.radioBlur.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();yt.decorators=[{type:e.Component,args:[{selector:"granite-radio-button",exportAs:"graniteRadioButton",host:{class:"granite-radio-button","[class.granite-radio-button-disabled]":"disabled","[class.granite-radio-button-label-before]":"_positionBefore","[class.granite-radio-button-checked]":"checked","[class.granite-radio-button-readonly]":"readonly"},template:'<label class="granite-radio-button-label">\n <div class="granite-radio-button-outer-circle">\n <input\n #input\n [id]="id"\n class="granite-radio-button-input cdk-visually-hidden"\n type="radio"\n [attr.name]="name"\n [disabled]="_radioDisabled"\n [checked]="checked"\n [readonly]="readonly"\n [required]="required"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-checked]="checked.toString()"\n [value]="value"\n (click)="_radioClick($event.target)"\n (change)="_radioChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-radio-button-inner-circle"></div>\n </div>\n <span class="granite-radio-button-text">\n <ng-content></ng-content>\n </span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover{cursor:pointer}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-label:hover .granite-radio-button-inner-circle{background-color:var(--granite-color-background-active-hover)}:host(.granite-radio-button):not(.granite-radio-button-readonly):not(.granite-radio-button-disabled) .granite-radio-button-outer-circle:focus-within{border:.0625rem solid var(--granite-color-focus)}:host(.granite-radio-button-label-before) .granite-radio-button-label{flex-direction:row-reverse}:host(.granite-radio-button-label-before) .granite-radio-button-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}:host(.granite-radio-button-checked) .granite-radio-button-inner-circle{visibility:visible;-webkit-animation:growAnimation .1s;animation:growAnimation .1s}:host(.granite-radio-button-checked) .granite-radio-button-outer-circle{border-color:var(--granite-color-background-active)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-disabled .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text);background-color:transparent}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-inner-circle{background-color:var(--granite-color-text)}:host(.granite-radio-button-checked).granite-radio-button-readonly .granite-radio-button-outer-circle{border:.0625rem solid var(--granite-color-text)}.granite-radio-button-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s);color:var(--granite-color-text)}.granite-radio-button-text:empty{display:none}.granite-radio-button-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-margin-end:var(--granite-spacing-xl);margin-inline-end:var(--granite-spacing-xl)}:host(.granite-radio-button-disabled) .granite-radio-button-text{opacity:.6}:host(.granite-radio-button-disabled) .granite-radio-button-outer-circle{opacity:.3;background-color:var(--granite-color-border-soft)}.granite-radio-button-outer-circle{height:1rem;width:1rem;border-radius:50%;box-sizing:border-box;border:.0625rem solid var(--granite-color-border-hard);display:flex;justify-content:center;position:relative;align-items:center}.granite-radio-button-inner-circle{width:.625rem;height:.625rem;visibility:hidden;position:absolute;border-radius:50%;background-color:var(--granite-color-background-active);margin:auto}@-webkit-keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}@keyframes growAnimation{0%{transform:scale(0)}to{transform:scale(1)}}"]}]}],yt.ctorParameters=function(){return[{type:l.FocusMonitor},{type:p.UniqueSelectionDispatcher}]},yt.propDecorators={value:[{type:e.Input}],id:[{type:e.Input}],name:[{type:e.Input}],checked:[{type:e.Input}],required:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],radioChange:[{type:e.Output}],radioBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var kt=function(){this.layout="horizontal",this.ariaLabelledby=null};kt.decorators=[{type:e.Directive}],kt.propDecorators={layout:[{type:e.Input}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}]};var _t=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(kt);_t.decorators=[{type:e.Component,args:[{selector:"granite-radio-group",host:{class:"granite-radio-group","[attr.role]":'"radiogroup"',"[attr.aria-labelledby]":"ariaLabelledby","[class.granite-radio-group-layout-horizontal]":'layout === "horizontal"'},template:"<ng-content></ng-content>\n",changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host(.granite-radio-group-layout-horizontal){display:flex;align-items:flex-start}"]}]}];var wt=function(){};wt.decorators=[{type:e.NgModule,args:[{declarations:[yt,_t],exports:[yt,_t]}]}];var xt=function(){function t(t){this._focusMonitor=t,this.id=null,this.checked=!1,this.disabled=!1,this.readonly=!1,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this.checkboxChange=new e.EventEmitter,this.checkboxBlur=new e.EventEmitter,this._positionBefore=!1,this._checkboxDisabled=!1}return t.prototype.ngOnChanges=function(t){t.checked&&(this.checked=o.coerceBooleanProperty(t.checked.currentValue)),t.disabled&&(this.disabled=o.coerceBooleanProperty(t.disabled.currentValue)),t.readonly&&(this.readonly=o.coerceBooleanProperty(t.readonly.currentValue)),null!=t.labelPosition&&(this._positionBefore=null!=t.labelPosition.currentValue&&"before"===t.labelPosition.currentValue),(t.disabled||t.readonly)&&(this.disabled||this.readonly)&&(this._checkboxDisabled=!0)},t.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getInputElement(),t,e)},t.prototype._onBlur=function(){this.checkboxBlur.emit()},t.prototype._checkboxChange=function(){this.checked=this._getInputElement().checked,this.valueChange.emit(this.checked)},t.prototype._checkboxClick=function(){this.checkboxChange.emit()},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t}();xt.decorators=[{type:e.Component,args:[{selector:"granite-checkbox",exportAs:"graniteCheckbox",host:{class:"granite-checkbox","[class.granite-checkbox-checked]":"checked","[class.granite-checkbox-disabled]":"disabled","[class.granite-checkbox-readonly]":"readonly","[class.granite-checkbox-label-before]":"_positionBefore"},template:'<label [attr.for]="id" class="granite-checkbox-label">\n <div class="granite-checkbox-box">\n <input\n #input\n [id]="id"\n class="granite-checkbox-input cdk-visually-hidden"\n role="checkbox"\n type="checkbox"\n [attr.aria-checked]="checked.toString()"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [checked]="checked"\n [disabled]="_checkboxDisabled"\n [readonly]="readonly"\n (click)="_checkboxClick()"\n (change)="_checkboxChange()"\n (blur)="_onBlur()"\n />\n <div class="granite-checkbox-check"></div>\n </div>\n <span class="granite-checkbox-text"><ng-content></ng-content></span>\n</label>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none}:host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}:host(.granite-checkbox){color:var(--granite-color-text)}:host(.granite-checkbox):not(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-label:hover .granite-checkbox-box{border-color:var(--granite-color-background-active)}:host(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-label:hover .granite-checkbox-box{background-color:var(--granite-color-background-active-hover);border-color:var(--granite-color-background-active-hover)}:host(.granite-checkbox-checked) .granite-checkbox-box{border-color:var(--granite-color-background-active);background-color:var(--granite-color-background-active)}:host(.granite-checkbox-checked) .granite-checkbox-box:focus-within{border-color:var(--granite-color-focus)}:host(.granite-checkbox-checked) .granite-checkbox-check{display:flex}:host(.granite-checkbox-checked):not(.granite-checkbox-readonly):not(.granite-checkbox-disabled) .granite-checkbox-box{-webkit-animation:fadeInAnimation .2s;animation:fadeInAnimation .2s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(:not(.granite-checkbox-checked)) .granite-checkbox-box{-webkit-animation:fadeOutAnimation .2s;animation:fadeOutAnimation .2s;-webkit-animation-iteration-count:1;animation-iteration-count:1}:host(.granite-checkbox-readonly.granite-checkbox-checked) .granite-checkbox-box{background-color:var(--granite-color-text);border-color:var(--granite-color-text)}:host(.granite-checkbox-readonly.granite-checkbox-checked) .granite-checkbox-box .granite-checkbox-check{border-color:var(--granite-color-background)}:host(.granite-checkbox-disabled) .granite-checkbox-box{opacity:.3;background-color:var(--granite-color-border-soft)}:host(.granite-checkbox-disabled) .granite-checkbox-label{opacity:.6}:host(.granite-checkbox-disabled) *,:host(.granite-checkbox-readonly) *{cursor:default}:host(.granite-checkbox-label-before) .granite-checkbox-label{flex-direction:row-reverse}:host(.granite-checkbox-label-before) .granite-checkbox-text{-webkit-padding-start:0;padding-inline-start:0;-webkit-padding-end:var(--granite-spacing-s);padding-inline-end:var(--granite-spacing-s)}.granite-checkbox-label{display:flex;align-items:center;width:-webkit-max-content;width:-moz-max-content;width:max-content}.granite-checkbox-box{width:1rem;height:1rem;border:solid var(--granite-color-background-inactive);border-width:.0625rem;border-radius:.25rem;display:flex;justify-content:center;position:relative}.granite-checkbox-box:focus-within{border:.0625rem solid var(--granite-color-focus)}.granite-checkbox-check{position:relative;display:none;width:.5625rem;height:.3125rem;background-color:transparent;border:solid var(--granite-color-text-static-light);transform:rotate(-45deg);margin-top:var(--granite-spacing-xs);border-width:0 0 .125rem .125rem}.granite-checkbox-text{-webkit-padding-start:var(--granite-spacing-s);padding-inline-start:var(--granite-spacing-s)}.granite-checkbox-text:empty{display:none}@-webkit-keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}@keyframes fadeInAnimation{0%{opacity:0}to{opacity:1}}@-webkit-keyframes fadeOutAnimation{0%{opacity:1}to{opacity:0}}@keyframes fadeOutAnimation{0%{opacity:1}to{opacity:0}}"]}]}],xt.ctorParameters=function(){return[{type:l.FocusMonitor}]},xt.propDecorators={id:[{type:e.Input}],checked:[{type:e.Input}],disabled:[{type:e.Input}],readonly:[{type:e.Input}],labelPosition:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],checkboxChange:[{type:e.Output}],checkboxBlur:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}]};var Ct=function(){};Ct.decorators=[{type:e.NgModule,args:[{declarations:[xt],exports:[xt]}]}];var It,Mt=function(t){void 0===t&&(t=function(){});var n=function(t){function e(){var e=t.apply(this,T(arguments))||this;return e.disabled=!1,e}return C(e,t),e.prototype.ngOnChanges=function(t){t.disabled&&(this.disabled=o.coerceBooleanProperty(t.disabled.currentValue))},e}(t);return n.decorators=[{type:e.Directive}],n.propDecorators={disabled:[{type:e.Input}]},n};(It=t.ButtonSelectors||(t.ButtonSelectors={})).graniteButton="granite-button",It.granitePrimaryButton="granite-primary-button",It.graniteFlatButton="granite-flat-button",It.graniteToolbarButton="granite-toolbar-button";var St=function(e){function n(n,o){var r,i,a=e.call(this)||this;a._focusMonitor=n,a._elementRef=o,a.toggled=!1,a._buttonToggled=!1;try{for(var c=S(Object.keys(t.ButtonSelectors)),s=c.next();!s.done;s=c.next()){var l=s.value;a._getHostElement().hasAttribute(l)&&a._getHostElement().classList.add(t.ButtonSelectors[l])}}catch(t){r={error:t}}finally{try{s&&!s.done&&(i=c.return)&&i.call(c)}finally{if(r)throw r.error}}return a}return C(n,e),n.prototype.ngOnChanges=function(n){e.prototype.ngOnChanges.call(this,n),n.toggled&&(this._getHostElement().classList.contains(t.ButtonSelectors.graniteFlatButton)||this._getHostElement().classList.contains(t.ButtonSelectors.graniteToolbarButton))&&(this._buttonToggled=o.coerceBooleanProperty(n.toggled.currentValue))},n.prototype.focus=function(t,e){void 0===t&&(t="program"),this._focusMonitor.focusVia(this._getHostElement(),t,e)},n.prototype._getHostElement=function(){return this._elementRef.nativeElement},n}(Mt());St.decorators=[{type:e.Component,args:[{selector:"button[graniteButton],\n button[granitePrimaryButton],\n button[graniteFlatButton],\n button[graniteToolbarButton]\n ",host:{class:"granite-button-base","[class.granite-button-disabled]":"disabled","[class.granite-button-toggled]":"_buttonToggled","[attr.disabled]":"disabled || null"},exportAs:"graniteButton",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{border-radius:.25rem;font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-font-size-body);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){outline-offset:-2px;outline-width:.125rem;outline-color:var(--granite-color-focus);outline-style:solid}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);outline:.0625rem solid var(--granite-color-border-soft);outline-offset:-1px}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}button:host.granite-button.granite-button-toggled{background-color:none;color:none;outline:none}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);outline:none;outline-offset:-1px}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none;outline:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:none;outline:none}button:host.granite-primary-button.granite-button-toggled{background-color:none;color:none;outline:none}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);outline:none;outline-offset:-1px}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}button:host.granite-flat-button.granite-button-toggled{background-color:var(--granite-color-background-selected);color:var(--granite-color-focus);outline:none}button:host.granite-toolbar-button{background-color:var(--granite-color-background);color:var(--granite-color-text);outline:.0625rem solid var(--granite-color-border-soft);outline-offset:-1px}button:host.granite-toolbar-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}button:host.granite-toolbar-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}button:host.granite-toolbar-button.granite-button-toggled{background-color:var(--granite-color-background-selected);color:var(--granite-color-focus);outline:none}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background);color:var(--granite-color-text-link);outline:.0625rem solid var(--granite-color-border-soft);outline-offset:-1px}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}a:host.granite-button.granite-button-toggled{background-color:none;color:none;outline:none}a:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text-link);outline:none;outline-offset:-1px}a:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}a:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}a:host.granite-flat-button.granite-button-toggled{background-color:none;color:none;outline:none}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;user-select:none}"]}]}],St.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]},St.propDecorators={toggled:[{type:e.Input}]};var Ot=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o._focusMonitor=e,o._elementRef=n,o}return C(e,t),e.prototype._anchorClick=function(t){this.disabled&&t.preventDefault()},e.prototype.ngOnChanges=function(e){t.prototype.ngOnChanges.call(this,e)},e}(St);Ot.decorators=[{type:e.Component,args:[{selector:"a[graniteButton],\n a[graniteFlatButton]",host:{class:"granite-button-base","[attr.tabindex]":"disabled ? -1 : 0","[class.granite-button-disabled]":"disabled"},exportAs:"graniteAnchor",template:"<ng-content></ng-content>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit;cursor:pointer}button:host{background-color:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;font:inherit;border-radius:inherit;height:inherit;font-weight:inherit;line-height:inherit;color:inherit;margin:inherit;cursor:pointer;padding:inherit}a:host,button:host{outline:none}:host.granite-button-base{border-radius:.25rem;font-size:var(--granite-font-size-body-small);font-weight:var(--granite-font-weight-regular);padding:var(--granite-spacing-s) var(--granite-spacing-s);position:relative;line-height:var(--granite-font-size-body);display:flex;justify-content:center;align-items:center;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}:host:focus:not(.granite-button-disabled):not(:active){outline-offset:-2px;outline-width:.125rem;outline-color:var(--granite-color-focus);outline-style:solid}button:host.granite-button{background-color:var(--granite-color-background-variant);color:var(--granite-color-text);outline:.0625rem solid var(--granite-color-border-soft);outline-offset:-1px}button:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}button:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}button:host.granite-button.granite-button-toggled{background-color:none;color:none;outline:none}button:host.granite-primary-button{background-color:var(--granite-color-background-active);color:var(--granite-color-text-on-active);outline:none;outline-offset:-1px}button:host.granite-primary-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:none;outline:none}button:host.granite-primary-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:none;outline:none}button:host.granite-primary-button.granite-button-toggled{background-color:none;color:none;outline:none}button:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text);outline:none;outline-offset:-1px}button:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}button:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}button:host.granite-flat-button.granite-button-toggled{background-color:var(--granite-color-background-selected);color:var(--granite-color-focus);outline:none}button:host.granite-toolbar-button{background-color:var(--granite-color-background);color:var(--granite-color-text);outline:.0625rem solid var(--granite-color-border-soft);outline-offset:-1px}button:host.granite-toolbar-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}button:host.granite-toolbar-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}button:host.granite-toolbar-button.granite-button-toggled{background-color:var(--granite-color-background-selected);color:var(--granite-color-focus);outline:none}button:host.granite-button-disabled,button:host.granite-button-disabled:active,button:host.granite-button-disabled:focus,button:host.granite-button-disabled:hover{opacity:.4;cursor:default}a:host.granite-button{background-color:var(--granite-color-background);color:var(--granite-color-text-link);outline:.0625rem solid var(--granite-color-border-soft);outline-offset:-1px}a:host.granite-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}a:host.granite-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}a:host.granite-button.granite-button-toggled{background-color:none;color:none;outline:none}a:host.granite-flat-button{background-color:transparent;color:var(--granite-color-text-link);outline:none;outline-offset:-1px}a:host.granite-flat-button:hover:not(.granite-button-disabled){background-color:var(--granite-color-background-active-hover);color:var(--granite-color-text-on-active);outline:none}a:host.granite-flat-button:active:not(.granite-button-disabled){background-color:var(--granite-color-background-active-pressed);color:var(--granite-color-text-on-active);outline:none}a:host.granite-flat-button.granite-button-toggled{background-color:none;color:none;outline:none}a:host.granite-button-disabled,a:host.granite-button-disabled:active,a:host.granite-button-disabled:focus,a:host.granite-button-disabled:hover{opacity:.4;text-decoration:none;cursor:default;pointer-events:none;-moz-user-select:none;-webkit-user-select:none;user-select:none}"]}]}],Ot.ctorParameters=function(){return[{type:l.FocusMonitor},{type:e.ElementRef}]},Ot.propDecorators={_anchorClick:[{type:e.HostListener,args:["click",["$event"]]}]};var Tt=function(){};Tt.decorators=[{type:e.NgModule,args:[{declarations:[St,Ot],exports:[St,Ot]}]}];var Et=function(){};Et.decorators=[{type:e.Directive,args:[{selector:"granite-table-column"}]}],Et.propDecorators={name:[{type:e.Input}],title:[{type:e.Input}],staticType:[{type:e.Input}],tableCellTemplateRef:[{type:e.ContentChild,args:["graniteTableCellTemplate",{static:!1}]}]};var Dt=function(){};Dt.CELL_ID_PREFIX="granite-cell";var Pt=function(){function t(){this.ariaLabel=null,this.cellIdPrefix=Dt.CELL_ID_PREFIX}return t.prototype.ngAfterContentInit=function(){this.columns=this.tableColumnsComponent.toArray(),this.renderedColumns=this.columns.map((function(t){return t.name}))},t}();Pt.decorators=[{type:e.Component,args:[{selector:"granite-table",template:'<cdk-table\n [dataSource]="dataSource"\n multiTemplateDataRows\n [trackBy]="trackBy"\n [attr.aria-label]="ariaLabel"\n>\n <ng-container\n *ngFor="let column of columns; index as columnI"\n [cdkColumnDef]="column.name"\n >\n \x3c!-- Cell Header --\x3e\n <cdk-header-cell *cdkHeaderCellDef graniteTableHeaderCell>\n {{ (column.title ? column.title : column.name) | graniteTitle }}\n </cdk-header-cell>\n\n \x3c!-- Cell Data --\x3e\n <cdk-cell\n graniteTableDataCell\n *cdkCellDef="let row; let rowI = dataIndex"\n [id]="cellIdPrefix + \'-\' + rowI + \'-\' + columnI"\n [value]="row[column.name]"\n [rowIndex]="rowI"\n [columnIndex]="columnI"\n [staticType]="column.staticType"\n [column]="column"\n [tableCellTemplateRef]="column.tableCellTemplateRef"\n [row]="row"\n ></cdk-cell>\n </ng-container>\n\n <cdk-header-row *cdkHeaderRowDef="renderedColumns"></cdk-header-row>\n <cdk-row\n *cdkRowDef="let row; let rowI = dataIndex; columns: renderedColumns"\n [attr.aria-rowindex]="rowI + 1"\n ></cdk-row>\n</cdk-table>\n',changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}cdk-table{flex-direction:column;background-color:var(--granite-color-background-variant)}cdk-header-row,cdk-row,cdk-table{display:flex}cdk-cell,cdk-header-cell{flex:1;height:2.5rem}cdk-cell{border-top:1px solid var(--granite-color-border-soft)}"]}]}],Pt.propDecorators={dataSource:[{type:e.Input}],trackBy:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],tableColumnsComponent:[{type:e.ContentChildren,args:[Et]}]};var At=function(){};At.decorators=[{type:e.Directive}],At.propDecorators={id:[{type:e.Input}],column:[{type:e.Input}]};var Bt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(At);Bt.decorators=[{type:e.Component,args:[{selector:"cdk-cell[graniteTableDataCell]",template:'<span class="granite-table-data-cell-static-container">\n <ng-template\n [ngTemplateOutlet]="tableCellTemplateRef || defaultTableCellTemplate"\n [ngTemplateOutletContext]="{\n data: value,\n rowIndex: rowIndex,\n columnIndex: columnIndex,\n column: column,\n row: row\n }"\n ></ng-template>\n</span>\n\n<ng-template #defaultTableCellTemplate>\n <ng-container [ngSwitch]="staticType">\n <ng-container *ngSwitchCase="\'badge\'">\n <granite-badge>{{ value }}</granite-badge>\n </ng-container>\n <ng-container *ngSwitchDefault>{{ value }}</ng-container>\n </ng-container>\n</ng-template>\n',styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-table-data-cell-static-container{padding:var(--granite-spacing-s);height:inherit;font-size:var(--granite-font-size-body-small);line-height:var(--granite-line-height-regular);display:flex;justify-content:center;align-items:center;color:var(--granite-color-text)}"]}]}],Bt.propDecorators={value:[{type:e.Input}],staticType:[{type:e.Input}],rowIndex:[{type:e.Input}],columnIndex:[{type:e.Input}],tableCellTemplateRef:[{type:e.Input}],row:[{type:e.Input}]};var zt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return C(e,t),e}(At);zt.decorators=[{type:e.Component,args:[{selector:"cdk-header-cell[graniteTableHeaderCell]",template:'<span class="granite-table-header-cell-title">\n <ng-content></ng-content>\n</span>\n',styles:[":host{box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-table-header-cell-title{padding:var(--granite-spacing-s);height:inherit;font-size:var(--granite-font-size-micro);line-height:var(--granite-line-height-flowing);letter-spacing:.015em;font-weight:400;display:flex;justify-content:center;align-items:center;color:var(--granite-color-text-weak)}"]}]}];var Rt=function(){function t(){}return t.prototype.transform=function(t){return t.split(/(?=[A-Z ])/).map((function(t){return t.trim()})).filter(Boolean).map((function(t){return t.charAt(0).toLocaleUpperCase()+t.slice(1)})).join(" ")},t}();Rt.decorators=[{type:e.Pipe,args:[{name:"graniteTitle"}]}];var Lt=function(){};Lt.decorators=[{type:e.NgModule,args:[{exports:[Rt],declarations:[Rt]}]}];var Gt=function(){};Gt.decorators=[{type:e.NgModule,args:[{declarations:[Pt,Bt,zt,Et],imports:[n.CommonModule,b.CdkTableModule,P,Lt],exports:[Pt,Et]}]}];var qt=["text","number","password","textarea"],Ft=function(){function t(t){this._focusMonitor=t,this.id=null,this.name=null,this.type="text",this.value="",this.required=!1,this.readonly=!1,this.invalid=!1,this.disabled=!1,this.placeholder="",this.maxlength=255,this.countcharacters=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.valueChange=new e.EventEmitter,this._supported=!0,this._empty=!1,this._passwordFieldIcon="view",this._passwordField=!1,this._currentCharCount=0,this._passwordToggled=!1}return t.prototype.ngOnInit=function(){this._validateType(),this._passwordField="password"==this.type,this._empty=null==this.value||""===this.value},t.prototype.ngOnChanges=function(t){t.required&&(this.required=o.coerceBooleanProperty(t.required.currentValue)),t.readonly&&(this.readonly=o.coerceBooleanProperty(t.readonly.currentValue)),t.invalid&&(this.invalid=o.coerceBooleanProperty(t.invalid.currentValue)),t.disabled&&(this.disabled=o.coerceBooleanProperty(t.disabled.currentValue)),t.countcharacters&&(this.countcharacters=o.coerceBooleanProperty(t.countcharacters.currentValue)),t.value&&(this._empty=null==this.value||""===this.value),t.type&&this._validateType()},t.prototype.focus=function(t,e){void 0===t&&(t="program"),"text"===this.type?this._focusMonitor.focusVia(this._getInputElement(),t,e):"textarea"===this.type&&this._focusMonitor.focusVia(this._getTextareaElement(),t,e)},t.prototype._togglePassword=function(){this._passwordToggled?(this._passwordToggled=!1,this.type="password",this._passwordFieldIcon="view"):(this._passwordToggled=!0,this.type="text",this._passwordFieldIcon="view-disabled")},t.prototype._onKeyUp=function(t){var e=t.target;this._applyCharacterCount(e.value),this._empty=null==e.value||""===e.value,this.valueChange.emit(e.value)},t.prototype._onInput=function(t){var e=t.target;this._empty=null==e.value||""===e.value,this.valueChange.emit(e.value)},t.prototype._validateType=function(){if(qt.indexOf(this.type)<0)throw this._supported=!1,Error('Input type "'+this.type+"\" isn't supported by graniteInputField.")},t.prototype._applyCharacterCount=function(t){this.countcharacters&&(this._currentCharCount=t.length,this._currentCharCount>this.maxlength&&(t=t.slice(0,this.maxlength),this._currentCharCount=this.maxlength))},t.prototype._getInputElement=function(){return this._inputElement.nativeElement},t.prototype._getTextareaElement=function(){return this._textareaElement.nativeElement},t}();Ft.decorators=[{type:e.Component,args:[{selector:"granite-input-field",exportAs:"graniteInputField",template:'<div\n *ngIf="_supported"\n class="granite-input-container"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n>\n <div\n class="granite-input-top-row"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n [class.granite-input-disabled]="disabled"\n [class.granite-input-readonly]="readonly"\n >\n <div\n *ngIf="prefixicon"\n class="granite-input-prepend"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n >\n <granite-icon class="granite-input-prepend-icon">\n {{ prefixicon }}\n </granite-icon>\n </div>\n\n <ng-container\n *ngIf="type != \'textarea\'; then inputElement; else textareaElement"\n ></ng-container>\n\n <ng-template #inputElement>\n <input\n #input\n [id]="id"\n class="granite-input-base"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n [name]="name"\n [attr.type]="type"\n [required]="required"\n [readonly]="readonly"\n [disabled]="disabled"\n [placeholder]="placeholder"\n [attr.maxlength]="maxlength"\n [value]="value"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-invalid]="invalid"\n (keyup)="_onKeyUp($event)"\n (input)="_onInput($event)"\n />\n </ng-template>\n\n <button\n *ngIf="_passwordField"\n class="granite-input-append"\n [class.granite-input-required]="required"\n [class.granite-input-empty]="_empty"\n (click)="_togglePassword()"\n >\n <granite-icon class="granite-input-password-toggle-icon">\n {{ _passwordFieldIcon }}\n </granite-icon>\n </button>\n\n <ng-template #textareaElement>\n <textarea\n #textarea\n [id]="id"\n class="granite-input-base granite-text-area"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n rows="1"\n [name]="name"\n [attr.type]="type"\n [required]="required"\n [readonly]="readonly"\n [disabled]="disabled"\n [placeholder]="placeholder"\n [value]="value"\n [attr.maxlength]="maxlength"\n [attr.aria-label]="ariaLabel"\n [attr.aria-labelledby]="ariaLabelledby"\n [attr.aria-required]="required"\n [attr.aria-invalid]="invalid"\n (keyup)="_onKeyUp($event)"\n (input)="_onInput($event)"\n ></textarea>\n </ng-template>\n\n <div\n class="granite-input-hover-bar"\n [class.granite-input-invalid]="invalid"\n [class.granite-input-empty]="_empty"\n ></div>\n </div>\n\n <div *ngIf="countcharacters" class="granite-input-bottom-row">\n <div class="granite-input-char-count">\n {{ _currentCharCount }}/{{ maxlength }}\n </div>\n </div>\n</div>\n',host:{class:"granite-input-field"},changeDetection:e.ChangeDetectionStrategy.OnPush,styles:[":host{transition:all .2s ease-out;width:14.5rem;box-sizing:border-box}:host *,:host :after,:host :before{box-sizing:inherit}.granite-input-container{width:inherit;font-size:var(--granite-font-size-body-small)}.granite-input-container .granite-input-top-row{display:inline-flex;width:inherit;position:relative;background:var(--granite-color-background)}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar{height:.125rem}.granite-input-container .granite-input-top-row:hover .granite-input-hover-bar.granite-input-invalid.granite-input-empty{background-color:var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-text-area{min-width:14.5rem;min-height:2rem}.granite-input-container .granite-input-top-row.granite-input-disabled,.granite-input-container .granite-input-top-row.granite-input-readonly{background-color:transparent;box-shadow:none}.granite-input-container .granite-input-top-row.granite-input-disabled .granite-input-hover-bar,.granite-input-container .granite-input-top-row.granite-input-readonly .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);padding:var(--granite-spacing-s);width:inherit;color:var(--granite-color-text);font:inherit;font-weight:var(--granite-font-weight-regular);line-height:var(--granite-line-height-regular)}.granite-input-container .granite-input-top-row .granite-input-base:required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-top-row .granite-input-base:required::-moz-placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:required::placeholder{color:var(--granite-color-text-weak)}.granite-input-container .granite-input-top-row .granite-input-base:-moz-read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:read-only{background-color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:disabled{opacity:.3}.granite-input-container .granite-input-top-row .granite-input-base::-moz-placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base::placeholder{color:var(--granite-color-text-hint)}.granite-input-container .granite-input-top-row .granite-input-base:hover::-moz-placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:hover::placeholder{color:var(--granite-color-text)}.granite-input-container .granite-input-top-row .granite-input-base:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus.granite-input-invalid{box-shadow:inset 0 -.125rem var(--granite-color-signal-failure),inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus)}.granite-input-container .granite-input-top-row .granite-input-base:focus::-moz-placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-base:focus::placeholder{color:transparent}.granite-input-container .granite-input-top-row .granite-input-hover-bar{height:.0625rem;background-color:var(--granite-color-border-hard);position:absolute;width:inherit;bottom:0}.granite-input-container .granite-input-top-row .granite-input-hover-bar.granite-input-invalid{background-color:var(--granite-color-signal-failure)}.granite-input-container .granite-input-top-row:focus-within .granite-input-hover-bar{background-color:transparent}.granite-input-container .granite-input-prepend{display:flex;align-items:center;padding:0 var(--granite-spacing-s);background:var(--granite-color-background-input)}.granite-input-container .granite-input-prepend .granite-input-prepend-icon{width:1rem;height:1rem;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-prepend.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-append{-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none;background-color:var(--granite-color-background-input);position:relative}.granite-input-container .granite-input-append:focus{box-shadow:inset 0 .125rem var(--granite-color-focus),inset .125rem 0 var(--granite-color-focus),inset -.125rem 0 var(--granite-color-focus),inset 0 -.125rem var(--granite-color-focus)}.granite-input-container .granite-input-append .granite-input-password-toggle-icon{width:-webkit-max-content;width:-moz-max-content;width:max-content;height:-webkit-max-content;height:-moz-max-content;height:max-content;color:var(--granite-color-text);box-shadow:none}.granite-input-container .granite-input-append.granite-input-required.granite-input-empty{background-color:var(--granite-color-background-failure)}.granite-input-container .granite-input-bottom-row{box-shadow:none}.granite-input-container .granite-input-char-count{background:var(--granite-color-background-warning);border-radius:0 0 .25rem .25rem;padding:var(--granite-spacing-s);background-size:contain;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;box-shadow:none}.granite-input-container.granite-input-disabled,.granite-input-container.granite-input-readonly{background-color:transparent}"]}]}],Ft.ctorParameters=function(){return[{type:l.FocusMonitor}]},Ft.propDecorators={id:[{type:e.Input}],name:[{type:e.Input}],type:[{type:e.Input}],value:[{type:e.Input}],required:[{type:e.Input}],readonly:[{type:e.Input}],invalid:[{type:e.Input}],disabled:[{type:e.Input}],placeholder:[{type:e.Input}],prefixicon:[{type:e.Input}],maxlength:[{type:e.Input}],countcharacters:[{type:e.Input}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}],valueChange:[{type:e.Output}],_inputElement:[{type:e.ViewChild,args:["input"]}],_textareaElement:[{type:e.ViewChild,args:["textarea"]}]};var Xt=function(){};Xt.decorators=[{type:e.NgModule,args:[{imports:[n.CommonModule,ht,Tt],declarations:[Ft],exports:[Ft]}]}];var Vt=it.output,jt=function(){};jt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputDesktop]",providers:[{provide:rt,useValue:Vt}]}]}];var Ht=at.output,Yt=function(){};Yt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientOutputTouch]",providers:[{provide:rt,useValue:Ht}]}]}];var Nt=it.input,$t=function(){};$t.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputDesktop]",providers:[{provide:ot,useValue:Nt}]}]}];var Ut=at.input,Kt=function(){};Kt.decorators=[{type:e.Directive,args:[{selector:"[graniteClientInputTouch]",providers:[{provide:ot,useValue:Ut}]}]}];var Wt=function(){};Wt.decorators=[{type:e.NgModule,args:[{declarations:[jt,Yt,$t,Kt],exports:[jt,Yt,$t,Kt]}]}],t.ClientInputDesktopDirective=$t,t.ClientInputTouchDirective=Kt,t.ClientOutputDesktopDirective=jt,t.ClientOutputTouchDirective=Yt,t.GRANITE_CLIENT_INPUT=ot,t.GRANITE_CLIENT_OUTPUT=rt,t.GraniteAnchorComponent=Ot,t.GraniteArrangeGridComponent=f,t.GraniteArrangeGridItemComponent=v,t.GraniteArrangeGridModule=y,t.GraniteBadgeComponent=D,t.GraniteBadgeHarness=A,t.GraniteBadgeModule=P,t.GraniteButtonComponent=St,t.GraniteButtonModule=Tt,t.GraniteCheckboxComponent=xt,t.GraniteCheckboxModule=Ct,t.GraniteCoreModule=Wt,t.GraniteDividerDirective=gt,t.GraniteGridComponent=_,t.GraniteGridItemComponent=k,t.GraniteGridModule=w,t.GraniteIconComponent=dt,t.GraniteIconModule=ht,t.GraniteInputFieldComponent=Ft,t.GraniteInputFieldModule=Xt,t.GraniteMenuComponent=nt,t.GraniteMenuHarness=bt,t.GraniteMenuItemComponent=z,t.GraniteMenuItemHarness=mt,t.GraniteMenuModule=pt,t.GraniteMenuTouchCloseComponent=lt,t.GraniteMenuTouchTitleItemComponent=ut,t.GraniteMenuTriggerForDirective=st,t.GraniteRadioButtonComponent=yt,t.GraniteRadioButtonModule=wt,t.GraniteRadioGroupComponent=_t,t.GraniteTableColumnDirective=Et,t.GraniteTableComponent=Pt,t.GraniteTableModule=Gt,t.GraniteToggleSwitchComponent=vt,t.GraniteToggleSwitchModule=ft,t._MenuBaseComponent=et,t.deviceDesktop=it,t.deviceTouch=at,t.disabledMixin=Mt,t.graniteMenuDesktopAnimations=q,t.graniteMenuTouchAnimations=Z,t.ɵ0=Ht,t.ɵa=B,t.ɵc=R,t.ɵd=L,t.ɵe=kt,t.ɵf=Bt,t.ɵg=At,t.ɵh=zt,t.ɵi=Lt,t.ɵj=Rt,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
10
10
|
//# sourceMappingURL=ifsworld-granite-components.umd.min.js.map
|