@fluid-topics/ft-search-locale-selector 1.0.5 → 1.0.7
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.
|
@@ -2,5 +2,5 @@ import { I18nMessageContext } from "@fluid-topics/ft-i18n/build/generator/I18nMe
|
|
|
2
2
|
export const selectorContext = I18nMessageContext.build("designedSearchLocaleSelector");
|
|
3
3
|
export const selectorDefaultMessages = {
|
|
4
4
|
label: "Select a language",
|
|
5
|
-
allLanguagesWarningMessage: "
|
|
5
|
+
allLanguagesWarningMessage: "Alla languages is only recommended when searching for language-agnostic keywords such as product references",
|
|
6
6
|
};
|
|
@@ -3,7 +3,7 @@ import { designSystemVariables, FtCssVariableFactory, setVariable } from "@fluid
|
|
|
3
3
|
import { FtTooltipCssVariables } from "@fluid-topics/ft-tooltip/build/ft-tooltip.css";
|
|
4
4
|
export const FtSearchLocaleSelectorCssVariables = {
|
|
5
5
|
warningIconColor: FtCssVariableFactory.extend("--ft-search-locale-selector-warning-icon-color", designSystemVariables.colorError),
|
|
6
|
-
warningTooltipMaxWidth: FtCssVariableFactory.create("--ft-search-locale-selector-warning-tooltip-max-width", "SIZE", "
|
|
6
|
+
warningTooltipMaxWidth: FtCssVariableFactory.create("--ft-search-locale-selector-warning-tooltip-max-width", "SIZE", "270px")
|
|
7
7
|
};
|
|
8
8
|
// language=CSS
|
|
9
9
|
export const styles = css `
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
position: relative;
|
|
31
31
|
word-break: break-word;
|
|
32
32
|
}
|
|
33
|
-
`,h={warningIconColor:i.FtCssVariableFactory.extend("--ft-search-locale-selector-warning-icon-color",i.designSystemVariables.colorError),warningTooltipMaxWidth:i.FtCssVariableFactory.create("--ft-search-locale-selector-warning-tooltip-max-width","SIZE","
|
|
33
|
+
`,h={warningIconColor:i.FtCssVariableFactory.extend("--ft-search-locale-selector-warning-icon-color",i.designSystemVariables.colorError),warningTooltipMaxWidth:i.FtCssVariableFactory.create("--ft-search-locale-selector-warning-tooltip-max-width","SIZE","270px")},p=e.css`
|
|
34
34
|
|
|
35
35
|
[part="warning-tooltip"] {
|
|
36
36
|
${i.setVariable(l.maxWidth,h.warningTooltipMaxWidth)};
|
|
@@ -51,13 +51,13 @@
|
|
|
51
51
|
* @license
|
|
52
52
|
* Copyright 2017 Google LLC
|
|
53
53
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
54
|
-
*/var
|
|
54
|
+
*/var A;const N=window,D=N.trustedTypes,R=D?D.createPolicy("lit-html",{createHTML:t=>t}):void 0,U="$lit$",F=`lit$${(Math.random()+"").slice(9)}$`,_="?"+F,P=`<${_}>`,H=document,W=()=>H.createComment(""),Z=t=>null===t||"object"!=typeof t&&"function"!=typeof t,V=Array.isArray,K="[ \t\n\f\r]",G=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,q=/-->/g,X=/>/g,Y=RegExp(`>|${K}(?:([^\\s"'>=/]+)(${K}*=${K}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),J=/'/g,Q=/"/g,tt=/^(?:script|style|textarea|title)$/i,it=(t=>(i,...e)=>({_$litType$:t,strings:i,values:e}))(1),et=Symbol.for("lit-noChange"),ot=Symbol.for("lit-nothing"),st=new WeakMap,nt=H.createTreeWalker(H,129,null,!1),rt=(t,i)=>{const e=t.length-1,o=[];let s,n=2===i?"<svg>":"",r=G;for(let i=0;i<e;i++){const e=t[i];let l,a,h=-1,p=0;for(;p<e.length&&(r.lastIndex=p,a=r.exec(e),null!==a);)p=r.lastIndex,r===G?"!--"===a[1]?r=q:void 0!==a[1]?r=X:void 0!==a[2]?(tt.test(a[2])&&(s=RegExp("</"+a[2],"g")),r=Y):void 0!==a[3]&&(r=Y):r===Y?">"===a[0]?(r=null!=s?s:G,h=-1):void 0===a[1]?h=-2:(h=r.lastIndex-a[2].length,l=a[1],r=void 0===a[3]?Y:'"'===a[3]?Q:J):r===Q||r===J?r=Y:r===q||r===X?r=G:(r=Y,s=void 0);const c=r===Y&&t[i+1].startsWith("/>")?" ":"";n+=r===G?e+P:h>=0?(o.push(l),e.slice(0,h)+U+e.slice(h)+F+c):e+F+(-2===h?(o.push(void 0),i):c)}const l=n+(t[e]||"<?>")+(2===i?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==R?R.createHTML(l):l,o]};class lt{constructor({strings:t,_$litType$:i},e){let o;this.parts=[];let s=0,n=0;const r=t.length-1,l=this.parts,[a,h]=rt(t,i);if(this.el=lt.createElement(a,e),nt.currentNode=this.el.content,2===i){const t=this.el.content,i=t.firstChild;i.remove(),t.append(...i.childNodes)}for(;null!==(o=nt.nextNode())&&l.length<r;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const i of o.getAttributeNames())if(i.endsWith(U)||i.startsWith(F)){const e=h[n++];if(t.push(i),void 0!==e){const t=o.getAttribute(e.toLowerCase()+U).split(F),i=/([.?@])?(.*)/.exec(e);l.push({type:1,index:s,name:i[2],strings:t,ctor:"."===i[1]?dt:"?"===i[1]?ut:"@"===i[1]?vt:ct})}else l.push({type:6,index:s})}for(const i of t)o.removeAttribute(i)}if(tt.test(o.tagName)){const t=o.textContent.split(F),i=t.length-1;if(i>0){o.textContent=D?D.emptyScript:"";for(let e=0;e<i;e++)o.append(t[e],W()),nt.nextNode(),l.push({type:2,index:++s});o.append(t[i],W())}}}else if(8===o.nodeType)if(o.data===_)l.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(F,t+1));)l.push({type:7,index:s}),t+=F.length-1}s++}}static createElement(t,i){const e=H.createElement("template");return e.innerHTML=t,e}}function at(t,i,e=t,o){var s,n,r,l;if(i===et)return i;let a=void 0!==o?null===(s=e._$Co)||void 0===s?void 0:s[o]:e._$Cl;const h=Z(i)?void 0:i._$litDirective$;return(null==a?void 0:a.constructor)!==h&&(null===(n=null==a?void 0:a._$AO)||void 0===n||n.call(a,!1),void 0===h?a=void 0:(a=new h(t),a._$AT(t,e,o)),void 0!==o?(null!==(r=(l=e)._$Co)&&void 0!==r?r:l._$Co=[])[o]=a:e._$Cl=a),void 0!==a&&(i=at(t,a._$AS(t,i.values),a,o)),i}class ht{constructor(t,i){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=i}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var i;const{el:{content:e},parts:o}=this._$AD,s=(null!==(i=null==t?void 0:t.creationScope)&&void 0!==i?i:H).importNode(e,!0);nt.currentNode=s;let n=nt.nextNode(),r=0,l=0,a=o[0];for(;void 0!==a;){if(r===a.index){let i;2===a.type?i=new pt(n,n.nextSibling,this,t):1===a.type?i=new a.ctor(n,a.name,a.strings,this,t):6===a.type&&(i=new bt(n,this,t)),this._$AV.push(i),a=o[++l]}r!==(null==a?void 0:a.index)&&(n=nt.nextNode(),r++)}return s}v(t){let i=0;for(const e of this._$AV)void 0!==e&&(void 0!==e.strings?(e._$AI(t,e,i),i+=e.strings.length-2):e._$AI(t[i])),i++}}class pt{constructor(t,i,e,o){var s;this.type=2,this._$AH=ot,this._$AN=void 0,this._$AA=t,this._$AB=i,this._$AM=e,this.options=o,this._$Cp=null===(s=null==o?void 0:o.isConnected)||void 0===s||s}get _$AU(){var t,i;return null!==(i=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==i?i:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const i=this._$AM;return void 0!==i&&11===(null==t?void 0:t.nodeType)&&(t=i.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,i=this){t=at(this,t,i),Z(t)?t===ot||null==t||""===t?(this._$AH!==ot&&this._$AR(),this._$AH=ot):t!==this._$AH&&t!==et&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>V(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!==ot&&Z(this._$AH)?this._$AA.nextSibling.data=t:this.$(H.createTextNode(t)),this._$AH=t}g(t){var i;const{values:e,_$litType$:o}=t,s="number"==typeof o?this._$AC(t):(void 0===o.el&&(o.el=lt.createElement(o.h,this.options)),o);if((null===(i=this._$AH)||void 0===i?void 0:i._$AD)===s)this._$AH.v(e);else{const t=new ht(s,this),i=t.u(this.options);t.v(e),this.$(i),this._$AH=t}}_$AC(t){let i=st.get(t.strings);return void 0===i&&st.set(t.strings,i=new lt(t)),i}T(t){V(this._$AH)||(this._$AH=[],this._$AR());const i=this._$AH;let e,o=0;for(const s of t)o===i.length?i.push(e=new pt(this.k(W()),this.k(W()),this,this.options)):e=i[o],e._$AI(s),o++;o<i.length&&(this._$AR(e&&e._$AB.nextSibling,o),i.length=o)}_$AR(t=this._$AA.nextSibling,i){var e;for(null===(e=this._$AP)||void 0===e||e.call(this,!1,!0,i);t&&t!==this._$AB;){const i=t.nextSibling;t.remove(),t=i}}setConnected(t){var i;void 0===this._$AM&&(this._$Cp=t,null===(i=this._$AP)||void 0===i||i.call(this,t))}}class ct{constructor(t,i,e,o,s){this.type=1,this._$AH=ot,this._$AN=void 0,this.element=t,this.name=i,this._$AM=o,this.options=s,e.length>2||""!==e[0]||""!==e[1]?(this._$AH=Array(e.length-1).fill(new String),this.strings=e):this._$AH=ot}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,i=this,e,o){const s=this.strings;let n=!1;if(void 0===s)t=at(this,t,i,0),n=!Z(t)||t!==this._$AH&&t!==et,n&&(this._$AH=t);else{const o=t;let r,l;for(t=s[0],r=0;r<s.length-1;r++)l=at(this,o[e+r],i,r),l===et&&(l=this._$AH[r]),n||(n=!Z(l)||l!==this._$AH[r]),l===ot?t=ot:t!==ot&&(t+=(null!=l?l:"")+s[r+1]),this._$AH[r]=l}n&&!o&&this.j(t)}j(t){t===ot?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class dt extends ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===ot?void 0:t}}const ft=D?D.emptyScript:"";class ut extends ct{constructor(){super(...arguments),this.type=4}j(t){t&&t!==ot?this.element.setAttribute(this.name,ft):this.element.removeAttribute(this.name)}}class vt extends ct{constructor(t,i,e,o,s){super(t,i,e,o,s),this.type=5}_$AI(t,i=this){var e;if((t=null!==(e=at(this,t,i,0))&&void 0!==e?e:ot)===et)return;const o=this._$AH,s=t===ot&&o!==ot||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==ot&&(o===ot||s);s&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var i,e;"function"==typeof this._$AH?this._$AH.call(null!==(e=null===(i=this.options)||void 0===i?void 0:i.host)&&void 0!==e?e:this.element,t):this._$AH.handleEvent(t)}}class bt{constructor(t,i,e){this.element=t,this.type=6,this._$AN=void 0,this._$AM=i,this.options=e}get _$AU(){return this._$AM._$AU}_$AI(t){at(this,t)}}const gt=N.litHtmlPolyfillSupport;null==gt||gt(lt,pt),(null!==(A=N.litHtmlVersions)&&void 0!==A?A:N.litHtmlVersions=[]).push("2.7.3");
|
|
55
55
|
/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2020 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
59
|
*/
|
|
60
|
-
const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void 0:t._$litStatic$},mt=t=>({_$litStatic$:t,r:xt}),$t=new Map,wt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=yt(n));)a+=s+i[++h],p=!0;h!==o&&l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=$t.get(t))&&(r.raw=r,$t.set(t,i=r)),e=l}return t(i,...e)})(it);var kt;!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"}(kt||(kt={}));const St=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),zt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Ct={fontFamily:zt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Ot=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",St),It=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Ct.fontSize,"20px"),jt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Ct.fontWeight,"normal"),Bt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Ct.letterSpacing,"0.15px"),Et=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Ct.lineHeight,"1.2"),Tt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Ct.textTransform,"inherit"),Mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",St),Lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Ct.fontSize,"14px"),
|
|
60
|
+
const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void 0:t._$litStatic$},mt=t=>({_$litStatic$:t,r:xt}),$t=new Map,wt=(t=>(i,...e)=>{const o=e.length;let s,n;const r=[],l=[];let a,h=0,p=!1;for(;h<o;){for(a=i[h];h<o&&void 0!==(n=e[h],s=yt(n));)a+=s+i[++h],p=!0;h!==o&&l.push(n),r.push(a),h++}if(h===o&&r.push(i[o]),p){const t=r.join("$$lit$$");void 0===(i=$t.get(t))&&(r.raw=r,$t.set(t,i=r)),e=l}return t(i,...e)})(it);var kt;!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"}(kt||(kt={}));const St=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.titleFont),zt=i.FtCssVariableFactory.extend("--ft-typography-font-family",i.designSystemVariables.contentFont),Ct={fontFamily:zt,fontSize:i.FtCssVariableFactory.create("--ft-typography-font-size","SIZE","16px"),fontWeight:i.FtCssVariableFactory.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:i.FtCssVariableFactory.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:i.FtCssVariableFactory.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:i.FtCssVariableFactory.create("--ft-typography-text-transform","UNKNOWN","inherit")},Ot=i.FtCssVariableFactory.extend("--ft-typography-title-font-family",St),It=i.FtCssVariableFactory.extend("--ft-typography-title-font-size",Ct.fontSize,"20px"),jt=i.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Ct.fontWeight,"normal"),Bt=i.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Ct.letterSpacing,"0.15px"),Et=i.FtCssVariableFactory.extend("--ft-typography-title-line-height",Ct.lineHeight,"1.2"),Tt=i.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Ct.textTransform,"inherit"),Mt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",St),Lt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Ct.fontSize,"14px"),At=i.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Ct.fontWeight,"normal"),Nt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Ct.letterSpacing,"0.105px"),Dt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Ct.lineHeight,"1.7"),Rt=i.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Ct.textTransform,"inherit"),Ut=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",zt),Ft=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Ct.fontSize,"16px"),_t=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Ct.fontWeight,"600"),Pt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Ct.letterSpacing,"0.144px"),Ht=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Ct.lineHeight,"1.5"),Wt=i.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Ct.textTransform,"inherit"),Zt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",zt),Vt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Ct.fontSize,"14px"),Kt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Ct.fontWeight,"normal"),Gt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Ct.letterSpacing,"0.098px"),qt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Ct.lineHeight,"1.7"),Xt=i.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Ct.textTransform,"inherit"),Yt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-family",zt),Jt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Ct.fontSize,"16px"),Qt=i.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Ct.fontWeight,"normal"),ti=i.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Ct.letterSpacing,"0.496px"),ii=i.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Ct.lineHeight,"1.5"),ei=i.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Ct.textTransform,"inherit"),oi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-body2-font-family",zt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Ct.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Ct.fontWeight,"normal"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Ct.letterSpacing,"0.252px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Ct.lineHeight,"1.4"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Ct.textTransform,"inherit")},si=i.FtCssVariableFactory.extend("--ft-typography-caption-font-family",zt),ni=i.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Ct.fontSize,"12px"),ri=i.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Ct.fontWeight,"normal"),li=i.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",Ct.letterSpacing,"0.396px"),ai=i.FtCssVariableFactory.extend("--ft-typography-caption-line-height",Ct.lineHeight,"1.33"),hi=i.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",Ct.textTransform,"inherit"),pi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",zt),ci=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",Ct.fontSize,"10px"),di=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",Ct.fontWeight,"normal"),fi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",Ct.letterSpacing,"0.33px"),ui=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",Ct.lineHeight,"1.6"),vi=i.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",Ct.textTransform,"inherit"),bi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-family",zt),gi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Ct.fontSize,"10px"),xi=i.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Ct.fontWeight,"normal"),yi=i.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Ct.letterSpacing,"1.5px"),mi=i.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Ct.lineHeight,"1.6"),$i=i.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",Ct.textTransform,"uppercase"),wi={fontFamily:i.FtCssVariableFactory.extend("--ft-typography-button-font-family",zt),fontSize:i.FtCssVariableFactory.extend("--ft-typography-button-font-size",Ct.fontSize,"14px"),fontWeight:i.FtCssVariableFactory.extend("--ft-typography-button-font-weight",Ct.fontWeight,"600"),letterSpacing:i.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",Ct.letterSpacing,"1.246px"),lineHeight:i.FtCssVariableFactory.extend("--ft-typography-button-line-height",Ct.lineHeight,"1.15"),textTransform:i.FtCssVariableFactory.extend("--ft-typography-button-text-transform",Ct.textTransform,"uppercase")},ki=e.css`
|
|
61
61
|
.ft-typography--title {
|
|
62
62
|
font-family: ${Ot};
|
|
63
63
|
font-size: ${It};
|
|
@@ -70,8 +70,8 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
70
70
|
.ft-typography--title-dense {
|
|
71
71
|
font-family: ${Mt};
|
|
72
72
|
font-size: ${Lt};
|
|
73
|
-
font-weight: ${
|
|
74
|
-
letter-spacing: ${
|
|
73
|
+
font-weight: ${At};
|
|
74
|
+
letter-spacing: ${Nt};
|
|
75
75
|
line-height: ${Dt};
|
|
76
76
|
text-transform: ${Rt};
|
|
77
77
|
}
|
|
@@ -152,14 +152,14 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
152
152
|
.ft-typography {
|
|
153
153
|
vertical-align: inherit;
|
|
154
154
|
}
|
|
155
|
-
`;var Li=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class
|
|
155
|
+
`;var Li=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ai extends i.FtLitElement{constructor(){super(...arguments),this.variant=kt.body1}render(){return this.element?wt`
|
|
156
156
|
<${mt(this.element)}
|
|
157
157
|
class="ft-typography ft-typography--${this.variant}">
|
|
158
158
|
<slot></slot>
|
|
159
159
|
</${mt(this.element)}>
|
|
160
160
|
`:wt`
|
|
161
161
|
<slot class="ft-typography ft-typography--${this.variant}"></slot>
|
|
162
|
-
`}}function
|
|
162
|
+
`}}function Ni(t,i){return t.flatMap((t=>[t,...Ni(i(t),i)]))}Ai.styles=[ki,Si,zi,Ci,Oi,Ii,ji,Bi,Ei,Ti,Mi],Li([s.property()],Ai.prototype,"element",void 0),Li([s.property()],Ai.prototype,"variant",void 0),i.customElement("ft-typography")(Ai);const Di=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorContent),Ri={color:Di,backgroundColor:i.FtCssVariableFactory.extend("--ft-ripple-background-color",Di),opacityContentOnSurfacePressed:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:i.FtCssVariableFactory.external(i.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:i.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},Ui=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorPrimary),Fi=Ui,_i=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Ui),Pi=i.FtCssVariableFactory.extend("--ft-ripple-color",i.designSystemVariables.colorSecondary),Hi=Pi,Wi=i.FtCssVariableFactory.extend("--ft-ripple-background-color",Pi),Zi=e.css`
|
|
163
163
|
:host {
|
|
164
164
|
display: contents;
|
|
165
165
|
}
|
|
@@ -284,7 +284,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
284
284
|
</div>
|
|
285
285
|
</div>
|
|
286
286
|
</div>
|
|
287
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=
|
|
287
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((i=>t.has(i)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const i=t.getBoundingClientRect(),e=(i.height-this.tooltip.clientHeight)/2,o=(i.width-this.tooltip.clientWidth)/2;let s=0,n=0;switch(this.validPosition){case"top":n=-this.tooltip.clientHeight,s=o;break;case"bottom":n=i.height,s=o;break;case"left":n=e,s=-this.tooltip.clientWidth;break;case"right":n=e,s=i.width}i.left+s+this.tooltip.clientWidth>window.innerWidth&&(s=window.innerWidth-this.tooltip.clientWidth-i.left),i.left+s<0&&(s=4-i.left);const r=this.tooltip.style;r.left=s+"px",r.top=n+"px",r.maxWidth=`max(${i.width}px, ${l.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}qi.elementDefinitions={"ft-typography":Ai},qi.styles=a,Gi([s.property()],qi.prototype,"text",void 0),Gi([s.property({type:Boolean})],qi.prototype,"manual",void 0),Gi([s.property({type:Boolean})],qi.prototype,"inline",void 0),Gi([s.property({type:Number})],qi.prototype,"delay",void 0),Gi([s.property()],qi.prototype,"position",void 0),Gi([s.queryAssignedNodes("",!0)],qi.prototype,"slotNodes",void 0),Gi([s.query(".ft-tooltip--container")],qi.prototype,"container",void 0),Gi([s.query("slot")],qi.prototype,"target",void 0),Gi([s.query(".ft-tooltip")],qi.prototype,"tooltip",void 0),Gi([s.query(".ft-tooltip--content")],qi.prototype,"tooltipContent",void 0),Gi([s.state()],qi.prototype,"visible",void 0),i.customElement("ft-tooltip")(qi);const Xi={color:i.FtCssVariableFactory.extend("--ft-loader-color",i.designSystemVariables.colorPrimary),size:i.FtCssVariableFactory.create("--ft-loader-size","SIZE","80px")},Yi=e.css`
|
|
288
288
|
:host {
|
|
289
289
|
line-height: 0;
|
|
290
290
|
}
|
|
@@ -573,7 +573,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
573
573
|
</ft-tooltip>
|
|
574
574
|
`:t}resolveIcon(){return this.loading?e.html`
|
|
575
575
|
<ft-loader part="loader icon"></ft-loader> `:this.icon?e.html`
|
|
576
|
-
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}be.elementDefinitions={"ft-ripple":Ki,"ft-tooltip":qi,"ft-typography":
|
|
576
|
+
<ft-icon part="icon" .variant="${this.iconVariant}" .value="${this.icon}"></ft-icon> `:e.nothing}focus(){var t;null===(t=this.button)||void 0===t||t.focus()}getLabel(){return this.label||this.textContent}get textContent(){return this.unslotText(this.slottedContent).trim()}unslotText(t){return t instanceof HTMLSlotElement?t.assignedNodes().map((t=>this.unslotText(t))).join(""):(null==t?void 0:t.textContent)||""}hasTextContent(){return this.textContent.length>0}onSlotchange(){this.requestUpdate()}isDisabled(){return this.disabled||this.loading}}be.elementDefinitions={"ft-ripple":Ki,"ft-tooltip":qi,"ft-typography":Ai,"ft-icon":ne,"ft-loader":Ji},be.styles=[i.safariEllipsisFix,ue],ve([s.property({type:String,reflect:!0})],be.prototype,"role",void 0),ve([s.property({type:Boolean})],be.prototype,"primary",void 0),ve([s.property({type:Boolean})],be.prototype,"outlined",void 0),ve([s.property({type:Boolean})],be.prototype,"disabled",void 0),ve([s.property({type:Boolean})],be.prototype,"dense",void 0),ve([s.property({type:Boolean})],be.prototype,"round",void 0),ve([s.property()],be.prototype,"label",void 0),ve([s.property()],be.prototype,"icon",void 0),ve([s.property()],be.prototype,"iconVariant",void 0),ve([s.property({type:Boolean})],be.prototype,"trailingIcon",void 0),ve([s.property({type:Boolean})],be.prototype,"loading",void 0),ve([s.property()],be.prototype,"tooltipPosition",void 0),ve([s.property({type:Boolean})],be.prototype,"hideTooltip",void 0),ve([s.property({type:Boolean})],be.prototype,"forceTooltip",void 0),ve([s.query(".ft-button")],be.prototype,"button",void 0),ve([s.query(".ft-button--label slot")],be.prototype,"slottedContent",void 0),i.customElement("ft-button")(be);const ge=i.FtCssVariableFactory.extend("--ft-checkbox-text-color",i.designSystemVariables.colorOnSurfaceHigh),xe=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),ye=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),me=i.FtCssVariableFactory.extend("--ft-checkbox-border-color",i.designSystemVariables.colorOnSurfaceMedium),$e=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),we=e.css`
|
|
577
577
|
* {
|
|
578
578
|
box-sizing: border-box;
|
|
579
579
|
}
|
|
@@ -676,7 +676,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
676
676
|
<slot></slot>
|
|
677
677
|
</ft-typography>
|
|
678
678
|
</label>
|
|
679
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Se.elementDefinitions={"ft-ripple":Ki,"ft-typography":
|
|
679
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}}Se.elementDefinitions={"ft-ripple":Ki,"ft-typography":Ai},Se.styles=we,ke([s.property()],Se.prototype,"name",void 0),ke([s.property({type:Boolean,reflect:!0})],Se.prototype,"checked",void 0),ke([s.property({type:Boolean})],Se.prototype,"indeterminate",void 0),ke([s.property({type:Boolean})],Se.prototype,"disabled",void 0),ke([s.query(".ft-checkbox")],Se.prototype,"container",void 0),ke([s.query("ft-ripple")],Se.prototype,"ripple",void 0),i.customElement("ft-checkbox")(Se);const ze=i.FtCssVariableFactory.extend("--ft-radio-text-color",i.designSystemVariables.colorOnSurfaceHigh),Ce=i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),Oe=(i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),i.FtCssVariableFactory.extend("--ft-radio-border-color",i.designSystemVariables.colorOnSurfaceMedium)),Ie=i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),je=e.css`
|
|
680
680
|
* {
|
|
681
681
|
box-sizing: border-box;
|
|
682
682
|
}
|
|
@@ -780,17 +780,17 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
780
780
|
</ft-typography>
|
|
781
781
|
</label>
|
|
782
782
|
</div>
|
|
783
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ee(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Ee(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Te.elementDefinitions={"ft-ripple":Ki,"ft-typography":
|
|
783
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Ee(this.value,this.checked))}contentAvailableCallback(t){var i;super.contentAvailableCallback(t),null===(i=this.ripple)||void 0===i||i.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Ee(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Te.elementDefinitions={"ft-ripple":Ki,"ft-typography":Ai},Te.styles=je,Be([s.property()],Te.prototype,"value",void 0),Be([s.property()],Te.prototype,"name",void 0),Be([s.property({type:Boolean,reflect:!0})],Te.prototype,"checked",void 0),Be([s.property({type:Boolean})],Te.prototype,"disabled",void 0),Be([s.query(".ft-radio")],Te.prototype,"container",void 0),Be([s.query("ft-ripple")],Te.prototype,"ripple",void 0),Be([s.query("input")],Te.prototype,"input",void 0);const Me=e.css`
|
|
784
784
|
:host {
|
|
785
785
|
display: contents;
|
|
786
786
|
}
|
|
787
|
-
`;var Le=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class
|
|
787
|
+
`;var Le=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ae extends i.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
788
788
|
<slot @slotchange=${this.onSlotChange}
|
|
789
789
|
@change=${this.onChange}
|
|
790
790
|
@keydown=${this.onKeyDown}
|
|
791
791
|
@focusin=${this.focusCurrentValue}
|
|
792
792
|
></slot>
|
|
793
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}
|
|
793
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((i=>i.checked=t.detail.value===i.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let i=this.findFtRadio(t),e=this.radioButtons.indexOf(i)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let i=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[i>this.radioButtons.length-1?0:i].select();break}}}findFtRadio(t){return t.composedPath().find((t=>"FT-RADIO"===t.tagName))}focusCurrentValue(){setTimeout((()=>{var t;return null===(t=this.radioButtons.find((t=>t.checked)))||void 0===t?void 0:t.focus()}),10)}}Ae.elementDefinitions={},Ae.styles=Me,Le([s.property()],Ae.prototype,"name",void 0),Le([s.queryAssignedElements()],Ae.prototype,"radioButtons",void 0),i.customElement("ft-radio")(Te),i.customElement("ft-radio-group")(Ae);const Ne={borderRadiusM:i.FtCssVariableFactory.external(i.designSystemVariables.borderRadiusM,"Design system"),colorOutline:i.FtCssVariableFactory.external(i.designSystemVariables.colorOutline,"Design system"),colorOnSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:i.FtCssVariableFactory.external(i.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:i.FtCssVariableFactory.external(oi.fontFamily,"Body2 typography"),fontSize:i.FtCssVariableFactory.external(oi.fontSize,"Body2 typography"),fontWeight:i.FtCssVariableFactory.external(oi.fontWeight,"Body2 typography"),letterSpacing:i.FtCssVariableFactory.external(oi.letterSpacing,"Body2 typography"),lineHeight:i.FtCssVariableFactory.external(oi.lineHeight,"Body2 typography"),textTransform:i.FtCssVariableFactory.external(oi.textTransform,"Body2 typography")},De=e.css`
|
|
794
794
|
.ft-filter-level--container {
|
|
795
795
|
display: flex;
|
|
796
796
|
flex-direction: column;
|
|
@@ -804,14 +804,14 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
804
804
|
flex-shrink: 0;
|
|
805
805
|
text-decoration: none;
|
|
806
806
|
position: relative;
|
|
807
|
-
border-radius: ${
|
|
807
|
+
border-radius: ${Ne.borderRadiusM};
|
|
808
808
|
overflow: hidden;
|
|
809
809
|
display: flex;
|
|
810
810
|
align-items: center;
|
|
811
811
|
padding: 4px 4px;
|
|
812
812
|
gap: 4px;
|
|
813
813
|
cursor: pointer;
|
|
814
|
-
color: ${
|
|
814
|
+
color: ${Ne.colorOnSurface};
|
|
815
815
|
}
|
|
816
816
|
|
|
817
817
|
.ft-filter-level--go-back:focus {
|
|
@@ -840,7 +840,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
840
840
|
}
|
|
841
841
|
|
|
842
842
|
ft-button {
|
|
843
|
-
${i.setVariable(le.color,
|
|
843
|
+
${i.setVariable(le.color,Ne.colorOnSurface)};
|
|
844
844
|
}
|
|
845
845
|
|
|
846
846
|
ft-radio, ft-checkbox {
|
|
@@ -854,7 +854,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
854
854
|
|
|
855
855
|
.ft-filter-level--no-values {
|
|
856
856
|
margin: 10px 0;
|
|
857
|
-
color: ${
|
|
857
|
+
color: ${Ne.colorOnSurfaceMedium};
|
|
858
858
|
}
|
|
859
859
|
`;var Re=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class Ue extends i.FtLitElement{constructor(){super(...arguments),this.filterId="",this.options=[],this.multivalued=!1,this.disabled=!1,this.hideSelectedOptions=!1,this.preventNavigation=!1,this.filter="",this.moreValuesButtonLabel="More",this.displayedValuesLimit=0,this.displayedPages=1}get hasHiddenValues(){let t=this.limit;return null!=t&&t<this.options.length}get limit(){return this.displayedValuesLimit>0?this.displayedPages*this.displayedValuesLimit:void 0}get height(){var t,i;return null!==(i=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==i?i:0}render(){let t=[...this.options];this.hideSelectedOptions&&(t=t.filter((t=>!t.selected))),this.filter&&(t=t.filter((t=>t.label.toLowerCase().includes(this.filter.toLowerCase()))));const i=t.slice(0,this.limit);return e.html`
|
|
860
860
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
@@ -905,7 +905,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
905
905
|
data-value="${t.value}"
|
|
906
906
|
.checked=${t.selected}
|
|
907
907
|
.disabled=${this.disabled}
|
|
908
|
-
.indeterminate=${
|
|
908
|
+
.indeterminate=${Ni(null!==(i=t.subOptions)&&void 0!==i?i:[],(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]})).some((t=>t.selected))}
|
|
909
909
|
@change=${i=>this.optionsChanged(i,t)}>
|
|
910
910
|
${t.renderOption?t.renderOption:t.label}
|
|
911
911
|
</ft-checkbox>
|
|
@@ -920,7 +920,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
920
920
|
@change=${t=>t.stopPropagation()}>
|
|
921
921
|
${t.renderOption?t.renderOption:t.label}
|
|
922
922
|
</ft-radio>
|
|
923
|
-
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Ue.elementDefinitions={"ft-button":be,"ft-ripple":Ki,"ft-typography":
|
|
923
|
+
`}onRadioKeyUp(t,i){i.selected&&" "===t.key&&this.optionsChanged(t,i)}optionsChanged(t,i){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:i}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Ue.elementDefinitions={"ft-button":be,"ft-ripple":Ki,"ft-typography":Ai,"ft-checkbox":Se,"ft-icon":ne,"ft-radio":Te},Ue.styles=De,Re([s.property({type:String})],Ue.prototype,"filterId",void 0),Re([s.property({type:Object})],Ue.prototype,"parent",void 0),Re([s.property({type:Array})],Ue.prototype,"options",void 0),Re([s.property({type:Boolean})],Ue.prototype,"multivalued",void 0),Re([s.property({type:Boolean})],Ue.prototype,"disabled",void 0),Re([s.property({type:Boolean})],Ue.prototype,"hideSelectedOptions",void 0),Re([s.property({type:Boolean})],Ue.prototype,"preventNavigation",void 0),Re([s.property({type:String})],Ue.prototype,"filter",void 0),Re([s.property({type:String})],Ue.prototype,"moreValuesButtonLabel",void 0),Re([s.property({type:String})],Ue.prototype,"noValuesLabel",void 0),Re([s.property({type:Number})],Ue.prototype,"displayedValuesLimit",void 0),Re([s.query(".ft-filter-level--container")],Ue.prototype,"container",void 0),Re([s.state()],Ue.prototype,"displayedPages",void 0);const Fe={buttonsColor:i.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color",i.designSystemVariables.colorPrimary),buttonsZIndex:i.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","COLOR","1"),gap:i.FtCssVariableFactory.create("--ft-snap-scroll-gap","SIZE","0"),colorSurface:i.FtCssVariableFactory.external(i.designSystemVariables.colorSurface,"Design system")},_e=e.css`
|
|
924
924
|
.ft-snap-scroll {
|
|
925
925
|
box-sizing: border-box;
|
|
926
926
|
position: relative;
|
|
@@ -1181,7 +1181,7 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
1181
1181
|
slot:not([name]) {
|
|
1182
1182
|
display: none;
|
|
1183
1183
|
}
|
|
1184
|
-
`];var Qe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class to extends CustomEvent{constructor(t){super("change",{detail:t})}}class io extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return
|
|
1184
|
+
`];var Qe=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class to extends CustomEvent{constructor(t){super("change",{detail:t})}}class io extends i.FtLitElement{constructor(){super(...arguments),this.id="",this.label="",this.filterPlaceHolder="Filter {0}",this.clearButtonLabel="Clear",this.moreValuesButtonLabel="More",this.noValuesLabel="No values available",this.options=[],this.multivalued=!1,this.disabled=!1,this.raiseSelectedOptions=!1,this.displayedValuesLimit=0,this.hideClearButton=!1,this.lastLevelHasHiddenvalues=!1,this.withScroll=!1,this.filter="",this.displayedLevels=[],this.scrollResizeObserver=new ResizeObserver((()=>this.updateScroll())),this.levelsScrollDebouncer=new i.Debouncer(300),this.changeDebouncer=new i.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return Ni(this.options,(t=>{var i;return null!==(i=t.subOptions)&&void 0!==i?i:[]}))}get selectedValues(){return this.flatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),i=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1185
1185
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1186
1186
|
part="container">
|
|
1187
1187
|
${this.label||t?e.html`
|
|
@@ -1253,9 +1253,9 @@ const xt=Symbol.for(""),yt=t=>{if((null==t?void 0:t.r)===xt)return null==t?void
|
|
|
1253
1253
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1254
1254
|
noValuesLabel="${this.noValuesLabel}"
|
|
1255
1255
|
></ft-filter-level>
|
|
1256
|
-
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;i.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new to(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}io.elementDefinitions={"ft-button":be,"ft-filter-level":Ue,"ft-snap-scroll":We,"ft-typography":
|
|
1256
|
+
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var i;t.stopPropagation();const e=this.flatOptions.find((i=>i.value===t.detail.value));e.selected=!e.selected;const o=t=>{var i;t!==e&&(t.selected=!1),null===(i=t.subOptions)||void 0===i||i.forEach(o)};this.multivalued?null===(i=e.subOptions)||void 0===i||i.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;i.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new to(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,i;this.filter=null!==(i=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==i?i:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}io.elementDefinitions={"ft-button":be,"ft-filter-level":Ue,"ft-snap-scroll":We,"ft-typography":Ai},io.styles=Je,Qe([s.property({type:String})],io.prototype,"id",void 0),Qe([s.property({type:String})],io.prototype,"label",void 0),Qe([s.property({type:String})],io.prototype,"filterPlaceHolder",void 0),Qe([s.property({type:String})],io.prototype,"clearButtonLabel",void 0),Qe([s.property({type:String})],io.prototype,"moreValuesButtonLabel",void 0),Qe([s.property({type:String})],io.prototype,"noValuesLabel",void 0),Qe([i.jsonProperty([])],io.prototype,"options",void 0),Qe([s.property({type:Boolean})],io.prototype,"multivalued",void 0),Qe([s.property({type:Boolean})],io.prototype,"disabled",void 0),Qe([s.property({type:Boolean})],io.prototype,"raiseSelectedOptions",void 0),Qe([s.property({type:Number})],io.prototype,"displayedValuesLimit",void 0),Qe([s.property({type:Boolean})],io.prototype,"hideClearButton",void 0),Qe([s.query(".ft-filter--slot")],io.prototype,"slotElement",void 0),Qe([s.query(".ft-filter--container")],io.prototype,"container",void 0),Qe([s.query(".ft-filter--values")],io.prototype,"valuesContainer",void 0),Qe([s.query(".ft-filter--levels")],io.prototype,"levelsContainer",void 0),Qe([s.state()],io.prototype,"lastLevelHasHiddenvalues",void 0),Qe([s.query(".ft-filter--filter input")],io.prototype,"filterInput",void 0),Qe([s.queryAll(".ft-filter--levels ft-filter-level")],io.prototype,"levels",void 0),Qe([s.state()],io.prototype,"withScroll",void 0),Qe([s.state()],io.prototype,"filter",void 0),Qe([s.state()],io.prototype,"slideIn",void 0),Qe([s.state()],io.prototype,"slideOut",void 0);var eo=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class oo extends i.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1257
1257
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1258
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}oo.elementDefinitions={},eo([s.property({type:String})],oo.prototype,"label",void 0),eo([s.property({type:Object,converter:t=>t})],oo.prototype,"value",void 0),eo([s.property({type:Boolean,reflect:!0})],oo.prototype,"selected",void 0),eo([s.property({type:Object})],oo.prototype,"subOptions",void 0),eo([i.jsonProperty({})],oo.prototype,"renderOption",void 0),eo([s.query(".ft-filter-option--slot")],oo.prototype,"slotElement",void 0),i.customElement("ft-filter")(io),i.customElement("ft-filter-option")(oo);const so=B.build("designedSearchLocaleSelector"),no={label:"Select a language",allLanguagesWarningMessage:"
|
|
1258
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}oo.elementDefinitions={},eo([s.property({type:String})],oo.prototype,"label",void 0),eo([s.property({type:Object,converter:t=>t})],oo.prototype,"value",void 0),eo([s.property({type:Boolean,reflect:!0})],oo.prototype,"selected",void 0),eo([s.property({type:Object})],oo.prototype,"subOptions",void 0),eo([i.jsonProperty({})],oo.prototype,"renderOption",void 0),eo([s.query(".ft-filter-option--slot")],oo.prototype,"slotElement",void 0),i.customElement("ft-filter")(io),i.customElement("ft-filter-option")(oo);const so=B.build("designedSearchLocaleSelector"),no={label:"Select a language",allLanguagesWarningMessage:"Alla languages is only recommended when searching for language-agnostic keywords such as product references"};var ro=function(t,i,e,o){for(var s,n=arguments.length,r=n<3?i:null===o?o=Object.getOwnPropertyDescriptor(i,e):o,l=t.length-1;l>=0;l--)(s=t[l])&&(r=(n<3?s(r):n>3?s(i,e,r):s(i,e))||r);return n>3&&r&&Object.defineProperty(i,e,r),r};class lo extends(z(L)){constructor(){super(),this.warningTooltipPosition="left",this.addI18nContext(so,no)}render(){var t;return e.html`
|
|
1259
1259
|
<ft-filter
|
|
1260
1260
|
exportpartsPrefix="filter"
|
|
1261
1261
|
label="${so.messages.label()}"
|
|
@@ -136,7 +136,7 @@ var xt,mt;let wt=class extends z{constructor(){super(...arguments),this.renderOp
|
|
|
136
136
|
position: relative;
|
|
137
137
|
word-break: break-word;
|
|
138
138
|
}
|
|
139
|
-
`,Ii={warningIconColor:Ot.extend("--ft-search-locale-selector-warning-icon-color",St.colorError),warningTooltipMaxWidth:Ot.create("--ft-search-locale-selector-warning-tooltip-max-width","SIZE","
|
|
139
|
+
`,Ii={warningIconColor:Ot.extend("--ft-search-locale-selector-warning-icon-color",St.colorError),warningTooltipMaxWidth:Ot.create("--ft-search-locale-selector-warning-tooltip-max-width","SIZE","270px")},Bi=$`
|
|
140
140
|
|
|
141
141
|
[part="warning-tooltip"] {
|
|
142
142
|
${kt(Pi.maxWidth,Ii.warningTooltipMaxWidth)};
|
|
@@ -404,7 +404,7 @@ var xt,mt;let wt=class extends z{constructor(){super(...arguments),this.renderOp
|
|
|
404
404
|
</div>
|
|
405
405
|
</div>
|
|
406
406
|
</div>
|
|
407
|
-
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=
|
|
407
|
+
`}update(t){t.has("visible")&&!this.visible&&this.resetTooltipContent(),super.update(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((e=>t.has(e)))&&this.visible&&this.positionTooltip()}show(t){this.visible=!0,null!=t&&this.hideDebounce.run((()=>this.hide()),t)}hide(){this.visible=!1}toggle(){this.visible=!this.visible}get slottedElement(){var t;return(null!==(t=this.slotNodes)&&void 0!==t?t:[]).filter((t=>t.nodeType==Node.ELEMENT_NODE))[0]}resetTooltipContent(){if(this.tooltip&&this.tooltipContent){const t=this.tooltipContent.style;switch(t.transition="none",this.validPosition){case"top":t.top=this.tooltip.clientHeight+"px",t.left="0";break;case"bottom":t.top=-this.tooltip.clientHeight+"px",t.left="0";break;case"left":t.top="0",t.left=this.tooltip.clientWidth+"px";break;case"right":t.top="0",t.left=-this.tooltip.clientWidth+"px"}}}positionTooltip(){this.resetTooltipContent();const t=this.slottedElement;if(this.tooltip&&t){const e=t.getBoundingClientRect(),i=(e.height-this.tooltip.clientHeight)/2,o=(e.width-this.tooltip.clientWidth)/2;let n=0,r=0;switch(this.validPosition){case"top":r=-this.tooltip.clientHeight,n=o;break;case"bottom":r=e.height,n=o;break;case"left":r=i,n=-this.tooltip.clientWidth;break;case"right":r=i,n=e.width}e.left+n+this.tooltip.clientWidth>window.innerWidth&&(n=window.innerWidth-this.tooltip.clientWidth-e.left),e.left+n<0&&(n=4-e.left);const s=this.tooltip.style;s.left=n+"px",s.top=r+"px",s.maxWidth=`max(${e.width}px, ${Pi.maxWidth})`}this.revealDebouncer.run((()=>{this.tooltipContent&&(this.tooltipContent.style.transition="top var(--ft-transition-duration, 250ms), left var(--ft-transition-duration, 250ms)",this.tooltipContent.style.top="0",this.tooltipContent.style.left="0")}),this.manual?0:this.delay)}onTouch(){this.manual||(this.show(),setTimeout((()=>window.addEventListener("touchstart",(t=>{t.composedPath().includes(this.container)||this.onOut()}),{once:!0})),100))}onHover(){this.manual||this.show()}onOut(){this.manual||(this.revealDebouncer.cancel(),this.hide())}}tr.elementDefinitions={"ft-typography":Fn},tr.styles=Ui,Qn([s()],tr.prototype,"text",void 0),Qn([s({type:Boolean})],tr.prototype,"manual",void 0),Qn([s({type:Boolean})],tr.prototype,"inline",void 0),Qn([s({type:Number})],tr.prototype,"delay",void 0),Qn([s()],tr.prototype,"position",void 0),Qn([function(t,e,i){let o,n=t;return"object"==typeof t?(n=t.slot,o=t):o={flatten:e},i?u({slot:n,flatten:e,selector:i}):a({descriptor:t=>({get(){var t,e;const i="slot"+(n?`[name=${n}]`:":not([name])"),r=null===(t=this.renderRoot)||void 0===t?void 0:t.querySelector(i);return null!==(e=null==r?void 0:r.assignedNodes(o))&&void 0!==e?e:[]},enumerable:!0,configurable:!0})})}("",!0)],tr.prototype,"slotNodes",void 0),Qn([c(".ft-tooltip--container")],tr.prototype,"container",void 0),Qn([c("slot")],tr.prototype,"target",void 0),Qn([c(".ft-tooltip")],tr.prototype,"tooltip",void 0),Qn([c(".ft-tooltip--content")],tr.prototype,"tooltipContent",void 0),Qn([l()],tr.prototype,"visible",void 0),p("ft-tooltip")(tr);const er={color:Ot.extend("--ft-loader-color",St.colorPrimary),size:Ot.create("--ft-loader-size","SIZE","80px")},ir=$`
|
|
408
408
|
:host {
|
|
409
409
|
line-height: 0;
|
|
410
410
|
}
|
|
@@ -1381,7 +1381,7 @@ class nr extends Di{constructor(t){if(super(t),this.et=ot,t.type!==Fi)throw Erro
|
|
|
1381
1381
|
></ft-filter-level>
|
|
1382
1382
|
`}goBack(t){this.slideOut=t.detail.value}onDisplayLevel(t){this.displayedLevels.push(t.detail.value),this.slideIn=t.detail.value}clear(){if(this.flatOptions.forEach((t=>t.selected=!1)),this.displayedLevels.length>0){let t=this.displayedLevels[this.displayedLevels.length-1];this.displayedLevels=[t],this.slideOut=t}this.optionsChanged()}onChange(t){var e;t.stopPropagation();const i=this.flatOptions.find((e=>e.value===t.detail.value));i.selected=!i.selected;const o=t=>{var e;t!==i&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(o)};this.multivalued?null===(e=i.subOptions)||void 0===e||e.forEach(o):this.options.forEach(o),this.optionsChanged()}optionsChanged(){this.changeDebouncer.run((()=>{var t;this.sendEventIfValuesChanged(),this.requestUpdate(),null===(t=this.levels)||void 0===t||t.forEach((t=>t.requestUpdate()))}))}sendEventIfValuesChanged(){const t=this.selectedValues;d(this.lastDispatchedValues,t)||(this.dispatchEvent(new ls(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,e;this.filter=null!==(e=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==e?e:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}as.elementDefinitions={"ft-button":Or,"ft-filter-level":Vr,"ft-snap-scroll":Gr,"ft-typography":Fn},as.styles=rs,ss([s({type:String})],as.prototype,"id",void 0),ss([s({type:String})],as.prototype,"label",void 0),ss([s({type:String})],as.prototype,"filterPlaceHolder",void 0),ss([s({type:String})],as.prototype,"clearButtonLabel",void 0),ss([s({type:String})],as.prototype,"moreValuesButtonLabel",void 0),ss([s({type:String})],as.prototype,"noValuesLabel",void 0),ss([v([])],as.prototype,"options",void 0),ss([s({type:Boolean})],as.prototype,"multivalued",void 0),ss([s({type:Boolean})],as.prototype,"disabled",void 0),ss([s({type:Boolean})],as.prototype,"raiseSelectedOptions",void 0),ss([s({type:Number})],as.prototype,"displayedValuesLimit",void 0),ss([s({type:Boolean})],as.prototype,"hideClearButton",void 0),ss([c(".ft-filter--slot")],as.prototype,"slotElement",void 0),ss([c(".ft-filter--container")],as.prototype,"container",void 0),ss([c(".ft-filter--values")],as.prototype,"valuesContainer",void 0),ss([c(".ft-filter--levels")],as.prototype,"levelsContainer",void 0),ss([l()],as.prototype,"lastLevelHasHiddenvalues",void 0),ss([c(".ft-filter--filter input")],as.prototype,"filterInput",void 0),ss([function(t){return a({descriptor:e=>({get(){var e,i;return null!==(i=null===(e=this.renderRoot)||void 0===e?void 0:e.querySelectorAll(t))&&void 0!==i?i:[]},enumerable:!0,configurable:!0})})}(".ft-filter--levels ft-filter-level")],as.prototype,"levels",void 0),ss([l()],as.prototype,"withScroll",void 0),ss([l()],as.prototype,"filter",void 0),ss([l()],as.prototype,"slideIn",void 0),ss([l()],as.prototype,"slideOut",void 0);var cs=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class hs extends At{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return et`
|
|
1383
1383
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1384
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}hs.elementDefinitions={},cs([s({type:String})],hs.prototype,"label",void 0),cs([s({type:Object,converter:t=>t})],hs.prototype,"value",void 0),cs([s({type:Boolean,reflect:!0})],hs.prototype,"selected",void 0),cs([s({type:Object})],hs.prototype,"subOptions",void 0),cs([v({})],hs.prototype,"renderOption",void 0),cs([c(".ft-filter-option--slot")],hs.prototype,"slotElement",void 0),p("ft-filter")(as),p("ft-filter-option")(hs);const fs=bo.build("designedSearchLocaleSelector"),us={label:"Select a language",allLanguagesWarningMessage:"
|
|
1384
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}hs.elementDefinitions={},cs([s({type:String})],hs.prototype,"label",void 0),cs([s({type:Object,converter:t=>t})],hs.prototype,"value",void 0),cs([s({type:Boolean,reflect:!0})],hs.prototype,"selected",void 0),cs([s({type:Object})],hs.prototype,"subOptions",void 0),cs([v({})],hs.prototype,"renderOption",void 0),cs([c(".ft-filter-option--slot")],hs.prototype,"slotElement",void 0),p("ft-filter")(as),p("ft-filter-option")(hs);const fs=bo.build("designedSearchLocaleSelector"),us={label:"Select a language",allLanguagesWarningMessage:"Alla languages is only recommended when searching for language-agnostic keywords such as product references"};var ds=function(t,e,i,o){for(var n,r=arguments.length,s=r<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,l=t.length-1;l>=0;l--)(n=t[l])&&(s=(r<3?n(s):r>3?n(e,i,s):n(e,i))||s);return r>3&&s&&Object.defineProperty(e,i,s),s};class ps extends(ho(mo)){constructor(){super(),this.warningTooltipPosition="left",this.addI18nContext(fs,us)}render(){var t;return et`
|
|
1385
1385
|
<ft-filter
|
|
1386
1386
|
exportpartsPrefix="filter"
|
|
1387
1387
|
label="${fs.messages.label()}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-search-locale-selector",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Search locale selector for integrated fluid-topics search pages",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-filter": "1.0.
|
|
23
|
-
"@fluid-topics/ft-i18n": "1.0.
|
|
24
|
-
"@fluid-topics/ft-icon": "1.0.
|
|
25
|
-
"@fluid-topics/ft-search-context": "1.0.
|
|
26
|
-
"@fluid-topics/ft-tooltip": "1.0.
|
|
27
|
-
"@fluid-topics/ft-wc-utils": "1.0.
|
|
22
|
+
"@fluid-topics/ft-filter": "1.0.7",
|
|
23
|
+
"@fluid-topics/ft-i18n": "1.0.7",
|
|
24
|
+
"@fluid-topics/ft-icon": "1.0.7",
|
|
25
|
+
"@fluid-topics/ft-search-context": "1.0.7",
|
|
26
|
+
"@fluid-topics/ft-tooltip": "1.0.7",
|
|
27
|
+
"@fluid-topics/ft-wc-utils": "1.0.7",
|
|
28
28
|
"lit": "2.7.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@fluid-topics/public-api": "1.0.
|
|
31
|
+
"@fluid-topics/public-api": "1.0.34"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@fluid-topics/public-api": "1.0.
|
|
34
|
+
"@fluid-topics/public-api": "1.0.34"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "4f7f68b0b32e1a397650061e8baee05e5aaa3526"
|
|
37
37
|
}
|