@fluid-topics/ft-chip 0.1.6 → 0.1.9
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/build/ft-chip.js +2 -0
- package/build/ft-chip.light.js +433 -0
- package/build/ft-chip.min.js +193 -7
- package/package.json +5 -5
package/build/ft-chip.js
CHANGED
|
@@ -137,8 +137,10 @@ let FtChip = class FtChip extends FtLitElement {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
.ft-chip--label {
|
|
140
|
+
vertical-align: bottom;
|
|
140
141
|
display: block;
|
|
141
142
|
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
143
|
+
${setVariable(FtTypographyBody2CssVariables.fontSize, "var(--ft-chip-internal-font-size)")};
|
|
142
144
|
${setVariable(FtTypographyBody2CssVariables.lineHeight, "var(--ft-chip-internal-content-height)")};
|
|
143
145
|
}
|
|
144
146
|
|
|
@@ -0,0 +1,433 @@
|
|
|
1
|
+
!function(t,e,i,r,a,o){
|
|
2
|
+
/*! *****************************************************************************
|
|
3
|
+
Copyright (c) Microsoft Corporation.
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
9
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
10
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
11
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
12
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
13
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
+
***************************************************************************** */
|
|
16
|
+
var n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},n(t,e)};var p=function(){return p=Object.assign||function(t){for(var e,i=1,r=arguments.length;i<r;i++)for(var a in e=arguments[i])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},p.apply(this,arguments)};function c(t,e,i,r){for(var a,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n}function s(t){var e="function"==typeof Symbol&&Symbol.iterator,i=e&&t[e],r=0;if(i)return i.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.")}
|
|
17
|
+
/**
|
|
18
|
+
* @license
|
|
19
|
+
* Copyright 2018 Google Inc.
|
|
20
|
+
*
|
|
21
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
22
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
23
|
+
* in the Software without restriction, including without limitation the rights
|
|
24
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
25
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
26
|
+
* furnished to do so, subject to the following conditions:
|
|
27
|
+
*
|
|
28
|
+
* The above copyright notice and this permission notice shall be included in
|
|
29
|
+
* all copies or substantial portions of the Software.
|
|
30
|
+
*
|
|
31
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
32
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
33
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
34
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
35
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
36
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
37
|
+
* THE SOFTWARE.
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* @license
|
|
41
|
+
* Copyright 2018 Google LLC
|
|
42
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
43
|
+
*/
|
|
44
|
+
const l=()=>{},d={get passive(){return!1}};document.addEventListener("x",l,d),document.removeEventListener("x",l);
|
|
45
|
+
/**
|
|
46
|
+
* @license
|
|
47
|
+
* Copyright 2018 Google LLC
|
|
48
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
49
|
+
*/
|
|
50
|
+
class f extends e.LitElement{click(){if(this.mdcRoot)return this.mdcRoot.focus(),void this.mdcRoot.click();super.click()}createFoundation(){void 0!==this.mdcFoundation&&this.mdcFoundation.destroy(),this.mdcFoundationClass&&(this.mdcFoundation=new this.mdcFoundationClass(this.createAdapter()),this.mdcFoundation.init())}firstUpdated(){this.createFoundation()}}
|
|
51
|
+
/**
|
|
52
|
+
* @license
|
|
53
|
+
* Copyright 2016 Google Inc.
|
|
54
|
+
*
|
|
55
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
56
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
57
|
+
* in the Software without restriction, including without limitation the rights
|
|
58
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
59
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
60
|
+
* furnished to do so, subject to the following conditions:
|
|
61
|
+
*
|
|
62
|
+
* The above copyright notice and this permission notice shall be included in
|
|
63
|
+
* all copies or substantial portions of the Software.
|
|
64
|
+
*
|
|
65
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
66
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
67
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
68
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
69
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
70
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
71
|
+
* THE SOFTWARE.
|
|
72
|
+
*/var h=function(){function t(t){void 0===t&&(t={}),this.adapter=t}return Object.defineProperty(t,"cssClasses",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"strings",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"numbers",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultAdapter",{get:function(){return{}},enumerable:!1,configurable:!0}),t.prototype.init=function(){},t.prototype.destroy=function(){},t}(),u={BG_FOCUSED:"mdc-ripple-upgraded--background-focused",FG_ACTIVATION:"mdc-ripple-upgraded--foreground-activation",FG_DEACTIVATION:"mdc-ripple-upgraded--foreground-deactivation",ROOT:"mdc-ripple-upgraded",UNBOUNDED:"mdc-ripple-upgraded--unbounded"},m={VAR_FG_SCALE:"--mdc-ripple-fg-scale",VAR_FG_SIZE:"--mdc-ripple-fg-size",VAR_FG_TRANSLATE_END:"--mdc-ripple-fg-translate-end",VAR_FG_TRANSLATE_START:"--mdc-ripple-fg-translate-start",VAR_LEFT:"--mdc-ripple-left",VAR_TOP:"--mdc-ripple-top"},y={DEACTIVATION_TIMEOUT_MS:225,FG_DEACTIVATION_MS:150,INITIAL_ORIGIN_SCALE:.6,PADDING:10,TAP_DELAY_MS:300};
|
|
73
|
+
/**
|
|
74
|
+
* @license
|
|
75
|
+
* Copyright 2016 Google Inc.
|
|
76
|
+
*
|
|
77
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
78
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
79
|
+
* in the Software without restriction, including without limitation the rights
|
|
80
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
81
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
82
|
+
* furnished to do so, subject to the following conditions:
|
|
83
|
+
*
|
|
84
|
+
* The above copyright notice and this permission notice shall be included in
|
|
85
|
+
* all copies or substantial portions of the Software.
|
|
86
|
+
*
|
|
87
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
88
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
89
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
90
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
91
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
92
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
93
|
+
* THE SOFTWARE.
|
|
94
|
+
*/
|
|
95
|
+
/**
|
|
96
|
+
* @license
|
|
97
|
+
* Copyright 2016 Google Inc.
|
|
98
|
+
*
|
|
99
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
100
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
101
|
+
* in the Software without restriction, including without limitation the rights
|
|
102
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
103
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
104
|
+
* furnished to do so, subject to the following conditions:
|
|
105
|
+
*
|
|
106
|
+
* The above copyright notice and this permission notice shall be included in
|
|
107
|
+
* all copies or substantial portions of the Software.
|
|
108
|
+
*
|
|
109
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
110
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
111
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
112
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
113
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
114
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
115
|
+
* THE SOFTWARE.
|
|
116
|
+
*/
|
|
117
|
+
var g=["touchstart","pointerdown","mousedown","keydown"],v=["touchend","pointerup","mouseup","contextmenu"],b=[],$=function(t){function e(i){var r=t.call(this,p(p({},e.defaultAdapter),i))||this;return r.activationAnimationHasEnded=!1,r.activationTimer=0,r.fgDeactivationRemovalTimer=0,r.fgScale="0",r.frame={width:0,height:0},r.initialSize=0,r.layoutFrame=0,r.maxRadius=0,r.unboundedCoords={left:0,top:0},r.activationState=r.defaultActivationState(),r.activationTimerCallback=function(){r.activationAnimationHasEnded=!0,r.runDeactivationUXLogicIfReady()},r.activateHandler=function(t){r.activateImpl(t)},r.deactivateHandler=function(){r.deactivateImpl()},r.focusHandler=function(){r.handleFocus()},r.blurHandler=function(){r.handleBlur()},r.resizeHandler=function(){r.layout()},r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return u},enumerable:!1,configurable:!0}),Object.defineProperty(e,"strings",{get:function(){return m},enumerable:!1,configurable:!0}),Object.defineProperty(e,"numbers",{get:function(){return y},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultAdapter",{get:function(){return{addClass:function(){},browserSupportsCssVars:function(){return!0},computeBoundingRect:function(){return{top:0,right:0,bottom:0,left:0,width:0,height:0}},containsEventTarget:function(){return!0},deregisterDocumentInteractionHandler:function(){},deregisterInteractionHandler:function(){},deregisterResizeHandler:function(){},getWindowPageOffset:function(){return{x:0,y:0}},isSurfaceActive:function(){return!0},isSurfaceDisabled:function(){return!0},isUnbounded:function(){return!0},registerDocumentInteractionHandler:function(){},registerInteractionHandler:function(){},registerResizeHandler:function(){},removeClass:function(){},updateCssVariable:function(){}}},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this,i=this.supportsPressRipple();if(this.registerRootHandlers(i),i){var r=e.cssClasses,a=r.ROOT,o=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.addClass(a),t.adapter.isUnbounded()&&(t.adapter.addClass(o),t.layoutInternal())}))}},e.prototype.destroy=function(){var t=this;if(this.supportsPressRipple()){this.activationTimer&&(clearTimeout(this.activationTimer),this.activationTimer=0,this.adapter.removeClass(e.cssClasses.FG_ACTIVATION)),this.fgDeactivationRemovalTimer&&(clearTimeout(this.fgDeactivationRemovalTimer),this.fgDeactivationRemovalTimer=0,this.adapter.removeClass(e.cssClasses.FG_DEACTIVATION));var i=e.cssClasses,r=i.ROOT,a=i.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(r),t.adapter.removeClass(a),t.removeCssVars()}))}this.deregisterRootHandlers(),this.deregisterDeactivationHandlers()},e.prototype.activate=function(t){this.activateImpl(t)},e.prototype.deactivate=function(){this.deactivateImpl()},e.prototype.layout=function(){var t=this;this.layoutFrame&&cancelAnimationFrame(this.layoutFrame),this.layoutFrame=requestAnimationFrame((function(){t.layoutInternal(),t.layoutFrame=0}))},e.prototype.setUnbounded=function(t){var i=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(i):this.adapter.removeClass(i)},e.prototype.handleFocus=function(){var t=this;requestAnimationFrame((function(){return t.adapter.addClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.handleBlur=function(){var t=this;requestAnimationFrame((function(){return t.adapter.removeClass(e.cssClasses.BG_FOCUSED)}))},e.prototype.supportsPressRipple=function(){return this.adapter.browserSupportsCssVars()},e.prototype.defaultActivationState=function(){return{activationEvent:void 0,hasDeactivationUXRun:!1,isActivated:!1,isProgrammatic:!1,wasActivatedByPointer:!1,wasElementMadeActive:!1}},e.prototype.registerRootHandlers=function(t){var e,i;if(t){try{for(var r=s(g),a=r.next();!a.done;a=r.next()){var o=a.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}this.adapter.isUnbounded()&&this.adapter.registerResizeHandler(this.resizeHandler)}this.adapter.registerInteractionHandler("focus",this.focusHandler),this.adapter.registerInteractionHandler("blur",this.blurHandler)},e.prototype.registerDeactivationHandlers=function(t){var e,i;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var r=s(v),a=r.next();!a.done;a=r.next()){var o=a.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(i=r.return)&&i.call(r)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var i=s(g),r=i.next();!r.done;r=i.next()){var a=r.value;this.adapter.deregisterInteractionHandler(a,this.activateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}this.adapter.deregisterInteractionHandler("focus",this.focusHandler),this.adapter.deregisterInteractionHandler("blur",this.blurHandler),this.adapter.isUnbounded()&&this.adapter.deregisterResizeHandler(this.resizeHandler)},e.prototype.deregisterDeactivationHandlers=function(){var t,e;this.adapter.deregisterInteractionHandler("keyup",this.deactivateHandler);try{for(var i=s(v),r=i.next();!r.done;r=i.next()){var a=r.value;this.adapter.deregisterDocumentInteractionHandler(a,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{r&&!r.done&&(e=i.return)&&e.call(i)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,i=e.strings;Object.keys(i).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(i[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var i=this.activationState;if(!i.isActivated){var r=this.previousActivationEvent;if(!(r&&void 0!==t&&r.type!==t.type))i.isActivated=!0,i.isProgrammatic=void 0===t,i.activationEvent=t,i.wasActivatedByPointer=!i.isProgrammatic&&(void 0!==t&&("mousedown"===t.type||"touchstart"===t.type||"pointerdown"===t.type)),void 0!==t&&b.length>0&&b.some((function(t){return e.adapter.containsEventTarget(t)}))?this.resetActivationState():(void 0!==t&&(b.push(t.target),this.registerDeactivationHandlers(t)),i.wasElementMadeActive=this.checkElementMadeActive(t),i.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){b=[],i.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(i.wasElementMadeActive=e.checkElementMadeActive(t),i.wasElementMadeActive&&e.animateActivation()),i.wasElementMadeActive||(e.activationState=e.defaultActivationState())})))}}},e.prototype.checkElementMadeActive=function(t){return void 0===t||"keydown"!==t.type||this.adapter.isSurfaceActive()},e.prototype.animateActivation=function(){var t=this,i=e.strings,r=i.VAR_FG_TRANSLATE_START,a=i.VAR_FG_TRANSLATE_END,o=e.cssClasses,n=o.FG_DEACTIVATION,p=o.FG_ACTIVATION,c=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var s="",l="";if(!this.adapter.isUnbounded()){var d=this.getFgTranslationCoordinates(),f=d.startPoint,h=d.endPoint;s=f.x+"px, "+f.y+"px",l=h.x+"px, "+h.y+"px"}this.adapter.updateCssVariable(r,s),this.adapter.updateCssVariable(a,l),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(n),this.adapter.computeBoundingRect(),this.adapter.addClass(p),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),c)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,i=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,i){if(!t)return{x:0,y:0};var r,a,o=e.x,n=e.y,p=o+i.left,c=n+i.top;if("touchstart"===t.type){var s=t;r=s.changedTouches[0].pageX-p,a=s.changedTouches[0].pageY-c}else{var l=t;r=l.pageX-p,a=l.pageY-c}return{x:r,y:a}}(i,this.adapter.getWindowPageOffset(),this.adapter.computeBoundingRect()):{x:this.frame.width/2,y:this.frame.height/2}).x-this.initialSize/2,y:t.y-this.initialSize/2},endPoint:{x:this.frame.width/2-this.initialSize/2,y:this.frame.height/2-this.initialSize/2}}},e.prototype.runDeactivationUXLogicIfReady=function(){var t=this,i=e.cssClasses.FG_DEACTIVATION,r=this.activationState,a=r.hasDeactivationUXRun,o=r.isActivated;(a||!o)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(i),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(i)}),y.FG_DEACTIVATION_MS))},e.prototype.rmBoundedActivationClasses=function(){var t=e.cssClasses.FG_ACTIVATION;this.adapter.removeClass(t),this.activationAnimationHasEnded=!1,this.adapter.computeBoundingRect()},e.prototype.resetActivationState=function(){var t=this;this.previousActivationEvent=this.activationState.activationEvent,this.activationState=this.defaultActivationState(),setTimeout((function(){return t.previousActivationEvent=void 0}),e.numbers.TAP_DELAY_MS)},e.prototype.deactivateImpl=function(){var t=this,e=this.activationState;if(e.isActivated){var i=p({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(i)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(i),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,i=t.wasElementMadeActive;(e||i)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var i=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?i:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var r=Math.floor(i*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&r%2!=0?this.initialSize=r-1:this.initialSize=r,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,i=t.VAR_FG_SIZE,r=t.VAR_LEFT,a=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(i,this.initialSize+"px"),this.adapter.updateCssVariable(o,this.fgScale),this.adapter.isUnbounded()&&(this.unboundedCoords={left:Math.round(this.frame.width/2-this.initialSize/2),top:Math.round(this.frame.height/2-this.initialSize/2)},this.adapter.updateCssVariable(r,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(a,this.unboundedCoords.top+"px"))},e}(h),x=$;
|
|
118
|
+
/**
|
|
119
|
+
* @license
|
|
120
|
+
* Copyright 2018 Google LLC
|
|
121
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
122
|
+
*/
|
|
123
|
+
class w extends f{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=x}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),i=this.selected&&(this.primary||!this.accent),a={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":i,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return e.html`
|
|
124
|
+
<div class="mdc-ripple-surface mdc-ripple-upgraded ${r.classMap(a)}"
|
|
125
|
+
style="${o.styleMap({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}c([i.query(".mdc-ripple-surface")],w.prototype,"mdcRoot",void 0),c([i.property({type:Boolean})],w.prototype,"primary",void 0),c([i.property({type:Boolean})],w.prototype,"accent",void 0),c([i.property({type:Boolean})],w.prototype,"unbounded",void 0),c([i.property({type:Boolean})],w.prototype,"disabled",void 0),c([i.property({type:Boolean})],w.prototype,"activated",void 0),c([i.property({type:Boolean})],w.prototype,"selected",void 0),c([i.property({type:Boolean})],w.prototype,"internalUseStateLayerCustomProperties",void 0),c([i.state()],w.prototype,"hovering",void 0),c([i.state()],w.prototype,"bgFocused",void 0),c([i.state()],w.prototype,"fgActivation",void 0),c([i.state()],w.prototype,"fgDeactivation",void 0),c([i.state()],w.prototype,"fgScale",void 0),c([i.state()],w.prototype,"fgSize",void 0),c([i.state()],w.prototype,"translateStart",void 0),c([i.state()],w.prototype,"translateEnd",void 0),c([i.state()],w.prototype,"leftPos",void 0),c([i.state()],w.prototype,"topPos",void 0);
|
|
126
|
+
/**
|
|
127
|
+
* @license
|
|
128
|
+
* Copyright 2021 Google LLC
|
|
129
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
130
|
+
*/
|
|
131
|
+
const k=e.css`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
132
|
+
/**
|
|
133
|
+
* @license
|
|
134
|
+
* Copyright 2018 Google LLC
|
|
135
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
136
|
+
*/;let z=class extends w{};z.styles=[k],z=c([i.customElement("mwc-ripple")],z);
|
|
137
|
+
/**
|
|
138
|
+
* @license
|
|
139
|
+
* Copyright 2020 Google LLC
|
|
140
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
141
|
+
*/
|
|
142
|
+
class A{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}var S=function(t,e,i,r){for(var a,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const O={color:a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorContent),primaryColor:a.FtCssVariable.extend("--ft-ripple-primary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorPrimary)),secondaryColor:a.FtCssVariable.extend("--ft-ripple-secondary-color",a.FtCssVariable.extend("--ft-ripple-color",a.designSystemVariables.colorSecondary)),opacityContentOnSurfacePressed:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:a.FtCssVariable.external(a.designSystemVariables.opacityContentOnSurfaceDragged,"Design system")};let T=class extends a.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return e.css`
|
|
143
|
+
:host {
|
|
144
|
+
display: contents;
|
|
145
|
+
|
|
146
|
+
--mdc-ripple-color: ${O.color};
|
|
147
|
+
--mdc-ripple-press-opacity: ${O.opacityContentOnSurfacePressed};
|
|
148
|
+
--mdc-ripple-hover-opacity: ${O.opacityContentOnSurfaceHover};
|
|
149
|
+
--mdc-ripple-focus-opacity: ${O.opacityContentOnSurfaceFocused};
|
|
150
|
+
--mdc-ripple-selected-opacity: ${O.opacityContentOnSurfaceSelected};
|
|
151
|
+
--mdc-ripple-activated-opacity: ${O.opacityContentOnSurfaceDragged};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
mwc-ripple.ft-ripple--secondary {
|
|
155
|
+
--mdc-ripple-color: ${O.secondaryColor};
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
mwc-ripple.ft-ripple--primary {
|
|
159
|
+
--mdc-ripple-color: ${O.primaryColor};
|
|
160
|
+
}
|
|
161
|
+
`}getTemplate(){return e.html`
|
|
162
|
+
<mwc-ripple
|
|
163
|
+
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
164
|
+
?unbounded=${this.unbounded}
|
|
165
|
+
?activated=${this.activated}
|
|
166
|
+
?selected=${this.selected}
|
|
167
|
+
?disabled=${this.disabled}
|
|
168
|
+
></mwc-ripple>
|
|
169
|
+
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new A((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),a=i("touchend","touchcancel"),o=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",a),e.addEventListener("keydown",o),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",a),e.removeEventListener("keydown",o),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};
|
|
170
|
+
/**
|
|
171
|
+
* @license
|
|
172
|
+
* Copyright 2017 Google LLC
|
|
173
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
174
|
+
*/
|
|
175
|
+
var _;T.elementDefinitions={"mwc-ripple":z},S([i.property({type:Boolean})],T.prototype,"primary",void 0),S([i.property({type:Boolean})],T.prototype,"secondary",void 0),S([i.property({type:Boolean})],T.prototype,"unbounded",void 0),S([i.property({type:Boolean})],T.prototype,"activated",void 0),S([i.property({type:Boolean})],T.prototype,"selected",void 0),S([i.property({type:Boolean})],T.prototype,"disabled",void 0),S([i.query("mwc-ripple")],T.prototype,"mwcRipple",void 0),T=S([a.customElement("ft-ripple")],T);const I=globalThis.trustedTypes,C=I?I.createPolicy("lit-html",{createHTML:t=>t}):void 0,E=`lit$${(Math.random()+"").slice(9)}$`,j="?"+E,D=`<${j}>`,F=document,B=(t="")=>F.createComment(t),R=t=>null===t||"object"!=typeof t&&"function"!=typeof t,N=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,P=/-->/g,H=/>/g,U=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,G=/'/g,V=/"/g,L=/^(?:script|style|textarea|title)$/i,Z=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),q=Symbol.for("lit-noChange"),W=Symbol.for("lit-nothing"),K=new WeakMap,X=F.createTreeWalker(F,129,null,!1),Y=(t,e)=>{const i=t.length-1,r=[];let a,o=2===e?"<svg>":"",n=M;for(let e=0;e<i;e++){const i=t[e];let p,c,s=-1,l=0;for(;l<i.length&&(n.lastIndex=l,c=n.exec(i),null!==c);)l=n.lastIndex,n===M?"!--"===c[1]?n=P:void 0!==c[1]?n=H:void 0!==c[2]?(L.test(c[2])&&(a=RegExp("</"+c[2],"g")),n=U):void 0!==c[3]&&(n=U):n===U?">"===c[0]?(n=null!=a?a:M,s=-1):void 0===c[1]?s=-2:(s=n.lastIndex-c[2].length,p=c[1],n=void 0===c[3]?U:'"'===c[3]?V:G):n===V||n===G?n=U:n===P||n===H?n=M:(n=U,a=void 0);const d=n===U&&t[e+1].startsWith("/>")?" ":"";o+=n===M?i+D:s>=0?(r.push(p),i.slice(0,s)+"$lit$"+i.slice(s)+E+d):i+E+(-2===s?(r.push(void 0),e):d)}const p=o+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==C?C.createHTML(p):p,r]};class J{constructor({strings:t,_$litType$:e},i){let r;this.parts=[];let a=0,o=0;const n=t.length-1,p=this.parts,[c,s]=Y(t,e);if(this.el=J.createElement(c,i),X.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(r=X.nextNode())&&p.length<n;){if(1===r.nodeType){if(r.hasAttributes()){const t=[];for(const e of r.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(E)){const i=s[o++];if(t.push(e),void 0!==i){const t=r.getAttribute(i.toLowerCase()+"$lit$").split(E),e=/([.?@])?(.*)/.exec(i);p.push({type:1,index:a,name:e[2],strings:t,ctor:"."===e[1]?rt:"?"===e[1]?ot:"@"===e[1]?nt:it})}else p.push({type:6,index:a})}for(const e of t)r.removeAttribute(e)}if(L.test(r.tagName)){const t=r.textContent.split(E),e=t.length-1;if(e>0){r.textContent=I?I.emptyScript:"";for(let i=0;i<e;i++)r.append(t[i],B()),X.nextNode(),p.push({type:2,index:++a});r.append(t[e],B())}}}else if(8===r.nodeType)if(r.data===j)p.push({type:2,index:a});else{let t=-1;for(;-1!==(t=r.data.indexOf(E,t+1));)p.push({type:7,index:a}),t+=E.length-1}a++}}static createElement(t,e){const i=F.createElement("template");return i.innerHTML=t,i}}function Q(t,e,i=t,r){var a,o,n,p;if(e===q)return e;let c=void 0!==r?null===(a=i._$Cl)||void 0===a?void 0:a[r]:i._$Cu;const s=R(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==s&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===s?c=void 0:(c=new s(t),c._$AT(t,i,r)),void 0!==r?(null!==(n=(p=i)._$Cl)&&void 0!==n?n:p._$Cl=[])[r]=c:i._$Cu=c),void 0!==c&&(e=Q(t,c._$AS(t,e.values),c,r)),e}class tt{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:r}=this._$AD,a=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:F).importNode(i,!0);X.currentNode=a;let o=X.nextNode(),n=0,p=0,c=r[0];for(;void 0!==c;){if(n===c.index){let e;2===c.type?e=new et(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new pt(o,this,t)),this.v.push(e),c=r[++p]}n!==(null==c?void 0:c.index)&&(o=X.nextNode(),n++)}return a}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class et{constructor(t,e,i,r){var a;this.type=2,this._$AH=W,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=r,this._$Cg=null===(a=null==r?void 0:r.isConnected)||void 0===a||a}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Q(this,t,e),R(t)?t===W||null==t||""===t?(this._$AH!==W&&this._$AR(),this._$AH=W):t!==this._$AH&&t!==q&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return N(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==W&&R(this._$AH)?this._$AA.nextSibling.data=t:this.S(F.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:r}=t,a="number"==typeof r?this._$AC(t):(void 0===r.el&&(r.el=J.createElement(r.h,this.options)),r);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===a)this._$AH.m(i);else{const t=new tt(a,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=K.get(t.strings);return void 0===e&&K.set(t.strings,e=new J(t)),e}A(t){N(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,r=0;for(const a of t)r===e.length?e.push(i=new et(this.M(B()),this.M(B()),this,this.options)):i=e[r],i._$AI(a),r++;r<e.length&&(this._$AR(i&&i._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class it{constructor(t,e,i,r,a){this.type=1,this._$AH=W,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=a,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=W}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,r){const a=this.strings;let o=!1;if(void 0===a)t=Q(this,t,e,0),o=!R(t)||t!==this._$AH&&t!==q,o&&(this._$AH=t);else{const r=t;let n,p;for(t=a[0],n=0;n<a.length-1;n++)p=Q(this,r[i+n],e,n),p===q&&(p=this._$AH[n]),o||(o=!R(p)||p!==this._$AH[n]),p===W?t=W:t!==W&&(t+=(null!=p?p:"")+a[n+1]),this._$AH[n]=p}o&&!r&&this.k(t)}k(t){t===W?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class rt extends it{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===W?void 0:t}}const at=I?I.emptyScript:"";class ot extends it{constructor(){super(...arguments),this.type=4}k(t){t&&t!==W?this.element.setAttribute(this.name,at):this.element.removeAttribute(this.name)}}class nt extends it{constructor(t,e,i,r,a){super(t,e,i,r,a),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=Q(this,t,e,0))&&void 0!==i?i:W)===q)return;const r=this._$AH,a=t===W&&r!==W||t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive,o=t!==W&&(r===W||a);a&&this.element.removeEventListener(this.name,this,r),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class pt{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){Q(this,t)}}const ct=window.litHtmlPolyfillSupport;null==ct||ct(J,et),(null!==(_=globalThis.litHtmlVersions)&&void 0!==_?_:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
176
|
+
/**
|
|
177
|
+
* @license
|
|
178
|
+
* Copyright 2020 Google LLC
|
|
179
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
180
|
+
*/
|
|
181
|
+
const st=t=>({_$litStatic$:t}),lt=new Map,dt=(t=>(e,...i)=>{var r;const a=i.length;let o,n;const p=[],c=[];let s,l=0,d=!1;for(;l<a;){for(s=e[l];l<a&&void 0!==(n=i[l],o=null===(r=n)||void 0===r?void 0:r._$litStatic$);)s+=o+e[++l],d=!0;c.push(n),p.push(s),l++}if(l===a&&p.push(e[a]),d){const t=p.join("$$lit$$");void 0===(e=lt.get(t))&&(p.raw=p,lt.set(t,e=p)),i=c}return t(e,...i)})(Z);var ft,ht=function(t,e,i,r){for(var a,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(ft||(ft={}));const ut=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.titleFont),mt=a.FtCssVariable.extend("--ft-typography-font-family",a.designSystemVariables.contentFont),yt={fontFamily:mt,fontSize:a.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:a.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:a.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:a.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:a.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},gt=a.FtCssVariable.extend("--ft-typography-title-font-family",ut),vt=a.FtCssVariable.extend("--ft-typography-title-font-size",yt.fontSize,"20px"),bt=a.FtCssVariable.extend("--ft-typography-title-font-weight",yt.fontWeight,"normal"),$t=a.FtCssVariable.extend("--ft-typography-title-letter-spacing",yt.letterSpacing,"0.15px"),xt=a.FtCssVariable.extend("--ft-typography-title-line-height",yt.lineHeight,"24px"),wt=a.FtCssVariable.extend("--ft-typography-title-text-transform",yt.textTransform,"inherit"),kt=a.FtCssVariable.extend("--ft-typography-title-dense-font-family",ut),zt=a.FtCssVariable.extend("--ft-typography-title-dense-font-size",yt.fontSize,"14px"),At=a.FtCssVariable.extend("--ft-typography-title-dense-font-weight",yt.fontWeight,"normal"),St=a.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",yt.letterSpacing,"0.105px"),Ot=a.FtCssVariable.extend("--ft-typography-title-dense-line-height",yt.lineHeight,"24px"),Tt=a.FtCssVariable.extend("--ft-typography-title-dense-text-transform",yt.textTransform,"inherit"),_t=a.FtCssVariable.extend("--ft-typography-subtitle1-font-family",mt),It=a.FtCssVariable.extend("--ft-typography-subtitle1-font-size",yt.fontSize,"16px"),Ct=a.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",yt.fontWeight,"600"),Et=a.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",yt.letterSpacing,"0.144px"),jt=a.FtCssVariable.extend("--ft-typography-subtitle1-line-height",yt.lineHeight,"24px"),Dt=a.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",yt.textTransform,"inherit"),Ft=a.FtCssVariable.extend("--ft-typography-subtitle2-font-family",mt),Bt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-size",yt.fontSize,"14px"),Rt=a.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",yt.fontWeight,"normal"),Nt=a.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",yt.letterSpacing,"0.098px"),Mt=a.FtCssVariable.extend("--ft-typography-subtitle2-line-height",yt.lineHeight,"24px"),Pt=a.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",yt.textTransform,"inherit"),Ht=a.FtCssVariable.extend("--ft-typography-body1-font-family",mt),Ut=a.FtCssVariable.extend("--ft-typography-body1-font-size",yt.fontSize,"16px"),Gt=a.FtCssVariable.extend("--ft-typography-body1-font-weight",yt.fontWeight,"normal"),Vt=a.FtCssVariable.extend("--ft-typography-body1-letter-spacing",yt.letterSpacing,"0.496px"),Lt=a.FtCssVariable.extend("--ft-typography-body1-line-height",yt.lineHeight,"24px"),Zt=a.FtCssVariable.extend("--ft-typography-body1-text-transform",yt.textTransform,"inherit"),qt={fontFamily:a.FtCssVariable.extend("--ft-typography-body2-font-family",mt),fontSize:a.FtCssVariable.extend("--ft-typography-body2-font-size",yt.fontSize,"14px"),fontWeight:a.FtCssVariable.extend("--ft-typography-body2-font-weight",yt.fontWeight,"normal"),letterSpacing:a.FtCssVariable.extend("--ft-typography-body2-letter-spacing",yt.letterSpacing,"0.252px"),lineHeight:a.FtCssVariable.extend("--ft-typography-body2-line-height",yt.lineHeight,"20px"),textTransform:a.FtCssVariable.extend("--ft-typography-body2-text-transform",yt.textTransform,"inherit")},Wt=a.FtCssVariable.extend("--ft-typography-caption-font-family",mt),Kt=a.FtCssVariable.extend("--ft-typography-caption-font-size",yt.fontSize,"12px"),Xt=a.FtCssVariable.extend("--ft-typography-caption-font-weight",yt.fontWeight,"normal"),Yt=a.FtCssVariable.extend("--ft-typography-caption-letter-spacing",yt.letterSpacing,"0.396px"),Jt=a.FtCssVariable.extend("--ft-typography-caption-line-height",yt.lineHeight,"16px"),Qt=a.FtCssVariable.extend("--ft-typography-caption-text-transform",yt.textTransform,"inherit"),te=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",mt),ee=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",yt.fontSize,"10px"),ie=a.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",yt.fontWeight,"normal"),re=a.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",yt.letterSpacing,"0.33px"),ae=a.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",yt.lineHeight,"16px"),oe=a.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",yt.textTransform,"inherit"),ne=a.FtCssVariable.extend("--ft-typography-overline-font-family",mt),pe=a.FtCssVariable.extend("--ft-typography-overline-font-size",yt.fontSize,"10px"),ce=a.FtCssVariable.extend("--ft-typography-overline-font-weight",yt.fontWeight,"normal"),se=a.FtCssVariable.extend("--ft-typography-overline-letter-spacing",yt.letterSpacing,"1.5px"),le=a.FtCssVariable.extend("--ft-typography-overline-line-height",yt.lineHeight,"16px"),de=a.FtCssVariable.extend("--ft-typography-overline-text-transform",yt.textTransform,"uppercase"),fe=a.FtCssVariable.extend("--ft-typography-button-font-family",mt),he=a.FtCssVariable.extend("--ft-typography-button-font-size",yt.fontSize,"14px"),ue=a.FtCssVariable.extend("--ft-typography-button-font-weight",yt.fontWeight,"600"),me=a.FtCssVariable.extend("--ft-typography-button-letter-spacing",yt.letterSpacing,"1.246px"),ye=a.FtCssVariable.extend("--ft-typography-button-line-height",yt.lineHeight,"16px"),ge=a.FtCssVariable.extend("--ft-typography-button-text-transform",yt.textTransform,"uppercase"),ve=e.css`
|
|
182
|
+
.ft-typography--title {
|
|
183
|
+
font-family: ${gt};
|
|
184
|
+
font-size: ${vt};
|
|
185
|
+
font-weight: ${bt};
|
|
186
|
+
letter-spacing: ${$t};
|
|
187
|
+
line-height: ${xt};
|
|
188
|
+
text-transform: ${wt};
|
|
189
|
+
}
|
|
190
|
+
`,be=e.css`
|
|
191
|
+
.ft-typography--title-dense {
|
|
192
|
+
font-family: ${kt};
|
|
193
|
+
font-size: ${zt};
|
|
194
|
+
font-weight: ${At};
|
|
195
|
+
letter-spacing: ${St};
|
|
196
|
+
line-height: ${Ot};
|
|
197
|
+
text-transform: ${Tt};
|
|
198
|
+
}
|
|
199
|
+
`,$e=e.css`
|
|
200
|
+
.ft-typography--subtitle1 {
|
|
201
|
+
font-family: ${_t};
|
|
202
|
+
font-size: ${It};
|
|
203
|
+
font-weight: ${Ct};
|
|
204
|
+
letter-spacing: ${Et};
|
|
205
|
+
line-height: ${jt};
|
|
206
|
+
text-transform: ${Dt};
|
|
207
|
+
}
|
|
208
|
+
`,xe=e.css`
|
|
209
|
+
.ft-typography--subtitle2 {
|
|
210
|
+
font-family: ${Ft};
|
|
211
|
+
font-size: ${Bt};
|
|
212
|
+
font-weight: ${Rt};
|
|
213
|
+
letter-spacing: ${Nt};
|
|
214
|
+
line-height: ${Mt};
|
|
215
|
+
text-transform: ${Pt};
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
`,we=e.css`
|
|
219
|
+
.ft-typography--body1 {
|
|
220
|
+
font-family: ${Ht};
|
|
221
|
+
font-size: ${Ut};
|
|
222
|
+
font-weight: ${Gt};
|
|
223
|
+
letter-spacing: ${Vt};
|
|
224
|
+
line-height: ${Lt};
|
|
225
|
+
text-transform: ${Zt};
|
|
226
|
+
}
|
|
227
|
+
`,ke=e.css`
|
|
228
|
+
.ft-typography--body2 {
|
|
229
|
+
font-family: ${qt.fontFamily};
|
|
230
|
+
font-size: ${qt.fontSize};
|
|
231
|
+
font-weight: ${qt.fontWeight};
|
|
232
|
+
letter-spacing: ${qt.letterSpacing};
|
|
233
|
+
line-height: ${qt.lineHeight};
|
|
234
|
+
text-transform: ${qt.textTransform};
|
|
235
|
+
}
|
|
236
|
+
`,ze=e.css`
|
|
237
|
+
.ft-typography--caption {
|
|
238
|
+
font-family: ${Wt};
|
|
239
|
+
font-size: ${Kt};
|
|
240
|
+
font-weight: ${Xt};
|
|
241
|
+
letter-spacing: ${Yt};
|
|
242
|
+
line-height: ${Jt};
|
|
243
|
+
text-transform: ${Qt};
|
|
244
|
+
}
|
|
245
|
+
`,Ae=e.css`
|
|
246
|
+
.ft-typography--breadcrumb {
|
|
247
|
+
font-family: ${te};
|
|
248
|
+
font-size: ${ee};
|
|
249
|
+
font-weight: ${ie};
|
|
250
|
+
letter-spacing: ${re};
|
|
251
|
+
line-height: ${ae};
|
|
252
|
+
text-transform: ${oe};
|
|
253
|
+
}
|
|
254
|
+
`,Se=e.css`
|
|
255
|
+
.ft-typography--overline {
|
|
256
|
+
font-family: ${ne};
|
|
257
|
+
font-size: ${pe};
|
|
258
|
+
font-weight: ${ce};
|
|
259
|
+
letter-spacing: ${se};
|
|
260
|
+
line-height: ${le};
|
|
261
|
+
text-transform: ${de};
|
|
262
|
+
}
|
|
263
|
+
`,Oe=e.css`
|
|
264
|
+
.ft-typography--button {
|
|
265
|
+
font-family: ${fe};
|
|
266
|
+
font-size: ${he};
|
|
267
|
+
font-weight: ${ue};
|
|
268
|
+
letter-spacing: ${me};
|
|
269
|
+
line-height: ${ye};
|
|
270
|
+
text-transform: ${ge};
|
|
271
|
+
}
|
|
272
|
+
`;let Te=class extends a.FtLitElement{constructor(){super(...arguments),this.variant=ft.body1}getStyles(){return[ve,be,$e,xe,we,ke,ze,Ae,Se,Oe,e.css`
|
|
273
|
+
.ft-typography {
|
|
274
|
+
vertical-align: inherit;
|
|
275
|
+
}
|
|
276
|
+
`]}getTemplate(){return this.element?dt`
|
|
277
|
+
<${st(this.element)}
|
|
278
|
+
class="ft-typography ft-typography--${this.variant}">
|
|
279
|
+
<slot></slot>
|
|
280
|
+
</${st(this.element)}>
|
|
281
|
+
`:dt`
|
|
282
|
+
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
283
|
+
`}};ht([i.property()],Te.prototype,"element",void 0),ht([i.property()],Te.prototype,"variant",void 0),Te=ht([a.customElement("ft-typography")],Te);
|
|
284
|
+
/**
|
|
285
|
+
* @license
|
|
286
|
+
* Copyright 2021 Google LLC
|
|
287
|
+
* SPDX-LIcense-Identifier: Apache-2.0
|
|
288
|
+
*/
|
|
289
|
+
const _e=e.css`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
290
|
+
/**
|
|
291
|
+
* @license
|
|
292
|
+
* Copyright 2018 Google LLC
|
|
293
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
294
|
+
*/;let Ie=class extends e.LitElement{render(){return e.html`<span><slot></slot></span>`}};Ie.styles=[_e],Ie=c([i.customElement("mwc-icon")],Ie);var Ce=function(t,e,i,r){for(var a,o=arguments.length,n=o<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,p=t.length-1;p>=0;p--)(a=t[p])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);return o>3&&n&&Object.defineProperty(e,i,n),n};const Ee=a.FtCssVariable.extend("--ft-chip-color",a.designSystemVariables.colorOnSurface),je={backgroundColor:a.FtCssVariable.extend("--ft-chip-background-color",a.designSystemVariables.colorSurface),color:Ee,fontSize:a.FtCssVariable.extend("--ft-chip-font-size",qt.fontSize),iconSize:a.FtCssVariable.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:a.FtCssVariable.extend("--ft-chip-ripple-color",Ee),horizontalPadding:a.FtCssVariable.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:a.FtCssVariable.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:a.FtCssVariable.external(a.designSystemVariables.colorOutline,"Design system"),opacityDisabled:a.FtCssVariable.external(a.designSystemVariables.colorOpacityDisabled,"Design system")},De=a.FtCssVariable.extend("--ft-chip-highlighted-color",a.FtCssVariable.extend("--ft-chip-color",a.designSystemVariables.colorOnPrimary)),Fe={backgroundColor:a.FtCssVariable.extend("--ft-chip-highlighted-background-color",a.FtCssVariable.extend("--ft-chip-background-color",a.designSystemVariables.colorPrimary)),color:De,rippleColor:a.FtCssVariable.extend("--ft-chip-highlighted-ripple-color",De)},Be={horizontalPadding:a.FtCssVariable.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),verticalPadding:a.FtCssVariable.create("--ft-chip-dense-vertical-padding","SIZE","4px")};class Re extends CustomEvent{constructor(){super("icon-click")}}t.FtChip=class extends a.FtLitElement{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return[a.noTextSelect,e.css`
|
|
295
|
+
:host {
|
|
296
|
+
display: inline-block;
|
|
297
|
+
max-width: 100%;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.ft-chip {
|
|
301
|
+
position: relative;
|
|
302
|
+
display: flex;
|
|
303
|
+
justify-content: center;
|
|
304
|
+
align-items: center;
|
|
305
|
+
width: 100%;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
box-sizing: border-box;
|
|
308
|
+
|
|
309
|
+
--ft-chip-internal-font-size: ${je.fontSize};
|
|
310
|
+
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
311
|
+
--mdc-icon-size: ${je.iconSize};
|
|
312
|
+
--ft-chip-internal-vertical-padding: ${je.verticalPadding};
|
|
313
|
+
--ft-chip-internal-horizontal-padding: ${je.horizontalPadding};
|
|
314
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
315
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), var(--mdc-icon-size));
|
|
316
|
+
|
|
317
|
+
border: 1px solid ${je.colorOutline};
|
|
318
|
+
color: ${je.color};
|
|
319
|
+
${a.setVariable(O.color,je.rippleColor)};
|
|
320
|
+
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
321
|
+
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
322
|
+
background-color: ${je.backgroundColor};
|
|
323
|
+
line-height: var(--ft-chip-internal-content-height);
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
.ft-chip--dense {
|
|
327
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
328
|
+
--ft-chip-internal-vertical-padding: ${Be.verticalPadding};
|
|
329
|
+
--ft-chip-internal-horizontal-padding: ${Be.horizontalPadding};
|
|
330
|
+
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.ft-chip--no-content {
|
|
334
|
+
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.ft-chip--disabled {
|
|
338
|
+
cursor: default;
|
|
339
|
+
pointer-events: none;
|
|
340
|
+
filter: grayscale(1);
|
|
341
|
+
opacity: ${je.opacityDisabled};
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.ft-chip--highlighted {
|
|
345
|
+
border: none;
|
|
346
|
+
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
347
|
+
background-color: ${Fe.backgroundColor};
|
|
348
|
+
${a.setVariable(O.color,Fe.rippleColor)};
|
|
349
|
+
color: ${Fe.color};
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.ft-chip--clickable {
|
|
353
|
+
cursor: pointer;
|
|
354
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
.ft-chip:focus {
|
|
358
|
+
outline: none;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
.ft-chip--icon-container {
|
|
362
|
+
display: inline-flex;
|
|
363
|
+
position: relative;
|
|
364
|
+
overflow: hidden;
|
|
365
|
+
border-radius: 100%;
|
|
366
|
+
justify-content: center;
|
|
367
|
+
align-items: center;
|
|
368
|
+
flex-shrink: 0;
|
|
369
|
+
|
|
370
|
+
padding: var(--ft-chip-internal-icon-padding);
|
|
371
|
+
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.ft-chip--label {
|
|
375
|
+
vertical-align: bottom;
|
|
376
|
+
display: block;
|
|
377
|
+
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
378
|
+
${a.setVariable(qt.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
379
|
+
${a.setVariable(qt.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ft-chip--safari-fix .ft-chip--label {
|
|
383
|
+
margin-right: 0;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
387
|
+
overflow: hidden;
|
|
388
|
+
white-space: nowrap;
|
|
389
|
+
text-overflow: ellipsis;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
393
|
+
content: "\\0000a0";
|
|
394
|
+
display: inline-block;
|
|
395
|
+
width: 0;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.ft-chip--no-content .ft-chip--label {
|
|
399
|
+
display: none;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
403
|
+
width: var(--ft-chip-internal-content-height);
|
|
404
|
+
height: var(--ft-chip-internal-content-height);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.ft-chip--icon-container:focus {
|
|
408
|
+
outline: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
412
|
+
order: -1;
|
|
413
|
+
}
|
|
414
|
+
`]}getTemplate(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":a.isSafari};return e.html`
|
|
415
|
+
<div class="${r.classMap(t)}"
|
|
416
|
+
aria-label="${this.getLabel()}"
|
|
417
|
+
tabindex="${this.interactionsOnChip?0:-1}"
|
|
418
|
+
@keyup=${this.onKeyUp}>
|
|
419
|
+
<ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
|
|
420
|
+
<ft-typography variant="body2" element="span" class="ft-chip--label">
|
|
421
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
422
|
+
</ft-typography>
|
|
423
|
+
${this.internalIcon?this.renderIcon():null}
|
|
424
|
+
</div>
|
|
425
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return e.html`
|
|
426
|
+
<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
|
|
427
|
+
tabindex="${this.interactionsOnIcon?0:-1}"
|
|
428
|
+
@click=${this.onIconClick}
|
|
429
|
+
@keyup=${this.onIconKeyUp}>
|
|
430
|
+
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
431
|
+
<mwc-icon>${this.internalIcon}</mwc-icon>
|
|
432
|
+
</div>
|
|
433
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new Re))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new Re))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}},t.FtChip.elementDefinitions={"ft-ripple":T,"ft-typography":Te,"mwc-icon":Ie},Ce([i.property({type:Boolean})],t.FtChip.prototype,"highlighted",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"removable",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"disabled",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"clickable",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"iconClickable",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"dense",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"multiLine",void 0),Ce([i.property({type:String})],t.FtChip.prototype,"label",void 0),Ce([i.property({type:String})],t.FtChip.prototype,"icon",void 0),Ce([i.property({type:Boolean})],t.FtChip.prototype,"trailingIcon",void 0),Ce([i.query("ft-typography slot")],t.FtChip.prototype,"slottedContent",void 0),t.FtChip=Ce([a.customElement("ft-chip")],t.FtChip),t.FtChipCssVariables=je,t.FtChipDenseCssVariables=Be,t.FtChipHighlightedCssVariables=Fe,t.IconClickEvent=Re,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.wcUtils,ftGlobals.litStyleMap);
|
package/build/ft-chip.min.js
CHANGED
|
@@ -69,7 +69,21 @@ const st=1,ct=t=>(...e)=>({_$litDirective$:t,values:e});class pt{constructor(t){
|
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2021 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/class mt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return s(o,this.constructor.elementStyles),o}}}(Q)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),T
|
|
72
|
+
*/class mt extends(function(t){return class extends t{createRenderRoot(){const t=this.constructor,{registry:e,elementDefinitions:i,shadowRootOptions:r}=t;i&&!e&&(t.registry=new CustomElementRegistry,Object.entries(i).forEach((([e,i])=>t.registry.define(e,i))));const o=this.renderOptions.creationScope=this.attachShadow({...r,customElements:t.registry});return s(o,this.constructor.elementStyles),o}}}(Q)){constructor(){super(),this.constructorName=this.constructor.name,this.proto=this.constructor.prototype}getStyles(){return[]}getTemplate(){return null}render(){let t=this.getStyles();return Array.isArray(t)||(t=[t]),T`
|
|
73
|
+
${t.map((t=>T`
|
|
74
|
+
<style>${t}</style>
|
|
75
|
+
`))}
|
|
76
|
+
${this.getTemplate()}
|
|
77
|
+
`}adoptedCallback(){Object.getPrototypeOf(this)!==this.constructorName&&Object.setPrototypeOf(this,this.proto)}updated(t){super.updated(t),setTimeout((()=>this.contentAvailableCallback(t)),0)}contentAvailableCallback(t){}}const yt=a`
|
|
78
|
+
.ft-no-text-select {
|
|
79
|
+
-webkit-touch-callout: none;
|
|
80
|
+
-webkit-user-select: none;
|
|
81
|
+
-khtml-user-select: none;
|
|
82
|
+
-moz-user-select: none;
|
|
83
|
+
-ms-user-select: none;
|
|
84
|
+
user-select: none;
|
|
85
|
+
}
|
|
86
|
+
`;var vt,gt,bt;const wt=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(bt=null===(gt=null===(vt=window.safari)||void 0===vt?void 0:vt.pushNotification)||void 0===gt?void 0:gt.toString())&&void 0!==bt?bt:"");
|
|
73
87
|
/*! *****************************************************************************
|
|
74
88
|
Copyright (c) Microsoft Corporation.
|
|
75
89
|
|
|
@@ -195,13 +209,15 @@ const _t=ct(class extends pt{constructor(t){var e;if(super(t),t.type!==st||"styl
|
|
|
195
209
|
* @license
|
|
196
210
|
* Copyright 2018 Google LLC
|
|
197
211
|
* SPDX-License-Identifier: Apache-2.0
|
|
198
|
-
*/class Bt extends Et{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=jt}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return T
|
|
212
|
+
*/class Bt extends Et{constructor(){super(...arguments),this.primary=!1,this.accent=!1,this.unbounded=!1,this.disabled=!1,this.activated=!1,this.selected=!1,this.internalUseStateLayerCustomProperties=!1,this.hovering=!1,this.bgFocused=!1,this.fgActivation=!1,this.fgDeactivation=!1,this.fgScale="",this.fgSize="",this.translateStart="",this.translateEnd="",this.leftPos="",this.topPos="",this.mdcFoundationClass=jt}get isActive(){return t=this.parentElement||this,e=":active",(t.matches||t.webkitMatchesSelector||t.msMatchesSelector).call(t,e);var t,e}createAdapter(){return{browserSupportsCssVars:()=>!0,isUnbounded:()=>this.unbounded,isSurfaceActive:()=>this.isActive,isSurfaceDisabled:()=>this.disabled,addClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!0;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!0;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!0}},removeClass:t=>{switch(t){case"mdc-ripple-upgraded--background-focused":this.bgFocused=!1;break;case"mdc-ripple-upgraded--foreground-activation":this.fgActivation=!1;break;case"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation=!1}},containsEventTarget:()=>!0,registerInteractionHandler:()=>{},deregisterInteractionHandler:()=>{},registerDocumentInteractionHandler:()=>{},deregisterDocumentInteractionHandler:()=>{},registerResizeHandler:()=>{},deregisterResizeHandler:()=>{},updateCssVariable:(t,e)=>{switch(t){case"--mdc-ripple-fg-scale":this.fgScale=e;break;case"--mdc-ripple-fg-size":this.fgSize=e;break;case"--mdc-ripple-fg-translate-end":this.translateEnd=e;break;case"--mdc-ripple-fg-translate-start":this.translateStart=e;break;case"--mdc-ripple-left":this.leftPos=e;break;case"--mdc-ripple-top":this.topPos=e}},computeBoundingRect:()=>(this.parentElement||this).getBoundingClientRect(),getWindowPageOffset:()=>({x:window.pageXOffset,y:window.pageYOffset})}}startPress(t){this.waitForFoundation((()=>{this.mdcFoundation.activate(t)}))}endPress(){this.waitForFoundation((()=>{this.mdcFoundation.deactivate()}))}startFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleFocus()}))}endFocus(){this.waitForFoundation((()=>{this.mdcFoundation.handleBlur()}))}startHover(){this.hovering=!0}endHover(){this.hovering=!1}waitForFoundation(t){this.mdcFoundation?t():this.updateComplete.then(t)}update(t){t.has("disabled")&&this.disabled&&this.endHover(),super.update(t)}render(){const t=this.activated&&(this.primary||!this.accent),e=this.selected&&(this.primary||!this.accent),i={"mdc-ripple-surface--accent":this.accent,"mdc-ripple-surface--primary--activated":t,"mdc-ripple-surface--accent--activated":this.accent&&this.activated,"mdc-ripple-surface--primary--selected":e,"mdc-ripple-surface--accent--selected":this.accent&&this.selected,"mdc-ripple-surface--disabled":this.disabled,"mdc-ripple-surface--hover":this.hovering,"mdc-ripple-surface--primary":this.primary,"mdc-ripple-surface--selected":this.selected,"mdc-ripple-upgraded--background-focused":this.bgFocused,"mdc-ripple-upgraded--foreground-activation":this.fgActivation,"mdc-ripple-upgraded--foreground-deactivation":this.fgDeactivation,"mdc-ripple-upgraded--unbounded":this.unbounded,"mdc-ripple-surface--internal-use-state-layer-custom-properties":this.internalUseStateLayerCustomProperties};return T`
|
|
213
|
+
<div class="mdc-ripple-surface mdc-ripple-upgraded ${lt(i)}"
|
|
214
|
+
style="${_t({"--mdc-ripple-fg-scale":this.fgScale,"--mdc-ripple-fg-size":this.fgSize,"--mdc-ripple-fg-translate-end":this.translateEnd,"--mdc-ripple-fg-translate-start":this.translateStart,"--mdc-ripple-left":this.leftPos,"--mdc-ripple-top":this.topPos})}"></div>`}}$t([nt(".mdc-ripple-surface")],Bt.prototype,"mdcRoot",void 0),$t([rt({type:Boolean})],Bt.prototype,"primary",void 0),$t([rt({type:Boolean})],Bt.prototype,"accent",void 0),$t([rt({type:Boolean})],Bt.prototype,"unbounded",void 0),$t([rt({type:Boolean})],Bt.prototype,"disabled",void 0),$t([rt({type:Boolean})],Bt.prototype,"activated",void 0),$t([rt({type:Boolean})],Bt.prototype,"selected",void 0),$t([rt({type:Boolean})],Bt.prototype,"internalUseStateLayerCustomProperties",void 0),$t([ot()],Bt.prototype,"hovering",void 0),$t([ot()],Bt.prototype,"bgFocused",void 0),$t([ot()],Bt.prototype,"fgActivation",void 0),$t([ot()],Bt.prototype,"fgDeactivation",void 0),$t([ot()],Bt.prototype,"fgScale",void 0),$t([ot()],Bt.prototype,"fgSize",void 0),$t([ot()],Bt.prototype,"translateStart",void 0),$t([ot()],Bt.prototype,"translateEnd",void 0),$t([ot()],Bt.prototype,"leftPos",void 0),$t([ot()],Bt.prototype,"topPos",void 0);
|
|
199
215
|
/**
|
|
200
216
|
* @license
|
|
201
217
|
* Copyright 2021 Google LLC
|
|
202
218
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
203
219
|
*/
|
|
204
|
-
const It=a`.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity;position:relative;outline:0;overflow:hidden}.mdc-ripple-surface::after,.mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.mdc-ripple-surface::after,.mdc-ripple-surface::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-upgraded--unbounded::after,.mdc-ripple-upgraded--unbounded::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.mdc-ripple-surface::after,.mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,#000)}.mdc-ripple-surface.mdc-ripple-surface--hover::before,.mdc-ripple-surface:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(.4,0,.2,1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity,0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity,0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::after,.mdc-ripple-surface--primary::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--primary--activated::after,.mdc-ripple-surface--primary--activated::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--primary--selected::after,.mdc-ripple-surface--primary--selected::before{background-color:#6200ee;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#6200ee))}.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--primary--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::after,.mdc-ripple-surface--accent::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity,.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity,.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity,.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:.12;opacity:var(--mdc-ripple-activated-opacity,.12)}.mdc-ripple-surface--accent--activated::after,.mdc-ripple-surface--accent--activated::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--activated:hover::before{opacity:.16;opacity:var(--mdc-ripple-hover-opacity,.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity,.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity,.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:.08;opacity:var(--mdc-ripple-selected-opacity,.08)}.mdc-ripple-surface--accent--selected::after,.mdc-ripple-surface--accent--selected::before{background-color:#018786;background-color:var(--mdc-ripple-color,var(--mdc-theme-secondary,#018786))}.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before,.mdc-ripple-surface--accent--selected:hover::before{opacity:.12;opacity:var(--mdc-ripple-hover-opacity,.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-focus-opacity,.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.2;opacity:var(--mdc-ripple-press-opacity,.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::after,.mdc-ripple-surface--internal-use-state-layer-custom-properties::before{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color,#000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-state-layer-opacity,.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-state-layer-opacity,.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity,.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
220
|
+
const It=a`.mdc-ripple-surface{--mdc-ripple-fg-size: 0;--mdc-ripple-left: 0;--mdc-ripple-top: 0;--mdc-ripple-fg-scale: 1;--mdc-ripple-fg-translate-end: 0;--mdc-ripple-fg-translate-start: 0;-webkit-tap-highlight-color:rgba(0,0,0,0);will-change:transform,opacity;position:relative;outline:none;overflow:hidden}.mdc-ripple-surface::before,.mdc-ripple-surface::after{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.mdc-ripple-surface::before{transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index, 1)}.mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index, 0)}.mdc-ripple-surface.mdc-ripple-upgraded::before{transform:scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface.mdc-ripple-upgraded::after{top:0;left:0;transform:scale(0);transform-origin:center center}.mdc-ripple-surface.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top, 0);left:var(--mdc-ripple-left, 0)}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-activation::after{animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.mdc-ripple-surface.mdc-ripple-upgraded--foreground-deactivation::after{animation:mdc-ripple-fg-opacity-out 150ms;transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}.mdc-ripple-surface::before,.mdc-ripple-surface::after{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.mdc-ripple-surface.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded],.mdc-ripple-upgraded--unbounded{overflow:visible}.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded]::after,.mdc-ripple-upgraded--unbounded::before,.mdc-ripple-upgraded--unbounded::after{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::before,.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::before,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{top:var(--mdc-ripple-top, calc(50% - 50%));left:var(--mdc-ripple-left, calc(50% - 50%));width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface[data-mdc-ripple-is-unbounded].mdc-ripple-upgraded::after,.mdc-ripple-upgraded--unbounded.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size, 100%);height:var(--mdc-ripple-fg-size, 100%)}.mdc-ripple-surface::before,.mdc-ripple-surface::after{background-color:#000;background-color:var(--mdc-ripple-color, #000)}.mdc-ripple-surface:hover::before,.mdc-ripple-surface.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}@keyframes mdc-ripple-fg-radius-in{from{animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transform:translate(var(--mdc-ripple-fg-translate-start, 0)) scale(1)}to{transform:translate(var(--mdc-ripple-fg-translate-end, 0)) scale(var(--mdc-ripple-fg-scale, 1))}}@keyframes mdc-ripple-fg-opacity-in{from{animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-out{from{animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}:host{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;display:block}:host .mdc-ripple-surface{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none;will-change:unset}.mdc-ripple-surface--primary::before,.mdc-ripple-surface--primary::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary:hover::before,.mdc-ripple-surface--primary.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--primary.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--primary--activated::before,.mdc-ripple-surface--primary--activated::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--activated:hover::before,.mdc-ripple-surface--primary--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--primary--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--primary--selected::before,.mdc-ripple-surface--primary--selected::after{background-color:#6200ee;background-color:var(--mdc-ripple-color, var(--mdc-theme-primary, #6200ee))}.mdc-ripple-surface--primary--selected:hover::before,.mdc-ripple-surface--primary--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--primary--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--primary--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent::before,.mdc-ripple-surface--accent::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent:hover::before,.mdc-ripple-surface--accent.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-opacity, 0.04)}.mdc-ripple-surface--accent.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-opacity, 0.12)}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before{opacity:0.12;opacity:var(--mdc-ripple-activated-opacity, 0.12)}.mdc-ripple-surface--accent--activated::before,.mdc-ripple-surface--accent--activated::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--activated:hover::before,.mdc-ripple-surface--accent--activated.mdc-ripple-surface--hover::before{opacity:0.16;opacity:var(--mdc-ripple-hover-opacity, 0.16)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-focus-opacity, 0.24)}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--activated:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.24;opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--activated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.mdc-ripple-surface--accent--selected::before{opacity:0.08;opacity:var(--mdc-ripple-selected-opacity, 0.08)}.mdc-ripple-surface--accent--selected::before,.mdc-ripple-surface--accent--selected::after{background-color:#018786;background-color:var(--mdc-ripple-color, var(--mdc-theme-secondary, #018786))}.mdc-ripple-surface--accent--selected:hover::before,.mdc-ripple-surface--accent--selected.mdc-ripple-surface--hover::before{opacity:0.12;opacity:var(--mdc-ripple-hover-opacity, 0.12)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-focus-opacity, 0.2)}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--accent--selected:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.2;opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--accent--selected.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.2)}.mdc-ripple-surface--disabled{opacity:0}.mdc-ripple-surface--internal-use-state-layer-custom-properties::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties::after{background-color:#000;background-color:var(--mdc-ripple-hover-state-layer-color, #000)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:hover::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-surface--hover::before{opacity:0.04;opacity:var(--mdc-ripple-hover-state-layer-opacity, 0.04)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded--background-focused::before,.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):focus::before{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-focus-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded)::after{transition:opacity 150ms linear}.mdc-ripple-surface--internal-use-state-layer-custom-properties:not(.mdc-ripple-upgraded):active::after{transition-duration:75ms;opacity:0.12;opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}.mdc-ripple-surface--internal-use-state-layer-custom-properties.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-pressed-state-layer-opacity, 0.12)}`
|
|
205
221
|
/**
|
|
206
222
|
* @license
|
|
207
223
|
* Copyright 2018 Google LLC
|
|
@@ -212,7 +228,34 @@ const It=a`.mdc-ripple-surface{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-
|
|
|
212
228
|
* Copyright 2020 Google LLC
|
|
213
229
|
* SPDX-License-Identifier: Apache-2.0
|
|
214
230
|
*/
|
|
215
|
-
class Dt{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}var Lt=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Ht={color:ht.extend("--ft-ripple-color",ft.colorContent),primaryColor:ht.extend("--ft-ripple-primary-color",ht.extend("--ft-ripple-color",ft.colorPrimary)),secondaryColor:ht.extend("--ft-ripple-secondary-color",ht.extend("--ft-ripple-color",ft.colorSecondary)),opacityContentOnSurfacePressed:ht.external(ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ht.external(ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ht.external(ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ht.external(ft.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:ht.external(ft.opacityContentOnSurfaceDragged,"Design system")};let Wt=class extends mt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return a
|
|
231
|
+
class Dt{constructor(t){this.startPress=e=>{t().then((t=>{t&&t.startPress(e)}))},this.endPress=()=>{t().then((t=>{t&&t.endPress()}))},this.startFocus=()=>{t().then((t=>{t&&t.startFocus()}))},this.endFocus=()=>{t().then((t=>{t&&t.endFocus()}))},this.startHover=()=>{t().then((t=>{t&&t.startHover()}))},this.endHover=()=>{t().then((t=>{t&&t.endHover()}))}}}var Lt=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const Ht={color:ht.extend("--ft-ripple-color",ft.colorContent),primaryColor:ht.extend("--ft-ripple-primary-color",ht.extend("--ft-ripple-color",ft.colorPrimary)),secondaryColor:ht.extend("--ft-ripple-secondary-color",ht.extend("--ft-ripple-color",ft.colorSecondary)),opacityContentOnSurfacePressed:ht.external(ft.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:ht.external(ft.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:ht.external(ft.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:ht.external(ft.opacityContentOnSurfaceSelected,"Design system"),opacityContentOnSurfaceDragged:ht.external(ft.opacityContentOnSurfaceDragged,"Design system")};let Wt=class extends mt{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1}getStyles(){return a`
|
|
232
|
+
:host {
|
|
233
|
+
display: contents;
|
|
234
|
+
|
|
235
|
+
--mdc-ripple-color: ${Ht.color};
|
|
236
|
+
--mdc-ripple-press-opacity: ${Ht.opacityContentOnSurfacePressed};
|
|
237
|
+
--mdc-ripple-hover-opacity: ${Ht.opacityContentOnSurfaceHover};
|
|
238
|
+
--mdc-ripple-focus-opacity: ${Ht.opacityContentOnSurfaceFocused};
|
|
239
|
+
--mdc-ripple-selected-opacity: ${Ht.opacityContentOnSurfaceSelected};
|
|
240
|
+
--mdc-ripple-activated-opacity: ${Ht.opacityContentOnSurfaceDragged};
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
mwc-ripple.ft-ripple--secondary {
|
|
244
|
+
--mdc-ripple-color: ${Ht.secondaryColor};
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
mwc-ripple.ft-ripple--primary {
|
|
248
|
+
--mdc-ripple-color: ${Ht.primaryColor};
|
|
249
|
+
}
|
|
250
|
+
`}getTemplate(){return T`
|
|
251
|
+
<mwc-ripple
|
|
252
|
+
class="${this.primary?"ft-ripple--primary":this.secondary?"ft-ripple--secondary":""}"
|
|
253
|
+
?unbounded=${this.unbounded}
|
|
254
|
+
?activated=${this.activated}
|
|
255
|
+
?selected=${this.selected}
|
|
256
|
+
?disabled=${this.disabled}
|
|
257
|
+
></mwc-ripple>
|
|
258
|
+
`}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple()}endRipple(){var t,e,i;null===(t=this.rippleHandlers)||void 0===t||t.endHover(),null===(e=this.rippleHandlers)||void 0===e||e.endFocus(),null===(i=this.rippleHandlers)||void 0===i||i.endPress()}connectedCallback(){var t;super.connectedCallback();const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentNode;if(e){const t=new Dt((async()=>this.mwcRipple)),i=(...e)=>i=>{e.forEach((e=>window.addEventListener(e,t.endPress,{once:!0}))),t.startPress(i)},r=i("mouseup"),o=i("touchend","touchcancel"),n=t=>{["Enter"," "].includes(t.key)&&i("keyup")()};e.addEventListener("mouseenter",t.startHover),e.addEventListener("mouseleave",t.endHover),e.addEventListener("mousedown",r),e.addEventListener("touchstart",o),e.addEventListener("keydown",n),e.addEventListener("focus",t.startFocus),e.addEventListener("blur",t.endFocus),this.onDisconnect=()=>{e.removeEventListener("mouseenter",t.startHover),e.removeEventListener("mouseleave",t.endHover),e.removeEventListener("mousedown",r),e.removeEventListener("touchstart",o),e.removeEventListener("keydown",n),e.removeEventListener("focus",t.startFocus),e.removeEventListener("blur",t.endFocus)},this.rippleHandlers=t}}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.endRipple()}};Wt.elementDefinitions={"mwc-ripple":Pt},Lt([rt({type:Boolean})],Wt.prototype,"primary",void 0),Lt([rt({type:Boolean})],Wt.prototype,"secondary",void 0),Lt([rt({type:Boolean})],Wt.prototype,"unbounded",void 0),Lt([rt({type:Boolean})],Wt.prototype,"activated",void 0),Lt([rt({type:Boolean})],Wt.prototype,"selected",void 0),Lt([rt({type:Boolean})],Wt.prototype,"disabled",void 0),Lt([nt("mwc-ripple")],Wt.prototype,"mwcRipple",void 0),Wt=Lt([dt("ft-ripple")],Wt);
|
|
216
259
|
/**
|
|
217
260
|
* @license
|
|
218
261
|
* Copyright 2020 Google LLC
|
|
@@ -309,7 +352,11 @@ const Vt=t=>({_$litStatic$:t}),Kt=new Map,Zt=(t=>(e,...i)=>{var r;const o=i.leng
|
|
|
309
352
|
line-height: ${Ye};
|
|
310
353
|
text-transform: ${Qe};
|
|
311
354
|
}
|
|
312
|
-
`;let li=class extends mt{constructor(){super(...arguments),this.variant=Gt.body1}getStyles(){return[ti,ei,ii,ri,oi,ni,ai,si,ci,pi
|
|
355
|
+
`;let li=class extends mt{constructor(){super(...arguments),this.variant=Gt.body1}getStyles(){return[ti,ei,ii,ri,oi,ni,ai,si,ci,pi,a`
|
|
356
|
+
.ft-typography {
|
|
357
|
+
vertical-align: inherit;
|
|
358
|
+
}
|
|
359
|
+
`]}getTemplate(){return this.element?Zt`
|
|
313
360
|
<${Vt(this.element)}
|
|
314
361
|
class="ft-typography ft-typography--${this.variant}">
|
|
315
362
|
<slot></slot>
|
|
@@ -322,9 +369,148 @@ const Vt=t=>({_$litStatic$:t}),Kt=new Map,Zt=(t=>(e,...i)=>{var r;const o=i.leng
|
|
|
322
369
|
* Copyright 2021 Google LLC
|
|
323
370
|
* SPDX-LIcense-Identifier: Apache-2.0
|
|
324
371
|
*/
|
|
325
|
-
const di=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:
|
|
372
|
+
const di=a`:host{font-family:var(--mdc-icon-font, "Material Icons");font-weight:normal;font-style:normal;font-size:var(--mdc-icon-size, 24px);line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-moz-osx-font-smoothing:grayscale;font-feature-settings:"liga"}`
|
|
326
373
|
/**
|
|
327
374
|
* @license
|
|
328
375
|
* Copyright 2018 Google LLC
|
|
329
376
|
* SPDX-License-Identifier: Apache-2.0
|
|
330
|
-
*/;let hi=class extends Q{render(){return T`<span><slot></slot></span>`}};hi.styles=[di],hi=$t([et("mwc-icon")],hi);var ui=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const fi=ht.extend("--ft-chip-color",ft.colorOnSurface),mi={backgroundColor:ht.extend("--ft-chip-background-color",ft.colorSurface),color:fi,fontSize:ht.extend("--ft-chip-font-size",Ne.fontSize),iconSize:ht.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ht.extend("--ft-chip-ripple-color",fi),horizontalPadding:ht.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ht.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ht.external(ft.colorOutline,"Design system"),opacityDisabled:ht.external(ft.colorOpacityDisabled,"Design system")},yi=ht.extend("--ft-chip-highlighted-color",ht.extend("--ft-chip-color",ft.colorOnPrimary)),vi={backgroundColor:ht.extend("--ft-chip-highlighted-background-color",ht.extend("--ft-chip-background-color",ft.colorPrimary)),color:yi,rippleColor:ht.extend("--ft-chip-highlighted-ripple-color",yi)},gi={horizontalPadding:ht.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),verticalPadding:ht.create("--ft-chip-dense-vertical-padding","SIZE","4px")};class bi extends CustomEvent{constructor(){super("icon-click")}}t.FtChip=class extends mt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return[yt,a
|
|
377
|
+
*/;let hi=class extends Q{render(){return T`<span><slot></slot></span>`}};hi.styles=[di],hi=$t([et("mwc-icon")],hi);var ui=function(t,e,i,r){for(var o,n=arguments.length,a=n<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,i):r,s=t.length-1;s>=0;s--)(o=t[s])&&(a=(n<3?o(a):n>3?o(e,i,a):o(e,i))||a);return n>3&&a&&Object.defineProperty(e,i,a),a};const fi=ht.extend("--ft-chip-color",ft.colorOnSurface),mi={backgroundColor:ht.extend("--ft-chip-background-color",ft.colorSurface),color:fi,fontSize:ht.extend("--ft-chip-font-size",Ne.fontSize),iconSize:ht.create("--ft-chip-icon-size","SIZE","18px"),rippleColor:ht.extend("--ft-chip-ripple-color",fi),horizontalPadding:ht.create("--ft-chip-horizontal-padding","SIZE","6px"),verticalPadding:ht.create("--ft-chip-vertical-padding","SIZE","6px"),colorOutline:ht.external(ft.colorOutline,"Design system"),opacityDisabled:ht.external(ft.colorOpacityDisabled,"Design system")},yi=ht.extend("--ft-chip-highlighted-color",ht.extend("--ft-chip-color",ft.colorOnPrimary)),vi={backgroundColor:ht.extend("--ft-chip-highlighted-background-color",ht.extend("--ft-chip-background-color",ft.colorPrimary)),color:yi,rippleColor:ht.extend("--ft-chip-highlighted-ripple-color",yi)},gi={horizontalPadding:ht.create("--ft-chip-dense-horizontal-padding","SIZE","4px"),verticalPadding:ht.create("--ft-chip-dense-vertical-padding","SIZE","4px")};class bi extends CustomEvent{constructor(){super("icon-click")}}t.FtChip=class extends mt{constructor(){super(...arguments),this.highlighted=!1,this.removable=!1,this.disabled=!1,this.clickable=!1,this.iconClickable=!1,this.dense=!1,this.multiLine=!1,this.label="",this.icon=void 0,this.trailingIcon=!1}getStyles(){return[yt,a`
|
|
378
|
+
:host {
|
|
379
|
+
display: inline-block;
|
|
380
|
+
max-width: 100%;
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
.ft-chip {
|
|
384
|
+
position: relative;
|
|
385
|
+
display: flex;
|
|
386
|
+
justify-content: center;
|
|
387
|
+
align-items: center;
|
|
388
|
+
width: 100%;
|
|
389
|
+
overflow: hidden;
|
|
390
|
+
box-sizing: border-box;
|
|
391
|
+
|
|
392
|
+
--ft-chip-internal-font-size: ${mi.fontSize};
|
|
393
|
+
--ft-chip-internal-line-height: max(20px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
394
|
+
--mdc-icon-size: ${mi.iconSize};
|
|
395
|
+
--ft-chip-internal-vertical-padding: ${mi.verticalPadding};
|
|
396
|
+
--ft-chip-internal-horizontal-padding: ${mi.horizontalPadding};
|
|
397
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
398
|
+
--ft-chip-internal-content-height: max(var(--ft-chip-internal-line-height), var(--mdc-icon-size));
|
|
399
|
+
|
|
400
|
+
border: 1px solid ${mi.colorOutline};
|
|
401
|
+
color: ${mi.color};
|
|
402
|
+
${ut(Ht.color,mi.rippleColor)};
|
|
403
|
+
border-radius: calc(var(--ft-chip-internal-content-height) / 2 + var(--ft-chip-internal-vertical-padding));
|
|
404
|
+
padding: calc(var(--ft-chip-internal-vertical-padding) - 1px) calc(var(--ft-chip-internal-horizontal-padding) - 1px);
|
|
405
|
+
background-color: ${mi.backgroundColor};
|
|
406
|
+
line-height: var(--ft-chip-internal-content-height);
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.ft-chip--dense {
|
|
410
|
+
--ft-chip-internal-icon-padding: 3px;
|
|
411
|
+
--ft-chip-internal-vertical-padding: ${gi.verticalPadding};
|
|
412
|
+
--ft-chip-internal-horizontal-padding: ${gi.horizontalPadding};
|
|
413
|
+
--ft-chip-internal-line-height: max(16px, calc(var(--ft-chip-internal-font-size) + 2px));
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.ft-chip--no-content {
|
|
417
|
+
--ft-chip-internal-horizontal-padding: var(--ft-chip-horizontal-padding, var(--ft-chip-internal-vertical-padding));
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
.ft-chip--disabled {
|
|
421
|
+
cursor: default;
|
|
422
|
+
pointer-events: none;
|
|
423
|
+
filter: grayscale(1);
|
|
424
|
+
opacity: ${mi.opacityDisabled};
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.ft-chip--highlighted {
|
|
428
|
+
border: none;
|
|
429
|
+
padding: var(--ft-chip-internal-vertical-padding) var(--ft-chip-internal-horizontal-padding);
|
|
430
|
+
background-color: ${vi.backgroundColor};
|
|
431
|
+
${ut(Ht.color,vi.rippleColor)};
|
|
432
|
+
color: ${vi.color};
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.ft-chip--clickable {
|
|
436
|
+
cursor: pointer;
|
|
437
|
+
-webkit-mask-image: radial-gradient(white, black);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.ft-chip:focus {
|
|
441
|
+
outline: none;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
.ft-chip--icon-container {
|
|
445
|
+
display: inline-flex;
|
|
446
|
+
position: relative;
|
|
447
|
+
overflow: hidden;
|
|
448
|
+
border-radius: 100%;
|
|
449
|
+
justify-content: center;
|
|
450
|
+
align-items: center;
|
|
451
|
+
flex-shrink: 0;
|
|
452
|
+
|
|
453
|
+
padding: var(--ft-chip-internal-icon-padding);
|
|
454
|
+
margin: calc((-1) * var(--ft-chip-internal-icon-padding));
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.ft-chip--label {
|
|
458
|
+
vertical-align: bottom;
|
|
459
|
+
display: block;
|
|
460
|
+
margin: 0 var(--ft-chip-internal-horizontal-padding);
|
|
461
|
+
${ut(Ne.fontSize,"var(--ft-chip-internal-font-size)")};
|
|
462
|
+
${ut(Ne.lineHeight,"var(--ft-chip-internal-content-height)")};
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
.ft-chip--safari-fix .ft-chip--label {
|
|
466
|
+
margin-right: 0;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
.ft-chip:not(.ft-chip--multi-line) .ft-chip--label {
|
|
470
|
+
overflow: hidden;
|
|
471
|
+
white-space: nowrap;
|
|
472
|
+
text-overflow: ellipsis;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.ft-chip--safari-fix:not(.ft-chip--multi-line) .ft-chip--label:after {
|
|
476
|
+
content: "\\0000a0";
|
|
477
|
+
display: inline-block;
|
|
478
|
+
width: 0;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.ft-chip--no-content .ft-chip--label {
|
|
482
|
+
display: none;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
.ft-chip--no-content .ft-chip--label + .ft-chip--icon-container {
|
|
486
|
+
width: var(--ft-chip-internal-content-height);
|
|
487
|
+
height: var(--ft-chip-internal-content-height);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.ft-chip--icon-container:focus {
|
|
491
|
+
outline: none;
|
|
492
|
+
}
|
|
493
|
+
|
|
494
|
+
.ft-chip:not(.ft-chip--trailing-icon) .ft-chip--icon-container {
|
|
495
|
+
order: -1;
|
|
496
|
+
}
|
|
497
|
+
`]}getTemplate(){const t={"ft-chip":!0,"ft-chip--highlighted":this.highlighted,"ft-chip--disabled":this.disabled,"ft-chip--clickable":this.interactionsOnChip,"ft-chip--trailing-icon":this.trailingIcon||this.removable,"ft-chip--no-content":!this.hasTextContent(),"ft-chip--dense":this.dense,"ft-chip--multi-line":this.multiLine,"ft-chip--safari-fix":wt};return T`
|
|
498
|
+
<div class="${lt(t)}"
|
|
499
|
+
aria-label="${this.getLabel()}"
|
|
500
|
+
tabindex="${this.interactionsOnChip?0:-1}"
|
|
501
|
+
@keyup=${this.onKeyUp}>
|
|
502
|
+
<ft-ripple ?disabled=${!this.interactionsOnChip}></ft-ripple>
|
|
503
|
+
<ft-typography variant="body2" element="span" class="ft-chip--label">
|
|
504
|
+
<slot @slotchange=${this.onSlotchange}></slot>
|
|
505
|
+
</ft-typography>
|
|
506
|
+
${this.internalIcon?this.renderIcon():null}
|
|
507
|
+
</div>
|
|
508
|
+
`}get interactionsOnChip(){return this.clickable&&!this.disabled}get interactionsOnIcon(){return(this.iconClickable||this.removable)&&!this.disabled}renderIcon(){return T`
|
|
509
|
+
<div class="ft-chip--icon-container ft-no-text-select ${this.interactionsOnIcon?"ft-chip--clickable":""}"
|
|
510
|
+
tabindex="${this.interactionsOnIcon?0:-1}"
|
|
511
|
+
@click=${this.onIconClick}
|
|
512
|
+
@keyup=${this.onIconKeyUp}>
|
|
513
|
+
<ft-ripple ?disabled=${!this.interactionsOnIcon}></ft-ripple>
|
|
514
|
+
<mwc-icon>${this.internalIcon}</mwc-icon>
|
|
515
|
+
</div>
|
|
516
|
+
`}onKeyUp(t){this.interactionsOnChip&&["Enter"," "].includes(t.key)&&t.target.click()}onIconKeyUp(t){this.interactionsOnIcon&&["Enter"," "].includes(t.key)&&(t.stopPropagation(),this.dispatchEvent(new bi))}onIconClick(t){this.interactionsOnIcon&&(t.stopPropagation(),this.dispatchEvent(new bi))}getLabel(){return this.label||this.textContent}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}get internalIcon(){return this.icon||(this.removable?"cancel":void 0)}},t.FtChip.elementDefinitions={"ft-ripple":Wt,"ft-typography":li,"mwc-icon":hi},ui([rt({type:Boolean})],t.FtChip.prototype,"highlighted",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"removable",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"disabled",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"clickable",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"iconClickable",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"dense",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"multiLine",void 0),ui([rt({type:String})],t.FtChip.prototype,"label",void 0),ui([rt({type:String})],t.FtChip.prototype,"icon",void 0),ui([rt({type:Boolean})],t.FtChip.prototype,"trailingIcon",void 0),ui([nt("ft-typography slot")],t.FtChip.prototype,"slottedContent",void 0),t.FtChip=ui([dt("ft-chip")],t.FtChip),t.FtChipCssVariables=mi,t.FtChipDenseCssVariables=gi,t.FtChipHighlightedCssVariables=vi,t.IconClickEvent=bi,Object.defineProperty(t,"t",{value:!0})}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-chip",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.9",
|
|
4
4
|
"description": "A generic Fluid Topics chip",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-ripple": "^0.1.
|
|
23
|
-
"@fluid-topics/ft-typography": "^0.1.
|
|
24
|
-
"@fluid-topics/ft-wc-utils": "^0.1.
|
|
22
|
+
"@fluid-topics/ft-ripple": "^0.1.9",
|
|
23
|
+
"@fluid-topics/ft-typography": "^0.1.9",
|
|
24
|
+
"@fluid-topics/ft-wc-utils": "^0.1.9",
|
|
25
25
|
"@material/mwc-icon": "^0.25.3",
|
|
26
26
|
"lit": "^2.0.2"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "9f649211936b1529bf691190603f2f721d2a72bd"
|
|
29
29
|
}
|