@fluid-topics/ft-card 0.3.71 → 1.0.0-alpha.1
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.css.d.ts +0 -1
- package/build/ft-card.css.js +17 -19
- package/build/ft-card.d.ts +1 -1
- package/build/ft-card.js +21 -12
- package/build/ft-card.light.js +113 -114
- package/build/ft-card.min.js +140 -151
- package/build/ft-card.properties.d.ts +1 -1
- package/build/ft-card.properties.js +0 -1
- package/build/index.d.ts +0 -1
- package/build/index.js +0 -1
- package/package.json +6 -6
package/build/ft-card.css.d.ts
CHANGED
package/build/ft-card.css.js
CHANGED
|
@@ -23,29 +23,33 @@ export const styles = css `
|
|
|
23
23
|
position: relative;
|
|
24
24
|
width: 100%;
|
|
25
25
|
height: 100%;
|
|
26
|
-
display:
|
|
26
|
+
display: grid;
|
|
27
|
+
grid-template:
|
|
28
|
+
"header actions"
|
|
29
|
+
"content content";
|
|
30
|
+
grid-template-columns: minmax(0, 1fr) max-content;
|
|
31
|
+
grid-template-rows: max-content minmax(0, 1fr);
|
|
32
|
+
grid-gap: 8px;
|
|
27
33
|
box-sizing: border-box;
|
|
28
34
|
background-color: ${FtCardCssVariables.colorSurface};
|
|
29
35
|
transition: box-shadow 0.2s linear, color 0.2s linear;
|
|
30
36
|
}
|
|
31
37
|
|
|
32
|
-
#container:hover {
|
|
33
|
-
box-shadow: ${FtCardCssVariables.elevation04};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
38
|
#container.selected {
|
|
37
39
|
outline: solid 2px ${FtCardCssVariables.colorPrimary};
|
|
38
40
|
box-shadow: ${FtCardCssVariables.elevation04};
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
margin-bottom: 8px;
|
|
44
|
-
width: calc(100% - 24px);
|
|
43
|
+
#container.clickable {
|
|
44
|
+
cursor: pointer;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
#
|
|
48
|
-
|
|
47
|
+
#container.clickable:hover {
|
|
48
|
+
box-shadow: ${FtCardCssVariables.elevation04};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
#header {
|
|
52
|
+
grid-area: header;
|
|
49
53
|
}
|
|
50
54
|
|
|
51
55
|
.title {
|
|
@@ -55,17 +59,11 @@ export const styles = css `
|
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
#content {
|
|
58
|
-
|
|
59
|
-
font-size: 15px;
|
|
60
|
-
height: 100%;
|
|
62
|
+
grid-area: content;
|
|
61
63
|
color: ${FtCardCssVariables.colorOnSurfaceMedium};
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
#action {
|
|
65
|
-
|
|
66
|
-
top: 0;
|
|
67
|
-
right: 0;
|
|
68
|
-
color: ${FtCardCssVariables.colorOnSurfaceHigh};
|
|
67
|
+
grid-area: actions;
|
|
69
68
|
}
|
|
70
69
|
`;
|
|
71
|
-
//# sourceMappingURL=ft-card.css.js.map
|
package/build/ft-card.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare class FtCard extends FtLitElement implements FtCardProperties {
|
|
|
4
4
|
static elementDefinitions: ElementDefinitionsMap;
|
|
5
5
|
static styles: import("lit").CSSResult;
|
|
6
6
|
title: string;
|
|
7
|
+
clickable: boolean;
|
|
7
8
|
selected: boolean;
|
|
8
9
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
9
10
|
}
|
|
10
|
-
//# sourceMappingURL=ft-card.d.ts.map
|
package/build/ft-card.js
CHANGED
|
@@ -4,34 +4,40 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { html, } from "lit";
|
|
7
|
+
import { html, nothing, } from "lit";
|
|
8
8
|
import { property } from "lit/decorators.js";
|
|
9
9
|
import { FtLitElement } from "@fluid-topics/ft-wc-utils";
|
|
10
10
|
import { FtRipple } from "@fluid-topics/ft-ripple";
|
|
11
11
|
import { FtTypography } from "@fluid-topics/ft-typography";
|
|
12
12
|
import { styles } from "./ft-card.css";
|
|
13
|
-
|
|
13
|
+
import { classMap } from "lit/directives/class-map.js";
|
|
14
|
+
class FtCard extends FtLitElement {
|
|
14
15
|
constructor() {
|
|
15
16
|
super(...arguments);
|
|
16
17
|
this.title = "";
|
|
18
|
+
this.clickable = false;
|
|
17
19
|
this.selected = false;
|
|
18
20
|
}
|
|
19
21
|
render() {
|
|
22
|
+
const classes = {
|
|
23
|
+
selected: this.selected,
|
|
24
|
+
clickable: this.clickable,
|
|
25
|
+
};
|
|
20
26
|
return html `
|
|
21
|
-
<div id="container" part="container" class=${
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
<div id="container" part="container" class=${classMap(classes)}>
|
|
28
|
+
${this.clickable ? html `
|
|
29
|
+
<ft-ripple primary ?selected=${this.selected}></ft-ripple>
|
|
30
|
+
` : nothing}
|
|
31
|
+
<div id="header" part="header">
|
|
24
32
|
<ft-typography class="title" element="span" variant="title">${this.title}</ft-typography>
|
|
25
|
-
<
|
|
26
|
-
<slot name="header"></slot>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div id="content" part="content">
|
|
30
|
-
<slot></slot>
|
|
33
|
+
<slot name="header"></slot>
|
|
31
34
|
</div>
|
|
32
35
|
<div id="action" part="action">
|
|
33
36
|
<slot name="action"></slot>
|
|
34
37
|
</div>
|
|
38
|
+
<div id="content" part="content">
|
|
39
|
+
<ft-typography variant="body2"><slot></slot></ft-typography>
|
|
40
|
+
</div>
|
|
35
41
|
</div>
|
|
36
42
|
`;
|
|
37
43
|
}
|
|
@@ -44,7 +50,10 @@ FtCard.styles = styles;
|
|
|
44
50
|
__decorate([
|
|
45
51
|
property()
|
|
46
52
|
], FtCard.prototype, "title", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
property({ type: Boolean })
|
|
55
|
+
], FtCard.prototype, "clickable", void 0);
|
|
47
56
|
__decorate([
|
|
48
57
|
property({ type: Boolean })
|
|
49
58
|
], FtCard.prototype, "selected", void 0);
|
|
50
|
-
|
|
59
|
+
export { FtCard };
|
package/build/ft-card.light.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
!function(t,i,e,o,s){const r=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),n=r,p=i.FtCssVariableFactory.extend("--ft-ripple-background-color",r),l=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),h=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),a=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),f=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),d=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),
|
|
1
|
+
!function(t,i,e,o,s){const r=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),n=r,p=i.FtCssVariableFactory.extend("--ft-ripple-background-color",r),l=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),h=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),a=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),f=i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),d=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),c=d,y=i.FtCssVariableFactory.extend("--ft-ripple-background-color",d),g=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),u=g,v=i.FtCssVariableFactory.extend("--ft-ripple-background-color",g),b=e.css`
|
|
2
2
|
:host {
|
|
3
3
|
display: contents;
|
|
4
4
|
}
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
39
|
-
background-color: ${
|
|
39
|
+
background-color: ${y};
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
43
|
-
background-color: ${
|
|
43
|
+
background-color: ${c};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.ft-ripple .ft-ripple--background {
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
opacity: ${l};
|
|
88
88
|
transform: translate(-50%, -50%) scale(1);
|
|
89
89
|
}
|
|
90
|
-
`;var
|
|
90
|
+
`;var m,$=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class x 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.setupDebouncer=new i.Debouncer(10),this.moveRipple=t=>{var i,e;let{x:o,y:s}=this.getCoordinates(t),r=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-r.x:r.width/2),this.originY=Math.round(null!=s?s-r.y:r.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`
|
|
91
91
|
<style>
|
|
92
92
|
.ft-ripple .ft-ripple--effect,
|
|
93
93
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -104,115 +104,115 @@
|
|
|
104
104
|
<div class="ft-ripple--background"></div>
|
|
105
105
|
<div class="ft-ripple--effect"></div>
|
|
106
106
|
</div>
|
|
107
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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"),s=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",s),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",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}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()}}x.elementDefinitions={},x.styles=b,m([o.property({type:Boolean})],x.prototype,"primary",void 0),m([o.property({type:Boolean})],x.prototype,"secondary",void 0),m([o.property({type:Boolean})],x.prototype,"unbounded",void 0),m([o.property({type:Boolean})],x.prototype,"activated",void 0),m([o.property({type:Boolean})],x.prototype,"selected",void 0),m([o.property({type:Boolean})],x.prototype,"disabled",void 0),m([o.state()],x.prototype,"hovered",void 0),m([o.state()],x.prototype,"focused",void 0),m([o.state()],x.prototype,"pressed",void 0),m([o.state()],x.prototype,"rippling",void 0),m([o.state()],x.prototype,"rippleSize",void 0),m([o.state()],x.prototype,"originX",void 0),m([o.state()],x.prototype,"originY",void 0),m([o.query(".ft-ripple")],x.prototype,"ripple",void 0),m([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const w=window,k=w.trustedTypes,z=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,A=`lit$${(Math.random()+"").slice(9)}$`,S="?"+A,_=`<${S}>`,O=document,N=(t="")=>O.createComment(t),j=t=>null===t||"object"!=typeof t&&"function"!=typeof t,D=Array.isArray,E=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,M=/-->/g,B=/>/g,I=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),R=/'/g,C=/"/g,U=/^(?:script|style|textarea|title)$/i,T=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),Z=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),W=new WeakMap,H=O.createTreeWalker(O,129,null,!1),F=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=E;for(let i=0;i<e;i++){const e=t[i];let p,l,h=-1,a=0;for(;a<e.length&&(n.lastIndex=a,l=n.exec(e),null!==l);)a=n.lastIndex,n===E?"!--"===l[1]?n=M:void 0!==l[1]?n=B:void 0!==l[2]?(U.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=I):void 0!==l[3]&&(n=I):n===I?">"===l[0]?(n=null!=s?s:E,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,p=l[1],n=void 0===l[3]?I:'"'===l[3]?C:R):n===C||n===R?n=I:n===M||n===B?n=E:(n=I,s=void 0);const f=n===I&&t[i+1].startsWith("/>")?" ":"";r+=n===E?e+_:h>=0?(o.push(p),e.slice(0,h)+"$lit$"+e.slice(h)+A+f):e+A+(-2===h?(o.push(void 0),i):f)}const p=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==z?z.createHTML(p):p,o]};class K{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,p=this.parts,[l,h]=F(t,i);if(this.el=K.createElement(l,e),H.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=H.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(A)){const e=h[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+"$lit$").split(A),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?q:"?"===i[1]?Q:"@"===i[1]?V:Y})}else p.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(U.test(o.tagName)){const t=o.textContent.split(A),i=t.length-1;if(i>0){o.textContent=k?k.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],N()),H.nextNode(),p.push({type:2,index:++s});o.append(t[i],N())}}}else if(8===o.nodeType)if(o.data===S)p.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(A,t+1));)p.push({type:7,index:s}),t+=A.length-1}s++}}static createElement(t,i){const e=O.createElement("template");return e.innerHTML=t,e}}function L(t,i,e=t,o){var s,r,n,p;if(i===Z)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=j(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(n=(p=e)._$Co)&&void 0!==n?n:p._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=L(t,l._$AS(t,i.values),l,o)),i}class P{constructor(t,i){this.u=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:O).importNode(e,!0);H.currentNode=s;let r=H.nextNode(),n=0,p=0,l=o[0];for(;void 0!==l;){if(n===l.index){let i;2===l.type?i=new X(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new tt(r,this,t)),this.u.push(i),l=o[++p]}n!==(null==l?void 0:l.index)&&(r=H.nextNode(),n++)}return s}p(t){let i=0;for(const e of this.u)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class X{constructor(t,i,e,o){var s;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cm=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cm}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=L(this,t,i),j(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==Z&&this.g(t):void 0!==t._$litType$?this.$(t):void 0!==t.nodeType?this.T(t):(t=>D(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.k(t):this.g(t)}O(t,i=this._$AB){return this._$AA.parentNode.insertBefore(t,i)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}g(t){this._$AH!==G&&j(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=K.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.p(e);else{const t=new P(s,this),i=t.v(this.options);t.p(e),this.T(i),this._$AH=t}}_$AC(t){let i=W.get(t.strings);return void 0===i&&W.set(t.strings,i=new K(t)),i}k(t){D(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new X(this.O(N()),this.O(N()),this,this.options)):e=i[o],e._$AI(s),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._$Cm=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class Y{constructor(t,i,e,o,s){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let r=!1;if(void 0===s)t=L(this,t,i,0),r=!j(t)||t!==this._$AH&&t!==Z,r&&(this._$AH=t);else{const o=t;let n,p;for(t=s[0],n=0;n<s.length-1;n++)p=L(this,o[e+n],i,n),p===Z&&(p=this._$AH[n]),r||(r=!j(p)||p!==this._$AH[n]),p===G?t=G:t!==G&&(t+=(null!=p?p:"")+s[n+1]),this._$AH[n]=p}r&&!o&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class q extends Y{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const J=k?k.emptyScript:"";class Q extends Y{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,J):this.element.removeAttribute(this.name)}}class V extends Y{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=L(this,t,i,0))&&void 0!==e?e:G)===Z)return;const o=this._$AH,s=t===G&&o!==G||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==G&&(o===G||s);s&&this.element.removeEventListener(this.name,this,o),r&&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){L(this,t)}}const it=w.litHtmlPolyfillSupport;null==it||it(K,X),(null!==($=w.litHtmlVersions)&&void 0!==$?$:w.litHtmlVersions=[]).push("2.4.0");
|
|
107
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>{var t;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"),s=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",s),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",s),t.removeEventListener("focus",this.startFocus),t.removeEventListener("blur",this.endFocus),t.removeEventListener("focusin",this.startFocus),t.removeEventListener("focusout",this.endFocus),this.onDisconnect=void 0,this.target=void 0}}getCoordinates(t){const i=t,e=t;let o,s;return null!=i.x?({x:o,y:s}=i):null!=e.touches&&(o=e.touches[0].clientX,s=e.touches[0].clientY),{x:o,y:s}}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()}}x.elementDefinitions={},x.styles=b,$([o.property({type:Boolean})],x.prototype,"primary",void 0),$([o.property({type:Boolean})],x.prototype,"secondary",void 0),$([o.property({type:Boolean})],x.prototype,"unbounded",void 0),$([o.property({type:Boolean})],x.prototype,"activated",void 0),$([o.property({type:Boolean})],x.prototype,"selected",void 0),$([o.property({type:Boolean})],x.prototype,"disabled",void 0),$([o.state()],x.prototype,"hovered",void 0),$([o.state()],x.prototype,"focused",void 0),$([o.state()],x.prototype,"pressed",void 0),$([o.state()],x.prototype,"rippling",void 0),$([o.state()],x.prototype,"rippleSize",void 0),$([o.state()],x.prototype,"originX",void 0),$([o.state()],x.prototype,"originY",void 0),$([o.query(".ft-ripple")],x.prototype,"ripple",void 0),$([o.query(".ft-ripple--effect")],x.prototype,"rippleEffect",void 0),i.customElement("ft-ripple")(x);const w=window,k=w.trustedTypes,z=k?k.createPolicy("lit-html",{createHTML:t=>t}):void 0,A="$lit$",S=`lit$${(Math.random()+"").slice(9)}$`,_="?"+S,N=`<${_}>`,D=document,E=()=>D.createComment(""),O=t=>null===t||"object"!=typeof t&&"function"!=typeof t,j=Array.isArray,M="[ \t\n\f\r]",B=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,I=/-->/g,R=/>/g,C=RegExp(`>|${M}(?:([^\\s"'>=/]+)(${M}*=${M}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),U=/'/g,T=/"/g,Z=/^(?:script|style|textarea|title)$/i,G=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),W=Symbol.for("lit-noChange"),H=Symbol.for("lit-nothing"),F=new WeakMap,K=D.createTreeWalker(D,129,null,!1),L=(t,i)=>{const e=t.length-1,o=[];let s,r=2===i?"<svg>":"",n=B;for(let i=0;i<e;i++){const e=t[i];let p,l,h=-1,a=0;for(;a<e.length&&(n.lastIndex=a,l=n.exec(e),null!==l);)a=n.lastIndex,n===B?"!--"===l[1]?n=I:void 0!==l[1]?n=R:void 0!==l[2]?(Z.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=C):void 0!==l[3]&&(n=C):n===C?">"===l[0]?(n=null!=s?s:B,h=-1):void 0===l[1]?h=-2:(h=n.lastIndex-l[2].length,p=l[1],n=void 0===l[3]?C:'"'===l[3]?T:U):n===T||n===U?n=C:n===I||n===R?n=B:(n=C,s=void 0);const f=n===C&&t[i+1].startsWith("/>")?" ":"";r+=n===B?e+N:h>=0?(o.push(p),e.slice(0,h)+A+e.slice(h)+S+f):e+S+(-2===h?(o.push(void 0),i):f)}const p=r+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==z?z.createHTML(p):p,o]};class P{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,r=0;const n=t.length-1,p=this.parts,[l,h]=L(t,i);if(this.el=P.createElement(l,e),K.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=K.nextNode())&&p.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(A)||i.startsWith(S)){const e=h[r++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+A).split(S),i=/([.?@])?(.*)/.exec(e);p.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?Q:"?"===i[1]?tt:"@"===i[1]?it:J})}else p.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(Z.test(o.tagName)){const t=o.textContent.split(S),i=t.length-1;if(i>0){o.textContent=k?k.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],E()),K.nextNode(),p.push({type:2,index:++s});o.append(t[i],E())}}}else if(8===o.nodeType)if(o.data===_)p.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(S,t+1));)p.push({type:7,index:s}),t+=S.length-1}s++}}static createElement(t,i){const e=D.createElement("template");return e.innerHTML=t,e}}function X(t,i,e=t,o){var s,r,n,p;if(i===W)return i;let l=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=O(i)?void 0:i._$litDirective$;return(null==l?void 0:l.constructor)!==h&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===h?l=void 0:(l=new h(t),l._$AT(t,e,o)),void 0!==o?(null!==(n=(p=e)._$Co)&&void 0!==n?n:p._$Co=[])[o]=l:e._$Cl=l),void 0!==l&&(i=X(t,l._$AS(t,i.values),l,o)),i}class Y{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:D).importNode(e,!0);K.currentNode=s;let r=K.nextNode(),n=0,p=0,l=o[0];for(;void 0!==l;){if(n===l.index){let i;2===l.type?i=new q(r,r.nextSibling,this,t):1===l.type?i=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(i=new et(r,this,t)),this._$AV.push(i),l=o[++p]}n!==(null==l?void 0:l.index)&&(r=K.nextNode(),n++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class q{constructor(t,i,e,o){var s;this.type=2,this._$AH=H,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=X(this,t,i),O(t)?t===H||null==t||""===t?(this._$AH!==H&&this._$AR(),this._$AH=H):t!==this._$AH&&t!==W&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>j(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==H&&O(this._$AH)?this._$AA.nextSibling.data=t:this.$(D.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=P.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new Y(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=F.get(t.strings);return void 0===i&&F.set(t.strings,i=new P(t)),i}T(t){j(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new q(this.k(E()),this.k(E()),this,this.options)):e=i[o],e._$AI(s),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._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class J{constructor(t,i,e,o,s){this.type=1,this._$AH=H,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=H}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let r=!1;if(void 0===s)t=X(this,t,i,0),r=!O(t)||t!==this._$AH&&t!==W,r&&(this._$AH=t);else{const o=t;let n,p;for(t=s[0],n=0;n<s.length-1;n++)p=X(this,o[e+n],i,n),p===W&&(p=this._$AH[n]),r||(r=!O(p)||p!==this._$AH[n]),p===H?t=H:t!==H&&(t+=(null!=p?p:"")+s[n+1]),this._$AH[n]=p}r&&!o&&this.j(t)}j(t){t===H?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===H?void 0:t}}const V=k?k.emptyScript:"";class tt extends J{constructor(){super(...arguments),this.type=4}j(t){t&&t!==H?this.element.setAttribute(this.name,V):this.element.removeAttribute(this.name)}}class it extends J{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=X(this,t,i,0))&&void 0!==e?e:H)===W)return;const o=this._$AH,s=t===H&&o!==H||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==H&&(o===H||s);s&&this.element.removeEventListener(this.name,this,o),r&&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 et{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){X(this,t)}}const ot=w.litHtmlPolyfillSupport;null==ot||ot(P,q),(null!==(m=w.litHtmlVersions)&&void 0!==m?m:w.litHtmlVersions=[]).push("2.7.3");
|
|
108
108
|
/**
|
|
109
109
|
* @license
|
|
110
110
|
* Copyright 2020 Google LLC
|
|
111
111
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
112
|
*/
|
|
113
|
-
const
|
|
113
|
+
const st=Symbol.for(""),rt=t=>{if((null==t?void 0:t.r)===st)return null==t?void 0:t._$litStatic$},nt=t=>({_$litStatic$:t,r:st}),pt=new Map,lt=(t=>(i,...e)=>{const o=e.length;let s,r;const n=[],p=[];let l,h=0,a=!1;for(;h<o;){for(l=i[h];h<o&&void 0!==(r=e[h],s=rt(r));)l+=s+i[++h],a=!0;h!==o&&p.push(r),n.push(l),h++}if(h===o&&n.push(i[o]),a){const t=n.join("$$lit$$");void 0===(i=pt.get(t))&&(n.raw=n,pt.set(t,i=n)),e=p}return t(i,...e)})(G);var ht;!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"}(ht||(ht={}));const at=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),ft=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),dt={fontFamily:ft,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},ct=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",at),yt=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",dt.fontSize,"20px"),gt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",dt.fontWeight,"normal"),ut=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",dt.letterSpacing,"0.15px"),vt=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",dt.lineHeight,"1.2"),bt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",dt.textTransform,"inherit"),mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",at),$t=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",dt.fontSize,"14px"),xt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",dt.fontWeight,"normal"),wt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",dt.letterSpacing,"0.105px"),kt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",dt.lineHeight,"1.7"),zt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",dt.textTransform,"inherit"),At=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",ft),St=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",dt.fontSize,"16px"),_t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",dt.fontWeight,"600"),Nt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",dt.letterSpacing,"0.144px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",dt.lineHeight,"1.5"),Et=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",dt.textTransform,"inherit"),Ot=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",ft),jt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",dt.fontSize,"14px"),Mt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",dt.fontWeight,"normal"),Bt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",dt.letterSpacing,"0.098px"),It=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",dt.lineHeight,"1.7"),Rt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",dt.textTransform,"inherit"),Ct=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",ft),Ut=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",dt.fontSize,"16px"),Tt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",dt.fontWeight,"normal"),Zt=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",dt.letterSpacing,"0.496px"),Gt=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",dt.lineHeight,"1.5"),Wt=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",dt.textTransform,"inherit"),Ht=i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",ft),Ft=i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",dt.fontSize,"14px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",dt.fontWeight,"normal"),Lt=i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",dt.letterSpacing,"0.252px"),Pt=i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",dt.lineHeight,"1.4"),Xt=i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",dt.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",ft),qt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",dt.fontSize,"12px"),Jt=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",dt.fontWeight,"normal"),Qt=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",dt.letterSpacing,"0.396px"),Vt=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",dt.lineHeight,"1.33"),ti=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",dt.textTransform,"inherit"),ii=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",ft),ei=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",dt.fontSize,"10px"),oi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",dt.fontWeight,"normal"),si=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",dt.letterSpacing,"0.33px"),ri=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",dt.lineHeight,"1.6"),ni=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",dt.textTransform,"inherit"),pi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",ft),li=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",dt.fontSize,"10px"),hi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",dt.fontWeight,"normal"),ai=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",dt.letterSpacing,"1.5px"),fi=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",dt.lineHeight,"1.6"),di=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",dt.textTransform,"uppercase"),ci=i.FtCssVariableFactory.extend("--ft-typography-button-font-family",ft),yi=i.FtCssVariableFactory.extend("--ft-typography-button-font-size",dt.fontSize,"14px"),gi=i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",dt.fontWeight,"600"),ui=i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",dt.letterSpacing,"1.246px"),vi=i.FtCssVariableFactory.extend("--ft-typography-button-line-height",dt.lineHeight,"1.15"),bi=i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",dt.textTransform,"uppercase"),mi=e.css`
|
|
114
114
|
.ft-typography--title {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${
|
|
117
|
-
font-weight: ${
|
|
118
|
-
letter-spacing: ${
|
|
119
|
-
line-height: ${
|
|
120
|
-
text-transform: ${
|
|
121
|
-
}
|
|
122
|
-
`,bi=e.css`
|
|
123
|
-
.ft-typography--title-dense {
|
|
124
|
-
font-family: ${vt};
|
|
125
|
-
font-size: ${bt};
|
|
126
|
-
font-weight: ${$t};
|
|
127
|
-
letter-spacing: ${mt};
|
|
128
|
-
line-height: ${xt};
|
|
129
|
-
text-transform: ${wt};
|
|
115
|
+
font-family: ${ct};
|
|
116
|
+
font-size: ${yt};
|
|
117
|
+
font-weight: ${gt};
|
|
118
|
+
letter-spacing: ${ut};
|
|
119
|
+
line-height: ${vt};
|
|
120
|
+
text-transform: ${bt};
|
|
130
121
|
}
|
|
131
122
|
`,$i=e.css`
|
|
123
|
+
.ft-typography--title-dense {
|
|
124
|
+
font-family: ${mt};
|
|
125
|
+
font-size: ${$t};
|
|
126
|
+
font-weight: ${xt};
|
|
127
|
+
letter-spacing: ${wt};
|
|
128
|
+
line-height: ${kt};
|
|
129
|
+
text-transform: ${zt};
|
|
130
|
+
}
|
|
131
|
+
`,xi=e.css`
|
|
132
132
|
.ft-typography--subtitle1 {
|
|
133
|
-
font-family: ${
|
|
134
|
-
font-size: ${
|
|
135
|
-
font-weight: ${
|
|
136
|
-
letter-spacing: ${
|
|
137
|
-
line-height: ${
|
|
138
|
-
text-transform: ${
|
|
139
|
-
}
|
|
140
|
-
`,
|
|
133
|
+
font-family: ${At};
|
|
134
|
+
font-size: ${St};
|
|
135
|
+
font-weight: ${_t};
|
|
136
|
+
letter-spacing: ${Nt};
|
|
137
|
+
line-height: ${Dt};
|
|
138
|
+
text-transform: ${Et};
|
|
139
|
+
}
|
|
140
|
+
`,wi=e.css`
|
|
141
141
|
.ft-typography--subtitle2 {
|
|
142
|
-
font-family: ${
|
|
142
|
+
font-family: ${Ot};
|
|
143
143
|
font-size: ${jt};
|
|
144
|
-
font-weight: ${
|
|
145
|
-
letter-spacing: ${
|
|
146
|
-
line-height: ${
|
|
147
|
-
text-transform: ${
|
|
144
|
+
font-weight: ${Mt};
|
|
145
|
+
letter-spacing: ${Bt};
|
|
146
|
+
line-height: ${It};
|
|
147
|
+
text-transform: ${Rt};
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
`,
|
|
150
|
+
`,ki=e.css`
|
|
151
151
|
.ft-typography--body1 {
|
|
152
|
-
font-family: ${
|
|
153
|
-
font-size: ${
|
|
154
|
-
font-weight: ${
|
|
155
|
-
letter-spacing: ${
|
|
156
|
-
line-height: ${
|
|
157
|
-
text-transform: ${
|
|
152
|
+
font-family: ${Ct};
|
|
153
|
+
font-size: ${Ut};
|
|
154
|
+
font-weight: ${Tt};
|
|
155
|
+
letter-spacing: ${Zt};
|
|
156
|
+
line-height: ${Gt};
|
|
157
|
+
text-transform: ${Wt};
|
|
158
158
|
}
|
|
159
|
-
`,
|
|
159
|
+
`,zi=e.css`
|
|
160
160
|
.ft-typography--body2 {
|
|
161
|
-
font-family: ${
|
|
162
|
-
font-size: ${
|
|
163
|
-
font-weight: ${
|
|
164
|
-
letter-spacing: ${
|
|
165
|
-
line-height: ${
|
|
166
|
-
text-transform: ${
|
|
161
|
+
font-family: ${Ht};
|
|
162
|
+
font-size: ${Ft};
|
|
163
|
+
font-weight: ${Kt};
|
|
164
|
+
letter-spacing: ${Lt};
|
|
165
|
+
line-height: ${Pt};
|
|
166
|
+
text-transform: ${Xt};
|
|
167
167
|
}
|
|
168
|
-
`,
|
|
168
|
+
`,Ai=e.css`
|
|
169
169
|
.ft-typography--caption {
|
|
170
|
-
font-family: ${
|
|
171
|
-
font-size: ${
|
|
172
|
-
font-weight: ${
|
|
173
|
-
letter-spacing: ${
|
|
174
|
-
line-height: ${
|
|
175
|
-
text-transform: ${
|
|
170
|
+
font-family: ${Yt};
|
|
171
|
+
font-size: ${qt};
|
|
172
|
+
font-weight: ${Jt};
|
|
173
|
+
letter-spacing: ${Qt};
|
|
174
|
+
line-height: ${Vt};
|
|
175
|
+
text-transform: ${ti};
|
|
176
176
|
}
|
|
177
|
-
`,
|
|
177
|
+
`,Si=e.css`
|
|
178
178
|
.ft-typography--breadcrumb {
|
|
179
|
-
font-family: ${
|
|
180
|
-
font-size: ${
|
|
181
|
-
font-weight: ${
|
|
182
|
-
letter-spacing: ${
|
|
183
|
-
line-height: ${
|
|
184
|
-
text-transform: ${
|
|
179
|
+
font-family: ${ii};
|
|
180
|
+
font-size: ${ei};
|
|
181
|
+
font-weight: ${oi};
|
|
182
|
+
letter-spacing: ${si};
|
|
183
|
+
line-height: ${ri};
|
|
184
|
+
text-transform: ${ni};
|
|
185
185
|
}
|
|
186
|
-
`,
|
|
186
|
+
`,_i=e.css`
|
|
187
187
|
.ft-typography--overline {
|
|
188
|
-
font-family: ${
|
|
189
|
-
font-size: ${
|
|
190
|
-
font-weight: ${
|
|
191
|
-
letter-spacing: ${
|
|
192
|
-
line-height: ${
|
|
193
|
-
text-transform: ${
|
|
194
|
-
}
|
|
195
|
-
`,
|
|
188
|
+
font-family: ${pi};
|
|
189
|
+
font-size: ${li};
|
|
190
|
+
font-weight: ${hi};
|
|
191
|
+
letter-spacing: ${ai};
|
|
192
|
+
line-height: ${fi};
|
|
193
|
+
text-transform: ${di};
|
|
194
|
+
}
|
|
195
|
+
`,Ni=e.css`
|
|
196
196
|
.ft-typography--button {
|
|
197
|
-
font-family: ${
|
|
198
|
-
font-size: ${
|
|
199
|
-
font-weight: ${
|
|
200
|
-
letter-spacing: ${
|
|
201
|
-
line-height: ${
|
|
202
|
-
text-transform: ${
|
|
203
|
-
}
|
|
204
|
-
`,
|
|
197
|
+
font-family: ${ci};
|
|
198
|
+
font-size: ${yi};
|
|
199
|
+
font-weight: ${gi};
|
|
200
|
+
letter-spacing: ${ui};
|
|
201
|
+
line-height: ${vi};
|
|
202
|
+
text-transform: ${bi};
|
|
203
|
+
}
|
|
204
|
+
`,Di=e.css`
|
|
205
205
|
.ft-typography {
|
|
206
206
|
vertical-align: inherit;
|
|
207
207
|
}
|
|
208
|
-
`;var
|
|
209
|
-
<${
|
|
208
|
+
`;var Ei=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Oi extends i.FtLitElement{constructor(){super(...arguments),this.variant=ht.body1}render(){return this.element?lt`
|
|
209
|
+
<${nt(this.element)}
|
|
210
210
|
class="ft-typography ft-typography--${this.variant}">
|
|
211
211
|
<slot></slot>
|
|
212
|
-
</${
|
|
213
|
-
`:
|
|
212
|
+
</${nt(this.element)}>
|
|
213
|
+
`:lt`
|
|
214
214
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
215
|
-
`}}
|
|
215
|
+
`}}Oi.styles=[mi,$i,xi,wi,ki,zi,Ai,Si,_i,Ni,Di],Ei([o.property()],Oi.prototype,"element",void 0),Ei([o.property()],Oi.prototype,"variant",void 0),i.customElement("ft-typography")(Oi);const ji={padding:i.FtCssVariableFactory.create("--ft-card-padding","SIZE","12px"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceHigh:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceHigh,"Design system"),borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),elevation02:i.FtCssVariableFactory.external(i.designSystemVariables.elevation02,"Design system"),elevation04:i.FtCssVariableFactory.external(i.designSystemVariables.elevation04,"Design system")},Mi=e.css`
|
|
216
216
|
:host {
|
|
217
217
|
display: block;
|
|
218
218
|
}
|
|
@@ -224,29 +224,33 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
224
224
|
position: relative;
|
|
225
225
|
width: 100%;
|
|
226
226
|
height: 100%;
|
|
227
|
-
display:
|
|
227
|
+
display: grid;
|
|
228
|
+
grid-template:
|
|
229
|
+
"header actions"
|
|
230
|
+
"content content";
|
|
231
|
+
grid-template-columns: minmax(0, 1fr) max-content;
|
|
232
|
+
grid-template-rows: max-content minmax(0, 1fr);
|
|
233
|
+
grid-gap: 8px;
|
|
228
234
|
box-sizing: border-box;
|
|
229
235
|
background-color: ${ji.colorSurface};
|
|
230
236
|
transition: box-shadow 0.2s linear, color 0.2s linear;
|
|
231
237
|
}
|
|
232
238
|
|
|
233
|
-
#container:hover {
|
|
234
|
-
box-shadow: ${ji.elevation04};
|
|
235
|
-
}
|
|
236
|
-
|
|
237
239
|
#container.selected {
|
|
238
240
|
outline: solid 2px ${ji.colorPrimary};
|
|
239
241
|
box-shadow: ${ji.elevation04};
|
|
240
242
|
}
|
|
241
243
|
|
|
242
|
-
#
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
244
|
+
#container.clickable {
|
|
245
|
+
cursor: pointer;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
#container.clickable:hover {
|
|
249
|
+
box-shadow: ${ji.elevation04};
|
|
246
250
|
}
|
|
247
251
|
|
|
248
|
-
#header
|
|
249
|
-
|
|
252
|
+
#header {
|
|
253
|
+
grid-area: header;
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
.title {
|
|
@@ -256,32 +260,27 @@ const et=Symbol.for(""),ot=t=>{if((null==t?void 0:t.r)===et)return null==t?void
|
|
|
256
260
|
}
|
|
257
261
|
|
|
258
262
|
#content {
|
|
259
|
-
|
|
260
|
-
font-size: 15px;
|
|
261
|
-
height: 100%;
|
|
263
|
+
grid-area: content;
|
|
262
264
|
color: ${ji.colorOnSurfaceMedium};
|
|
263
265
|
}
|
|
264
266
|
|
|
265
267
|
#action {
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
<
|
|
274
|
-
<div id="header" ?hidden=${!this.title} part="header">
|
|
268
|
+
grid-area: actions;
|
|
269
|
+
}
|
|
270
|
+
`;var Bi=function(t,i,e,o){for(var s,r=arguments.length,n=r<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(i,e,n):s(i,e))||n);return r>3&&n&&Object.defineProperty(i,e,n),n};class Ii extends i.FtLitElement{constructor(){super(...arguments),this.title="",this.clickable=!1,this.selected=!1}render(){const t={selected:this.selected,clickable:this.clickable};return e.html`
|
|
271
|
+
<div id="container" part="container" class=${s.classMap(t)}>
|
|
272
|
+
${this.clickable?e.html`
|
|
273
|
+
<ft-ripple primary ?selected=${this.selected}></ft-ripple>
|
|
274
|
+
`:e.nothing}
|
|
275
|
+
<div id="header" part="header">
|
|
275
276
|
<ft-typography class="title" element="span" variant="title">${this.title}</ft-typography>
|
|
276
|
-
<
|
|
277
|
-
<slot name="header"></slot>
|
|
278
|
-
</div>
|
|
279
|
-
</div>
|
|
280
|
-
<div id="content" part="content">
|
|
281
|
-
<slot></slot>
|
|
277
|
+
<slot name="header"></slot>
|
|
282
278
|
</div>
|
|
283
279
|
<div id="action" part="action">
|
|
284
280
|
<slot name="action"></slot>
|
|
285
281
|
</div>
|
|
282
|
+
<div id="content" part="content">
|
|
283
|
+
<ft-typography variant="body2"><slot></slot></ft-typography>
|
|
284
|
+
</div>
|
|
286
285
|
</div>
|
|
287
|
-
`}}
|
|
286
|
+
`}}Ii.elementDefinitions={"ft-ripple":x,"ft-typography":Oi},Ii.styles=Mi,Bi([o.property()],Ii.prototype,"title",void 0),Bi([o.property({type:Boolean})],Ii.prototype,"clickable",void 0),Bi([o.property({type:Boolean})],Ii.prototype,"selected",void 0),i.customElement("ft-card")(Ii),t.FtCard=Ii,t.FtCardCssVariables=ji,t.styles=Mi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap);
|