@fluid-topics/ft-card 0.2.3 → 0.2.4
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.inline-styles.js +131 -117
- package/build/ft-card.light.js +69 -55
- package/build/ft-card.min.js +129 -115
- package/package.json +5 -5
package/build/ft-card.light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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=n,a=i.FtCssVariable.extend("--ft-ripple-background-color",n),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"),y=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),d=y,u=i.FtCssVariable.extend("--ft-ripple-background-color",y),g=i.FtCssVariable.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),x=g,b=i.FtCssVariable.extend("--ft-ripple-background-color",g);class v 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.debouncer=new i.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},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
2
|
<style>
|
|
3
3
|
.ft-ripple .ft-ripple--effect,
|
|
4
4
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<div class="ft-ripple--background"></div>
|
|
16
16
|
<div class="ft-ripple--effect"></div>
|
|
17
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
|
|
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){var i,e;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(i=this.target)||void 0===i||i.removeAttribute("data-is-ft-ripple-target")):null===(e=this.target)||void 0===e||e.setAttribute("data-is-ft-ripple-target","true")),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()}}v.elementDefinitions={},v.styles=e.css`
|
|
19
19
|
:host {
|
|
20
20
|
display: contents;
|
|
21
21
|
}
|
|
@@ -34,24 +34,38 @@
|
|
|
34
34
|
.ft-ripple .ft-ripple--effect {
|
|
35
35
|
position: absolute;
|
|
36
36
|
opacity: 0;
|
|
37
|
-
background-color: ${n};
|
|
38
37
|
}
|
|
39
38
|
|
|
40
|
-
.ft-ripple
|
|
41
|
-
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
39
|
+
.ft-ripple .ft-ripple--background {
|
|
42
40
|
background-color: ${a};
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
.ft-ripple.ft-ripple--
|
|
46
|
-
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
43
|
+
.ft-ripple .ft-ripple--effect {
|
|
47
44
|
background-color: ${p};
|
|
48
45
|
}
|
|
49
46
|
|
|
47
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
48
|
+
background-color: ${b};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
52
|
+
background-color: ${x};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
56
|
+
background-color: ${u};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
60
|
+
background-color: ${d};
|
|
61
|
+
}
|
|
62
|
+
|
|
50
63
|
.ft-ripple .ft-ripple--background {
|
|
51
64
|
top: 0;
|
|
52
65
|
left: 0;
|
|
53
66
|
height: 100%;
|
|
54
67
|
width: 100%;
|
|
68
|
+
transition: opacity 75ms linear;
|
|
55
69
|
}
|
|
56
70
|
|
|
57
71
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -90,28 +104,19 @@
|
|
|
90
104
|
opacity: ${l};
|
|
91
105
|
transform: translate(-50%, -50%) scale(1);
|
|
92
106
|
}
|
|
93
|
-
`,s([o.property({type:Boolean})],
|
|
107
|
+
`,s([o.property({type:Boolean})],v.prototype,"primary",void 0),s([o.property({type:Boolean})],v.prototype,"secondary",void 0),s([o.property({type:Boolean})],v.prototype,"unbounded",void 0),s([o.property({type:Boolean})],v.prototype,"activated",void 0),s([o.property({type:Boolean})],v.prototype,"selected",void 0),s([o.property({type:Boolean})],v.prototype,"disabled",void 0),s([o.state()],v.prototype,"hovered",void 0),s([o.state()],v.prototype,"focused",void 0),s([o.state()],v.prototype,"pressed",void 0),s([o.state()],v.prototype,"rippling",void 0),s([o.state()],v.prototype,"rippleSize",void 0),s([o.state()],v.prototype,"originX",void 0),s([o.state()],v.prototype,"originY",void 0),s([o.query(".ft-ripple")],v.prototype,"ripple",void 0),s([o.query(".ft-ripple--effect")],v.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(v);class m{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 m(t,i,void 0,e)}static extend(t,i,e){return new m(t,i.category,i,e)}static external(t,i){return new m(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 $={colorPrimary:m.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:m.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:m.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:m.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:m.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:m.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:m.create("--ft-color-error","COLOR","#B00020"),colorOutline:m.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:m.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:m.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:m.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:m.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:m.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:m.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:m.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:m.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:m.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:m.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:m.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:m.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:m.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:m.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:m.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:m.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:m.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:m.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:m.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:m.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:m.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:m.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:m.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:m.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:m.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:m.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:m.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:m.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:m.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:m.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:m.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:m.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:m.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:m.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:m.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:m.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.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:m.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:m.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:m.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:m.create("--ft-border-radius-XL","SIZE","16px"),titleFont:m.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:m.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:m.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:m.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};
|
|
94
108
|
/**
|
|
95
109
|
* @license
|
|
96
110
|
* Copyright 2017 Google LLC
|
|
97
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
98
|
-
*/var
|
|
112
|
+
*/var O;const N=globalThis.trustedTypes,S=N?N.createPolicy("lit-html",{createHTML:t=>t}):void 0,w=`lit$${(Math.random()+"").slice(9)}$`,R="?"+w,U=`<${R}>`,E=document,F=(t="")=>E.createComment(t),M=t=>null===t||"object"!=typeof t&&"function"!=typeof t,C=Array.isArray,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,B=/-->/g,z=/>/g,L=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,D=/'/g,P=/"/g,A=/^(?:script|style|textarea|title)$/i,W=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),K=Symbol.for("lit-noChange"),_=Symbol.for("lit-nothing"),I=new WeakMap,T=E.createTreeWalker(E,129,null,!1),H=(t,i)=>{const e=t.length-1,o=[];let r,s=2===i?"<svg>":"",n=k;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===k?"!--"===a[1]?n=B:void 0!==a[1]?n=z:void 0!==a[2]?(A.test(a[2])&&(r=RegExp("</"+a[2],"g")),n=L):void 0!==a[3]&&(n=L):n===L?">"===a[0]?(n=null!=r?r:k,l=-1):void 0===a[1]?l=-2:(l=n.lastIndex-a[2].length,p=a[1],n=void 0===a[3]?L:'"'===a[3]?P:D):n===P||n===D?n=L:n===B||n===z?n=k:(n=L,r=void 0);const h=n===L&&t[i+1].startsWith("/>")?" ":"";s+=n===k?e+U:l>=0?(o.push(p),e.slice(0,l)+"$lit$"+e.slice(l)+w+h):e+w+(-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!==S?S.createHTML(p):p,o]};class Z{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]=H(t,i);if(this.el=Z.createElement(a,e),T.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=T.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(w)){const e=l[s++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(w),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:r,name:i[2],strings:t,ctor:"."===i[1]?Y:"?"===i[1]?J:"@"===i[1]?Q:X})}else p.push({type:6,index:r})}for(const i of t)o.removeAttribute(i)}if(A.test(o.tagName)){const t=o.textContent.split(w),i=t.length-1;if(i>0){o.textContent=N?N.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],F()),T.nextNode(),p.push({type:2,index:++r});o.append(t[i],F())}}}else if(8===o.nodeType)if(o.data===R)p.push({type:2,index:r});else{let t=-1;for(;-1!==(t=o.data.indexOf(w,t+1));)p.push({type:7,index:r}),t+=w.length-1}r++}}static createElement(t,i){const e=E.createElement("template");return e.innerHTML=t,e}}function j(t,i,e=t,o){var r,s,n,p;if(i===K)return i;let a=void 0!==o?null===(r=e._$Cl)||void 0===r?void 0:r[o]:e._$Cu;const l=M(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=j(t,a._$AS(t,i.values),a,o)),i}class G{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:E).importNode(e,!0);T.currentNode=r;let s=T.nextNode(),n=0,p=0,a=o[0];for(;void 0!==a;){if(n===a.index){let i;2===a.type?i=new V(s,s.nextSibling,this,t):1===a.type?i=new a.ctor(s,a.name,a.strings,this,t):6===a.type&&(i=new tt(s,this,t)),this.v.push(i),a=o[++p]}n!==(null==a?void 0:a.index)&&(s=T.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 V{constructor(t,i,e,o){var r;this.type=2,this._$AH=_,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=j(this,t,i),M(t)?t===_||null==t||""===t?(this._$AH!==_&&this._$AR(),this._$AH=_):t!==this._$AH&&t!==K&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var i;return C(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!==_&&M(this._$AH)?this._$AA.nextSibling.data=t:this.S(E.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=Z.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 G(r,this),i=t.p(this.options);t.m(e),this.S(i),this._$AH=t}}_$AC(t){let i=I.get(t.strings);return void 0===i&&I.set(t.strings,i=new Z(t)),i}A(t){C(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 V(this.M(F()),this.M(F()),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 X{constructor(t,i,e,o,r){this.type=1,this._$AH=_,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=_}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=j(this,t,i,0),s=!M(t)||t!==this._$AH&&t!==K,s&&(this._$AH=t);else{const o=t;let n,p;for(t=r[0],n=0;n<r.length-1;n++)p=j(this,o[e+n],i,n),p===K&&(p=this._$AH[n]),s||(s=!M(p)||p!==this._$AH[n]),p===_?t=_:t!==_&&(t+=(null!=p?p:"")+r[n+1]),this._$AH[n]=p}s&&!o&&this.k(t)}k(t){t===_?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Y extends X{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===_?void 0:t}}const q=N?N.emptyScript:"";class J extends X{constructor(){super(...arguments),this.type=4}k(t){t&&t!==_?this.element.setAttribute(this.name,q):this.element.removeAttribute(this.name)}}class Q extends X{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=j(this,t,i,0))&&void 0!==e?e:_)===K)return;const o=this._$AH,r=t===_&&o!==_||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,s=t!==_&&(o===_||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 tt{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){j(this,t)}}const it=window.litHtmlPolyfillSupport;null==it||it(Z,V),(null!==(O=globalThis.litHtmlVersions)&&void 0!==O?O:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
99
113
|
/**
|
|
100
114
|
* @license
|
|
101
115
|
* Copyright 2020 Google LLC
|
|
102
116
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
117
|
*/
|
|
104
|
-
const
|
|
118
|
+
const et=t=>({_$litStatic$:t}),ot=new Map,rt=(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=ot.get(t))&&(p.raw=p,ot.set(t,i=p)),e=a}return t(i,...e)})(W);var st,nt=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"}(st||(st={}));const pt=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),at=i.FtCssVariable.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),lt={fontFamily:at,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")},ft=i.FtCssVariable.extend("--ft-typography-title-font-family",pt),ht=i.FtCssVariable.extend("--ft-typography-title-font-size",lt.fontSize,"20px"),ct=i.FtCssVariable.extend("--ft-typography-title-font-weight",lt.fontWeight,"normal"),yt=i.FtCssVariable.extend("--ft-typography-title-letter-spacing",lt.letterSpacing,"0.15px"),dt=i.FtCssVariable.extend("--ft-typography-title-line-height",lt.lineHeight,"24px"),ut=i.FtCssVariable.extend("--ft-typography-title-text-transform",lt.textTransform,"inherit"),gt=i.FtCssVariable.extend("--ft-typography-title-dense-font-family",pt),xt=i.FtCssVariable.extend("--ft-typography-title-dense-font-size",lt.fontSize,"14px"),bt=i.FtCssVariable.extend("--ft-typography-title-dense-font-weight",lt.fontWeight,"normal"),vt=i.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",lt.letterSpacing,"0.105px"),mt=i.FtCssVariable.extend("--ft-typography-title-dense-line-height",lt.lineHeight,"24px"),$t=i.FtCssVariable.extend("--ft-typography-title-dense-text-transform",lt.textTransform,"inherit"),Ot=i.FtCssVariable.extend("--ft-typography-subtitle1-font-family",at),Nt=i.FtCssVariable.extend("--ft-typography-subtitle1-font-size",lt.fontSize,"16px"),St=i.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",lt.fontWeight,"600"),wt=i.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",lt.letterSpacing,"0.144px"),Rt=i.FtCssVariable.extend("--ft-typography-subtitle1-line-height",lt.lineHeight,"24px"),Ut=i.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",lt.textTransform,"inherit"),Et=i.FtCssVariable.extend("--ft-typography-subtitle2-font-family",at),Ft=i.FtCssVariable.extend("--ft-typography-subtitle2-font-size",lt.fontSize,"14px"),Mt=i.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",lt.fontWeight,"normal"),Ct=i.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",lt.letterSpacing,"0.098px"),kt=i.FtCssVariable.extend("--ft-typography-subtitle2-line-height",lt.lineHeight,"24px"),Bt=i.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",lt.textTransform,"inherit"),zt=i.FtCssVariable.extend("--ft-typography-body1-font-family",at),Lt=i.FtCssVariable.extend("--ft-typography-body1-font-size",lt.fontSize,"16px"),Dt=i.FtCssVariable.extend("--ft-typography-body1-font-weight",lt.fontWeight,"normal"),Pt=i.FtCssVariable.extend("--ft-typography-body1-letter-spacing",lt.letterSpacing,"0.496px"),At=i.FtCssVariable.extend("--ft-typography-body1-line-height",lt.lineHeight,"24px"),Wt=i.FtCssVariable.extend("--ft-typography-body1-text-transform",lt.textTransform,"inherit"),Kt=i.FtCssVariable.extend("--ft-typography-body2-font-family",at),_t=i.FtCssVariable.extend("--ft-typography-body2-font-size",lt.fontSize,"14px"),It=i.FtCssVariable.extend("--ft-typography-body2-font-weight",lt.fontWeight,"normal"),Tt=i.FtCssVariable.extend("--ft-typography-body2-letter-spacing",lt.letterSpacing,"0.252px"),Ht=i.FtCssVariable.extend("--ft-typography-body2-line-height",lt.lineHeight,"20px"),Zt=i.FtCssVariable.extend("--ft-typography-body2-text-transform",lt.textTransform,"inherit"),jt=i.FtCssVariable.extend("--ft-typography-caption-font-family",at),Gt=i.FtCssVariable.extend("--ft-typography-caption-font-size",lt.fontSize,"12px"),Vt=i.FtCssVariable.extend("--ft-typography-caption-font-weight",lt.fontWeight,"normal"),Xt=i.FtCssVariable.extend("--ft-typography-caption-letter-spacing",lt.letterSpacing,"0.396px"),Yt=i.FtCssVariable.extend("--ft-typography-caption-line-height",lt.lineHeight,"16px"),qt=i.FtCssVariable.extend("--ft-typography-caption-text-transform",lt.textTransform,"inherit"),Jt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",at),Qt=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",lt.fontSize,"10px"),ti=i.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",lt.fontWeight,"normal"),ii=i.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",lt.letterSpacing,"0.33px"),ei=i.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",lt.lineHeight,"16px"),oi=i.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",lt.textTransform,"inherit"),ri=i.FtCssVariable.extend("--ft-typography-overline-font-family",at),si=i.FtCssVariable.extend("--ft-typography-overline-font-size",lt.fontSize,"10px"),ni=i.FtCssVariable.extend("--ft-typography-overline-font-weight",lt.fontWeight,"normal"),pi=i.FtCssVariable.extend("--ft-typography-overline-letter-spacing",lt.letterSpacing,"1.5px"),ai=i.FtCssVariable.extend("--ft-typography-overline-line-height",lt.lineHeight,"16px"),li=i.FtCssVariable.extend("--ft-typography-overline-text-transform",lt.textTransform,"uppercase"),fi=i.FtCssVariable.extend("--ft-typography-button-font-family",at),hi=i.FtCssVariable.extend("--ft-typography-button-font-size",lt.fontSize,"14px"),ci=i.FtCssVariable.extend("--ft-typography-button-font-weight",lt.fontWeight,"600"),yi=i.FtCssVariable.extend("--ft-typography-button-letter-spacing",lt.letterSpacing,"1.246px"),di=i.FtCssVariable.extend("--ft-typography-button-line-height",lt.lineHeight,"16px"),ui=i.FtCssVariable.extend("--ft-typography-button-text-transform",lt.textTransform,"uppercase"),gi=e.css`
|
|
105
119
|
.ft-typography--title {
|
|
106
|
-
font-family: ${rt};
|
|
107
|
-
font-size: ${st};
|
|
108
|
-
font-weight: ${nt};
|
|
109
|
-
letter-spacing: ${pt};
|
|
110
|
-
line-height: ${at};
|
|
111
|
-
text-transform: ${lt};
|
|
112
|
-
}
|
|
113
|
-
`,hi=e.css`
|
|
114
|
-
.ft-typography--title-dense {
|
|
115
120
|
font-family: ${ft};
|
|
116
121
|
font-size: ${ht};
|
|
117
122
|
font-weight: ${ct};
|
|
@@ -119,8 +124,8 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
119
124
|
line-height: ${dt};
|
|
120
125
|
text-transform: ${ut};
|
|
121
126
|
}
|
|
122
|
-
`,
|
|
123
|
-
.ft-typography--
|
|
127
|
+
`,xi=e.css`
|
|
128
|
+
.ft-typography--title-dense {
|
|
124
129
|
font-family: ${gt};
|
|
125
130
|
font-size: ${xt};
|
|
126
131
|
font-weight: ${bt};
|
|
@@ -128,8 +133,8 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
128
133
|
line-height: ${mt};
|
|
129
134
|
text-transform: ${$t};
|
|
130
135
|
}
|
|
131
|
-
`,
|
|
132
|
-
.ft-typography--
|
|
136
|
+
`,bi=e.css`
|
|
137
|
+
.ft-typography--subtitle1 {
|
|
133
138
|
font-family: ${Ot};
|
|
134
139
|
font-size: ${Nt};
|
|
135
140
|
font-weight: ${St};
|
|
@@ -137,18 +142,18 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
137
142
|
line-height: ${Rt};
|
|
138
143
|
text-transform: ${Ut};
|
|
139
144
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
.ft-typography--body1 {
|
|
145
|
+
`,vi=e.css`
|
|
146
|
+
.ft-typography--subtitle2 {
|
|
143
147
|
font-family: ${Et};
|
|
144
148
|
font-size: ${Ft};
|
|
145
149
|
font-weight: ${Mt};
|
|
146
150
|
letter-spacing: ${Ct};
|
|
147
|
-
line-height: ${
|
|
148
|
-
text-transform: ${
|
|
151
|
+
line-height: ${kt};
|
|
152
|
+
text-transform: ${Bt};
|
|
149
153
|
}
|
|
150
|
-
|
|
151
|
-
|
|
154
|
+
|
|
155
|
+
`,mi=e.css`
|
|
156
|
+
.ft-typography--body1 {
|
|
152
157
|
font-family: ${zt};
|
|
153
158
|
font-size: ${Lt};
|
|
154
159
|
font-weight: ${Dt};
|
|
@@ -156,8 +161,8 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
156
161
|
line-height: ${At};
|
|
157
162
|
text-transform: ${Wt};
|
|
158
163
|
}
|
|
159
|
-
|
|
160
|
-
.ft-typography--
|
|
164
|
+
`,$i=e.css`
|
|
165
|
+
.ft-typography--body2 {
|
|
161
166
|
font-family: ${Kt};
|
|
162
167
|
font-size: ${_t};
|
|
163
168
|
font-weight: ${It};
|
|
@@ -165,8 +170,8 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
165
170
|
line-height: ${Ht};
|
|
166
171
|
text-transform: ${Zt};
|
|
167
172
|
}
|
|
168
|
-
`,
|
|
169
|
-
.ft-typography--
|
|
173
|
+
`,Oi=e.css`
|
|
174
|
+
.ft-typography--caption {
|
|
170
175
|
font-family: ${jt};
|
|
171
176
|
font-size: ${Gt};
|
|
172
177
|
font-weight: ${Vt};
|
|
@@ -174,8 +179,8 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
174
179
|
line-height: ${Yt};
|
|
175
180
|
text-transform: ${qt};
|
|
176
181
|
}
|
|
177
|
-
`,
|
|
178
|
-
.ft-typography--
|
|
182
|
+
`,Ni=e.css`
|
|
183
|
+
.ft-typography--breadcrumb {
|
|
179
184
|
font-family: ${Jt};
|
|
180
185
|
font-size: ${Qt};
|
|
181
186
|
font-weight: ${ti};
|
|
@@ -183,8 +188,8 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
183
188
|
line-height: ${ei};
|
|
184
189
|
text-transform: ${oi};
|
|
185
190
|
}
|
|
186
|
-
`,
|
|
187
|
-
.ft-typography--
|
|
191
|
+
`,Si=e.css`
|
|
192
|
+
.ft-typography--overline {
|
|
188
193
|
font-family: ${ri};
|
|
189
194
|
font-size: ${si};
|
|
190
195
|
font-weight: ${ni};
|
|
@@ -192,42 +197,51 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
192
197
|
line-height: ${ai};
|
|
193
198
|
text-transform: ${li};
|
|
194
199
|
}
|
|
195
|
-
|
|
196
|
-
|
|
200
|
+
`,wi=e.css`
|
|
201
|
+
.ft-typography--button {
|
|
202
|
+
font-family: ${fi};
|
|
203
|
+
font-size: ${hi};
|
|
204
|
+
font-weight: ${ci};
|
|
205
|
+
letter-spacing: ${yi};
|
|
206
|
+
line-height: ${di};
|
|
207
|
+
text-transform: ${ui};
|
|
208
|
+
}
|
|
209
|
+
`;class Ri extends i.FtLitElement{constructor(){super(...arguments),this.variant=st.body1}render(){return this.element?rt`
|
|
210
|
+
<${et(this.element)}
|
|
197
211
|
class="ft-typography ft-typography--${this.variant}">
|
|
198
212
|
<slot></slot>
|
|
199
|
-
</${
|
|
200
|
-
`:
|
|
213
|
+
</${et(this.element)}>
|
|
214
|
+
`:rt`
|
|
201
215
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
202
|
-
`}}
|
|
216
|
+
`}}Ri.styles=[gi,xi,bi,vi,mi,$i,Oi,Ni,Si,wi,e.css`
|
|
203
217
|
.ft-typography {
|
|
204
218
|
vertical-align: inherit;
|
|
205
219
|
}
|
|
206
|
-
`],
|
|
220
|
+
`],nt([o.property()],Ri.prototype,"element",void 0),nt([o.property()],Ri.prototype,"variant",void 0),i.customElement("ft-typography")(Ri);var Ui=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 Ei={padding:i.FtCssVariable.create("--ft-card-padding","SIZE","12px"),colorPrimary:i.FtCssVariable.external($.colorPrimary,"Design system"),colorSurface:i.FtCssVariable.external($.colorSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariable.external($.colorOnSurfaceMedium,"Design system"),colorOnSurfaceHigh:i.FtCssVariable.external($.colorOnSurfaceHigh,"Design system"),borderRadiusM:i.FtCssVariable.external($.borderRadiusM,"Design system"),elevation02:i.FtCssVariable.external($.elevation02,"Design system"),elevation04:i.FtCssVariable.external($.elevation04,"Design system")};class Fi extends i.FtLitElement{constructor(){super(...arguments),this.title="",this.selected=!1}static get styles(){return e.css`
|
|
207
221
|
:host {
|
|
208
222
|
display: block;
|
|
209
223
|
}
|
|
210
224
|
|
|
211
225
|
#container {
|
|
212
|
-
padding: ${
|
|
213
|
-
border-radius: ${
|
|
214
|
-
box-shadow: ${
|
|
226
|
+
padding: ${Ei.padding};
|
|
227
|
+
border-radius: ${Ei.borderRadiusM};
|
|
228
|
+
box-shadow: ${Ei.elevation02};
|
|
215
229
|
position: relative;
|
|
216
230
|
width: 100%;
|
|
217
231
|
height: 100%;
|
|
218
232
|
display: block;
|
|
219
233
|
box-sizing: border-box;
|
|
220
|
-
background-color: ${
|
|
234
|
+
background-color: ${Ei.colorSurface};
|
|
221
235
|
transition: box-shadow 0.2s linear, color 0.2s linear;
|
|
222
236
|
}
|
|
223
237
|
|
|
224
238
|
#container:hover {
|
|
225
|
-
box-shadow: ${
|
|
239
|
+
box-shadow: ${Ei.elevation04};
|
|
226
240
|
}
|
|
227
241
|
|
|
228
242
|
#container.selected {
|
|
229
|
-
outline: solid 2px ${
|
|
230
|
-
box-shadow: ${
|
|
243
|
+
outline: solid 2px ${Ei.colorPrimary};
|
|
244
|
+
box-shadow: ${Ei.elevation04};
|
|
231
245
|
}
|
|
232
246
|
|
|
233
247
|
#header:not([hidden]) {
|
|
@@ -241,21 +255,21 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
241
255
|
|
|
242
256
|
.title {
|
|
243
257
|
text-overflow: ellipsis;
|
|
244
|
-
color: ${
|
|
258
|
+
color: ${Ei.colorOnSurfaceHigh};
|
|
245
259
|
}
|
|
246
260
|
|
|
247
261
|
#content {
|
|
248
262
|
opacity: 1;
|
|
249
263
|
font-size: 15px;
|
|
250
264
|
height: 100%;
|
|
251
|
-
color: ${
|
|
265
|
+
color: ${Ei.colorOnSurfaceMedium};
|
|
252
266
|
}
|
|
253
267
|
|
|
254
268
|
#action {
|
|
255
269
|
position: absolute;
|
|
256
270
|
top: 0;
|
|
257
271
|
right: 0;
|
|
258
|
-
color: ${
|
|
272
|
+
color: ${Ei.colorOnSurfaceHigh};
|
|
259
273
|
}
|
|
260
274
|
`}render(){return e.html`
|
|
261
275
|
<div id="container" part="container" class=${this.selected?"selected":""}>
|
|
@@ -273,4 +287,4 @@ const Y=t=>({_$litStatic$:t}),q=new Map,J=(t=>(i,...e)=>{var o;const r=e.length;
|
|
|
273
287
|
<slot name="action"></slot>
|
|
274
288
|
</div>
|
|
275
289
|
</div>
|
|
276
|
-
`}}
|
|
290
|
+
`}}Fi.elementDefinitions={"ft-ripple":v,"ft-typography":Ri},Ui([o.property()],Fi.prototype,"title",void 0),Ui([o.property({type:Boolean})],Fi.prototype,"selected",void 0),i.customElement("ft-card")(Fi),t.FtCard=Fi,t.FtCardCssVariables=Ei,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|