@fluid-topics/ft-accordion 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-accordion-item.js +4 -0
- package/build/ft-accordion.inline-styles.js +144 -126
- package/build/ft-accordion.light.js +83 -65
- package/build/ft-accordion.min.js +142 -124
- package/package.json +6 -6
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
.ft-accordion {
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
}
|
|
9
|
-
`,n([o.property({type:Boolean})],p.prototype,"multi",void 0),n([o.query("slot")],p.prototype,"content",void 0);var l=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const a=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),h=e.FtCssVariable.extend("--ft-ripple-
|
|
9
|
+
`,n([o.property({type:Boolean})],p.prototype,"multi",void 0),n([o.query("slot")],p.prototype,"content",void 0);var l=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const a=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorContent),f=a,h=e.FtCssVariable.extend("--ft-ripple-background-color",a),c=e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),d=e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),g=e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),x=e.FtCssVariable.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),y=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),u=y,m=e.FtCssVariable.extend("--ft-ripple-background-color",y),v=e.FtCssVariable.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),b=v,$=e.FtCssVariable.extend("--ft-ripple-background-color",v);class w extends e.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 e.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 e,i;let{x:o,y:s}=this.getCoordinates(t),r=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{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 i.html`
|
|
10
10
|
<style>
|
|
11
11
|
.ft-ripple .ft-ripple--effect,
|
|
12
12
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
<div class="ft-ripple--background"></div>
|
|
24
24
|
<div class="ft-ripple--effect"></div>
|
|
25
25
|
</div>
|
|
26
|
-
`}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
|
|
26
|
+
`}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 e,i;super.updated(t),t.has("disabled")&&(this.disabled?(this.endRipple(),null===(e=this.target)||void 0===e||e.removeAttribute("data-is-ft-ripple-target")):null===(i=this.target)||void 0===i||i.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 e=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;e&&this.setupFor(e),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 e=(...t)=>e=>{t.forEach((t=>window.addEventListener(t,this.endPress,{once:!0}))),this.startPress(e)},i=e("mouseup","contextmenu"),o=e("touchend","touchcancel"),s=t=>{["Enter"," "].includes(t.key)&&e("keyup")(t)};t.addEventListener("mouseover",this.startHover),t.addEventListener("mousemove",this.moveRipple),t.addEventListener("mouseleave",this.endHover),t.addEventListener("mousedown",i),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",i),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}}getCoordinates(t){const e=t,i=t;let o,s;return null!=e.x?({x:o,y:s}=e):null!=i.touches&&(o=i.touches[0].clientX,s=i.touches[0].clientY),{x:o,y:s}}isIgnored(t){if(this.disabled)return!0;if(null!=t)for(let e of t.composedPath()){if(e===this.target)break;if("hasAttribute"in e&&e.hasAttribute("data-is-ft-ripple-target"))return!0}return!1}disconnectedCallback(){super.disconnectedCallback(),this.onDisconnect&&this.onDisconnect(),this.resizeObserver.disconnect(),this.endRipple()}}
|
|
27
27
|
/**
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
31
|
*/
|
|
32
|
-
var
|
|
32
|
+
var k;w.elementDefinitions={},w.styles=i.css`
|
|
33
33
|
:host {
|
|
34
34
|
display: contents;
|
|
35
35
|
}
|
|
@@ -48,17 +48,30 @@ var u;g.elementDefinitions={},g.styles=i.css`
|
|
|
48
48
|
.ft-ripple .ft-ripple--effect {
|
|
49
49
|
position: absolute;
|
|
50
50
|
opacity: 0;
|
|
51
|
-
background-color: ${a};
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
.ft-ripple
|
|
55
|
-
|
|
53
|
+
.ft-ripple .ft-ripple--background {
|
|
54
|
+
background-color: ${h};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.ft-ripple .ft-ripple--effect {
|
|
56
58
|
background-color: ${f};
|
|
57
59
|
}
|
|
58
60
|
|
|
59
|
-
.ft-ripple.ft-ripple--
|
|
61
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
62
|
+
background-color: ${$};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.ft-ripple.ft-ripple--secondary .ft-ripple--effect {
|
|
66
|
+
background-color: ${b};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.ft-ripple.ft-ripple--primary .ft-ripple--background {
|
|
70
|
+
background-color: ${m};
|
|
71
|
+
}
|
|
72
|
+
|
|
60
73
|
.ft-ripple.ft-ripple--primary .ft-ripple--effect {
|
|
61
|
-
background-color: ${
|
|
74
|
+
background-color: ${u};
|
|
62
75
|
}
|
|
63
76
|
|
|
64
77
|
.ft-ripple .ft-ripple--background {
|
|
@@ -66,6 +79,7 @@ var u;g.elementDefinitions={},g.styles=i.css`
|
|
|
66
79
|
left: 0;
|
|
67
80
|
height: 100%;
|
|
68
81
|
width: 100%;
|
|
82
|
+
transition: opacity 75ms linear;
|
|
69
83
|
}
|
|
70
84
|
|
|
71
85
|
.ft-ripple .ft-ripple--effect,
|
|
@@ -93,43 +107,34 @@ var u;g.elementDefinitions={},g.styles=i.css`
|
|
|
93
107
|
}
|
|
94
108
|
|
|
95
109
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
96
|
-
opacity: ${
|
|
110
|
+
opacity: ${x};
|
|
97
111
|
}
|
|
98
112
|
|
|
99
113
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
100
|
-
opacity: ${
|
|
114
|
+
opacity: ${g};
|
|
101
115
|
}
|
|
102
116
|
|
|
103
117
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
104
118
|
opacity: ${c};
|
|
105
119
|
transform: translate(-50%, -50%) scale(1);
|
|
106
120
|
}
|
|
107
|
-
`,l([o.property({type:Boolean})],
|
|
121
|
+
`,l([o.property({type:Boolean})],w.prototype,"primary",void 0),l([o.property({type:Boolean})],w.prototype,"secondary",void 0),l([o.property({type:Boolean})],w.prototype,"unbounded",void 0),l([o.property({type:Boolean})],w.prototype,"activated",void 0),l([o.property({type:Boolean})],w.prototype,"selected",void 0),l([o.property({type:Boolean})],w.prototype,"disabled",void 0),l([o.state()],w.prototype,"hovered",void 0),l([o.state()],w.prototype,"focused",void 0),l([o.state()],w.prototype,"pressed",void 0),l([o.state()],w.prototype,"rippling",void 0),l([o.state()],w.prototype,"rippleSize",void 0),l([o.state()],w.prototype,"originX",void 0),l([o.state()],w.prototype,"originY",void 0),l([o.query(".ft-ripple")],w.prototype,"ripple",void 0),l([o.query(".ft-ripple--effect")],w.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(w);const z=globalThis.trustedTypes,j=z?z.createPolicy("lit-html",{createHTML:t=>t}):void 0,N=`lit$${(Math.random()+"").slice(9)}$`,S="?"+N,A=`<${S}>`,O=document,_=(t="")=>O.createComment(t),E=t=>null===t||"object"!=typeof t&&"function"!=typeof t,I=Array.isArray,M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,C=/-->/g,T=/>/g,U=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,B=/'/g,Z=/"/g,W=/^(?:script|style|textarea|title)$/i,D=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),K=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),R=new WeakMap,q=O.createTreeWalker(O,129,null,!1),F=(t,e)=>{const i=t.length-1,o=[];let s,r=2===e?"<svg>":"",n=M;for(let e=0;e<i;e++){const i=t[e];let p,l,a=-1,f=0;for(;f<i.length&&(n.lastIndex=f,l=n.exec(i),null!==l);)f=n.lastIndex,n===M?"!--"===l[1]?n=C:void 0!==l[1]?n=T:void 0!==l[2]?(W.test(l[2])&&(s=RegExp("</"+l[2],"g")),n=U):void 0!==l[3]&&(n=U):n===U?">"===l[0]?(n=null!=s?s:M,a=-1):void 0===l[1]?a=-2:(a=n.lastIndex-l[2].length,p=l[1],n=void 0===l[3]?U:'"'===l[3]?Z:B):n===Z||n===B?n=U:n===C||n===T?n=M:(n=U,s=void 0);const h=n===U&&t[e+1].startsWith("/>")?" ":"";r+=n===M?i+A:a>=0?(o.push(p),i.slice(0,a)+"$lit$"+i.slice(a)+N+h):i+N+(-2===a?(o.push(void 0),e):h)}const p=r+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==j?j.createHTML(p):p,o]};class H{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,r=0;const n=t.length-1,p=this.parts,[l,a]=F(t,e);if(this.el=H.createElement(l,i),q.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=q.nextNode())&&p.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(N)){const i=a[r++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+"$lit$").split(N),e=/([.?@])?(.*)/.exec(i);p.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?P:"?"===e[1]?V:"@"===e[1]?tt:J})}else p.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(W.test(o.tagName)){const t=o.textContent.split(N),e=t.length-1;if(e>0){o.textContent=z?z.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],_()),q.nextNode(),p.push({type:2,index:++s});o.append(t[e],_())}}}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(N,t+1));)p.push({type:7,index:s}),t+=N.length-1}s++}}static createElement(t,e){const i=O.createElement("template");return i.innerHTML=t,i}}function L(t,e,i=t,o){var s,r,n,p;if(e===K)return e;let l=void 0!==o?null===(s=i._$Cl)||void 0===s?void 0:s[o]:i._$Cu;const a=E(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==a&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===a?l=void 0:(l=new a(t),l._$AT(t,i,o)),void 0!==o?(null!==(n=(p=i)._$Cl)&&void 0!==n?n:p._$Cl=[])[o]=l:i._$Cu=l),void 0!==l&&(e=L(t,l._$AS(t,e.values),l,o)),e}class X{constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:O).importNode(i,!0);q.currentNode=s;let r=q.nextNode(),n=0,p=0,l=o[0];for(;void 0!==l;){if(n===l.index){let e;2===l.type?e=new Y(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new et(r,this,t)),this.v.push(e),l=o[++p]}n!==(null==l?void 0:l.index)&&(r=q.nextNode(),n++)}return s}m(t){let e=0;for(const i of this.v)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class Y{constructor(t,e,i,o){var s;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cg=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=L(this,t,e),E(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==K&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):(t=>{var e;return I(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])})(t)?this.A(t):this.$(t)}M(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.M(t))}$(t){this._$AH!==G&&E(this._$AH)?this._$AA.nextSibling.data=t:this.S(O.createTextNode(t)),this._$AH=t}T(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=H.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.m(i);else{const t=new X(s,this),e=t.p(this.options);t.m(i),this.S(e),this._$AH=t}}_$AC(t){let e=R.get(t.strings);return void 0===e&&R.set(t.strings,e=new H(t)),e}A(t){I(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let i,o=0;for(const s of t)o===e.length?e.push(i=new Y(this.M(_()),this.M(_()),this,this.options)):i=e[o],i._$AI(s),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for(null===(i=this._$AP)||void 0===i||i.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class J{constructor(t,e,i,o,s){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=s,i.length>2||""!==i[0]||""!==i[1]?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let r=!1;if(void 0===s)t=L(this,t,e,0),r=!E(t)||t!==this._$AH&&t!==K,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[i+n],e,n),p===K&&(p=this._$AH[n]),r||(r=!E(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.k(t)}k(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class P extends J{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===G?void 0:t}}const Q=z?z.emptyScript:"";class V extends J{constructor(){super(...arguments),this.type=4}k(t){t&&t!==G?this.element.setAttribute(this.name,Q):this.element.removeAttribute(this.name)}}class tt extends J{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=L(this,t,e,0))&&void 0!==i?i:G)===K)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 e,i;"function"==typeof this._$AH?this._$AH.call(null!==(i=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==i?i:this.element,t):this._$AH.handleEvent(t)}}class et{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){L(this,t)}}const it=window.litHtmlPolyfillSupport;null==it||it(H,Y),(null!==(k=globalThis.litHtmlVersions)&&void 0!==k?k:globalThis.litHtmlVersions=[]).push("2.1.3");
|
|
108
122
|
/**
|
|
109
123
|
* @license
|
|
110
124
|
* Copyright 2020 Google LLC
|
|
111
125
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
112
126
|
*/
|
|
113
|
-
const
|
|
127
|
+
const ot=t=>({_$litStatic$:t}),st=new Map,rt=(t=>(e,...i)=>{var o;const s=i.length;let r,n;const p=[],l=[];let a,f=0,h=!1;for(;f<s;){for(a=e[f];f<s&&void 0!==(n=i[f],r=null===(o=n)||void 0===o?void 0:o._$litStatic$);)a+=r+e[++f],h=!0;l.push(n),p.push(a),f++}if(f===s&&p.push(e[s]),h){const t=p.join("$$lit$$");void 0===(e=st.get(t))&&(p.raw=p,st.set(t,e=p)),i=l}return t(e,...i)})(D);var nt,pt=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.title="title",t.title_dense="title-dense",t.subtitle1="subtitle1",t.subtitle2="subtitle2",t.body1="body1",t.body2="body2",t.caption="caption",t.breadcrumb="breadcrumb",t.overline="overline",t.button="button"}(nt||(nt={}));const lt=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),at=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),ft={fontFamily:at,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","SIZE","24px"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},ht=e.FtCssVariable.extend("--ft-typography-title-font-family",lt),ct=e.FtCssVariable.extend("--ft-typography-title-font-size",ft.fontSize,"20px"),dt=e.FtCssVariable.extend("--ft-typography-title-font-weight",ft.fontWeight,"normal"),gt=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",ft.letterSpacing,"0.15px"),xt=e.FtCssVariable.extend("--ft-typography-title-line-height",ft.lineHeight,"24px"),yt=e.FtCssVariable.extend("--ft-typography-title-text-transform",ft.textTransform,"inherit"),ut=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",lt),mt=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",ft.fontSize,"14px"),vt=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",ft.fontWeight,"normal"),bt=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",ft.letterSpacing,"0.105px"),$t=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",ft.lineHeight,"24px"),wt=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",ft.textTransform,"inherit"),kt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",at),zt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",ft.fontSize,"16px"),jt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",ft.fontWeight,"600"),Nt=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",ft.letterSpacing,"0.144px"),St=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",ft.lineHeight,"24px"),At=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",ft.textTransform,"inherit"),Ot=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",at),_t=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",ft.fontSize,"14px"),Et=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",ft.fontWeight,"normal"),It=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",ft.letterSpacing,"0.098px"),Mt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",ft.lineHeight,"24px"),Ct=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",ft.textTransform,"inherit"),Tt=e.FtCssVariable.extend("--ft-typography-body1-font-family",at),Ut=e.FtCssVariable.extend("--ft-typography-body1-font-size",ft.fontSize,"16px"),Bt=e.FtCssVariable.extend("--ft-typography-body1-font-weight",ft.fontWeight,"normal"),Zt=e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",ft.letterSpacing,"0.496px"),Wt=e.FtCssVariable.extend("--ft-typography-body1-line-height",ft.lineHeight,"24px"),Dt=e.FtCssVariable.extend("--ft-typography-body1-text-transform",ft.textTransform,"inherit"),Kt=e.FtCssVariable.extend("--ft-typography-body2-font-family",at),Gt=e.FtCssVariable.extend("--ft-typography-body2-font-size",ft.fontSize,"14px"),Rt=e.FtCssVariable.extend("--ft-typography-body2-font-weight",ft.fontWeight,"normal"),qt=e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",ft.letterSpacing,"0.252px"),Ft=e.FtCssVariable.extend("--ft-typography-body2-line-height",ft.lineHeight,"20px"),Ht=e.FtCssVariable.extend("--ft-typography-body2-text-transform",ft.textTransform,"inherit"),Lt=e.FtCssVariable.extend("--ft-typography-caption-font-family",at),Xt=e.FtCssVariable.extend("--ft-typography-caption-font-size",ft.fontSize,"12px"),Yt=e.FtCssVariable.extend("--ft-typography-caption-font-weight",ft.fontWeight,"normal"),Jt=e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",ft.letterSpacing,"0.396px"),Pt=e.FtCssVariable.extend("--ft-typography-caption-line-height",ft.lineHeight,"16px"),Qt=e.FtCssVariable.extend("--ft-typography-caption-text-transform",ft.textTransform,"inherit"),Vt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",at),te=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",ft.fontSize,"10px"),ee=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",ft.fontWeight,"normal"),ie=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",ft.letterSpacing,"0.33px"),oe=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",ft.lineHeight,"16px"),se=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",ft.textTransform,"inherit"),re=e.FtCssVariable.extend("--ft-typography-overline-font-family",at),ne=e.FtCssVariable.extend("--ft-typography-overline-font-size",ft.fontSize,"10px"),pe=e.FtCssVariable.extend("--ft-typography-overline-font-weight",ft.fontWeight,"normal"),le=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",ft.letterSpacing,"1.5px"),ae=e.FtCssVariable.extend("--ft-typography-overline-line-height",ft.lineHeight,"16px"),fe=e.FtCssVariable.extend("--ft-typography-overline-text-transform",ft.textTransform,"uppercase"),he=e.FtCssVariable.extend("--ft-typography-button-font-family",at),ce=e.FtCssVariable.extend("--ft-typography-button-font-size",ft.fontSize,"14px"),de=e.FtCssVariable.extend("--ft-typography-button-font-weight",ft.fontWeight,"600"),ge=e.FtCssVariable.extend("--ft-typography-button-letter-spacing",ft.letterSpacing,"1.246px"),xe=e.FtCssVariable.extend("--ft-typography-button-line-height",ft.lineHeight,"16px"),ye=e.FtCssVariable.extend("--ft-typography-button-text-transform",ft.textTransform,"uppercase"),ue=i.css`
|
|
114
128
|
.ft-typography--title {
|
|
115
|
-
font-family: ${
|
|
116
|
-
font-size: ${nt};
|
|
117
|
-
font-weight: ${pt};
|
|
118
|
-
letter-spacing: ${lt};
|
|
119
|
-
line-height: ${at};
|
|
120
|
-
text-transform: ${ht};
|
|
121
|
-
}
|
|
122
|
-
`,ce=i.css`
|
|
123
|
-
.ft-typography--title-dense {
|
|
124
|
-
font-family: ${ft};
|
|
129
|
+
font-family: ${ht};
|
|
125
130
|
font-size: ${ct};
|
|
126
131
|
font-weight: ${dt};
|
|
127
|
-
letter-spacing: ${
|
|
128
|
-
line-height: ${
|
|
129
|
-
text-transform: ${
|
|
132
|
+
letter-spacing: ${gt};
|
|
133
|
+
line-height: ${xt};
|
|
134
|
+
text-transform: ${yt};
|
|
130
135
|
}
|
|
131
|
-
`,
|
|
132
|
-
.ft-typography--
|
|
136
|
+
`,me=i.css`
|
|
137
|
+
.ft-typography--title-dense {
|
|
133
138
|
font-family: ${ut};
|
|
134
139
|
font-size: ${mt};
|
|
135
140
|
font-weight: ${vt};
|
|
@@ -137,18 +142,17 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
137
142
|
line-height: ${$t};
|
|
138
143
|
text-transform: ${wt};
|
|
139
144
|
}
|
|
140
|
-
`,
|
|
141
|
-
.ft-typography--
|
|
142
|
-
font-family: ${
|
|
143
|
-
font-size: ${
|
|
145
|
+
`,ve=i.css`
|
|
146
|
+
.ft-typography--subtitle1 {
|
|
147
|
+
font-family: ${kt};
|
|
148
|
+
font-size: ${zt};
|
|
144
149
|
font-weight: ${jt};
|
|
145
150
|
letter-spacing: ${Nt};
|
|
146
151
|
line-height: ${St};
|
|
147
152
|
text-transform: ${At};
|
|
148
153
|
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
.ft-typography--body1 {
|
|
154
|
+
`,be=i.css`
|
|
155
|
+
.ft-typography--subtitle2 {
|
|
152
156
|
font-family: ${Ot};
|
|
153
157
|
font-size: ${_t};
|
|
154
158
|
font-weight: ${Et};
|
|
@@ -156,8 +160,9 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
156
160
|
line-height: ${Mt};
|
|
157
161
|
text-transform: ${Ct};
|
|
158
162
|
}
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
|
|
164
|
+
`,$e=i.css`
|
|
165
|
+
.ft-typography--body1 {
|
|
161
166
|
font-family: ${Tt};
|
|
162
167
|
font-size: ${Ut};
|
|
163
168
|
font-weight: ${Bt};
|
|
@@ -165,8 +170,8 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
165
170
|
line-height: ${Wt};
|
|
166
171
|
text-transform: ${Dt};
|
|
167
172
|
}
|
|
168
|
-
`,
|
|
169
|
-
.ft-typography--
|
|
173
|
+
`,we=i.css`
|
|
174
|
+
.ft-typography--body2 {
|
|
170
175
|
font-family: ${Kt};
|
|
171
176
|
font-size: ${Gt};
|
|
172
177
|
font-weight: ${Rt};
|
|
@@ -174,8 +179,8 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
174
179
|
line-height: ${Ft};
|
|
175
180
|
text-transform: ${Ht};
|
|
176
181
|
}
|
|
177
|
-
`,
|
|
178
|
-
.ft-typography--
|
|
182
|
+
`,ke=i.css`
|
|
183
|
+
.ft-typography--caption {
|
|
179
184
|
font-family: ${Lt};
|
|
180
185
|
font-size: ${Xt};
|
|
181
186
|
font-weight: ${Yt};
|
|
@@ -183,8 +188,8 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
183
188
|
line-height: ${Pt};
|
|
184
189
|
text-transform: ${Qt};
|
|
185
190
|
}
|
|
186
|
-
`,
|
|
187
|
-
.ft-typography--
|
|
191
|
+
`,ze=i.css`
|
|
192
|
+
.ft-typography--breadcrumb {
|
|
188
193
|
font-family: ${Vt};
|
|
189
194
|
font-size: ${te};
|
|
190
195
|
font-weight: ${ee};
|
|
@@ -192,41 +197,50 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
192
197
|
line-height: ${oe};
|
|
193
198
|
text-transform: ${se};
|
|
194
199
|
}
|
|
195
|
-
`,
|
|
196
|
-
.ft-typography--
|
|
200
|
+
`,je=i.css`
|
|
201
|
+
.ft-typography--overline {
|
|
197
202
|
font-family: ${re};
|
|
198
203
|
font-size: ${ne};
|
|
199
204
|
font-weight: ${pe};
|
|
200
205
|
letter-spacing: ${le};
|
|
201
206
|
line-height: ${ae};
|
|
202
|
-
text-transform: ${
|
|
207
|
+
text-transform: ${fe};
|
|
203
208
|
}
|
|
204
|
-
|
|
205
|
-
|
|
209
|
+
`,Ne=i.css`
|
|
210
|
+
.ft-typography--button {
|
|
211
|
+
font-family: ${he};
|
|
212
|
+
font-size: ${ce};
|
|
213
|
+
font-weight: ${de};
|
|
214
|
+
letter-spacing: ${ge};
|
|
215
|
+
line-height: ${xe};
|
|
216
|
+
text-transform: ${ye};
|
|
217
|
+
}
|
|
218
|
+
`;class Se extends e.FtLitElement{constructor(){super(...arguments),this.variant=nt.body1}render(){return this.element?rt`
|
|
219
|
+
<${ot(this.element)}
|
|
206
220
|
class="ft-typography ft-typography--${this.variant}">
|
|
207
221
|
<slot></slot>
|
|
208
|
-
</${
|
|
209
|
-
`:
|
|
222
|
+
</${ot(this.element)}>
|
|
223
|
+
`:rt`
|
|
210
224
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
211
|
-
`}}var
|
|
225
|
+
`}}var Ae,Oe;Se.styles=[ue,me,ve,be,$e,we,ke,ze,je,Ne,i.css`
|
|
212
226
|
.ft-typography {
|
|
213
227
|
vertical-align: inherit;
|
|
214
228
|
}
|
|
215
|
-
`],
|
|
229
|
+
`],pt([o.property()],Se.prototype,"element",void 0),pt([o.property()],Se.prototype,"variant",void 0),e.customElement("ft-typography")(Se),function(t){t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.STAR_PLAIN="",t.STAR="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_DOWN="",t.THUMBS_UP_PLAIN="",t.THUMBS_UP="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="\f06e",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL=""}(Ae||(Ae={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Oe||(Oe={})),new Map([...["abw"].map((t=>[t,Oe.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Oe.AUDIO])),...["avi"].map((t=>[t,Oe.AVI])),...["chm","xhs"].map((t=>[t,Oe.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Oe.CODE])),...["csv"].map((t=>[t,Oe.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Oe.DITA])),...["epub"].map((t=>[t,Oe.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Oe.EXCEL])),...["flac"].map((t=>[t,Oe.FLAC])),...["gif"].map((t=>[t,Oe.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Oe.GZIP])),...["html","htm","xhtml"].map((t=>[t,Oe.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Oe.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Oe.JPEG])),...["json"].map((t=>[t,Oe.JSON])),...["m4a","m4p"].map((t=>[t,Oe.M4A])),...["mov","qt"].map((t=>[t,Oe.MOV])),...["mp3"].map((t=>[t,Oe.MP3])),...["mp4","m4v"].map((t=>[t,Oe.MP4])),...["ogg","oga"].map((t=>[t,Oe.OGG])),...["pdf","ps"].map((t=>[t,Oe.PDF])),...["png"].map((t=>[t,Oe.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Oe.POWERPOINT])),...["rar"].map((t=>[t,Oe.RAR])),...["stp"].map((t=>[t,Oe.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Oe.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Oe.VIDEO])),...["wav"].map((t=>[t,Oe.WAV])),...["wma"].map((t=>[t,Oe.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Oe.WORD])),...["xml","xsl","rdf"].map((t=>[t,Oe.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Oe.YAML])),...["zip"].map((t=>[t,Oe.ZIP]))]);var _e,Ee=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(_e||(_e={}));const Ie=e.FtCssVariable.create("--ft-icon-font-size","SIZE","24px"),Me=e.FtCssVariable.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Ce=e.FtCssVariable.extend("--ft-icon-file-format-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","ft-mime")),Te=e.FtCssVariable.extend("--ft-icon-material-font-family",e.FtCssVariable.create("--ft-icon-font-family","UNKNOWN","Material Icons"));class Ue extends e.FtLitElement{constructor(){super(...arguments),this.variant=_e.fluid_topics}render(){return i.html`
|
|
216
230
|
<i class="ft-icon ${"ft-icon--"+this.variant}">
|
|
217
231
|
${r.unsafeHTML(this.getIcon())}
|
|
218
232
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
219
233
|
</i>
|
|
220
|
-
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let o=this.textContent;return this.variant===
|
|
234
|
+
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let o=this.textContent;return this.variant===_e.file_format?null!==(t=Oe[o.toUpperCase()])&&void 0!==t?t:o:this.variant===_e.fluid_topics?null!==(e=Ae[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}Ue.elementDefinitions={},Ue.styles=i.css`
|
|
221
235
|
:host, i.ft-icon {
|
|
222
236
|
display: inline-block;
|
|
223
|
-
width: ${
|
|
224
|
-
height: ${
|
|
237
|
+
width: ${Ie};
|
|
238
|
+
height: ${Ie};
|
|
225
239
|
text-align: center;
|
|
226
240
|
}
|
|
227
241
|
|
|
228
242
|
i.ft-icon {
|
|
229
|
-
font-size: ${
|
|
243
|
+
font-size: ${Ie};
|
|
230
244
|
line-height: 1;
|
|
231
245
|
font-weight: normal;
|
|
232
246
|
text-transform: none;
|
|
@@ -240,17 +254,17 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
240
254
|
}
|
|
241
255
|
|
|
242
256
|
.ft-icon--fluid-topics {
|
|
243
|
-
font-family: ${
|
|
257
|
+
font-family: ${Me}, ft-icons, fticons, sans-serif;
|
|
244
258
|
}
|
|
245
259
|
|
|
246
260
|
.ft-icon--file-format {
|
|
247
|
-
font-family: ${
|
|
261
|
+
font-family: ${Ce}, ft-mime, sans-serif;
|
|
248
262
|
}
|
|
249
263
|
|
|
250
264
|
.ft-icon--material {
|
|
251
|
-
font-family: ${
|
|
265
|
+
font-family: ${Te}, "Material Icons", sans-serif;
|
|
252
266
|
}
|
|
253
|
-
`,
|
|
267
|
+
`,Ee([o.property()],Ue.prototype,"variant",void 0),Ee([o.query("slot")],Ue.prototype,"slottedContent",void 0),e.customElement("ft-icon")(Ue);var Be=function(t,e,i,o){for(var s,r=arguments.length,n=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,p=t.length-1;p>=0;p--)(s=t[p])&&(n=(r<3?s(n):r>3?s(e,i,n):s(e,i))||n);return r>3&&n&&Object.defineProperty(e,i,n),n};const Ze={horizontalSpacing:e.FtCssVariable.create("--ft-accordion-toggle-horizontal-spacing","SIZE","16px"),verticalSpacing:e.FtCssVariable.create("--ft-accordion-toggle-vertical-spacing","SIZE","16px"),colorOutline:e.FtCssVariable.external(e.designSystemVariables.colorOutline,"Design system")};class We extends e.FtLitElement{constructor(){super(...arguments),this.icon="",this.label="",this.active=!1}render(){return i.html`
|
|
254
268
|
<div class="ft-accordion-item ${this.active?"ft-accordion-item--active":""}">
|
|
255
269
|
<div class="ft-accordion-item--toggle"
|
|
256
270
|
part="toggle"
|
|
@@ -274,7 +288,7 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
274
288
|
</div>
|
|
275
289
|
<div class="ft-accordion-item--separator" part="separator"></div>
|
|
276
290
|
</div>
|
|
277
|
-
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}
|
|
291
|
+
`}update(t){super.update(t),t.has("active")&&this.active&&this.dispatchEvent(new Event("activated",{composed:!0,bubbles:!0}))}onToggleKeyDown(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),this.active=!this.active)}}We.elementDefinitions={"ft-ripple":w,"ft-typography":Se,"ft-icon":Ue},We.styles=i.css`
|
|
278
292
|
.ft-accordion-item {
|
|
279
293
|
display: flex;
|
|
280
294
|
flex-direction: column;
|
|
@@ -287,11 +301,15 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
287
301
|
display: flex;
|
|
288
302
|
align-items: center;
|
|
289
303
|
cursor: pointer;
|
|
290
|
-
padding: ${
|
|
291
|
-
gap: calc(${
|
|
304
|
+
padding: ${Ze.verticalSpacing} ${Ze.horizontalSpacing};
|
|
305
|
+
gap: calc(${Ze.horizontalSpacing} / 2);
|
|
292
306
|
outline: none;
|
|
293
307
|
}
|
|
294
308
|
|
|
309
|
+
.ft-accordion-item--toggle > *:not(ft-ripple) {
|
|
310
|
+
position: relative;
|
|
311
|
+
}
|
|
312
|
+
|
|
295
313
|
.ft-accordion-item--label {
|
|
296
314
|
flex-grow: 1;
|
|
297
315
|
flex-shrink: 1;
|
|
@@ -309,10 +327,10 @@ const P=t=>({_$litStatic$:t}),Q=new Map,V=(t=>(e,...i)=>{var o;const s=i.length;
|
|
|
309
327
|
.ft-accordion-item--active .ft-accordion-item--content {
|
|
310
328
|
height: initial;
|
|
311
329
|
overflow: visible;
|
|
312
|
-
padding: ${
|
|
330
|
+
padding: ${Ze.verticalSpacing} ${Ze.horizontalSpacing};
|
|
313
331
|
}
|
|
314
332
|
|
|
315
333
|
.ft-accordion-item--separator {
|
|
316
|
-
border-bottom: 1px solid ${
|
|
334
|
+
border-bottom: 1px solid ${Ze.colorOutline};
|
|
317
335
|
}
|
|
318
|
-
`,
|
|
336
|
+
`,Be([o.property({type:String})],We.prototype,"icon",void 0),Be([o.property({type:String})],We.prototype,"label",void 0),Be([o.property({type:Boolean,reflect:!0})],We.prototype,"active",void 0),e.customElement("ft-accordion")(p),e.customElement("ft-accordion-item")(We),t.FtAccordion=p,t.FtAccordionCssVariables={},t.FtAccordionItem=We,t.FtAccordionItemCssVariables=Ze,Object.defineProperty(t,"t",{value:!0})}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|