@fluid-topics/ft-select 1.0.0-alpha.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/ft-select.light.js +21 -19
- package/build/ft-select.min.js +4 -2
- package/package.json +7 -7
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$",
|
|
7
|
+
var r;const p=window,a=p.trustedTypes,f=a?a.createPolicy("lit-html",{createHTML:t=>t}):void 0,h="$lit$",d=`lit$${(Math.random()+"").slice(9)}$`,c="?"+d,u=`<${c}>`,x=document,y=()=>x.createComment(""),g=t=>null===t||"object"!=typeof t&&"function"!=typeof t,b=Array.isArray,v="[ \t\n\f\r]",m=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,$=/-->/g,w=/>/g,k=RegExp(`>|${v}(?:([^\\s"'>=/]+)(${v}*=${v}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),z=/'/g,S=/"/g,O=/^(?:script|style|textarea|title)$/i,E=(t=>(e,...i)=>({_$litType$:t,strings:e,values:i}))(1),j=Symbol.for("lit-noChange"),N=Symbol.for("lit-nothing"),C=new WeakMap,I=x.createTreeWalker(x,129,null,!1),A=(t,e)=>{const i=t.length-1,o=[];let s,l=2===e?"<svg>":"",n=m;for(let e=0;e<i;e++){const i=t[e];let r,p,a=-1,f=0;for(;f<i.length&&(n.lastIndex=f,p=n.exec(i),null!==p);)f=n.lastIndex,n===m?"!--"===p[1]?n=$:void 0!==p[1]?n=w:void 0!==p[2]?(O.test(p[2])&&(s=RegExp("</"+p[2],"g")),n=k):void 0!==p[3]&&(n=k):n===k?">"===p[0]?(n=null!=s?s:m,a=-1):void 0===p[1]?a=-2:(a=n.lastIndex-p[2].length,r=p[1],n=void 0===p[3]?k:'"'===p[3]?S:z):n===S||n===z?n=k:n===$||n===w?n=m:(n=k,s=void 0);const c=n===k&&t[e+1].startsWith("/>")?" ":"";l+=n===m?i+u:a>=0?(o.push(r),i.slice(0,a)+h+i.slice(a)+d+c):i+d+(-2===a?(o.push(void 0),e):c)}const r=l+(t[i]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==f?f.createHTML(r):r,o]};class D{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let s=0,l=0;const n=t.length-1,r=this.parts,[p,f]=A(t,e);if(this.el=D.createElement(p,i),I.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(o=I.nextNode())&&r.length<n;){if(1===o.nodeType){if(o.hasAttributes()){const t=[];for(const e of o.getAttributeNames())if(e.endsWith(h)||e.startsWith(d)){const i=f[l++];if(t.push(e),void 0!==i){const t=o.getAttribute(i.toLowerCase()+h).split(d),e=/([.?@])?(.*)/.exec(i);r.push({type:1,index:s,name:e[2],strings:t,ctor:"."===e[1]?U:"?"===e[1]?T:"@"===e[1]?W:Z})}else r.push({type:6,index:s})}for(const e of t)o.removeAttribute(e)}if(O.test(o.tagName)){const t=o.textContent.split(d),e=t.length-1;if(e>0){o.textContent=a?a.emptyScript:"";for(let i=0;i<e;i++)o.append(t[i],y()),I.nextNode(),r.push({type:2,index:++s});o.append(t[e],y())}}}else if(8===o.nodeType)if(o.data===c)r.push({type:2,index:s});else{let t=-1;for(;-1!==(t=o.data.indexOf(d,t+1));)r.push({type:7,index:s}),t+=d.length-1}s++}}static createElement(t,e){const i=x.createElement("template");return i.innerHTML=t,i}}function _(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 R=a?a.emptyScript:"";class T extends Z{constructor(){super(...arguments),this.type=4}j(t){t&&t!==N?this.element.setAttribute(this.name,R):this.element.removeAttribute(this.name)}}class W extends Z{constructor(t,e,i,o,s){super(t,e,i,o,s),this.type=5}_$AI(t,e=this){var i;if((t=null!==(i=_(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 G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:G}),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=H(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 X;!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"}(X||(X={}));const Y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),Q={fontFamily:J,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")},V=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",Y),tt=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",Q.fontSize,"20px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Q.fontWeight,"normal"),it=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Q.letterSpacing,"0.15px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",Q.lineHeight,"1.2"),st=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Q.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",Y),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Q.fontSize,"14px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Q.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Q.letterSpacing,"0.105px"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Q.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Q.textTransform,"inherit"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",J),
|
|
13
|
+
const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t._$litStatic$},P=t=>({_$litStatic$:t,r:G}),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=H(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 X;!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"}(X||(X={}));const Y=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),J=e.FtCssVariableFactory.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),Q={fontFamily:J,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")},V=e.FtCssVariableFactory.extend("--ft-typography-title-font-family",Y),tt=e.FtCssVariableFactory.extend("--ft-typography-title-font-size",Q.fontSize,"20px"),et=e.FtCssVariableFactory.extend("--ft-typography-title-font-weight",Q.fontWeight,"normal"),it=e.FtCssVariableFactory.extend("--ft-typography-title-letter-spacing",Q.letterSpacing,"0.15px"),ot=e.FtCssVariableFactory.extend("--ft-typography-title-line-height",Q.lineHeight,"1.2"),st=e.FtCssVariableFactory.extend("--ft-typography-title-text-transform",Q.textTransform,"inherit"),lt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-family",Y),nt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-size",Q.fontSize,"14px"),rt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-font-weight",Q.fontWeight,"normal"),pt=e.FtCssVariableFactory.extend("--ft-typography-title-dense-letter-spacing",Q.letterSpacing,"0.105px"),at=e.FtCssVariableFactory.extend("--ft-typography-title-dense-line-height",Q.lineHeight,"1.7"),ft=e.FtCssVariableFactory.extend("--ft-typography-title-dense-text-transform",Q.textTransform,"inherit"),ht=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-family",J),dt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-size",Q.fontSize,"16px"),ct=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-font-weight",Q.fontWeight,"600"),ut=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-letter-spacing",Q.letterSpacing,"0.144px"),xt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-line-height",Q.lineHeight,"1.5"),yt=e.FtCssVariableFactory.extend("--ft-typography-subtitle1-text-transform",Q.textTransform,"inherit"),gt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-family",J),bt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-size",Q.fontSize,"14px"),vt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-font-weight",Q.fontWeight,"normal"),mt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-letter-spacing",Q.letterSpacing,"0.098px"),$t=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-line-height",Q.lineHeight,"1.7"),wt=e.FtCssVariableFactory.extend("--ft-typography-subtitle2-text-transform",Q.textTransform,"inherit"),kt={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-body1-font-family",J),fontSize:e.FtCssVariableFactory.extend("--ft-typography-body1-font-size",Q.fontSize,"16px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-body1-font-weight",Q.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-body1-letter-spacing",Q.letterSpacing,"0.496px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-body1-line-height",Q.lineHeight,"1.5"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-body1-text-transform",Q.textTransform,"inherit")},zt=e.FtCssVariableFactory.extend("--ft-typography-body2-font-family",J),St=e.FtCssVariableFactory.extend("--ft-typography-body2-font-size",Q.fontSize,"14px"),Ot=e.FtCssVariableFactory.extend("--ft-typography-body2-font-weight",Q.fontWeight,"normal"),Et=e.FtCssVariableFactory.extend("--ft-typography-body2-letter-spacing",Q.letterSpacing,"0.252px"),jt=e.FtCssVariableFactory.extend("--ft-typography-body2-line-height",Q.lineHeight,"1.4"),Nt=e.FtCssVariableFactory.extend("--ft-typography-body2-text-transform",Q.textTransform,"inherit"),Ct={fontFamily:e.FtCssVariableFactory.extend("--ft-typography-caption-font-family",J),fontSize:e.FtCssVariableFactory.extend("--ft-typography-caption-font-size",Q.fontSize,"12px"),fontWeight:e.FtCssVariableFactory.extend("--ft-typography-caption-font-weight",Q.fontWeight,"normal"),letterSpacing:e.FtCssVariableFactory.extend("--ft-typography-caption-letter-spacing",Q.letterSpacing,"0.396px"),lineHeight:e.FtCssVariableFactory.extend("--ft-typography-caption-line-height",Q.lineHeight,"1.33"),textTransform:e.FtCssVariableFactory.extend("--ft-typography-caption-text-transform",Q.textTransform,"inherit")},It=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-family",J),At=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-size",Q.fontSize,"10px"),Dt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-font-weight",Q.fontWeight,"normal"),_t=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-letter-spacing",Q.letterSpacing,"0.33px"),Mt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-line-height",Q.lineHeight,"1.6"),Bt=e.FtCssVariableFactory.extend("--ft-typography-breadcrumb-text-transform",Q.textTransform,"inherit"),Zt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-family",J),Ut=e.FtCssVariableFactory.extend("--ft-typography-overline-font-size",Q.fontSize,"10px"),Rt=e.FtCssVariableFactory.extend("--ft-typography-overline-font-weight",Q.fontWeight,"normal"),Tt=e.FtCssVariableFactory.extend("--ft-typography-overline-letter-spacing",Q.letterSpacing,"1.5px"),Wt=e.FtCssVariableFactory.extend("--ft-typography-overline-line-height",Q.lineHeight,"1.6"),Kt=e.FtCssVariableFactory.extend("--ft-typography-overline-text-transform",Q.textTransform,"uppercase"),Ft=e.FtCssVariableFactory.extend("--ft-typography-button-font-family",J),Gt=e.FtCssVariableFactory.extend("--ft-typography-button-font-size",Q.fontSize,"14px"),Ht=e.FtCssVariableFactory.extend("--ft-typography-button-font-weight",Q.fontWeight,"600"),Pt=e.FtCssVariableFactory.extend("--ft-typography-button-letter-spacing",Q.letterSpacing,"1.246px"),qt=e.FtCssVariableFactory.extend("--ft-typography-button-line-height",Q.lineHeight,"1.15"),Lt=e.FtCssVariableFactory.extend("--ft-typography-button-text-transform",Q.textTransform,"uppercase"),Xt=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${V};
|
|
16
16
|
font-size: ${tt};
|
|
@@ -31,8 +31,8 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
31
31
|
`,Jt=i.css`
|
|
32
32
|
.ft-typography--subtitle1 {
|
|
33
33
|
font-family: ${ht};
|
|
34
|
-
font-size: ${
|
|
35
|
-
font-weight: ${
|
|
34
|
+
font-size: ${dt};
|
|
35
|
+
font-weight: ${ct};
|
|
36
36
|
letter-spacing: ${ut};
|
|
37
37
|
line-height: ${xt};
|
|
38
38
|
text-transform: ${yt};
|
|
@@ -85,8 +85,8 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
85
85
|
}
|
|
86
86
|
`,oe=i.css`
|
|
87
87
|
.ft-typography--overline {
|
|
88
|
-
font-family: ${
|
|
89
|
-
font-size: ${
|
|
88
|
+
font-family: ${Zt};
|
|
89
|
+
font-size: ${Ut};
|
|
90
90
|
font-weight: ${Rt};
|
|
91
91
|
letter-spacing: ${Tt};
|
|
92
92
|
line-height: ${Wt};
|
|
@@ -243,7 +243,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
243
243
|
</div>
|
|
244
244
|
`:null}
|
|
245
245
|
</div>
|
|
246
|
-
`}}he.elementDefinitions={},he.styles=[ee,ae],fe([o.property({type:String})],he.prototype,"text",void 0),fe([o.property({type:Boolean})],he.prototype,"raised",void 0),fe([o.property({type:Boolean})],he.prototype,"outlined",void 0),fe([o.property({type:Boolean})],he.prototype,"disabled",void 0),fe([o.property({type:Boolean})],he.prototype,"error",void 0),e.customElement("ft-input-label")(he);const
|
|
246
|
+
`}}he.elementDefinitions={},he.styles=[ee,ae],fe([o.property({type:String})],he.prototype,"text",void 0),fe([o.property({type:Boolean})],he.prototype,"raised",void 0),fe([o.property({type:Boolean})],he.prototype,"outlined",void 0),fe([o.property({type:Boolean})],he.prototype,"disabled",void 0),fe([o.property({type:Boolean})],he.prototype,"error",void 0),e.customElement("ft-input-label")(he);const de=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorContent),ce={color:de,backgroundColor:e.FtCssVariableFactory.extend("--ft-ripple-background-color",de),opacityContentOnSurfacePressed:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:e.FtCssVariableFactory.external(e.designSystemVariables.opacityContentOnSurfaceSelected,"Design system"),borderRadius:e.FtCssVariableFactory.create("--ft-ripple-border-radius","SIZE","0px")},ue=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorPrimary),xe=ue,ye=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ue),ge=e.FtCssVariableFactory.extend("--ft-ripple-color",e.designSystemVariables.colorSecondary),be=ge,ve=e.FtCssVariableFactory.extend("--ft-ripple-background-color",ge),me=i.css`
|
|
247
247
|
:host {
|
|
248
248
|
display: contents;
|
|
249
249
|
}
|
|
@@ -256,6 +256,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
256
256
|
|
|
257
257
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
258
258
|
overflow: hidden;
|
|
259
|
+
border-radius: ${ce.borderRadius};
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
.ft-ripple .ft-ripple--background,
|
|
@@ -265,11 +266,11 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
265
266
|
}
|
|
266
267
|
|
|
267
268
|
.ft-ripple .ft-ripple--background {
|
|
268
|
-
background-color: ${
|
|
269
|
+
background-color: ${ce.backgroundColor};
|
|
269
270
|
}
|
|
270
271
|
|
|
271
272
|
.ft-ripple .ft-ripple--effect {
|
|
272
|
-
background-color: ${
|
|
273
|
+
background-color: ${ce.color};
|
|
273
274
|
}
|
|
274
275
|
|
|
275
276
|
.ft-ripple.ft-ripple--secondary .ft-ripple--background {
|
|
@@ -317,19 +318,19 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
317
318
|
}
|
|
318
319
|
|
|
319
320
|
.ft-ripple.ft-ripple--hovered .ft-ripple--background {
|
|
320
|
-
opacity: ${
|
|
321
|
+
opacity: ${ce.opacityContentOnSurfaceHover};
|
|
321
322
|
}
|
|
322
323
|
|
|
323
324
|
.ft-ripple.ft-ripple--selected .ft-ripple--background {
|
|
324
|
-
opacity: ${
|
|
325
|
+
opacity: ${ce.opacityContentOnSurfaceSelected};
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
.ft-ripple.ft-ripple--focused .ft-ripple--background {
|
|
328
|
-
opacity: ${
|
|
329
|
+
opacity: ${ce.opacityContentOnSurfaceFocused};
|
|
329
330
|
}
|
|
330
331
|
|
|
331
332
|
.ft-ripple.ft-ripple--pressed .ft-ripple--effect {
|
|
332
|
-
opacity: ${
|
|
333
|
+
opacity: ${ce.opacityContentOnSurfacePressed};
|
|
333
334
|
transform: translate(-50%, -50%) scale(1);
|
|
334
335
|
}
|
|
335
336
|
`;var $e,we,ke=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class ze extends e.FtLitElement{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.unbounded=!1,this.activated=!1,this.selected=!1,this.disabled=!1,this.hovered=!1,this.focused=!1,this.pressed=!1,this.rippling=!1,this.rippleSize=0,this.originX=0,this.originY=0,this.resizeObserver=new ResizeObserver((()=>this.setRippleSize())),this.debouncer=new e.Debouncer(1e3),this.onTransitionStart=t=>{"transform"===t.propertyName&&(this.rippling=this.pressed,this.debouncer.run((()=>this.rippling=!1)))},this.onTransitionEnd=t=>{"transform"===t.propertyName&&(this.rippling=!1)},this.setupDebouncer=new e.Debouncer(10),this.moveRipple=t=>{var e,i;let{x:o,y:s}=this.getCoordinates(t),l=null!==(i=null===(e=this.ripple)||void 0===e?void 0:e.getBoundingClientRect())&&void 0!==i?i:{x:0,y:0,width:0,height:0};this.originX=Math.round(null!=o?o-l.x:l.width/2),this.originY=Math.round(null!=s?s-l.y:l.height/2)},this.startPress=t=>{this.moveRipple(t),this.pressed=!this.isIgnored(t)},this.endPress=()=>{this.pressed=!1},this.startHover=t=>{this.hovered=!this.isIgnored(t)},this.endHover=()=>{this.hovered=!1},this.startFocus=t=>{this.focused=!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`
|
|
@@ -384,6 +385,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
384
385
|
|
|
385
386
|
/* Ugly fix because font is broken */
|
|
386
387
|
font-size: calc(0.75 * ${Se});
|
|
388
|
+
line-height: ${Se};
|
|
387
389
|
position: relative;
|
|
388
390
|
top: -4%;
|
|
389
391
|
justify-content: center;
|
|
@@ -397,7 +399,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
397
399
|
font-family: ${je}, "Material Icons", sans-serif;
|
|
398
400
|
}
|
|
399
401
|
`;var Ie;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ie||(Ie={}));var Ae=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 De extends e.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=i.nothing}render(){const t=this.variant&&Object.values(Ie).includes(this.variant)?this.variant:Ie.fluid_topics,e=t!==Ie.material||!!this.value;return i.html`
|
|
400
|
-
<i class="ft-icon
|
|
402
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
401
403
|
${n.unsafeHTML(this.resolvedIcon)}
|
|
402
404
|
<slot ?hidden=${e}></slot>
|
|
403
405
|
</i>
|
|
@@ -428,13 +430,13 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
428
430
|
padding-right: ${_e.horizontalSpacing};
|
|
429
431
|
gap: 8px;
|
|
430
432
|
color: ${_e.selectedOptionColor};
|
|
431
|
-
${e.setVariable(
|
|
433
|
+
${e.setVariable(ce.color,_e.selectedOptionColor)};
|
|
432
434
|
}
|
|
433
435
|
|
|
434
436
|
.ft-select--input-panel,
|
|
435
437
|
.ft-select--option {
|
|
436
|
-
${e.setVariable(
|
|
437
|
-
${e.setVariable(
|
|
438
|
+
${e.setVariable(ce.opacityContentOnSurfaceHover,"0.08")};
|
|
439
|
+
${e.setVariable(ce.opacityContentOnSurfacePressed,"0.04")};
|
|
438
440
|
}
|
|
439
441
|
|
|
440
442
|
.ft-select--input-panel > *:not(ft-ripple),
|
|
@@ -550,7 +552,7 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
550
552
|
.ft-select--in-error .ft-select--helper-text {
|
|
551
553
|
color: ${_e.colorError};
|
|
552
554
|
}
|
|
553
|
-
`;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
|
|
555
|
+
`;var Be=function(t,e,i,o){for(var s,l=arguments.length,n=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(s=t[r])&&(n=(l<3?s(n):l>3?s(e,i,n):s(e,i))||n);return l>3&&n&&Object.defineProperty(e,i,n),n};class Ze extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1}render(){return i.html``}updated(t){super.updated(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Ze.elementDefinitions={},Be([o.property({type:String})],Ze.prototype,"label",void 0),Be([o.property({type:Object,converter:t=>t})],Ze.prototype,"value",void 0),Be([o.property({type:Boolean,reflect:!0})],Ze.prototype,"selected",void 0);class Ue extends e.FtLitElement{constructor(){super(...arguments),this.label="",this.helper="",this.outlined=!1,this.disabled=!1,this.error=!1,this.fixedMenuPosition=!1,this.options=[],this.optionsDisplayed=!1,this.focusOptions=!1,this.hideOptions=t=>this.optionsDisplayed=this.optionsDisplayed&&t.composedPath().includes(this.container)}render(){var t,e,o,n,r;let p=this.hasOptionsMenuOpen,a=this.disabled||!this.hasOptions;const f=null!=(null===(t=this.selectedOption)||void 0===t?void 0:t.value)||(null!==(o=null===(e=this.selectedOption)||void 0===e?void 0:e.label)&&void 0!==o?o:"").length>0,h={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":a,"ft-select--options-displayed":p,"ft-select--has-option-selected":f,"ft-select--no-label":!this.label,"ft-select--fixed":this.fixedMenuPosition,"ft-select--in-error":this.error};return i.html`
|
|
554
556
|
<div class="${s.classMap(h)}" part="container">
|
|
555
557
|
<div class="ft-select--main-panel" part="main-panel">
|
|
556
558
|
<ft-input-label text="${this.label}"
|
|
@@ -598,4 +600,4 @@ const G=Symbol.for(""),H=t=>{if((null==t?void 0:t.r)===G)return null==t?void 0:t
|
|
|
598
600
|
<ft-ripple ?primary=${e} ?activated=${e}></ft-ripple>
|
|
599
601
|
<span>${t.label}</span>
|
|
600
602
|
</div>
|
|
601
|
-
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;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)}}
|
|
603
|
+
`}updated(t){super.updated(t),t.has("options")&&(this.selectedOption=this.options.filter((t=>t.selected))[0]),t.has("selectedOption")&&(this.optionsDisplayed=!1),t.has("optionsDisplayed")&&this.fixedMenuPosition&&this.hasOptionsMenuOpen&&this.positionOptionsMenu()}positionOptionsMenu(){this.optionsMenu.style.top=this.mainPanel.getBoundingClientRect().top+this.mainPanel.getBoundingClientRect().height+"px",this.optionsMenu.style.left=this.mainPanel.getBoundingClientRect().left+"px",this.optionsMenu.style.width=this.mainPanel.getBoundingClientRect().width+"px"}contentAvailableCallback(t){var e,i;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
|
@@ -344,7 +344,7 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
344
344
|
</div>
|
|
345
345
|
`:null}
|
|
346
346
|
</div>
|
|
347
|
-
`}}ai.elementDefinitions={},ai.styles=[Ge,ri],li([o({type:String})],ai.prototype,"text",void 0),li([o({type:Boolean})],ai.prototype,"raised",void 0),li([o({type:Boolean})],ai.prototype,"outlined",void 0),li([o({type:Boolean})],ai.prototype,"disabled",void 0),li([o({type:Boolean})],ai.prototype,"error",void 0),a("ft-input-label")(ai);const pi=xt.extend("--ft-ripple-color",bt.colorContent),ci={color:pi,backgroundColor:xt.extend("--ft-ripple-background-color",pi),opacityContentOnSurfacePressed:xt.external(bt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(bt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(bt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(bt.opacityContentOnSurfaceSelected,"Design system")},hi=xt.extend("--ft-ripple-color",bt.colorPrimary),fi=hi,di=xt.extend("--ft-ripple-background-color",hi),ui=xt.extend("--ft-ripple-color",bt.colorSecondary),yi=ui,xi=xt.extend("--ft-ripple-background-color",ui),vi=y`
|
|
347
|
+
`}}ai.elementDefinitions={},ai.styles=[Ge,ri],li([o({type:String})],ai.prototype,"text",void 0),li([o({type:Boolean})],ai.prototype,"raised",void 0),li([o({type:Boolean})],ai.prototype,"outlined",void 0),li([o({type:Boolean})],ai.prototype,"disabled",void 0),li([o({type:Boolean})],ai.prototype,"error",void 0),a("ft-input-label")(ai);const pi=xt.extend("--ft-ripple-color",bt.colorContent),ci={color:pi,backgroundColor:xt.extend("--ft-ripple-background-color",pi),opacityContentOnSurfacePressed:xt.external(bt.opacityContentOnSurfacePressed,"Design system"),opacityContentOnSurfaceHover:xt.external(bt.opacityContentOnSurfaceHover,"Design system"),opacityContentOnSurfaceFocused:xt.external(bt.opacityContentOnSurfaceFocused,"Design system"),opacityContentOnSurfaceSelected:xt.external(bt.opacityContentOnSurfaceSelected,"Design system"),borderRadius:xt.create("--ft-ripple-border-radius","SIZE","0px")},hi=xt.extend("--ft-ripple-color",bt.colorPrimary),fi=hi,di=xt.extend("--ft-ripple-background-color",hi),ui=xt.extend("--ft-ripple-color",bt.colorSecondary),yi=ui,xi=xt.extend("--ft-ripple-background-color",ui),vi=y`
|
|
348
348
|
:host {
|
|
349
349
|
display: contents;
|
|
350
350
|
}
|
|
@@ -357,6 +357,7 @@ const Ct=1,Mt=2,Rt=t=>(...e)=>({_$litDirective$:t,values:e});class Ut{constructo
|
|
|
357
357
|
|
|
358
358
|
.ft-ripple:not(.ft-ripple--unbounded) {
|
|
359
359
|
overflow: hidden;
|
|
360
|
+
border-radius: ${ci.borderRadius};
|
|
360
361
|
}
|
|
361
362
|
|
|
362
363
|
.ft-ripple .ft-ripple--background,
|
|
@@ -491,6 +492,7 @@ class mi extends Ut{constructor(t){if(super(t),this.et=X,t.type!==Mt)throw Error
|
|
|
491
492
|
|
|
492
493
|
/* Ugly fix because font is broken */
|
|
493
494
|
font-size: calc(0.75 * ${Si});
|
|
495
|
+
line-height: ${Si};
|
|
494
496
|
position: relative;
|
|
495
497
|
top: -4%;
|
|
496
498
|
justify-content: center;
|
|
@@ -504,7 +506,7 @@ class mi extends Ut{constructor(t){if(super(t),this.et=X,t.type!==Mt)throw Error
|
|
|
504
506
|
font-family: ${Ni}, "Material Icons", sans-serif;
|
|
505
507
|
}
|
|
506
508
|
`;var Ri;!function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ri||(Ri={}));var Ui=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 zi extends kt{constructor(){super(...arguments),this.resolvedIcon=X}render(){const t=this.variant&&Object.values(Ri).includes(this.variant)?this.variant:Ri.fluid_topics,e=t!==Ri.material||!!this.value;return J`
|
|
507
|
-
<i class="ft-icon
|
|
509
|
+
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
508
510
|
${wi(this.resolvedIcon)}
|
|
509
511
|
<slot ?hidden=${e}></slot>
|
|
510
512
|
</i>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-select",
|
|
3
|
-
"version": "1.0.0
|
|
3
|
+
"version": "1.0.0",
|
|
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.0
|
|
23
|
-
"@fluid-topics/ft-input-label": "1.0.0
|
|
24
|
-
"@fluid-topics/ft-ripple": "1.0.0
|
|
25
|
-
"@fluid-topics/ft-typography": "1.0.0
|
|
26
|
-
"@fluid-topics/ft-wc-utils": "1.0.0
|
|
22
|
+
"@fluid-topics/ft-icon": "1.0.0",
|
|
23
|
+
"@fluid-topics/ft-input-label": "1.0.0",
|
|
24
|
+
"@fluid-topics/ft-ripple": "1.0.0",
|
|
25
|
+
"@fluid-topics/ft-typography": "1.0.0",
|
|
26
|
+
"@fluid-topics/ft-wc-utils": "1.0.0",
|
|
27
27
|
"lit": "2.7.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "90895771e0ea740f1a0d972b9fd3796051757255"
|
|
30
30
|
}
|