@fluid-topics/ft-card 0.1.16 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-card.d.ts +2 -2
- package/build/ft-card.inline-styles.js +371 -0
- package/build/ft-card.js +5 -9
- package/build/ft-card.light.js +180 -256
- package/build/ft-card.min.js +211 -282
- package/build/index.d.ts +2 -0
- package/build/index.js +5 -0
- package/build/inline-styles.d.ts +2 -0
- package/build/inline-styles.js +4 -0
- package/package.json +7 -7
package/build/ft-card.light.js
CHANGED
|
@@ -1,309 +1,233 @@
|
|
|
1
|
-
!function(t,e,r,i,a,o){
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
!function(t,i,e,o,r){var s=function(t,i,e,o){for(var r,s=arguments.length,n=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(r=t[p])&&(n=(s<3?r(n):s>3?r(i,e,n):r(i,e))||n);return s>3&&n&&Object.defineProperty(i,e,n),n};const n=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),p=i.FtCssVariable.extend("--ft-ripple-primary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary)),a=i.FtCssVariable.extend("--ft-ripple-secondary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary)),l=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),f=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),h=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),c=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system");class y extends i.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed)},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.moveRipple=t=>{var i,e;let{x:o,y:r}=this.getCoordinates(t),s=null!==(e=null===(i=this.ripple)||void 0===i?void 0:i.getBoundingClientRect())&&void 0!==e?e:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-s.x:s.width/2),this.originY=Math.round(null!=r?r-s.y:s.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!this.isIgnored(t)},this.endFocus=()=>{this.focused=!1}}render(){let t={"ft-ripple":!0,"ft-ripple--primary":this.primary,"ft-ripple--secondary":this.secondary,"ft-ripple--unbounded":this.unbounded,"ft-ripple--selected":(this.selected||this.activated)&&!this.disabled,"ft-ripple--pressed":(this.pressed||this.rippling)&&!this.disabled,"ft-ripple--hovered":this.hovered&&!this.disabled,"ft-ripple--focused":this.focused&&!this.disabled};return e.html`
|
|
2
|
+
<style>
|
|
3
|
+
.ft-ripple .ft-ripple--effect,
|
|
4
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
5
|
+
width: ${this.rippleSize}px;
|
|
6
|
+
height: ${this.rippleSize}px;
|
|
7
|
+
}
|
|
4
8
|
|
|
5
|
-
|
|
6
|
-
|
|
9
|
+
.ft-ripple .ft-ripple--effect {
|
|
10
|
+
left: ${this.originX}px;
|
|
11
|
+
top: ${this.originY}px;
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
<div class="${r.classMap(t)}">
|
|
15
|
+
<div class="ft-ripple--background"></div>
|
|
16
|
+
<div class="ft-ripple--effect"></div>
|
|
17
|
+
</div>
|
|
18
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.ripple&&this.resizeObserver.observe(this.ripple),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}updated(t){super.updated(t),t.has("disabled")&&this.disabled&&this.endRipple(),t.has("unbounded")&&this.setRippleSize()}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}setRippleSize(){if(this.ripple){const t=this.ripple.getBoundingClientRect();this.rippleSize=(this.unbounded?1:1.7)*Math.max(t.width,t.height)}}connectedCallback(){var t;super.connectedCallback();const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(i),this.setRippleSize()}setupFor(t){if(this.target===t)return;this.onDisconnect&&this.onDisconnect(),this.target=t,t.setAttribute("data-is-ft-ripple-target","true");const i=(...t)=>i=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(i)},e=i("mouseup","contextmenu"),o=i("touchend","touchcancel"),r=t=>{["Enter"," "].includes(t.key)&&i("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",e),t.addEventListener("touchstart",o),t.addEventListener("touchmove",this.moveRipple),t.addEventListener("keydown",r),t.addEventListener("focus",this.startFocus),t.addEventListener("blur",this.endFocus),t.addEventListener("focusin",this.startFocus),t.addEventListener("focusout",this.endFocus),this.onDisconnect=()=>{t.removeAttribute("data-is-ft-ripple-target"),t.removeEventListener("mouseover",this.startHover),t.removeEventListener("mousemove",this.moveRipple),t.removeEventListener("mouseleave",this.endHover),t.removeEventListener("mousedown",e),t.removeEventListener("touchstart",o),t.removeEventListener("touchmove",this.moveRipple),t.removeEventListener("keydown",r),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0}}getCoordinates(t){const i=t,e=t;let o,r;return null!=i.x?({x:o,y:r}=i):null!=e.touches&&(o=e.touches[0].clientX,r=e.touches[0].clientY),{x:o,y:r}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let i of t.composedPath()){if(i===this.target)break;if("hasAttribute"in i&&i.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}y.elementDefinitions={},y.styles=e.css`
|
|
19
|
+
:host {
|
|
20
|
+
display: contents;
|
|
21
|
+
}
|
|
7
22
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
14
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
15
|
-
***************************************************************************** */
|
|
16
|
-
var p=function(t,e){return p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},p(t,e)};var c=function(){return c=Object.assign||function(t){for(var e,r=1,i=arguments.length;r<i;r++)for(var a in e=arguments[r])Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t},c.apply(this,arguments)};function s(t,e,r,i){for(var a,o=arguments.length,p=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i,c=t.length-1;c>=0;c--)(a=t[c])&&(p=(o<3?a(p):o>3?a(e,r,p):a(e,r))||p);return o>3&&p&&Object.defineProperty(e,r,p),p}function n(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],i=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&i>=t.length&&(t=void 0),{value:t&&t[i++],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 d=()=>{},l={get passive(){return!1}};document.addEventListener("x",d,l),document.removeEventListener("x",d);
|
|
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 u=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}(),h={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=[],x=function(t){function e(r){var i=t.call(this,c(c({},e.defaultAdapter),r))||this;return i.activationAnimationHasEnded=!1,i.activationTimer=0,i.fgDeactivationRemovalTimer=0,i.fgScale="0",i.frame={width:0,height:0},i.initialSize=0,i.layoutFrame=0,i.maxRadius=0,i.unboundedCoords={left:0,top:0},i.activationState=i.defaultActivationState(),i.activationTimerCallback=function(){i.activationAnimationHasEnded=!0,i.runDeactivationUXLogicIfReady()},i.activateHandler=function(t){i.activateImpl(t)},i.deactivateHandler=function(){i.deactivateImpl()},i.focusHandler=function(){i.handleFocus()},i.blurHandler=function(){i.handleBlur()},i.resizeHandler=function(){i.layout()},i}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 r(){this.constructor=t}p(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}(e,t),Object.defineProperty(e,"cssClasses",{get:function(){return h},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,r=this.supportsPressRipple();if(this.registerRootHandlers(r),r){var i=e.cssClasses,a=i.ROOT,o=i.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 r=e.cssClasses,i=r.ROOT,a=r.UNBOUNDED;requestAnimationFrame((function(){t.adapter.removeClass(i),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 r=e.cssClasses.UNBOUNDED;t?this.adapter.addClass(r):this.adapter.removeClass(r)},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,r;if(t){try{for(var i=n(g),a=i.next();!a.done;a=i.next()){var o=a.value;this.adapter.registerInteractionHandler(o,this.activateHandler)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}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,r;if("keydown"===t.type)this.adapter.registerInteractionHandler("keyup",this.deactivateHandler);else try{for(var i=n(v),a=i.next();!a.done;a=i.next()){var o=a.value;this.adapter.registerDocumentInteractionHandler(o,this.deactivateHandler)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(e)throw e.error}}},e.prototype.deregisterRootHandlers=function(){var t,e;try{for(var r=n(g),i=r.next();!i.done;i=r.next()){var a=i.value;this.adapter.deregisterInteractionHandler(a,this.activateHandler)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}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 r=n(v),i=r.next();!i.done;i=r.next()){var a=i.value;this.adapter.deregisterDocumentInteractionHandler(a,this.deactivateHandler)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(e=r.return)&&e.call(r)}finally{if(t)throw t.error}}},e.prototype.removeCssVars=function(){var t=this,r=e.strings;Object.keys(r).forEach((function(e){0===e.indexOf("VAR_")&&t.adapter.updateCssVariable(r[e],null)}))},e.prototype.activateImpl=function(t){var e=this;if(!this.adapter.isSurfaceDisabled()){var r=this.activationState;if(!r.isActivated){var i=this.previousActivationEvent;if(!(i&&void 0!==t&&i.type!==t.type))r.isActivated=!0,r.isProgrammatic=void 0===t,r.activationEvent=t,r.wasActivatedByPointer=!r.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)),r.wasElementMadeActive=this.checkElementMadeActive(t),r.wasElementMadeActive&&this.animateActivation(),requestAnimationFrame((function(){b=[],r.wasElementMadeActive||void 0===t||" "!==t.key&&32!==t.keyCode||(r.wasElementMadeActive=e.checkElementMadeActive(t),r.wasElementMadeActive&&e.animateActivation()),r.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,r=e.strings,i=r.VAR_FG_TRANSLATE_START,a=r.VAR_FG_TRANSLATE_END,o=e.cssClasses,p=o.FG_DEACTIVATION,c=o.FG_ACTIVATION,s=e.numbers.DEACTIVATION_TIMEOUT_MS;this.layoutInternal();var n="",d="";if(!this.adapter.isUnbounded()){var l=this.getFgTranslationCoordinates(),f=l.startPoint,u=l.endPoint;n=f.x+"px, "+f.y+"px",d=u.x+"px, "+u.y+"px"}this.adapter.updateCssVariable(i,n),this.adapter.updateCssVariable(a,d),clearTimeout(this.activationTimer),clearTimeout(this.fgDeactivationRemovalTimer),this.rmBoundedActivationClasses(),this.adapter.removeClass(p),this.adapter.computeBoundingRect(),this.adapter.addClass(c),this.activationTimer=setTimeout((function(){t.activationTimerCallback()}),s)},e.prototype.getFgTranslationCoordinates=function(){var t,e=this.activationState,r=e.activationEvent;return{startPoint:t={x:(t=e.wasActivatedByPointer?function(t,e,r){if(!t)return{x:0,y:0};var i,a,o=e.x,p=e.y,c=o+r.left,s=p+r.top;if("touchstart"===t.type){var n=t;i=n.changedTouches[0].pageX-c,a=n.changedTouches[0].pageY-s}else{var d=t;i=d.pageX-c,a=d.pageY-s}return{x:i,y:a}}(r,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,r=e.cssClasses.FG_DEACTIVATION,i=this.activationState,a=i.hasDeactivationUXRun,o=i.isActivated;(a||!o)&&this.activationAnimationHasEnded&&(this.rmBoundedActivationClasses(),this.adapter.addClass(r),this.fgDeactivationRemovalTimer=setTimeout((function(){t.adapter.removeClass(r)}),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 r=c({},e);e.isProgrammatic?(requestAnimationFrame((function(){t.animateDeactivation(r)})),this.resetActivationState()):(this.deregisterDeactivationHandlers(),requestAnimationFrame((function(){t.activationState.hasDeactivationUXRun=!0,t.animateDeactivation(r),t.resetActivationState()})))}},e.prototype.animateDeactivation=function(t){var e=t.wasActivatedByPointer,r=t.wasElementMadeActive;(e||r)&&this.runDeactivationUXLogicIfReady()},e.prototype.layoutInternal=function(){var t=this;this.frame=this.adapter.computeBoundingRect();var r=Math.max(this.frame.height,this.frame.width);this.maxRadius=this.adapter.isUnbounded()?r:Math.sqrt(Math.pow(t.frame.width,2)+Math.pow(t.frame.height,2))+e.numbers.PADDING;var i=Math.floor(r*e.numbers.INITIAL_ORIGIN_SCALE);this.adapter.isUnbounded()&&i%2!=0?this.initialSize=i-1:this.initialSize=i,this.fgScale=""+this.maxRadius/this.initialSize,this.updateLayoutCssVars()},e.prototype.updateLayoutCssVars=function(){var t=e.strings,r=t.VAR_FG_SIZE,i=t.VAR_LEFT,a=t.VAR_TOP,o=t.VAR_FG_SCALE;this.adapter.updateCssVariable(r,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(i,this.unboundedCoords.left+"px"),this.adapter.updateCssVariable(a,this.unboundedCoords.top+"px"))},e}(u),O=x;
|
|
118
|
-
/**
|
|
119
|
-
* @license
|
|
120
|
-
* Copyright 2018 Google LLC
|
|
121
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
122
|
-
*/
|
|
123
|
-
class $ 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=O}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),r=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":r,"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 ${a.classMap(i)}"
|
|
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>`}}s([r.query(".mdc-ripple-surface")],$.prototype,"mdcRoot",void 0),s([r.property({type:Boolean})],$.prototype,"primary",void 0),s([r.property({type:Boolean})],$.prototype,"accent",void 0),s([r.property({type:Boolean})],$.prototype,"unbounded",void 0),s([r.property({type:Boolean})],$.prototype,"disabled",void 0),s([r.property({type:Boolean})],$.prototype,"activated",void 0),s([r.property({type:Boolean})],$.prototype,"selected",void 0),s([r.property({type:Boolean})],$.prototype,"internalUseStateLayerCustomProperties",void 0),s([r.state()],$.prototype,"hovering",void 0),s([r.state()],$.prototype,"bgFocused",void 0),s([r.state()],$.prototype,"fgActivation",void 0),s([r.state()],$.prototype,"fgDeactivation",void 0),s([r.state()],$.prototype,"fgScale",void 0),s([r.state()],$.prototype,"fgSize",void 0),s([r.state()],$.prototype,"translateStart",void 0),s([r.state()],$.prototype,"translateEnd",void 0),s([r.state()],$.prototype,"leftPos",void 0),s([r.state()],$.prototype,"topPos",void 0);
|
|
126
|
-
/**
|
|
127
|
-
* @license
|
|
128
|
-
* Copyright 2021 Google LLC
|
|
129
|
-
* SPDX-LIcense-Identifier: Apache-2.0
|
|
130
|
-
*/
|
|
131
|
-
const w=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 N=class extends ${};N.styles=[w],N=s([r.customElement("mwc-ripple")],N);
|
|
137
|
-
/**
|
|
138
|
-
* @license
|
|
139
|
-
* Copyright 2020 Google LLC
|
|
140
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
141
|
-
*/
|
|
142
|
-
class S{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 R=function(t,e,r,i){for(var a,o=arguments.length,p=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,r):i,c=t.length-1;c>=0;c--)(a=t[c])&&(p=(o<3?a(p):o>3?a(e,r,p):a(e,r))||p);return o>3&&p&&Object.defineProperty(e,r,p),p};const F=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorContent),A=i.FtCssVariable.extend("--ft-ripple-primary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary)),E=i.FtCssVariable.extend("--ft-ripple-secondary-color",i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary)),k=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),C=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),U=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),M=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),z=i.FtCssVariable.external(i.designSystemVariables.opacityContentOnSurfaceDragged,"Design system");let T=class extends i.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;
|
|
23
|
+
.ft-ripple {
|
|
24
|
+
position: absolute;
|
|
25
|
+
inset: 0;
|
|
26
|
+
pointer-events: none;
|
|
27
|
+
}
|
|
145
28
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
--mdc-ripple-focus-opacity: ${U};
|
|
150
|
-
--mdc-ripple-selected-opacity: ${M};
|
|
151
|
-
--mdc-ripple-activated-opacity: ${z};
|
|
152
|
-
}
|
|
29
|
+
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
}
|
|
153
32
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
33
|
+
.ft-ripple .ft-ripple--background,
|
|
34
|
+
.ft-ripple .ft-ripple--effect {
|
|
35
|
+
position: absolute;
|
|
36
|
+
opacity: 0;
|
|
37
|
+
background-color: ${n};
|
|
38
|
+
}
|
|
157
39
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
40
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background,
|
|
41
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
42
|
+
background-color: ${a};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background,
|
|
46
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
47
|
+
background-color: ${p};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ft-ripple .ft-ripple--background {
|
|
51
|
+
top: 0;
|
|
52
|
+
left: 0;
|
|
53
|
+
height: 100%;
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ft-ripple .ft-ripple--effect,
|
|
58
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
59
|
+
border-radius: 50%;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ft-ripple .ft-ripple--effect {
|
|
63
|
+
transform: translate(-50%, -50%) scale(0.15);
|
|
64
|
+
transition: transform 300ms ease, opacity 75ms linear;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
68
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
69
|
+
left: 50%;
|
|
70
|
+
top: 50%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
74
|
+
transform: translate(-50%, -50%);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
78
|
+
opacity: ${f};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
82
|
+
opacity: ${c};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
86
|
+
opacity: ${h};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
90
|
+
opacity: ${l};
|
|
91
|
+
transform: translate(-50%, -50%) scale(1);
|
|
92
|
+
}
|
|
93
|
+
`,s([o.property({type:Boolean})],y.prototype,"primary",void 0),s([o.property({type:Boolean})],y.prototype,"secondary",void 0),s([o.property({type:Boolean})],y.prototype,"unbounded",void 0),s([o.property({type:Boolean})],y.prototype,"activated",void 0),s([o.property({type:Boolean})],y.prototype,"selected",void 0),s([o.property({type:Boolean})],y.prototype,"disabled",void 0),s([o.state()],y.prototype,"hovered",void 0),s([o.state()],y.prototype,"focused",void 0),s([o.state()],y.prototype,"pressed",void 0),s([o.state()],y.prototype,"rippling",void 0),s([o.state()],y.prototype,"rippleSize",void 0),s([o.state()],y.prototype,"originX",void 0),s([o.state()],y.prototype,"originY",void 0),s([o.query(".ft-ripple")],y.prototype,"ripple",void 0),s([o.query(".ft-ripple--effect")],y.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(y);class d{constructor(t,i,e,o,r){this.name=t,this.category=i,this.fallbackVariable=e,this.defaultValue=o,this.context=r,this._$cssResult$=!0,this.value=this.get()}get cssText(){return this.value.cssText}get styleSheet(){return this.value.styleSheet}toString(){return this.value.toString()}static create(t,i,e){return new d(t,i,void 0,e)}static extend(t,i,e){return new d(t,i.category,i,e)}static external(t,i){return new d(t.name,t.category,t.fallbackVariable,t.defaultValue,i)}get(t){return e.css`var(${e.unsafeCSS(this.name)}, ${this.defaultCssValue(t)})`}defaultCssValue(t){return this.fallbackVariable?this.fallbackVariable.get(null!=t?t:this.defaultValue):e.unsafeCSS(null!=t?t:this.defaultValue)}lastResortDefaultValue(){var t,i;return null!==(t=this.defaultValue)&&void 0!==t?t:null===(i=this.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()}breadcrumb(){return this.fallbackVariable?[this.fallbackVariable.name,...this.fallbackVariable.breadcrumb()]:[]}}const u={colorPrimary:d.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:d.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:d.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:d.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:d.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:d.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:d.create("--ft-color-error","COLOR","#B00020"),colorOutline:d.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:d.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:d.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:d.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:d.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:d.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:d.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:d.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:d.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:d.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:d.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:d.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:d.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:d.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:d.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:d.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:d.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:d.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:d.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:d.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:d.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:d.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:d.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:d.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:d.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:d.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:d.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:d.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:d.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:d.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:d.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:d.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:d.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:d.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:d.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:d.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:d.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:d.create("--ft-elevation-00","UNKNOWN","0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0), 0px 0px 0px 0px rgba(0, 0, 0, 0)"),elevation01:d.create("--ft-elevation-01","UNKNOWN","0px 1px 4px 0px rgba(0, 0, 0, 0.06), 0px 1px 2px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation02:d.create("--ft-elevation-02","UNKNOWN","0px 4px 10px 0px rgba(0, 0, 0, 0.06), 0px 2px 5px 0px rgba(0, 0, 0, 0.14), 0px 0px 1px 0px rgba(0, 0, 0, 0.06)"),elevation03:d.create("--ft-elevation-03","UNKNOWN","0px 6px 13px 0px rgba(0, 0, 0, 0.06), 0px 3px 7px 0px rgba(0, 0, 0, 0.14), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)"),elevation04:d.create("--ft-elevation-04","UNKNOWN","0px 8px 16px 0px rgba(0, 0, 0, 0.06), 0px 4px 9px 0px rgba(0, 0, 0, 0.14), 0px 2px 3px 0px rgba(0, 0, 0, 0.06)"),elevation06:d.create("--ft-elevation-06","UNKNOWN","0px 12px 22px 0px rgba(0, 0, 0, 0.06), 0px 6px 13px 0px rgba(0, 0, 0, 0.14), 0px 4px 5px 0px rgba(0, 0, 0, 0.06)"),elevation08:d.create("--ft-elevation-08","UNKNOWN","0px 16px 28px 0px rgba(0, 0, 0, 0.06), 0px 8px 17px 0px rgba(0, 0, 0, 0.14), 0px 6px 7px 0px rgba(0, 0, 0, 0.06)"),elevation12:d.create("--ft-elevation-12","UNKNOWN","0px 22px 40px 0px rgba(0, 0, 0, 0.06), 0px 12px 23px 0px rgba(0, 0, 0, 0.14), 0px 10px 11px 0px rgba(0, 0, 0, 0.06)"),elevation16:d.create("--ft-elevation-16","UNKNOWN","0px 28px 52px 0px rgba(0, 0, 0, 0.06), 0px 16px 29px 0px rgba(0, 0, 0, 0.14), 0px 14px 15px 0px rgba(0, 0, 0, 0.06)"),elevation24:d.create("--ft-elevation-24","UNKNOWN","0px 40px 76px 0px rgba(0, 0, 0, 0.06), 0px 24px 41px 0px rgba(0, 0, 0, 0.14), 0px 22px 23px 0px rgba(0, 0, 0, 0.06)"),borderRadiusS:d.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:d.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:d.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:d.create("--ft-border-radius-XL","SIZE","16px"),titleFont:d.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:d.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:d.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:d.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
170
94
|
/**
|
|
171
95
|
* @license
|
|
172
96
|
* Copyright 2017 Google LLC
|
|
173
97
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
174
|
-
*/var
|
|
98
|
+
*/var g;const x=globalThis.trustedTypes,b=x?x.createPolicy("lit-html",{createHTML:t=>t}):void 0,v=`lit$${(Math.random()+"").slice(9)}$`,m="?"+v,$=`<${m}>`,O=document,N=(t="")=>O.createComment(t),S=t=>null===t||"object"!=typeof t&&"function"!=typeof t,w=Array.isArray,R=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,U=/-->/g,E=/>/g,F=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,M=/'/g,C=/"/g,B=/^(?:script|style|textarea|title)$/i,k=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),z=Symbol.for("lit-noChange"),L=Symbol.for("lit-nothing"),D=new WeakMap,P=O.createTreeWalker(O,129,null,!1),A=(t,i)=>{const e=t.length-1,o=[];let r,s=2===i?"<svg>":"",n=R;for(let i=0;i<e;i++){const e=t[i];let p,a,l=-1,f=0;for(;f<e.length&&(n.lastIndex=f,a=n.exec(e),null!==a);)f=n.lastIndex,n===R?"!--"===a[1]?n=U:void 0!==a[1]?n=E:void 0!==a[2]?(B.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=F):void 0!==a[3]&&(n=F):n===F?">"===a[0]?(n=null!=r?r:R,l=-1):void 0===a[1]?l=-2:(l=n.lastIndex-a[2].length,p=a[1],n=void 0===a[3]?F:'"'===a[3]?C:M):n===C||n===M?n=F:n===U||n===E?n=R:(n=F,r=void 0);const h=n===F&&t[i+1].startsWith("/>")?" ":"";s+=n===R?e+$:l>=0?(o.push(p),e.slice(0,l)+"$lit$"+e.slice(l)+v+h):e+v+(-2===l?(o.push(void 0),i):h)}const p=s+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==b?b.createHTML(p):p,o]};class W{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let r=0,s=0;const n=t.length-1,p=this.parts,[a,l]=A(t,i);if(this.el=W.createElement(a,e),P.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=P.nextNode())&&p.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith("$lit$")||i.startsWith(v)){const e=l[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(v),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?H:"?"===i[1]?j:"@"===i[1]?G:T})}else p.push({type:6,index:r})}for(const i of t)o.removeAttribute(i)}if(B.test(o.tagName)){const t=o.textContent.split(v),i=t.length-1;if(i>0){o.textContent=x?x.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],N()),P.nextNode(),p.push({type:2,index:++r});o.append(t[i],N())}}}else if(8===o.nodeType)if(o.data===m)p.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(v,t+1));)p.push({type:7,index:r}),t+=v.length-1}r++}}static createElement(t,i){const e=O.createElement("template");return e.innerHTML=t,e}}function K(t,i,e=t,o){var r,s,n,p;if(i===z)return i;let a=void 0!==o?null===(r=e._$Cl)||void 0===r?void 0:r[o]:e._$Cu;const l=S(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null===(s=null==a?void 0:a._$AO)||void 0===s||s.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,e,o)),void 0!==o?(null!==(n=(p=e)._$Cl)&&void 0!==n?n:p._$Cl=[])[o]=a:e._$Cu=a),void 0!==a&&(i=K(t,a._$AS(t,i.values),a,o)),i}class _{constructor(t,i){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var i;const{el:{content:e},parts:o}=this._$AD,r=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:O).importNode(e,!0);P.currentNode=r;let s=P.nextNode(),n=0,p=0,a=o[0];for(;void 0!==a;){if(n===a.index){let i;2===a.type?i=new I(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new V(s,this,t)),this.v.push(i),a=o[++p]}n!==(null==a?void 0:a.index)&&(s=P.nextNode(),n++)}return r}m(t){let i=0;for(const e of this.v)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class I{constructor(t,i,e,o){var r;this.type=2,this._$AH=L,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cg=null===(r=null==o?void 0:o.isConnected)||void 0===r||r}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===t.nodeType&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=K(this,t,i),S(t)?t===L||null==t||""===t?(this._$AH!==L&&this._$AR(),this._$AH=L):t!==this._$AH&&t!==z&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return w(t)||"function"==typeof(null===(i=t)||void 0===i?void 0:i[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==L&&S(this._$AH)?this._$AA.nextSibling.data=t:this.S(O.createTextNode(t)),this._$AH=t}T(t){var i;const{values:e,_$litType$:o}=t,r="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=W.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===r)this._$AH.m(e);else{const t=new _(r,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=D.get(t.strings);return void 0===i&&D.set(t.strings,i=new W(t)),i}A(t){w(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const r of t)o===i.length?i.push(e=new I(this.M(N()),this.M(N()),this,this.options)):e=i[o],e._$AI(r),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cg=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class T{constructor(t,i,e,o,r){this.type=1,this._$AH=L,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=r,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=L}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const r=this.strings;let s=!1;if(void 0===r)t=K(this,t,i,0),s=!S(t)||t!==this._$AH&&t!==z,s&&(this._$AH=t);else{const o=t;let n,p;for(t=r[0],n=0;n<r.length-1;n++)p=K(this,o[e+n],i,n),p===z&&(p=this._$AH[n]),s||(s=!S(p)||p!==this._$AH[n]),p===L?t=L:t!==L&&(t+=(null!=p?p:"")+r[n+1]),this._$AH[n]=p}s&&!o&&this.k(t)}k(t){t===L?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class H extends T{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===L?void 0:t}}const Z=x?x.emptyScript:"";class j extends T{constructor(){super(...arguments),this.type=4}k(t){t&&t!==L?this.element.setAttribute(this.name,Z):this.element.removeAttribute(this.name)}}class G extends T{constructor(t,i,e,o,r){super(t,i,e,o,r),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=K(this,t,i,0))&&void 0!==e?e:L)===z)return;const o=this._$AH,r=t===L&&o!==L||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==L&&(o===L||r);r&&this.element.removeEventListener(this.name,this,o),s&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class V{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){K(this,t)}}const X=window.litHtmlPolyfillSupport;null==X||X(W,I),(null!==(g=globalThis.litHtmlVersions)&&void 0!==g?g:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
175
99
|
/**
|
|
176
100
|
* @license
|
|
177
101
|
* Copyright 2020 Google LLC
|
|
178
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
179
103
|
*/
|
|
180
|
-
const
|
|
104
|
+
const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;let s,n;const p=[],a=[];let l,f=0,h=!1;for(;f<r;){for(l=i[f];f<r&&void 0!==(n=e[f],s=null===(o=n)||void 0===o?void 0:o._$litStatic$);)l+=s+i[++f],h=!0;a.push(n),p.push(l),f++}if(f===r&&p.push(i[r]),h){const t=p.join("$$lit$$");void 0===(i=q.get(t))&&(p.raw=p,q.set(t,i=p)),e=a}return t(i,...e)})(k);var Q,tt=function(t,i,e,o){for(var r,s=arguments.length,n=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(r=t[p])&&(n=(s<3?r(n):s>3?r(i,e,n):r(i,e))||n);return s>3&&n&&Object.defineProperty(i,e,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"}(Q||(Q={}));const it=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),et=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),ot={fontFamily:et,fontSize:i.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:i.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},rt=i.FtCssVariable.extend("--ft-typography-title-font-family",it),st=i.FtCssVariable.extend("--ft-typography-title-font-size",ot.fontSize,"20px"),nt=i.FtCssVariable.extend("--ft-typography-title-font-weight",ot.fontWeight,"normal"),pt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",ot.letterSpacing,"0.15px"),at=i.FtCssVariable.extend("--ft-typography-title-line-height",ot.lineHeight,"24px"),lt=i.FtCssVariable.extend("--ft-typography-title-text-transform",ot.textTransform,"inherit"),ft=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",it),ht=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",ot.fontSize,"14px"),ct=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",ot.fontWeight,"normal"),yt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",ot.letterSpacing,"0.105px"),dt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",ot.lineHeight,"24px"),ut=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",ot.textTransform,"inherit"),gt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",et),xt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",ot.fontSize,"16px"),bt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",ot.fontWeight,"600"),vt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",ot.letterSpacing,"0.144px"),mt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",ot.lineHeight,"24px"),$t=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",ot.textTransform,"inherit"),Ot=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",et),Nt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",ot.fontSize,"14px"),St=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",ot.fontWeight,"normal"),wt=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",ot.letterSpacing,"0.098px"),Rt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",ot.lineHeight,"24px"),Ut=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",ot.textTransform,"inherit"),Et=i.FtCssVariable.extend("--ft-typography-body1-font-family",et),Ft=i.FtCssVariable.extend("--ft-typography-body1-font-size",ot.fontSize,"16px"),Mt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",ot.fontWeight,"normal"),Ct=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",ot.letterSpacing,"0.496px"),Bt=i.FtCssVariable.extend("--ft-typography-body1-line-height",ot.lineHeight,"24px"),kt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",ot.textTransform,"inherit"),zt=i.FtCssVariable.extend("--ft-typography-body2-font-family",et),Lt=i.FtCssVariable.extend("--ft-typography-body2-font-size",ot.fontSize,"14px"),Dt=i.FtCssVariable.extend("--ft-typography-body2-font-weight",ot.fontWeight,"normal"),Pt=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",ot.letterSpacing,"0.252px"),At=i.FtCssVariable.extend("--ft-typography-body2-line-height",ot.lineHeight,"20px"),Wt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",ot.textTransform,"inherit"),Kt=i.FtCssVariable.extend("--ft-typography-caption-font-family",et),_t=i.FtCssVariable.extend("--ft-typography-caption-font-size",ot.fontSize,"12px"),It=i.FtCssVariable.extend("--ft-typography-caption-font-weight",ot.fontWeight,"normal"),Tt=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",ot.letterSpacing,"0.396px"),Ht=i.FtCssVariable.extend("--ft-typography-caption-line-height",ot.lineHeight,"16px"),Zt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",ot.textTransform,"inherit"),jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",et),Gt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",ot.fontSize,"10px"),Vt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",ot.fontWeight,"normal"),Xt=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",ot.letterSpacing,"0.33px"),Yt=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",ot.lineHeight,"16px"),qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",ot.textTransform,"inherit"),Jt=i.FtCssVariable.extend("--ft-typography-overline-font-family",et),Qt=i.FtCssVariable.extend("--ft-typography-overline-font-size",ot.fontSize,"10px"),ti=i.FtCssVariable.extend("--ft-typography-overline-font-weight",ot.fontWeight,"normal"),ii=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",ot.letterSpacing,"1.5px"),ei=i.FtCssVariable.extend("--ft-typography-overline-line-height",ot.lineHeight,"16px"),oi=i.FtCssVariable.extend("--ft-typography-overline-text-transform",ot.textTransform,"uppercase"),ri=i.FtCssVariable.extend("--ft-typography-button-font-family",et),si=i.FtCssVariable.extend("--ft-typography-button-font-size",ot.fontSize,"14px"),ni=i.FtCssVariable.extend("--ft-typography-button-font-weight",ot.fontWeight,"600"),pi=i.FtCssVariable.extend("--ft-typography-button-letter-spacing",ot.letterSpacing,"1.246px"),ai=i.FtCssVariable.extend("--ft-typography-button-line-height",ot.lineHeight,"16px"),li=i.FtCssVariable.extend("--ft-typography-button-text-transform",ot.textTransform,"uppercase"),fi=e.css`
|
|
181
105
|
.ft-typography--title {
|
|
182
|
-
font-family: ${
|
|
183
|
-
font-size: ${
|
|
184
|
-
font-weight: ${
|
|
185
|
-
letter-spacing: ${
|
|
186
|
-
line-height: ${
|
|
187
|
-
text-transform: ${
|
|
106
|
+
font-family: ${rt};
|
|
107
|
+
font-size: ${st};
|
|
108
|
+
font-weight: ${nt};
|
|
109
|
+
letter-spacing: ${pt};
|
|
110
|
+
line-height: ${at};
|
|
111
|
+
text-transform: ${lt};
|
|
188
112
|
}
|
|
189
|
-
`,
|
|
113
|
+
`,hi=e.css`
|
|
190
114
|
.ft-typography--title-dense {
|
|
191
|
-
font-family: ${
|
|
192
|
-
font-size: ${
|
|
193
|
-
font-weight: ${
|
|
194
|
-
letter-spacing: ${
|
|
195
|
-
line-height: ${
|
|
196
|
-
text-transform: ${
|
|
115
|
+
font-family: ${ft};
|
|
116
|
+
font-size: ${ht};
|
|
117
|
+
font-weight: ${ct};
|
|
118
|
+
letter-spacing: ${yt};
|
|
119
|
+
line-height: ${dt};
|
|
120
|
+
text-transform: ${ut};
|
|
197
121
|
}
|
|
198
|
-
`,
|
|
122
|
+
`,ci=e.css`
|
|
199
123
|
.ft-typography--subtitle1 {
|
|
200
|
-
font-family: ${
|
|
201
|
-
font-size: ${
|
|
202
|
-
font-weight: ${
|
|
203
|
-
letter-spacing: ${
|
|
204
|
-
line-height: ${
|
|
205
|
-
text-transform: ${
|
|
124
|
+
font-family: ${gt};
|
|
125
|
+
font-size: ${xt};
|
|
126
|
+
font-weight: ${bt};
|
|
127
|
+
letter-spacing: ${vt};
|
|
128
|
+
line-height: ${mt};
|
|
129
|
+
text-transform: ${$t};
|
|
206
130
|
}
|
|
207
|
-
`,
|
|
131
|
+
`,yi=e.css`
|
|
208
132
|
.ft-typography--subtitle2 {
|
|
209
|
-
font-family: ${
|
|
210
|
-
font-size: ${
|
|
211
|
-
font-weight: ${
|
|
212
|
-
letter-spacing: ${
|
|
213
|
-
line-height: ${
|
|
214
|
-
text-transform: ${
|
|
133
|
+
font-family: ${Ot};
|
|
134
|
+
font-size: ${Nt};
|
|
135
|
+
font-weight: ${St};
|
|
136
|
+
letter-spacing: ${wt};
|
|
137
|
+
line-height: ${Rt};
|
|
138
|
+
text-transform: ${Ut};
|
|
215
139
|
}
|
|
216
140
|
|
|
217
|
-
`,
|
|
141
|
+
`,di=e.css`
|
|
218
142
|
.ft-typography--body1 {
|
|
219
|
-
font-family: ${
|
|
220
|
-
font-size: ${
|
|
221
|
-
font-weight: ${
|
|
222
|
-
letter-spacing: ${
|
|
223
|
-
line-height: ${
|
|
224
|
-
text-transform: ${
|
|
143
|
+
font-family: ${Et};
|
|
144
|
+
font-size: ${Ft};
|
|
145
|
+
font-weight: ${Mt};
|
|
146
|
+
letter-spacing: ${Ct};
|
|
147
|
+
line-height: ${Bt};
|
|
148
|
+
text-transform: ${kt};
|
|
225
149
|
}
|
|
226
|
-
`,
|
|
150
|
+
`,ui=e.css`
|
|
227
151
|
.ft-typography--body2 {
|
|
228
|
-
font-family: ${
|
|
229
|
-
font-size: ${
|
|
230
|
-
font-weight: ${
|
|
231
|
-
letter-spacing: ${
|
|
232
|
-
line-height: ${
|
|
233
|
-
text-transform: ${
|
|
152
|
+
font-family: ${zt};
|
|
153
|
+
font-size: ${Lt};
|
|
154
|
+
font-weight: ${Dt};
|
|
155
|
+
letter-spacing: ${Pt};
|
|
156
|
+
line-height: ${At};
|
|
157
|
+
text-transform: ${Wt};
|
|
234
158
|
}
|
|
235
|
-
`,
|
|
159
|
+
`,gi=e.css`
|
|
236
160
|
.ft-typography--caption {
|
|
237
|
-
font-family: ${
|
|
238
|
-
font-size: ${
|
|
239
|
-
font-weight: ${
|
|
240
|
-
letter-spacing: ${
|
|
241
|
-
line-height: ${
|
|
242
|
-
text-transform: ${
|
|
161
|
+
font-family: ${Kt};
|
|
162
|
+
font-size: ${_t};
|
|
163
|
+
font-weight: ${It};
|
|
164
|
+
letter-spacing: ${Tt};
|
|
165
|
+
line-height: ${Ht};
|
|
166
|
+
text-transform: ${Zt};
|
|
243
167
|
}
|
|
244
|
-
`,
|
|
168
|
+
`,xi=e.css`
|
|
245
169
|
.ft-typography--breadcrumb {
|
|
246
|
-
font-family: ${
|
|
247
|
-
font-size: ${
|
|
248
|
-
font-weight: ${
|
|
249
|
-
letter-spacing: ${
|
|
250
|
-
line-height: ${
|
|
251
|
-
text-transform: ${
|
|
170
|
+
font-family: ${jt};
|
|
171
|
+
font-size: ${Gt};
|
|
172
|
+
font-weight: ${Vt};
|
|
173
|
+
letter-spacing: ${Xt};
|
|
174
|
+
line-height: ${Yt};
|
|
175
|
+
text-transform: ${qt};
|
|
252
176
|
}
|
|
253
|
-
`,
|
|
177
|
+
`,bi=e.css`
|
|
254
178
|
.ft-typography--overline {
|
|
255
|
-
font-family: ${
|
|
256
|
-
font-size: ${
|
|
257
|
-
font-weight: ${
|
|
258
|
-
letter-spacing: ${
|
|
259
|
-
line-height: ${
|
|
260
|
-
text-transform: ${
|
|
179
|
+
font-family: ${Jt};
|
|
180
|
+
font-size: ${Qt};
|
|
181
|
+
font-weight: ${ti};
|
|
182
|
+
letter-spacing: ${ii};
|
|
183
|
+
line-height: ${ei};
|
|
184
|
+
text-transform: ${oi};
|
|
261
185
|
}
|
|
262
|
-
`,
|
|
186
|
+
`,vi=e.css`
|
|
263
187
|
.ft-typography--button {
|
|
264
|
-
font-family: ${
|
|
265
|
-
font-size: ${
|
|
266
|
-
font-weight: ${
|
|
267
|
-
letter-spacing: ${
|
|
268
|
-
line-height: ${
|
|
269
|
-
text-transform: ${
|
|
188
|
+
font-family: ${ri};
|
|
189
|
+
font-size: ${si};
|
|
190
|
+
font-weight: ${ni};
|
|
191
|
+
letter-spacing: ${pi};
|
|
192
|
+
line-height: ${ai};
|
|
193
|
+
text-transform: ${li};
|
|
270
194
|
}
|
|
271
|
-
`;
|
|
272
|
-
.
|
|
273
|
-
vertical-align: inherit;
|
|
274
|
-
}
|
|
275
|
-
`]}getTemplate(){return this.element?xt`
|
|
276
|
-
<${vt(this.element)}
|
|
195
|
+
`;class mi extends i.FtLitElement{constructor(){super(...arguments),this.variant=Q.body1}render(){return this.element?J`
|
|
196
|
+
<${Y(this.element)}
|
|
277
197
|
class="ft-typography ft-typography--${this.variant}">
|
|
278
198
|
<slot></slot>
|
|
279
|
-
</${
|
|
280
|
-
`:
|
|
199
|
+
</${Y(this.element)}>
|
|
200
|
+
`:J`
|
|
281
201
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
282
|
-
`}}
|
|
202
|
+
`}}mi.styles=[fi,hi,ci,yi,di,ui,gi,xi,bi,vi,e.css`
|
|
203
|
+
.ft-typography {
|
|
204
|
+
vertical-align: inherit;
|
|
205
|
+
}
|
|
206
|
+
`],tt([o.property()],mi.prototype,"element",void 0),tt([o.property()],mi.prototype,"variant",void 0),i.customElement("ft-typography")(mi);var $i=function(t,i,e,o){for(var r,s=arguments.length,n=s<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(r=t[p])&&(n=(s<3?r(n):s>3?r(i,e,n):r(i,e))||n);return s>3&&n&&Object.defineProperty(i,e,n),n};const Oi={padding:i.FtCssVariable.create("--ft-card-padding","SIZE","12px"),colorPrimary:i.FtCssVariable.external(u.colorPrimary,"Design system"),colorSurface:i.FtCssVariable.external(u.colorSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariable.external(u.colorOnSurfaceMedium,"Design system"),colorOnSurfaceHigh:i.FtCssVariable.external(u.colorOnSurfaceHigh,"Design system"),borderRadiusM:i.FtCssVariable.external(u.borderRadiusM,"Design system"),elevation02:i.FtCssVariable.external(u.elevation02,"Design system"),elevation04:i.FtCssVariable.external(u.elevation04,"Design system")};class Ni extends i.FtLitElement{constructor(){super(...arguments),this.title="",this.selected=!1}static get styles(){return e.css`
|
|
283
207
|
:host {
|
|
284
208
|
display: block;
|
|
285
209
|
}
|
|
286
210
|
|
|
287
211
|
#container {
|
|
288
|
-
padding: ${
|
|
289
|
-
border-radius: ${
|
|
290
|
-
box-shadow: ${
|
|
212
|
+
padding: ${Oi.padding};
|
|
213
|
+
border-radius: ${Oi.borderRadiusM};
|
|
214
|
+
box-shadow: ${Oi.elevation02};
|
|
291
215
|
position: relative;
|
|
292
216
|
width: 100%;
|
|
293
217
|
height: 100%;
|
|
294
218
|
display: block;
|
|
295
219
|
box-sizing: border-box;
|
|
296
|
-
background-color: ${
|
|
220
|
+
background-color: ${Oi.colorSurface};
|
|
297
221
|
transition: box-shadow 0.2s linear, color 0.2s linear;
|
|
298
222
|
}
|
|
299
223
|
|
|
300
224
|
#container:hover {
|
|
301
|
-
box-shadow: ${
|
|
225
|
+
box-shadow: ${Oi.elevation04};
|
|
302
226
|
}
|
|
303
227
|
|
|
304
228
|
#container.selected {
|
|
305
|
-
outline: solid 2px ${
|
|
306
|
-
box-shadow: ${
|
|
229
|
+
outline: solid 2px ${Oi.colorPrimary};
|
|
230
|
+
box-shadow: ${Oi.elevation04};
|
|
307
231
|
}
|
|
308
232
|
|
|
309
233
|
#header:not([hidden]) {
|
|
@@ -317,23 +241,23 @@ const vt=t=>({_$litStatic$:t}),bt=new Map,xt=(t=>(e,...r)=>{var i;const a=r.leng
|
|
|
317
241
|
|
|
318
242
|
.title {
|
|
319
243
|
text-overflow: ellipsis;
|
|
320
|
-
color: ${
|
|
244
|
+
color: ${Oi.colorOnSurfaceHigh};
|
|
321
245
|
}
|
|
322
246
|
|
|
323
247
|
#content {
|
|
324
248
|
opacity: 1;
|
|
325
249
|
font-size: 15px;
|
|
326
250
|
height: 100%;
|
|
327
|
-
color: ${
|
|
251
|
+
color: ${Oi.colorOnSurfaceMedium};
|
|
328
252
|
}
|
|
329
253
|
|
|
330
254
|
#action {
|
|
331
255
|
position: absolute;
|
|
332
256
|
top: 0;
|
|
333
257
|
right: 0;
|
|
334
|
-
color: ${
|
|
258
|
+
color: ${Oi.colorOnSurfaceHigh};
|
|
335
259
|
}
|
|
336
|
-
`}
|
|
260
|
+
`}render(){return e.html`
|
|
337
261
|
<div id="container" part="container" class=${this.selected?"selected":""}>
|
|
338
262
|
<ft-ripple primary></ft-ripple>
|
|
339
263
|
<div id="header" ?hidden=${!this.title} part="header">
|
|
@@ -349,4 +273,4 @@ const vt=t=>({_$litStatic$:t}),bt=new Map,xt=(t=>(e,...r)=>{var i;const a=r.leng
|
|
|
349
273
|
<slot name="action"></slot>
|
|
350
274
|
</div>
|
|
351
275
|
</div>
|
|
352
|
-
`}}
|
|
276
|
+
`}}Ni.elementDefinitions={"ft-ripple":y,"ft-typography":mi},$i([o.property()],Ni.prototype,"title",void 0),$i([o.property({type:Boolean})],Ni.prototype,"selected",void 0),i.customElement("ft-card")(Ni),t.FtCard=Ni,t.FtCardCssVariables=Oi,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|