@fluid-topics/ft-select 1.0.55 → 1.0.56
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.d.ts +2 -2
- package/build/ft-select.js +4 -4
- package/build/ft-select.light.js +64 -48
- package/build/ft-select.min.js +28 -12
- package/package.json +7 -7
package/build/ft-select.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ export declare class FtSelectOption extends FtLitElement implements FtSelectOpti
|
|
|
7
7
|
value: any;
|
|
8
8
|
selected: boolean;
|
|
9
9
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
10
|
-
protected
|
|
10
|
+
protected update(changedProperties: PropertyValues): void;
|
|
11
11
|
}
|
|
12
12
|
export declare class FtSelect extends FtLitElement implements FtSelectProperties {
|
|
13
13
|
static elementDefinitions: ElementDefinitionsMap;
|
|
@@ -32,7 +32,7 @@ export declare class FtSelect extends FtLitElement implements FtSelectProperties
|
|
|
32
32
|
private optionsSlot?;
|
|
33
33
|
protected render(): import("lit-html").TemplateResult<1>;
|
|
34
34
|
private renderOption;
|
|
35
|
-
protected
|
|
35
|
+
protected update(props: PropertyValues): void;
|
|
36
36
|
private positionOptionsMenu;
|
|
37
37
|
protected contentAvailableCallback(props: PropertyValues): void;
|
|
38
38
|
private get hasOptionsMenuOpen();
|
package/build/ft-select.js
CHANGED
|
@@ -24,8 +24,8 @@ class FtSelectOption extends FtLitElement {
|
|
|
24
24
|
render() {
|
|
25
25
|
return html ``;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
super.
|
|
27
|
+
update(changedProperties) {
|
|
28
|
+
super.update(changedProperties);
|
|
29
29
|
this.dispatchEvent(new CustomEvent("option-change", { detail: this, bubbles: true }));
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -132,8 +132,8 @@ class FtSelect extends FtLitElement {
|
|
|
132
132
|
</div>
|
|
133
133
|
`;
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
super.
|
|
135
|
+
update(props) {
|
|
136
|
+
super.update(props);
|
|
137
137
|
if (props.has("options")) {
|
|
138
138
|
this.selectedOption = this.options.filter(o => o.selected)[0];
|
|
139
139
|
}
|
package/build/ft-select.light.js
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
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]?
|
|
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]?W:"@"===e[1]?R: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 _(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=_(t,p._$AS(t,e.values),p,o)),e}class M{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=_(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 M(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=_(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=_(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 T=a?a.emptyScript:"";class W extends Z{constructor(){super(...arguments),this.type=4}j(t){t&&t!==N?this.element.setAttribute(this.name,T):this.element.removeAttribute(this.name)}}class R 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=_(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){_(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 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"),
|
|
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"),_t=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",J.letterSpacing,"0.33px"),Mt=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"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",J.fontWeight,"normal"),Wt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",J.letterSpacing,"1.5px"),Rt=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
15
|
font-family: ${Q};
|
|
16
16
|
font-size: ${tt};
|
|
@@ -79,17 +79,17 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)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: ${_t};
|
|
83
|
+
line-height: ${Mt};
|
|
84
84
|
text-transform: ${Bt};
|
|
85
85
|
}
|
|
86
86
|
`,oe=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
88
|
font-family: ${Zt};
|
|
89
89
|
font-size: ${Ut};
|
|
90
|
-
font-weight: ${
|
|
91
|
-
letter-spacing: ${
|
|
92
|
-
line-height: ${
|
|
90
|
+
font-weight: ${Tt};
|
|
91
|
+
letter-spacing: ${Wt};
|
|
92
|
+
line-height: ${Rt};
|
|
93
93
|
text-transform: ${Kt};
|
|
94
94
|
}
|
|
95
95
|
`,se=i.css`
|
|
@@ -265,6 +265,30 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
265
265
|
opacity: 0;
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
+
.ft-ripple .ft-ripple--effect {
|
|
269
|
+
aspect-ratio: 1;
|
|
270
|
+
width: auto;
|
|
271
|
+
height: auto;
|
|
272
|
+
min-width: 170%;
|
|
273
|
+
min-height: 170%;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.ft-ripple .ft-ripple--background{
|
|
277
|
+
width: 100%;
|
|
278
|
+
height: 100%;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
282
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
283
|
+
aspect-ratio: 1;
|
|
284
|
+
width: auto;
|
|
285
|
+
height: auto;
|
|
286
|
+
max-width: unset;
|
|
287
|
+
max-height: unset;
|
|
288
|
+
min-width: 100%;
|
|
289
|
+
min-height: 100%;
|
|
290
|
+
}
|
|
291
|
+
|
|
268
292
|
.ft-ripple .ft-ripple--background {
|
|
269
293
|
background-color: ${ce.backgroundColor};
|
|
270
294
|
}
|
|
@@ -292,8 +316,6 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
292
316
|
.ft-ripple .ft-ripple--background {
|
|
293
317
|
top: 0;
|
|
294
318
|
left: 0;
|
|
295
|
-
height: 100%;
|
|
296
|
-
width: 100%;
|
|
297
319
|
transition: opacity 75ms linear;
|
|
298
320
|
}
|
|
299
321
|
|
|
@@ -333,14 +355,8 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
333
355
|
opacity: ${ce.opacityContentOnSurfacePressed};
|
|
334
356
|
transform: translate(-50%, -50%) scale(1);
|
|
335
357
|
}
|
|
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.
|
|
358
|
+
`;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.originX=0,this.originY=0,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
359
|
<style>
|
|
338
|
-
.ft-ripple .ft-ripple--effect,
|
|
339
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
340
|
-
width: ${this.rippleSize}px;
|
|
341
|
-
height: ${this.rippleSize}px;
|
|
342
|
-
}
|
|
343
|
-
|
|
344
360
|
.ft-ripple .ft-ripple--effect {
|
|
345
361
|
left: ${this.originX}px;
|
|
346
362
|
top: ${this.originY}px;
|
|
@@ -350,7 +366,7 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
350
366
|
<div class="ft-ripple--background"></div>
|
|
351
367
|
<div class="ft-ripple--effect"></div>
|
|
352
368
|
</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}}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.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",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`
|
|
369
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}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)}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.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,"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.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",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
370
|
:host, i.ft-icon {
|
|
355
371
|
display: inline-flex;
|
|
356
372
|
align-items: center;
|
|
@@ -403,7 +419,7 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
403
419
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
404
420
|
<slot ?hidden=${e}></slot>
|
|
405
421
|
</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
|
|
422
|
+
`}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 _e={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")},Me=i.css`
|
|
407
423
|
*:focus {
|
|
408
424
|
outline: none;
|
|
409
425
|
}
|
|
@@ -417,7 +433,7 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
417
433
|
.ft-select--main-panel {
|
|
418
434
|
position: relative;
|
|
419
435
|
display: flex;
|
|
420
|
-
height: calc(4 * ${
|
|
436
|
+
height: calc(4 * ${_e.verticalSpacing} + ${_e.labelSize} + ${_e.selectedOptionSize});
|
|
421
437
|
}
|
|
422
438
|
|
|
423
439
|
.ft-select--input-panel {
|
|
@@ -426,11 +442,11 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
426
442
|
display: flex;
|
|
427
443
|
align-items: center;
|
|
428
444
|
overflow: hidden;
|
|
429
|
-
padding-left: ${
|
|
430
|
-
padding-right: ${
|
|
445
|
+
padding-left: ${_e.horizontalSpacing};
|
|
446
|
+
padding-right: ${_e.horizontalSpacing};
|
|
431
447
|
gap: 8px;
|
|
432
|
-
color: ${
|
|
433
|
-
${e.setVariable(ce.color,
|
|
448
|
+
color: ${_e.selectedOptionColor};
|
|
449
|
+
${e.setVariable(ce.color,_e.selectedOptionColor)};
|
|
434
450
|
}
|
|
435
451
|
|
|
436
452
|
.ft-select--input-panel,
|
|
@@ -446,7 +462,7 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
446
462
|
|
|
447
463
|
.ft-select--disabled .ft-select--input-panel,
|
|
448
464
|
.ft-select--disabled .ft-select--option {
|
|
449
|
-
color: ${
|
|
465
|
+
color: ${_e.colorOnSurfaceDisabled};
|
|
450
466
|
}
|
|
451
467
|
|
|
452
468
|
.ft-select:not(.ft-select--disabled) .ft-select--input-panel,
|
|
@@ -455,20 +471,20 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
455
471
|
}
|
|
456
472
|
|
|
457
473
|
ft-input-label {
|
|
458
|
-
${e.setVariable(pe.fontSize,
|
|
459
|
-
${e.setVariable(pe.raisedFontSize,
|
|
460
|
-
${e.setVariable(pe.verticalSpacing,
|
|
461
|
-
${e.setVariable(pe.horizontalSpacing,
|
|
474
|
+
${e.setVariable(pe.fontSize,_e.selectedOptionSize)};
|
|
475
|
+
${e.setVariable(pe.raisedFontSize,_e.labelSize)};
|
|
476
|
+
${e.setVariable(pe.verticalSpacing,_e.verticalSpacing)};
|
|
477
|
+
${e.setVariable(pe.horizontalSpacing,_e.horizontalSpacing)};
|
|
462
478
|
${e.setVariable(pe.labelMaxWidth,`calc(100% - ${Se} - 8px)`)};
|
|
463
479
|
}
|
|
464
480
|
|
|
465
481
|
.ft-select:not(.ft-select--disabled):focus-within ft-icon {
|
|
466
|
-
color: ${
|
|
482
|
+
color: ${_e.colorPrimary};
|
|
467
483
|
}
|
|
468
484
|
|
|
469
485
|
.ft-select:not(.ft-select--disabled):focus-within ft-input-label {
|
|
470
|
-
${e.setVariable(pe.borderColor,
|
|
471
|
-
${e.setVariable(pe.textColor,
|
|
486
|
+
${e.setVariable(pe.borderColor,_e.colorPrimary)};
|
|
487
|
+
${e.setVariable(pe.textColor,_e.colorPrimary)};
|
|
472
488
|
}
|
|
473
489
|
|
|
474
490
|
.ft-select--selected-option {
|
|
@@ -478,12 +494,12 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
478
494
|
overflow: hidden;
|
|
479
495
|
white-space: nowrap;
|
|
480
496
|
text-overflow: ellipsis;
|
|
481
|
-
${e.setVariable(kt.fontSize,
|
|
482
|
-
${e.setVariable(kt.lineHeight,
|
|
497
|
+
${e.setVariable(kt.fontSize,_e.selectedOptionSize)};
|
|
498
|
+
${e.setVariable(kt.lineHeight,_e.selectedOptionSize)};
|
|
483
499
|
}
|
|
484
500
|
|
|
485
501
|
.ft-select--in-error .ft-select--selected-option {
|
|
486
|
-
color: ${
|
|
502
|
+
color: ${_e.colorError};
|
|
487
503
|
}
|
|
488
504
|
|
|
489
505
|
ft-icon {
|
|
@@ -495,16 +511,16 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
495
511
|
}
|
|
496
512
|
|
|
497
513
|
.ft-select--filled .ft-select--input-panel {
|
|
498
|
-
border-radius: ${
|
|
514
|
+
border-radius: ${_e.borderRadiusS} ${_e.borderRadiusS} 0 0;
|
|
499
515
|
}
|
|
500
516
|
|
|
501
517
|
.ft-select--filled:not(.ft-select--no-label) .ft-select--selected-option {
|
|
502
518
|
align-self: stretch;
|
|
503
|
-
padding-top: calc(${
|
|
519
|
+
padding-top: calc(${_e.labelSize} + 2 * ${_e.verticalSpacing});
|
|
504
520
|
}
|
|
505
521
|
|
|
506
522
|
.ft-select--outlined .ft-select--input-panel {
|
|
507
|
-
border-radius: ${
|
|
523
|
+
border-radius: ${_e.borderRadiusS};
|
|
508
524
|
}
|
|
509
525
|
|
|
510
526
|
.ft-select--options {
|
|
@@ -513,10 +529,10 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
513
529
|
top: 100%;
|
|
514
530
|
left: 0;
|
|
515
531
|
right: 0;
|
|
516
|
-
color: ${
|
|
517
|
-
background: ${
|
|
518
|
-
z-index: ${
|
|
519
|
-
box-shadow: ${
|
|
532
|
+
color: ${_e.optionsColor};
|
|
533
|
+
background: ${_e.colorSurface};
|
|
534
|
+
z-index: ${_e.optionsZIndex};
|
|
535
|
+
box-shadow: ${_e.elevation02};
|
|
520
536
|
}
|
|
521
537
|
|
|
522
538
|
.ft-select--fixed .ft-select--options {
|
|
@@ -527,13 +543,13 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
527
543
|
|
|
528
544
|
.ft-select--options-displayed .ft-select--options {
|
|
529
545
|
display: block;
|
|
530
|
-
max-height: ${
|
|
546
|
+
max-height: ${_e.optionsHeight};
|
|
531
547
|
overflow-y: auto;
|
|
532
548
|
}
|
|
533
549
|
|
|
534
550
|
.ft-select--option {
|
|
535
551
|
position: relative;
|
|
536
|
-
padding: 4px ${
|
|
552
|
+
padding: 4px ${_e.horizontalSpacing};
|
|
537
553
|
min-height: 32px;
|
|
538
554
|
display: flex;
|
|
539
555
|
align-items: center;
|
|
@@ -545,14 +561,14 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
545
561
|
}
|
|
546
562
|
|
|
547
563
|
.ft-select--helper-text {
|
|
548
|
-
padding: 0 ${
|
|
549
|
-
color: ${
|
|
564
|
+
padding: 0 ${_e.horizontalSpacing};
|
|
565
|
+
color: ${_e.helperColor};
|
|
550
566
|
}
|
|
551
567
|
|
|
552
568
|
.ft-select--in-error .ft-select--helper-text {
|
|
553
|
-
color: ${
|
|
569
|
+
color: ${_e.colorError};
|
|
554
570
|
}
|
|
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``}
|
|
571
|
+
`;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``}update(t){super.update(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
572
|
<div class="${s.classMap(h)}" part="container">
|
|
557
573
|
<div class="ft-select--main-panel" part="main-panel">
|
|
558
574
|
<ft-input-label text="${this.label}"
|
|
@@ -600,4 +616,4 @@ const H=Symbol.for(""),G=t=>{if((null==t?void 0:t.r)===H)return null==t?void 0:t
|
|
|
600
616
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
601
617
|
<span>${t.label}</span>
|
|
602
618
|
</div>
|
|
603
|
-
`}
|
|
619
|
+
`}update(t){super.update(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,Me],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=_e,t.FtSelectOption=Ze,t.styles=Me}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litClassMap,ftGlobals.litRepeat,ftGlobals.litUnsafeHTML);
|
package/build/ft-select.min.js
CHANGED
|
@@ -366,6 +366,30 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
366
366
|
opacity: 0;
|
|
367
367
|
}
|
|
368
368
|
|
|
369
|
+
.ft-ripple .ft-ripple--effect {
|
|
370
|
+
aspect-ratio: 1;
|
|
371
|
+
width: auto;
|
|
372
|
+
height: auto;
|
|
373
|
+
min-width: 170%;
|
|
374
|
+
min-height: 170%;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.ft-ripple .ft-ripple--background{
|
|
378
|
+
width: 100%;
|
|
379
|
+
height: 100%;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--effect,
|
|
383
|
+
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
384
|
+
aspect-ratio: 1;
|
|
385
|
+
width: auto;
|
|
386
|
+
height: auto;
|
|
387
|
+
max-width: unset;
|
|
388
|
+
max-height: unset;
|
|
389
|
+
min-width: 100%;
|
|
390
|
+
min-height: 100%;
|
|
391
|
+
}
|
|
392
|
+
|
|
369
393
|
.ft-ripple .ft-ripple--background {
|
|
370
394
|
background-color: ${ci.backgroundColor};
|
|
371
395
|
}
|
|
@@ -393,8 +417,6 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
393
417
|
.ft-ripple .ft-ripple--background {
|
|
394
418
|
top: 0;
|
|
395
419
|
left: 0;
|
|
396
|
-
height: 100%;
|
|
397
|
-
width: 100%;
|
|
398
420
|
transition: opacity 75ms linear;
|
|
399
421
|
}
|
|
400
422
|
|
|
@@ -434,14 +456,8 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
434
456
|
opacity: ${ci.opacityContentOnSurfacePressed};
|
|
435
457
|
transform: translate(-50%, -50%) scale(1);
|
|
436
458
|
}
|
|
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.
|
|
459
|
+
`;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.originX=0,this.originY=0,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
460
|
<style>
|
|
439
|
-
.ft-ripple .ft-ripple--effect,
|
|
440
|
-
.ft-ripple.ft-ripple--unbounded .ft-ripple--background {
|
|
441
|
-
width: ${this.rippleSize}px;
|
|
442
|
-
height: ${this.rippleSize}px;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
461
|
.ft-ripple .ft-ripple--effect {
|
|
446
462
|
left: ${this.originX}px;
|
|
447
463
|
top: ${this.originY}px;
|
|
@@ -451,7 +467,7 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
451
467
|
<div class="ft-ripple--background"></div>
|
|
452
468
|
<div class="ft-ripple--effect"></div>
|
|
453
469
|
</div>
|
|
454
|
-
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.
|
|
470
|
+
`}contentAvailableCallback(t){super.contentAvailableCallback(t),this.rippleEffect&&this.rippleEffect.ontransitionstart!==this.onTransitionStart&&(this.rippleEffect.ontransitionstart=this.onTransitionStart,this.rippleEffect.ontransitionend=this.onTransitionEnd)}update(t){var e,i;super.update(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"))}endRipple(){this.endHover(),this.endFocus(),this.endPress(),this.rippling=!1}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)}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.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,"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
471
|
/**
|
|
456
472
|
* @license
|
|
457
473
|
* Copyright 2017 Google LLC
|
|
@@ -659,7 +675,7 @@ class mi extends Ut{constructor(t){if(super(t),this.et=X,t.type!==Mt)throw Error
|
|
|
659
675
|
.ft-select--in-error .ft-select--helper-text {
|
|
660
676
|
color: ${ji.colorError};
|
|
661
677
|
}
|
|
662
|
-
`;var Ai=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 Di extends kt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return J``}
|
|
678
|
+
`;var Ai=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 Di extends kt{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return J``}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Di.elementDefinitions={},Ai([o({type:String})],Di.prototype,"label",void 0),Ai([o({type:Object,converter:t=>t})],Di.prototype,"value",void 0),Ai([o({type:Boolean,reflect:!0})],Di.prototype,"selected",void 0);class Bi extends kt{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,i,o,s;let n=this.hasOptionsMenuOpen,r=this.disabled||!this.hasOptions;const l=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(i=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==i?i:"").length>0,a={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":r,"ft-select--options-displayed":n,"ft-select--has-option-selected":l,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return J`
|
|
663
679
|
<div class="${zt(a)}" part="container">
|
|
664
680
|
<div class="ft-select--main-panel" part="main-panel">
|
|
665
681
|
<ft-input-label text="${this.label}"
|
|
@@ -707,4 +723,4 @@ class mi extends Ut{constructor(t){if(super(t),this.et=X,t.type!==Mt)throw Error
|
|
|
707
723
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
708
724
|
<span>${t.label}</span>
|
|
709
725
|
</div>
|
|
710
|
-
`}
|
|
726
|
+
`}update(t){super.update(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,n;let r;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(),r=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(),r=null!==(n=null===(s=this.focusedOption)||void 0===s?void 0:s.nextElementSibling)&&void 0!==n?n:this.firstOption}null==r||r.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 e,i;if(!l(null===(e=this.selectedOption)||void 0===e?void 0:e.value,t.value)){this.selectedOption=t;for(let e of this.options)e.selected=e===t;this.dispatchEvent(new CustomEvent("change",{detail:null===(i=this.selectedOption)||void 0===i?void 0:i.value}))}this.optionsDisplayed=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this.hideOptions)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this.hideOptions)}}Bi.elementDefinitions={"ft-input-label":ai,"ft-typography":si,"ft-ripple":gi,"ft-icon":zi},Bi.styles=[Ye,Ge,Fi],Ai([o({type:String})],Bi.prototype,"label",void 0),Ai([o({type:String})],Bi.prototype,"helper",void 0),Ai([o({type:Boolean})],Bi.prototype,"outlined",void 0),Ai([o({type:Boolean})],Bi.prototype,"disabled",void 0),Ai([o({type:Boolean})],Bi.prototype,"error",void 0),Ai([o({type:Boolean})],Bi.prototype,"fixedMenuPosition",void 0),Ai([o({type:Array})],Bi.prototype,"options",void 0),Ai([s()],Bi.prototype,"selectedOption",void 0),Ai([s()],Bi.prototype,"optionsDisplayed",void 0),Ai([s()],Bi.prototype,"focusOptions",void 0),Ai([n(".ft-select")],Bi.prototype,"container",void 0),Ai([n(".ft-select--options")],Bi.prototype,"optionsMenu",void 0),Ai([n(".ft-select--input-panel")],Bi.prototype,"mainPanel",void 0),Ai([n(".ft-select--option:first-child")],Bi.prototype,"firstOption",void 0),Ai([n(".ft-select--option:focus")],Bi.prototype,"focusedOption",void 0),Ai([n(".ft-select--option.ft-select--option-selected")],Bi.prototype,"selectedOptionElement",void 0),Ai([n(".ft-select--option:last-child")],Bi.prototype,"lastOption",void 0),Ai([n("slot")],Bi.prototype,"optionsSlot",void 0),a("ft-select")(Bi),a("ft-select-option")(Di),t.FtSelect=Bi,t.FtSelectCssVariables=ji,t.FtSelectOption=Di,t.styles=Fi}({});
|
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.56",
|
|
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.56",
|
|
23
|
+
"@fluid-topics/ft-input-label": "1.0.56",
|
|
24
|
+
"@fluid-topics/ft-ripple": "1.0.56",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.0.56",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.56",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "da00d6ea6bfc74fef8c6687f383355e35a26289b"
|
|
30
30
|
}
|