@fluid-topics/ft-select 1.0.36 → 1.0.37
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-select.light.js +46 -46
- package/build/ft-select.min.js +23 -23
- package/package.json +7 -7
package/build/ft-select.light.js
CHANGED
|
@@ -4,22 +4,22 @@
|
|
|
4
4
|
* Copyright 2017 Google LLC
|
|
5
5
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
6
|
*/
|
|
7
|
-
var r;const p=window,a=p.trustedTypes,f=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",d=`lit$${(Math.random()+"").slice(9)}$`,c="?"+d,u=`<${c}>`,x=document,y=()=>x.createComment(""),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,w=/>/g,k=RegExp(`>|${v}(?:([^\\s"'>=/]+)(${v}*=${v}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,S=/"/g,O=/^(?:script|style|textarea|title)$/i,E=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),j=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),C=new WeakMap,I=x.createTreeWalker(x,129,null,!1),A=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=m;for(let e=0;e<i;e++){const i=t[e];let r,p,a=-1,f=0;for(;f<i.length&&(n.lastIndex=f,p=n.exec(i),null!==p);)f=n.lastIndex,n===m?"!--"===p[1]?n=$:void 0!==p[1]?n=w:void 0!==p[2]?(O.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=k):void 0!==p[3]&&(n=k):n===k?">"===p[0]?(n=null!=s?s:m,a=-1):void 0===p[1]?a=-2:(a=n.lastIndex-p[2].length,r=p[1],n=void 0===p[3]?k:'"'===p[3]?S:z):n===S||n===z?n=k:n===$||n===w?n=m:(n=k,s=void 0);const c=n===k&&t[e+1].startsWith("/>")?" ":"";l+=n===m?i+u:a>=0?(o.push(r),i.slice(0,a)+h+i.slice(a)+d+c):i+d+(-2===a?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class D{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[p,f]=A(t,e);if(this.el=D.createElement(p,i),I.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=I.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(h)||e.startsWith(d)){const i=f[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+h).split(d),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?U:"?"===e[1]?T:"@"===e[1]?W:Z})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(d),e=t.length-1;if(e>0){o.textContent=a?a.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],y()),I.nextNode(),r.push({type:2,index:++s});o.append(t[e],y())}}}else if(8===o.nodeType)if(o.data===c)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)r.push({type:7,index:s}),t+=d.length-1}s++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function
|
|
7
|
+
var r;const p=window,a=p.trustedTypes,f=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",d=`lit$${(Math.random()+"").slice(9)}$`,c="?"+d,u=`<${c}>`,x=document,y=()=>x.createComment(""),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,w=/>/g,k=RegExp(`>|${v}(?:([^\\s"'>=/]+)(${v}*=${v}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,S=/"/g,O=/^(?:script|style|textarea|title)$/i,E=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),j=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),C=new WeakMap,I=x.createTreeWalker(x,129,null,!1),A=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=m;for(let e=0;e<i;e++){const i=t[e];let r,p,a=-1,f=0;for(;f<i.length&&(n.lastIndex=f,p=n.exec(i),null!==p);)f=n.lastIndex,n===m?"!--"===p[1]?n=$:void 0!==p[1]?n=w:void 0!==p[2]?(O.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=k):void 0!==p[3]&&(n=k):n===k?">"===p[0]?(n=null!=s?s:m,a=-1):void 0===p[1]?a=-2:(a=n.lastIndex-p[2].length,r=p[1],n=void 0===p[3]?k:'"'===p[3]?S:z):n===S||n===z?n=k:n===$||n===w?n=m:(n=k,s=void 0);const c=n===k&&t[e+1].startsWith("/>")?" ":"";l+=n===m?i+u:a>=0?(o.push(r),i.slice(0,a)+h+i.slice(a)+d+c):i+d+(-2===a?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class D{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[p,f]=A(t,e);if(this.el=D.createElement(p,i),I.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=I.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(h)||e.startsWith(d)){const i=f[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+h).split(d),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?U:"?"===e[1]?T:"@"===e[1]?W:Z})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(d),e=t.length-1;if(e>0){o.textContent=a?a.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],y()),I.nextNode(),r.push({type:2,index:++s});o.append(t[e],y())}}}else if(8===o.nodeType)if(o.data===c)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)r.push({type:7,index:s}),t+=d.length-1}s++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function M(t,e,i=t,o){var s,l,n,r;if(e===j)return e;let p=void 0!==o?null===(s=i._$Co)||void 0===s?void 0:s[o]:i._$Cl;const a=g(e)?void 0:e._$litDirective$;return(null==p?void 0:p.constructor)!==a&&(null===(l=null==p?void 0:p._$AO)||void 0===l||l.call(p,!1),void 0===a?p=void 0:(p=new a(t),p._$AT(t,i,o)),void 0!==o?(null!==(n=(r=i)._$Co)&&void 0!==n?n:r._$Co=[])[o]=p:i._$Cl=p),void 0!==p&&(e=M(t,p._$AS(t,e.values),p,o)),e}class _{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:i},parts:o}=this._$AD,s=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:x).importNode(i,!0);I.currentNode=s;let l=I.nextNode(),n=0,r=0,p=o[0];for(;void 0!==p;){if(n===p.index){let e;2===p.type?e=new B(l,l.nextSibling,this,t):1===p.type?e=new p.ctor(l,p.name,p.strings,this,t):6===p.type&&(e=new K(l,this,t)),this._$AV.push(e),p=o[++r]}n!==(null==p?void 0:p.index)&&(l=I.nextNode(),n++)}return s}v(t){let e=0;for(const i of this._$AV)void 0!==i&&(void 0!==i.strings?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}}class B{constructor(t,e,i,o){var s;this.type=2,this._$AH=N,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=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._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=M(this,t,e),g(t)?t===N||null==t||""===t?(this._$AH!==N&&this._$AR(),this._$AH=N):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>b(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!==N&&g(this._$AH)?this._$AA.nextSibling.data=t:this.$(x.createTextNode(t)),this._$AH=t}g(t){var e;const{values:i,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=D.createElement(o.h,this.options)),o);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===s)this._$AH.v(i);else{const t=new _(s,this),e=t.u(this.options);t.v(i),this.$(e),this._$AH=t}}_$AC(t){let e=C.get(t.strings);return void 0===e&&C.set(t.strings,e=new D(t)),e}T(t){b(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 B(this.k(y()),this.k(y()),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._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Z{constructor(t,e,i,o,s){this.type=1,this._$AH=N,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=N}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){const s=this.strings;let l=!1;if(void 0===s)t=M(this,t,e,0),l=!g(t)||t!==this._$AH&&t!==j,l&&(this._$AH=t);else{const o=t;let n,r;for(t=s[0],n=0;n<s.length-1;n++)r=M(this,o[i+n],e,n),r===j&&(r=this._$AH[n]),l||(l=!g(r)||r!==this._$AH[n]),r===N?t=N:t!==N&&(t+=(null!=r?r:"")+s[n+1]),this._$AH[n]=r}l&&!o&&this.j(t)}j(t){t===N?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class U extends Z{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===N?void 0:t}}const R=a?a.emptyScript:"";class T extends Z{constructor(){super(...arguments),this.type=4}j(t){t&&t!==N?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class W extends Z{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=M(this,t,e,0))&&void 0!==i?i:N)===j)return;const o=this._$AH,s=t===N&&o!==N||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,l=t!==N&&(o===N||s);s&&this.element.removeEventListener(this.name,this,o),l&&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 K{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){M(this,t)}}const F=p.litHtmlPolyfillSupport;null==F||F(D,B),(null!==(r=p.litHtmlVersions)&&void 0!==r?r:p.litHtmlVersions=[]).push("2.7.3");
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:H}),q=new Map,L=(t=>(e,...i)=>{const o=i.length;let s,l;const n=[],r=[];let p,a=0,f=!1;for(;a<o;){for(p=e[a];a<o&&void 0!==(l=i[a],s=G(l));)p+=s+e[++a],f=!0;a!==o&&r.push(l),n.push(p),a++}if(a===o&&n.push(e[o]),f){const t=n.join("$$lit$$");void 0===(e=q.get(t))&&(n.raw=n,q.set(t,e=n)),i=r}return t(e,...i)})(E);var V;!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"}(V||(V={}));const X=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),Y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),J={fontFamily:Y,fontSize:e.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Q=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",X),tt=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",J.fontSize,"20px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",J.fontWeight,"normal"),it=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",J.letterSpacing,"0.15px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",J.lineHeight,"1.2"),st=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",J.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",X),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",J.fontSize,"14px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",J.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",J.letterSpacing,"0.105px"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",J.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",J.textTransform,"inherit"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",Y),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",J.fontSize,"16px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",J.fontWeight,"600"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",J.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",J.lineHeight,"1.5"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",J.textTransform,"inherit"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",Y),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",J.fontSize,"14px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",J.fontWeight,"normal"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",J.letterSpacing,"0.098px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",J.lineHeight,"1.7"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",J.textTransform,"inherit"),kt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",J.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",J.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",J.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",J.textTransform,"inherit")},zt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",Y),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",J.fontSize,"14px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",J.fontWeight,"normal"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",J.letterSpacing,"0.252px"),jt=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",J.lineHeight,"1.4"),Nt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",J.textTransform,"inherit"),Ct={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",Y),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",J.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",J.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",J.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",J.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",J.textTransform,"inherit")},It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",Y),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",J.fontSize,"10px"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",J.fontWeight,"normal"),Mt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),_t=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",J.lineHeight,"1.6"),Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",J.textTransform,"inherit"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",Y),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",J.fontSize,"10px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Wt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",J.lineHeight,"1.6"),Kt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",J.textTransform,"uppercase"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",Y),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",J.fontSize,"14px"),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",J.fontWeight,"600"),Pt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",J.letterSpacing,"1.246px"),qt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",J.lineHeight,"1.15"),Lt=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",J.textTransform,"uppercase"),Vt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
|
-
font-family: ${
|
|
15
|
+
font-family: ${Q};
|
|
16
16
|
font-size: ${tt};
|
|
17
17
|
font-weight: ${et};
|
|
18
18
|
letter-spacing: ${it};
|
|
19
19
|
line-height: ${ot};
|
|
20
20
|
text-transform: ${st};
|
|
21
21
|
}
|
|
22
|
-
`,
|
|
22
|
+
`,Xt=i.css`
|
|
23
23
|
.ft-typography--title-dense {
|
|
24
24
|
font-family: ${lt};
|
|
25
25
|
font-size: ${nt};
|
|
@@ -28,7 +28,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
28
28
|
line-height: ${at};
|
|
29
29
|
text-transform: ${ft};
|
|
30
30
|
}
|
|
31
|
-
`,
|
|
31
|
+
`,Yt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${ht};
|
|
34
34
|
font-size: ${dt};
|
|
@@ -37,7 +37,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
37
37
|
line-height: ${xt};
|
|
38
38
|
text-transform: ${yt};
|
|
39
39
|
}
|
|
40
|
-
`,
|
|
40
|
+
`,Jt=i.css`
|
|
41
41
|
.ft-typography--subtitle2 {
|
|
42
42
|
font-family: ${gt};
|
|
43
43
|
font-size: ${bt};
|
|
@@ -47,7 +47,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
47
47
|
text-transform: ${wt};
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
`,
|
|
50
|
+
`,Qt=i.css`
|
|
51
51
|
.ft-typography--body1 {
|
|
52
52
|
font-family: ${kt.fontFamily};
|
|
53
53
|
font-size: ${kt.fontSize};
|
|
@@ -79,8 +79,8 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
79
79
|
font-family: ${It};
|
|
80
80
|
font-size: ${At};
|
|
81
81
|
font-weight: ${Dt};
|
|
82
|
-
letter-spacing: ${
|
|
83
|
-
line-height: ${
|
|
82
|
+
letter-spacing: ${Mt};
|
|
83
|
+
line-height: ${_t};
|
|
84
84
|
text-transform: ${Bt};
|
|
85
85
|
}
|
|
86
86
|
`,oe=i.css`
|
|
@@ -95,8 +95,8 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
95
95
|
`,se=i.css`
|
|
96
96
|
.ft-typography--button {
|
|
97
97
|
font-family: ${Ft};
|
|
98
|
-
font-size: ${
|
|
99
|
-
font-weight: ${
|
|
98
|
+
font-size: ${Ht};
|
|
99
|
+
font-weight: ${Gt};
|
|
100
100
|
letter-spacing: ${Pt};
|
|
101
101
|
line-height: ${qt};
|
|
102
102
|
text-transform: ${Lt};
|
|
@@ -105,14 +105,14 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
105
105
|
.ft-typography {
|
|
106
106
|
vertical-align: inherit;
|
|
107
107
|
}
|
|
108
|
-
`;var ne=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class re extends e.FtLitElement{constructor(){super(...arguments),this.variant=
|
|
108
|
+
`;var ne=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class re extends e.FtLitElement{constructor(){super(...arguments),this.variant=V.body1}render(){return this.element?L`
|
|
109
109
|
<${P(this.element)}
|
|
110
110
|
class="ft-typography ft-typography--${this.variant}">
|
|
111
111
|
<slot></slot>
|
|
112
112
|
</${P(this.element)}>
|
|
113
113
|
`:L`
|
|
114
114
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
115
|
-
`}}re.styles=[Xt,Yt,Jt,Qt,
|
|
115
|
+
`}}re.styles=[Vt,Xt,Yt,Jt,Qt,te,ee,ie,oe,se,le],ne([o.property()],re.prototype,"element",void 0),ne([o.property()],re.prototype,"variant",void 0),e.customElement("ft-typography")(re);const pe={fontSize:e.FtCssVariableFactory.create("--ft-input-label-font-size","SIZE","14px"),raisedFontSize:e.FtCssVariableFactory.create("--ft-input-label-raised-font-size","SIZE","11px"),raisedZIndex:e.FtCssVariableFactory.create("--ft-input-label-outlined-raised-z-index","NUMBER","2"),verticalSpacing:e.FtCssVariableFactory.create("--ft-input-label-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-input-label-horizontal-spacing","SIZE","12px"),labelMaxWidth:e.FtCssVariableFactory.create("--ft-input-label-max-width","SIZE","100%"),borderColor:e.FtCssVariableFactory.extend("--ft-input-label-border-color",e.designSystemVariables.colorOutline),textColor:e.FtCssVariableFactory.extend("--ft-input-label-text-color",e.designSystemVariables.colorOnSurfaceMedium),disabledTextColor:e.FtCssVariableFactory.extend("--ft-input-label-disabled-text-color",e.designSystemVariables.colorOnSurfaceDisabled),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},ae=i.css`
|
|
116
116
|
.ft-input-label {
|
|
117
117
|
position: absolute;
|
|
118
118
|
inset: 0;
|
|
@@ -333,7 +333,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
333
333
|
opacity: ${ce.opacityContentOnSurfacePressed};
|
|
334
334
|
transform: translate(-50%, -50%) scale(1);
|
|
335
335
|
}
|
|
336
|
-
`;var $e,we,ke=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ze 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.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),l=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-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.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
|
|
336
|
+
`;var $e,we,ke=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ze 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.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),l=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-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.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.isFocusVisible(null==t?void 0:t.target)&&!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`
|
|
337
337
|
<style>
|
|
338
338
|
.ft-ripple .ft-ripple--effect,
|
|
339
339
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -350,7 +350,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
350
350
|
<div class="ft-ripple--background"></div>
|
|
351
351
|
<div class="ft-ripple--effect"></div>
|
|
352
352
|
</div>
|
|
353
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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,this.target=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()}}ze.elementDefinitions={},ze.styles=me,ke([o.property({type:Boolean})],ze.prototype,"primary",void 0),ke([o.property({type:Boolean})],ze.prototype,"secondary",void 0),ke([o.property({type:Boolean})],ze.prototype,"unbounded",void 0),ke([o.property({type:Boolean})],ze.prototype,"activated",void 0),ke([o.property({type:Boolean})],ze.prototype,"selected",void 0),ke([o.property({type:Boolean})],ze.prototype,"disabled",void 0),ke([o.state()],ze.prototype,"hovered",void 0),ke([o.state()],ze.prototype,"focused",void 0),ke([o.state()],ze.prototype,"pressed",void 0),ke([o.state()],ze.prototype,"rippling",void 0),ke([o.state()],ze.prototype,"rippleSize",void 0),ke([o.state()],ze.prototype,"originX",void 0),ke([o.state()],ze.prototype,"originY",void 0),ke([o.query(".ft-ripple")],ze.prototype,"ripple",void 0),ke([o.query(".ft-ripple--effect")],ze.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ze),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",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.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="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}($e||($e={})),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=""}(we||(we={})),new Map([...["abw"].map((t=>[t,we.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,we.AUDIO])),...["avi"].map((t=>[t,we.AVI])),...["chm","xhs"].map((t=>[t,we.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,we.CODE])),...["csv"].map((t=>[t,we.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,we.DITA])),...["epub"].map((t=>[t,we.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,we.EXCEL])),...["flac"].map((t=>[t,we.FLAC])),...["gif"].map((t=>[t,we.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,we.GZIP])),...["html","htm","xhtml"].map((t=>[t,we.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,we.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,we.JPEG])),...["json"].map((t=>[t,we.JSON])),...["m4a","m4p"].map((t=>[t,we.M4A])),...["mov","qt"].map((t=>[t,we.MOV])),...["mp3"].map((t=>[t,we.MP3])),...["mp4","m4v"].map((t=>[t,we.MP4])),...["ogg","oga"].map((t=>[t,we.OGG])),...["pdf","ps"].map((t=>[t,we.PDF])),...["png"].map((t=>[t,we.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,we.POWERPOINT])),...["rar"].map((t=>[t,we.RAR])),...["stp"].map((t=>[t,we.STP])),...["txt","rtf","md","mdown"].map((t=>[t,we.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,we.VIDEO])),...["wav"].map((t=>[t,we.WAV])),...["wma"].map((t=>[t,we.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,we.WORD])),...["xml","xsl","rdf"].map((t=>[t,we.XML])),...["yaml","yml","x-yaml"].map((t=>[t,we.YAML])),...["zip"].map((t=>[t,we.ZIP]))]);const Se=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),Oe=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Ee=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),je=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Ne=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),Ce=i.css`
|
|
353
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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,this.target=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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}ze.elementDefinitions={},ze.styles=me,ke([o.property({type:Boolean})],ze.prototype,"primary",void 0),ke([o.property({type:Boolean})],ze.prototype,"secondary",void 0),ke([o.property({type:Boolean})],ze.prototype,"unbounded",void 0),ke([o.property({type:Boolean})],ze.prototype,"activated",void 0),ke([o.property({type:Boolean})],ze.prototype,"selected",void 0),ke([o.property({type:Boolean})],ze.prototype,"disabled",void 0),ke([o.state()],ze.prototype,"hovered",void 0),ke([o.state()],ze.prototype,"focused",void 0),ke([o.state()],ze.prototype,"pressed",void 0),ke([o.state()],ze.prototype,"rippling",void 0),ke([o.state()],ze.prototype,"rippleSize",void 0),ke([o.state()],ze.prototype,"originX",void 0),ke([o.state()],ze.prototype,"originY",void 0),ke([o.query(".ft-ripple")],ze.prototype,"ripple",void 0),ke([o.query(".ft-ripple--effect")],ze.prototype,"rippleEffect",void 0),e.customElement("ft-ripple")(ze),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",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.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="",t.EYE_SLASH="",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="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}($e||($e={})),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=""}(we||(we={})),new Map([...["abw"].map((t=>[t,we.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,we.AUDIO])),...["avi"].map((t=>[t,we.AVI])),...["chm","xhs"].map((t=>[t,we.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,we.CODE])),...["csv"].map((t=>[t,we.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,we.DITA])),...["epub"].map((t=>[t,we.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,we.EXCEL])),...["flac"].map((t=>[t,we.FLAC])),...["gif"].map((t=>[t,we.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,we.GZIP])),...["html","htm","xhtml"].map((t=>[t,we.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,we.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,we.JPEG])),...["json"].map((t=>[t,we.JSON])),...["m4a","m4p"].map((t=>[t,we.M4A])),...["mov","qt"].map((t=>[t,we.MOV])),...["mp3"].map((t=>[t,we.MP3])),...["mp4","m4v"].map((t=>[t,we.MP4])),...["ogg","oga"].map((t=>[t,we.OGG])),...["pdf","ps"].map((t=>[t,we.PDF])),...["png"].map((t=>[t,we.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,we.POWERPOINT])),...["rar"].map((t=>[t,we.RAR])),...["stp"].map((t=>[t,we.STP])),...["txt","rtf","md","mdown"].map((t=>[t,we.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,we.VIDEO])),...["wav"].map((t=>[t,we.WAV])),...["wma"].map((t=>[t,we.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,we.WORD])),...["xml","xsl","rdf"].map((t=>[t,we.XML])),...["yaml","yml","x-yaml"].map((t=>[t,we.YAML])),...["zip"].map((t=>[t,we.ZIP]))]);const Se=e.FtCssVariableFactory.create("--ft-icon-font-size","SIZE","24px"),Oe=e.FtCssVariableFactory.extend("--ft-icon-fluid-topics-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-icons")),Ee=e.FtCssVariableFactory.extend("--ft-icon-file-format-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","ft-mime")),je=e.FtCssVariableFactory.extend("--ft-icon-material-font-family",e.FtCssVariableFactory.create("--ft-icon-font-family","UNKNOWN","Material Icons")),Ne=e.FtCssVariableFactory.create("--ft-icon-vertical-align","UNKNOWN","unset"),Ce=i.css`
|
|
354
354
|
:host, i.ft-icon {
|
|
355
355
|
display: inline-flex;
|
|
356
356
|
align-items: center;
|
|
@@ -382,7 +382,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
382
382
|
|
|
383
383
|
i.ft-icon.ft-icon--fluid-topics {
|
|
384
384
|
font-family: ${Oe}, ft-icons, fticons, sans-serif;
|
|
385
|
-
|
|
385
|
+
|
|
386
386
|
/* Ugly fix because font is broken */
|
|
387
387
|
font-size: calc(0.75 * ${Se});
|
|
388
388
|
line-height: ${Se};
|
|
@@ -403,7 +403,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
403
403
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
404
404
|
<slot ?hidden=${e}></slot>
|
|
405
405
|
</i>
|
|
406
|
-
`}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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Ie.file_format:this.resolvedIcon=null!==(t=we[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ie.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=$e[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}De.elementDefinitions={},De.styles=Ce,Ae([o.property()],De.prototype,"variant",void 0),Ae([o.property()],De.prototype,"value",void 0),Ae([o.state()],De.prototype,"resolvedIcon",void 0),Ae([o.query("slot")],De.prototype,"slottedContent",void 0),e.customElement("ft-icon")(De);const
|
|
406
|
+
`}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:""}update(t){super.update(t),["value","variant"].some((e=>t.has(e)))&&this.resolveIcon()}resolveIcon(){var t,e;let o=this.value||this.textContent;switch(this.variant){case Ie.file_format:this.resolvedIcon=null!==(t=we[o.replace("-","_").toUpperCase()])&&void 0!==t?t:o;break;case Ie.material:this.resolvedIcon=this.value||i.nothing;break;default:this.resolvedIcon=null!==(e=$e[o.replace("-","_").toUpperCase()])&&void 0!==e?e:o}}firstUpdated(t){super.firstUpdated(t),setTimeout((()=>this.resolveIcon()))}}De.elementDefinitions={},De.styles=Ce,Ae([o.property()],De.prototype,"variant",void 0),Ae([o.property()],De.prototype,"value",void 0),Ae([o.state()],De.prototype,"resolvedIcon",void 0),Ae([o.query("slot")],De.prototype,"slottedContent",void 0),e.customElement("ft-icon")(De);const Me={labelSize:e.FtCssVariableFactory.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariableFactory.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariableFactory.create("--ft-select-vertical-spacing","SIZE","4px"),horizontalSpacing:e.FtCssVariableFactory.create("--ft-select-horizontal-spacing","SIZE","16px"),optionsHeight:e.FtCssVariableFactory.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariableFactory.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariableFactory.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariableFactory.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariableFactory.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariableFactory.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariableFactory.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariableFactory.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariableFactory.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariableFactory.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariableFactory.external(e.designSystemVariables.colorError,"Design system")},_e=i.css`
|
|
407
407
|
*:focus {
|
|
408
408
|
outline: none;
|
|
409
409
|
}
|
|
@@ -417,7 +417,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
417
417
|
.ft-select--main-panel {
|
|
418
418
|
position: relative;
|
|
419
419
|
display: flex;
|
|
420
|
-
height: calc(4 * ${
|
|
420
|
+
height: calc(4 * ${Me.verticalSpacing} + ${Me.labelSize} + ${Me.selectedOptionSize});
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
.ft-select--input-panel {
|
|
@@ -426,11 +426,11 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
426
426
|
display: flex;
|
|
427
427
|
align-items: center;
|
|
428
428
|
overflow: hidden;
|
|
429
|
-
padding-left: ${
|
|
430
|
-
padding-right: ${
|
|
429
|
+
padding-left: ${Me.horizontalSpacing};
|
|
430
|
+
padding-right: ${Me.horizontalSpacing};
|
|
431
431
|
gap: 8px;
|
|
432
|
-
color: ${
|
|
433
|
-
${e.setVariable(ce.color,
|
|
432
|
+
color: ${Me.selectedOptionColor};
|
|
433
|
+
${e.setVariable(ce.color,Me.selectedOptionColor)};
|
|
434
434
|
}
|
|
435
435
|
|
|
436
436
|
.ft-select--input-panel,
|
|
@@ -446,7 +446,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
446
446
|
|
|
447
447
|
.ft-select--disabled .ft-select--input-panel,
|
|
448
448
|
.ft-select--disabled .ft-select--option {
|
|
449
|
-
color: ${
|
|
449
|
+
color: ${Me.colorOnSurfaceDisabled};
|
|
450
450
|
}
|
|
451
451
|
|
|
452
452
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -455,20 +455,20 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
455
455
|
}
|
|
456
456
|
|
|
457
457
|
ft-input-label {
|
|
458
|
-
${e.setVariable(pe.fontSize,
|
|
459
|
-
${e.setVariable(pe.raisedFontSize,
|
|
460
|
-
${e.setVariable(pe.verticalSpacing,
|
|
461
|
-
${e.setVariable(pe.horizontalSpacing,
|
|
458
|
+
${e.setVariable(pe.fontSize,Me.selectedOptionSize)};
|
|
459
|
+
${e.setVariable(pe.raisedFontSize,Me.labelSize)};
|
|
460
|
+
${e.setVariable(pe.verticalSpacing,Me.verticalSpacing)};
|
|
461
|
+
${e.setVariable(pe.horizontalSpacing,Me.horizontalSpacing)};
|
|
462
462
|
${e.setVariable(pe.labelMaxWidth,`calc(100% - ${Se} - 8px)`)};
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
466
|
-
color: ${
|
|
466
|
+
color: ${Me.colorPrimary};
|
|
467
467
|
}
|
|
468
468
|
|
|
469
469
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
470
|
-
${e.setVariable(pe.borderColor,
|
|
471
|
-
${e.setVariable(pe.textColor,
|
|
470
|
+
${e.setVariable(pe.borderColor,Me.colorPrimary)};
|
|
471
|
+
${e.setVariable(pe.textColor,Me.colorPrimary)};
|
|
472
472
|
}
|
|
473
473
|
|
|
474
474
|
.ft-select--selected-option {
|
|
@@ -478,12 +478,12 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
478
478
|
overflow: hidden;
|
|
479
479
|
white-space: nowrap;
|
|
480
480
|
text-overflow: ellipsis;
|
|
481
|
-
${e.setVariable(kt.fontSize,
|
|
482
|
-
${e.setVariable(kt.lineHeight,
|
|
481
|
+
${e.setVariable(kt.fontSize,Me.selectedOptionSize)};
|
|
482
|
+
${e.setVariable(kt.lineHeight,Me.selectedOptionSize)};
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
.ft-select--in-error .ft-select--selected-option {
|
|
486
|
-
color: ${
|
|
486
|
+
color: ${Me.colorError};
|
|
487
487
|
}
|
|
488
488
|
|
|
489
489
|
ft-icon {
|
|
@@ -495,16 +495,16 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
495
495
|
}
|
|
496
496
|
|
|
497
497
|
.ft-select--filled .ft-select--input-panel {
|
|
498
|
-
border-radius: ${
|
|
498
|
+
border-radius: ${Me.borderRadiusS} ${Me.borderRadiusS} 0 0;
|
|
499
499
|
}
|
|
500
500
|
|
|
501
501
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
502
502
|
align-self: stretch;
|
|
503
|
-
padding-top: calc(${
|
|
503
|
+
padding-top: calc(${Me.labelSize} + 2 * ${Me.verticalSpacing});
|
|
504
504
|
}
|
|
505
505
|
|
|
506
506
|
.ft-select--outlined .ft-select--input-panel {
|
|
507
|
-
border-radius: ${
|
|
507
|
+
border-radius: ${Me.borderRadiusS};
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
.ft-select--options {
|
|
@@ -513,10 +513,10 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
513
513
|
top: 100%;
|
|
514
514
|
left: 0;
|
|
515
515
|
right: 0;
|
|
516
|
-
color: ${
|
|
517
|
-
background: ${
|
|
518
|
-
z-index: ${
|
|
519
|
-
box-shadow: ${
|
|
516
|
+
color: ${Me.optionsColor};
|
|
517
|
+
background: ${Me.colorSurface};
|
|
518
|
+
z-index: ${Me.optionsZIndex};
|
|
519
|
+
box-shadow: ${Me.elevation02};
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
.ft-select--fixed .ft-select--options {
|
|
@@ -527,13 +527,13 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
527
527
|
|
|
528
528
|
.ft-select--options-displayed .ft-select--options {
|
|
529
529
|
display: block;
|
|
530
|
-
max-height: ${
|
|
530
|
+
max-height: ${Me.optionsHeight};
|
|
531
531
|
overflow-y: auto;
|
|
532
532
|
}
|
|
533
533
|
|
|
534
534
|
.ft-select--option {
|
|
535
535
|
position: relative;
|
|
536
|
-
padding: 4px ${
|
|
536
|
+
padding: 4px ${Me.horizontalSpacing};
|
|
537
537
|
min-height: 32px;
|
|
538
538
|
display: flex;
|
|
539
539
|
align-items: center;
|
|
@@ -545,12 +545,12 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
.ft-select--helper-text {
|
|
548
|
-
padding: 0 ${
|
|
549
|
-
color: ${
|
|
548
|
+
padding: 0 ${Me.horizontalSpacing};
|
|
549
|
+
color: ${Me.helperColor};
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
.ft-select--in-error .ft-select--helper-text {
|
|
553
|
-
color: ${
|
|
553
|
+
color: ${Me.colorError};
|
|
554
554
|
}
|
|
555
555
|
`;var Be=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Ze extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ze.elementDefinitions={},Be([o.property({type:String})],Ze.prototype,"label",void 0),Be([o.property({type:Object,converter:t=>t})],Ze.prototype,"value",void 0),Be([o.property({type:Boolean,reflect:!0})],Ze.prototype,"selected",void 0);class Ue extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,n,r;let p=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,h={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":p,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
556
556
|
<div class="${s.classMap(h)}" part="container">
|
|
@@ -600,4 +600,4 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
600
600
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
601
601
|
<span>${t.label}</span>
|
|
602
602
|
</div>
|
|
603
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,l;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(l=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==l?l:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ue.elementDefinitions={"ft-input-label":he,"ft-typography":re,"ft-ripple":ze,"ft-icon":De},Ue.styles=[te,ee,
|
|
603
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;super.contentAvailableCallback(t),t.has("focusOptions")&&this.focusOptions&&(null===(i=null!==(e=this.selectedOptionElement)&&void 0!==e?e:this.firstOption)||void 0===i||i.focus(),this.focusOptions=!1)}get hasOptionsMenuOpen(){return!this.disabled&&this.optionsDisplayed&&this.hasOptions}get hasOptions(){return this.options.length>0}updateOptionsFromSlot(t){var e;t.stopPropagation();let i=null===(e=this.optionsSlot)||void 0===e?void 0:e.assignedElements().map((t=>t));i&&i.length>0&&(this.options=i)}onMainPanelKeyDown(t){switch(t.key){case" ":t.preventDefault(),t.stopPropagation();case"Enter":this.optionsDisplayed=!this.optionsDisplayed,this.focusOptions=!0;break;case"ArrowUp":case"ArrowDown":t.preventDefault(),t.stopPropagation(),this.optionsDisplayed=!0,this.focusOptions=!0}}onOptionsKeyDown(t){var e,i,o,s,l;let n;switch(t.key){case"Escape":this.optionsDisplayed=!1,null===(e=this.mainPanel)||void 0===e||e.focus();break;case"Tab":this.optionsDisplayed=!1;break;case"ArrowUp":t.preventDefault(),t.stopPropagation(),n=null!==(o=null===(i=this.focusedOption)||void 0===i?void 0:i.previousElementSibling)&&void 0!==o?o:this.lastOption;break;case"ArrowDown":t.preventDefault(),t.stopPropagation(),n=null!==(l=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==l?l:this.firstOption}null==n||n.focus()}onOptionKeyDown(t,e){var i;"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),t.stopPropagation(),this.selectOption(e),this.optionsDisplayed=!1,null===(i=this.mainPanel)||void 0===i||i.focus())}selectOption(t){var i,o;if(!e.deepEqual(null===(i=this.selectedOption)||void 0===i?void 0:i.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(o=this.selectedOption)||void 0===o?void 0:o.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Ue.elementDefinitions={"ft-input-label":he,"ft-typography":re,"ft-ripple":ze,"ft-icon":De},Ue.styles=[te,ee,_e],Be([o.property({type:String})],Ue.prototype,"label",void 0),Be([o.property({type:String})],Ue.prototype,"helper",void 0),Be([o.property({type:Boolean})],Ue.prototype,"outlined",void 0),Be([o.property({type:Boolean})],Ue.prototype,"disabled",void 0),Be([o.property({type:Boolean})],Ue.prototype,"error",void 0),Be([o.property({type:Boolean})],Ue.prototype,"fixedMenuPosition",void 0),Be([o.property({type:Array})],Ue.prototype,"options",void 0),Be([o.state()],Ue.prototype,"selectedOption",void 0),Be([o.state()],Ue.prototype,"optionsDisplayed",void 0),Be([o.state()],Ue.prototype,"focusOptions",void 0),Be([o.query(".ft-select")],Ue.prototype,"container",void 0),Be([o.query(".ft-select--options")],Ue.prototype,"optionsMenu",void 0),Be([o.query(".ft-select--input-panel")],Ue.prototype,"mainPanel",void 0),Be([o.query(".ft-select--option:first-child")],Ue.prototype,"firstOption",void 0),Be([o.query(".ft-select--option:focus")],Ue.prototype,"focusedOption",void 0),Be([o.query(".ft-select--option.ft-select--option-selected")],Ue.prototype,"selectedOptionElement",void 0),Be([o.query(".ft-select--option:last-child")],Ue.prototype,"lastOption",void 0),Be([o.query("slot")],Ue.prototype,"optionsSlot",void 0),e.customElement("ft-select")(Ue),e.customElement("ft-select-option")(Ze),t.FtSelect=Ue,t.FtSelectCssVariables=Me,t.FtSelectOption=Ze,t.styles=_e}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
|
package/build/ft-select.min.js
CHANGED
|
@@ -64,30 +64,30 @@ var N;E.finalized=!0,E.elementProperties=new Map,E.elementStyles=[],E.shadowRoot
|
|
|
64
64
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
65
|
*/
|
|
66
66
|
var ft,dt;let ut=class extends E{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const i=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=i.firstChild),i}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=((t,e,i)=>{var o,s;const n=null!==(o=null==i?void 0:i.renderBefore)&&void 0!==o?o:e;let r=n._$litPart$;if(void 0===r){const t=null!==(s=null==i?void 0:i.renderBefore)&&void 0!==s?s:null;n._$litPart$=r=new ot(e.insertBefore(D(),t),t,void 0,null!=i?i:{})}return r._$AI(t),r})(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return q}};ut.finalized=!0,ut._$litElement$=!0,null===(ft=globalThis.litElementHydrateSupport)||void 0===ft||ft.call(globalThis,{LitElement:ut});const xt=globalThis.litElementPolyfillSupport;null==xt||xt({LitElement:ut}),(null!==(dt=globalThis.litElementVersions)&&void 0!==dt?dt:globalThis.litElementVersions=[]).push("3.3.2");class yt{static create(t,e,i){let o=t=>u(null!=t?t:i),s=x`var(${u(t)}, ${o(i)})`;return s.name=t,s.category=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>x`var(${u(t)}, ${o(e)})`,s.breadcrumb=()=>[],s.lastResortDefaultValue=()=>i,s}static extend(t,e,i){let o=t=>e.get(null!=t?t:i),s=x`var(${u(t)}, ${o(i)})`;return s.name=t,s.category=e.category,s.fallbackVariable=e,s.defaultValue=i,s.defaultCssValue=o,s.get=e=>x`var(${u(t)}, ${o(e)})`,s.breadcrumb=()=>[e.name,...e.breadcrumb()],s.lastResortDefaultValue=()=>i,s}static external(t,e){let i=e=>t.fallbackVariable?t.fallbackVariable.get(null!=e?e:t.defaultValue):u(null!=e?e:t.defaultValue),o=x`var(${u(t.name)}, ${i(t.defaultValue)})`;return o.name=t.name,o.category=t.category,o.fallbackVariable=t.fallbackVariable,o.defaultValue=t.defaultValue,o.context=e,o.defaultCssValue=i,o.get=e=>x`var(${u(t.name)}, ${i(e)})`,o.breadcrumb=()=>t.fallbackVariable?[t.fallbackVariable.name,...t.fallbackVariable.breadcrumb()]:[],o.lastResortDefaultValue=()=>{var e,i;return null!==(e=t.defaultValue)&&void 0!==e?e:null===(i=t.fallbackVariable)||void 0===i?void 0:i.lastResortDefaultValue()},o}}function vt(t,e){return u(`${t.name}: ${e}`)}const bt={colorPrimary:yt.create("--ft-color-primary","COLOR","#2196F3"),colorPrimaryVariant:yt.create("--ft-color-primary-variant","COLOR","#1976D2"),colorSecondary:yt.create("--ft-color-secondary","COLOR","#FFCC80"),colorSecondaryVariant:yt.create("--ft-color-secondary-variant","COLOR","#F57C00"),colorSurface:yt.create("--ft-color-surface","COLOR","#FFFFFF"),colorContent:yt.create("--ft-color-content","COLOR","rgba(0, 0, 0, 0.87)"),colorError:yt.create("--ft-color-error","COLOR","#B00020"),colorOutline:yt.create("--ft-color-outline","COLOR","rgba(0, 0, 0, 0.14)"),colorOpacityHigh:yt.create("--ft-color-opacity-high","NUMBER","1"),colorOpacityMedium:yt.create("--ft-color-opacity-medium","NUMBER","0.74"),colorOpacityDisabled:yt.create("--ft-color-opacity-disabled","NUMBER","0.38"),colorOnPrimary:yt.create("--ft-color-on-primary","COLOR","#FFFFFF"),colorOnPrimaryHigh:yt.create("--ft-color-on-primary-high","COLOR","#FFFFFF"),colorOnPrimaryMedium:yt.create("--ft-color-on-primary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnPrimaryDisabled:yt.create("--ft-color-on-primary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSecondary:yt.create("--ft-color-on-secondary","COLOR","#FFFFFF"),colorOnSecondaryHigh:yt.create("--ft-color-on-secondary-high","COLOR","#FFFFFF"),colorOnSecondaryMedium:yt.create("--ft-color-on-secondary-medium","COLOR","rgba(255, 255, 255, 0.74)"),colorOnSecondaryDisabled:yt.create("--ft-color-on-secondary-disabled","COLOR","rgba(255, 255, 255, 0.38)"),colorOnSurface:yt.create("--ft-color-on-surface","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceHigh:yt.create("--ft-color-on-surface-high","COLOR","rgba(0, 0, 0, 0.87)"),colorOnSurfaceMedium:yt.create("--ft-color-on-surface-medium","COLOR","rgba(0, 0, 0, 0.60)"),colorOnSurfaceDisabled:yt.create("--ft-color-on-surface-disabled","COLOR","rgba(0, 0, 0, 0.38)"),opacityContentOnSurfaceDisabled:yt.create("--ft-opacity-content-on-surface-disabled","NUMBER","0"),opacityContentOnSurfaceEnable:yt.create("--ft-opacity-content-on-surface-enable","NUMBER","0"),opacityContentOnSurfaceHover:yt.create("--ft-opacity-content-on-surface-hover","NUMBER","0.04"),opacityContentOnSurfaceFocused:yt.create("--ft-opacity-content-on-surface-focused","NUMBER","0.12"),opacityContentOnSurfacePressed:yt.create("--ft-opacity-content-on-surface-pressed","NUMBER","0.10"),opacityContentOnSurfaceSelected:yt.create("--ft-opacity-content-on-surface-selected","NUMBER","0.08"),opacityContentOnSurfaceDragged:yt.create("--ft-opacity-content-on-surface-dragged","NUMBER","0.08"),opacityPrimaryOnSurfaceDisabled:yt.create("--ft-opacity-primary-on-surface-disabled","NUMBER","0"),opacityPrimaryOnSurfaceEnable:yt.create("--ft-opacity-primary-on-surface-enable","NUMBER","0"),opacityPrimaryOnSurfaceHover:yt.create("--ft-opacity-primary-on-surface-hover","NUMBER","0.04"),opacityPrimaryOnSurfaceFocused:yt.create("--ft-opacity-primary-on-surface-focused","NUMBER","0.12"),opacityPrimaryOnSurfacePressed:yt.create("--ft-opacity-primary-on-surface-pressed","NUMBER","0.10"),opacityPrimaryOnSurfaceSelected:yt.create("--ft-opacity-primary-on-surface-selected","NUMBER","0.08"),opacityPrimaryOnSurfaceDragged:yt.create("--ft-opacity-primary-on-surface-dragged","NUMBER","0.08"),opacitySurfaceOnPrimaryDisabled:yt.create("--ft-opacity-surface-on-primary-disabled","NUMBER","0"),opacitySurfaceOnPrimaryEnable:yt.create("--ft-opacity-surface-on-primary-enable","NUMBER","0"),opacitySurfaceOnPrimaryHover:yt.create("--ft-opacity-surface-on-primary-hover","NUMBER","0.04"),opacitySurfaceOnPrimaryFocused:yt.create("--ft-opacity-surface-on-primary-focused","NUMBER","0.12"),opacitySurfaceOnPrimaryPressed:yt.create("--ft-opacity-surface-on-primary-pressed","NUMBER","0.10"),opacitySurfaceOnPrimarySelected:yt.create("--ft-opacity-surface-on-primary-selected","NUMBER","0.08"),opacitySurfaceOnPrimaryDragged:yt.create("--ft-opacity-surface-on-primary-dragged","NUMBER","0.08"),elevation00:yt.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:yt.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:yt.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:yt.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:yt.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:yt.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:yt.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:yt.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:yt.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:yt.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:yt.create("--ft-border-radius-S","SIZE","4px"),borderRadiusM:yt.create("--ft-border-radius-M","SIZE","8px"),borderRadiusL:yt.create("--ft-border-radius-L","SIZE","12px"),borderRadiusXL:yt.create("--ft-border-radius-XL","SIZE","16px"),titleFont:yt.create("--ft-title-font","UNKNOWN","Ubuntu, system-ui, sans-serif"),contentFont:yt.create("--ft-content-font","UNKNOWN","'Open Sans', system-ui, sans-serif"),transitionDuration:yt.create("--ft-transition-duration","UNKNOWN","250ms"),transitionTimingFunction:yt.create("--ft-transition-timing-function","UNKNOWN","ease-in-out")};class gt extends ut{createRenderRoot(){const t=this.constructor;t.elementDefinitions&&!t.registry&&(t.registry=new CustomElementRegistry,Object.entries(t.elementDefinitions).forEach((([e,i])=>t.registry.define(e,i))));const e={...t.shadowRootOptions,customElements:t.registry},i=this.renderOptions.creationScope=this.attachShadow(e);return y(i,t.elementStyles),i}}var mt,wt=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};const $t=Symbol("constructorPrototype"),Ot=Symbol("constructorName"),St=Symbol("exportpartsDebouncer");class kt extends gt{constructor(){super(),this[mt]=new e(5),this[Ot]=this.constructor.name,this[$t]=this.constructor.prototype}adoptedCallback(){this.constructor.name!==this[Ot]&&Object.setPrototypeOf(this,this[$t])}updated(t){super.updated(t),setTimeout((()=>{this.contentAvailableCallback(t),this.scheduleExportpartsUpdate()}),0)}contentAvailableCallback(t){var e,i;if((null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll(".ft-lit-element--custom-stylesheet"))&&void 0!==i?i:[]).forEach((t=>t.remove())),this.customStylesheet){const t=document.createElement("style");t.classList.add("ft-lit-element--custom-stylesheet"),t.innerHTML=this.customStylesheet,this.shadowRoot.append(t)}}scheduleExportpartsUpdate(){this[St].run((()=>{var t;(null===(t=this.exportpartsPrefix)||void 0===t?void 0:t.trim())?this.setExportpartsAttribute([this.exportpartsPrefix]):null!=this.exportpartsPrefixes&&this.exportpartsPrefixes.length>0&&this.setExportpartsAttribute(this.exportpartsPrefixes)}))}setExportpartsAttribute(t){var e,i,o,s,n,r;const l=t=>null!=t&&t.trim().length>0,a=t.filter(l).map((t=>t.trim()));if(0===a.length)return void this.removeAttribute("exportparts");const p=new Set;for(let t of null!==(i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelectorAll("[part],[exportparts]"))&&void 0!==i?i:[]){const e=null!==(s=null===(o=t.getAttribute("part"))||void 0===o?void 0:o.split(" "))&&void 0!==s?s:[],i=null!==(r=null===(n=t.getAttribute("exportparts"))||void 0===n?void 0:n.split(",").map((t=>t.split(":")[1])))&&void 0!==r?r:[];new Array(...e,...i).filter(l).map((t=>t.trim())).forEach((t=>p.add(t)))}if(0===p.size)return void this.removeAttribute("exportparts");const c=[...p.values()].flatMap((t=>a.map((e=>`${t}:${e}--${t}`))));this.setAttribute("exportparts",[...this.part,...c].join(", "))}}var Et,Nt;mt=St,wt([o()],kt.prototype,"exportpartsPrefix",void 0),wt([function(t,e){const i=()=>JSON.parse(JSON.stringify(t));return o({type:Object,converter:{fromAttribute:t=>{if(null==t)return i();try{return JSON.parse(t)}catch{return i()}},toAttribute:t=>JSON.stringify(t)},hasChanged:(t,e)=>!l(t,e),...null!=e?e:{}})}([])],kt.prototype,"exportpartsPrefixes",void 0),wt([o()],kt.prototype,"customStylesheet",void 0),x`
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
.ft-no-text-select {
|
|
68
|
+
-webkit-touch-callout: none;
|
|
69
|
+
-webkit-user-select: none;
|
|
70
|
+
-khtml-user-select: none;
|
|
71
|
+
-moz-user-select: none;
|
|
72
|
+
-ms-user-select: none;
|
|
73
|
+
user-select: none;
|
|
74
|
+
}
|
|
75
75
|
`,x`
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
76
|
+
.ft-word-wrap {
|
|
77
|
+
white-space: normal;
|
|
78
|
+
word-wrap: break-word;
|
|
79
|
+
-ms-word-break: break-all;
|
|
80
|
+
word-break: break-all;
|
|
81
|
+
word-break: break-word;
|
|
82
|
+
-ms-hyphens: auto;
|
|
83
|
+
-moz-hyphens: auto;
|
|
84
|
+
-webkit-hyphens: auto;
|
|
85
|
+
hyphens: auto
|
|
86
|
+
}
|
|
87
87
|
`,x`
|
|
88
88
|
.ft-safari-ellipsis-fix {
|
|
89
89
|
margin-right: 0;
|
|
90
|
-
|
|
90
|
+
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.ft-safari-ellipsis-fix:after {
|
|
@@ -434,7 +434,7 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
434
434
|
opacity: ${ci.opacityContentOnSurfacePressed};
|
|
435
435
|
transform: translate(-50%, -50%) scale(1);
|
|
436
436
|
}
|
|
437
|
-
`;var bi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class gi extends kt{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(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 e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=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-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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
|
|
437
|
+
`;var bi=function(t,e,i,o){for(var s,n=arguments.length,r=n<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(e,i,r):s(e,i))||r);return n>3&&r&&Object.defineProperty(e,i,r),r};class gi extends kt{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(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 e(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),n=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-n.x:n.width/2),this.originY=Math.round(null!=s?s-n.y:n.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.isFocusVisible(null==t?void 0:t.target)&&!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 J`
|
|
438
438
|
<style>
|
|
439
439
|
.ft-ripple .ft-ripple--effect,
|
|
440
440
|
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
@@ -451,7 +451,7 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
451
451
|
<div class="ft-ripple--background"></div>
|
|
452
452
|
<div class="ft-ripple--effect"></div>
|
|
453
453
|
</div>
|
|
454
|
-
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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,this.target=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()}}gi.elementDefinitions={},gi.styles=vi,bi([o({type:Boolean})],gi.prototype,"primary",void 0),bi([o({type:Boolean})],gi.prototype,"secondary",void 0),bi([o({type:Boolean})],gi.prototype,"unbounded",void 0),bi([o({type:Boolean})],gi.prototype,"activated",void 0),bi([o({type:Boolean})],gi.prototype,"selected",void 0),bi([o({type:Boolean})],gi.prototype,"disabled",void 0),bi([s()],gi.prototype,"hovered",void 0),bi([s()],gi.prototype,"focused",void 0),bi([s()],gi.prototype,"pressed",void 0),bi([s()],gi.prototype,"rippling",void 0),bi([s()],gi.prototype,"rippleSize",void 0),bi([s()],gi.prototype,"originX",void 0),bi([s()],gi.prototype,"originY",void 0),bi([n(".ft-ripple")],gi.prototype,"ripple",void 0),bi([n(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),a("ft-ripple")(gi);
|
|
454
|
+
`}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(){super.connectedCallback(),this.setupDebouncer.run((()=>this.defaultSetup()))}defaultSetup(){var t,e;const i=null===(t=this.shadowRoot)||void 0===t?void 0:t.host.parentElement;i&&this.setupFor(null!==(e=this.target)&&void 0!==e?e:i),this.setRippleSize()}setupFor(t){if(this.setupDebouncer.cancel(),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,this.target=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}}isFocusVisible(t){return!(t instanceof HTMLElement)||t.matches(":focus-visible")}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()}}gi.elementDefinitions={},gi.styles=vi,bi([o({type:Boolean})],gi.prototype,"primary",void 0),bi([o({type:Boolean})],gi.prototype,"secondary",void 0),bi([o({type:Boolean})],gi.prototype,"unbounded",void 0),bi([o({type:Boolean})],gi.prototype,"activated",void 0),bi([o({type:Boolean})],gi.prototype,"selected",void 0),bi([o({type:Boolean})],gi.prototype,"disabled",void 0),bi([s()],gi.prototype,"hovered",void 0),bi([s()],gi.prototype,"focused",void 0),bi([s()],gi.prototype,"pressed",void 0),bi([s()],gi.prototype,"rippling",void 0),bi([s()],gi.prototype,"rippleSize",void 0),bi([s()],gi.prototype,"originX",void 0),bi([s()],gi.prototype,"originY",void 0),bi([n(".ft-ripple")],gi.prototype,"ripple",void 0),bi([n(".ft-ripple--effect")],gi.prototype,"rippleEffect",void 0),a("ft-ripple")(gi);
|
|
455
455
|
/**
|
|
456
456
|
* @license
|
|
457
457
|
* Copyright 2017 Google LLC
|
|
@@ -489,7 +489,7 @@ class mi extends Ut{constructor(t){if(super(t),this.et=X,t.type!==Mt)throw Error
|
|
|
489
489
|
|
|
490
490
|
i.ft-icon.ft-icon--fluid-topics {
|
|
491
491
|
font-family: ${ki}, ft-icons, fticons, sans-serif;
|
|
492
|
-
|
|
492
|
+
|
|
493
493
|
/* Ugly fix because font is broken */
|
|
494
494
|
font-size: calc(0.75 * ${Si});
|
|
495
495
|
line-height: ${Si};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-select",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.37",
|
|
4
4
|
"description": "Value selector for a predefined list of choices",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
23
|
-
"@fluid-topics/ft-input-label": "1.0.
|
|
24
|
-
"@fluid-topics/ft-ripple": "1.0.
|
|
25
|
-
"@fluid-topics/ft-typography": "1.0.
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-icon": "1.0.37",
|
|
23
|
+
"@fluid-topics/ft-input-label": "1.0.37",
|
|
24
|
+
"@fluid-topics/ft-ripple": "1.0.37",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.0.37",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.37",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "abb2109b58b81de01332c9f036f5ff1df0861f8f"
|
|
30
30
|
}
|