@fluid-topics/ft-filterable-table 0.2.14 → 0.2.17
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.
|
@@ -10,7 +10,7 @@ var r;const a=globalThis.trustedTypes,p=a?a.createPolicy("lit-html",{createHTML:
|
|
|
10
10
|
* Copyright 2020 Google LLC
|
|
11
11
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
12
12
|
*/
|
|
13
|
-
const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===U)return null===(i=t)||void 0===i?void 0:i._$litStatic$},W=t=>({_$litStatic$:t,r:U}),L=new Map,K=(t=>(e,...i)=>{const o=i.length;let n,l;const s=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(l=i[p],n=H(l));)a+=n+e[++p],f=!0;r.push(l),s.push(a),p++}if(p===o&&s.push(e[o]),f){const t=s.join("$$lit$$");void 0===(e=L.get(t))&&(s.raw=s,L.set(t,e=s)),i=r}return t(e,...i)})(z);var P,G=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};!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"}(P||(P={}));const V=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","
|
|
13
|
+
const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===U)return null===(i=t)||void 0===i?void 0:i._$litStatic$},W=t=>({_$litStatic$:t,r:U}),L=new Map,K=(t=>(e,...i)=>{const o=i.length;let n,l;const s=[],r=[];let a,p=0,f=!1;for(;p<o;){for(a=e[p];p<o&&void 0!==(l=i[p],n=H(l));)a+=n+e[++p],f=!0;r.push(l),s.push(a),p++}if(p===o&&s.push(e[o]),f){const t=s.join("$$lit$$");void 0===(e=L.get(t))&&(s.raw=s,L.set(t,e=s)),i=r}return t(e,...i)})(z);var P,G=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};!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"}(P||(P={}));const V=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.titleFont),q=e.FtCssVariable.extend("--ft-typography-font-family",e.designSystemVariables.contentFont),X={fontFamily:q,fontSize:e.FtCssVariable.create("--ft-typography-font-size","SIZE","16px"),fontWeight:e.FtCssVariable.create("--ft-typography-font-weight","UNKNOWN","normal"),letterSpacing:e.FtCssVariable.create("--ft-typography-letter-spacing","SIZE","0.496px"),lineHeight:e.FtCssVariable.create("--ft-typography-line-height","NUMBER","1.5"),textTransform:e.FtCssVariable.create("--ft-typography-text-transform","UNKNOWN","inherit")},Y=e.FtCssVariable.extend("--ft-typography-title-font-family",V),J=e.FtCssVariable.extend("--ft-typography-title-font-size",X.fontSize,"20px"),Q=e.FtCssVariable.extend("--ft-typography-title-font-weight",X.fontWeight,"normal"),tt=e.FtCssVariable.extend("--ft-typography-title-letter-spacing",X.letterSpacing,"0.15px"),et=e.FtCssVariable.extend("--ft-typography-title-line-height",X.lineHeight,"1.2"),it=e.FtCssVariable.extend("--ft-typography-title-text-transform",X.textTransform,"inherit"),ot=e.FtCssVariable.extend("--ft-typography-title-dense-font-family",V),nt=e.FtCssVariable.extend("--ft-typography-title-dense-font-size",X.fontSize,"14px"),lt=e.FtCssVariable.extend("--ft-typography-title-dense-font-weight",X.fontWeight,"normal"),st=e.FtCssVariable.extend("--ft-typography-title-dense-letter-spacing",X.letterSpacing,"0.105px"),rt=e.FtCssVariable.extend("--ft-typography-title-dense-line-height",X.lineHeight,"1.7"),at=e.FtCssVariable.extend("--ft-typography-title-dense-text-transform",X.textTransform,"inherit"),pt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-family",q),ft=e.FtCssVariable.extend("--ft-typography-subtitle1-font-size",X.fontSize,"16px"),dt=e.FtCssVariable.extend("--ft-typography-subtitle1-font-weight",X.fontWeight,"600"),ht=e.FtCssVariable.extend("--ft-typography-subtitle1-letter-spacing",X.letterSpacing,"0.144px"),ct=e.FtCssVariable.extend("--ft-typography-subtitle1-line-height",X.lineHeight,"1.5"),ut=e.FtCssVariable.extend("--ft-typography-subtitle1-text-transform",X.textTransform,"inherit"),xt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-family",q),bt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-size",X.fontSize,"14px"),vt=e.FtCssVariable.extend("--ft-typography-subtitle2-font-weight",X.fontWeight,"normal"),gt=e.FtCssVariable.extend("--ft-typography-subtitle2-letter-spacing",X.letterSpacing,"0.098px"),yt=e.FtCssVariable.extend("--ft-typography-subtitle2-line-height",X.lineHeight,"1.7"),mt=e.FtCssVariable.extend("--ft-typography-subtitle2-text-transform",X.textTransform,"inherit"),$t={fontFamily:e.FtCssVariable.extend("--ft-typography-body1-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-body1-font-size",X.fontSize,"16px"),fontWeight:e.FtCssVariable.extend("--ft-typography-body1-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-body1-letter-spacing",X.letterSpacing,"0.496px"),lineHeight:e.FtCssVariable.extend("--ft-typography-body1-line-height",X.lineHeight,"1.5"),textTransform:e.FtCssVariable.extend("--ft-typography-body1-text-transform",X.textTransform,"inherit")},wt=e.FtCssVariable.extend("--ft-typography-body2-font-family",q),kt=e.FtCssVariable.extend("--ft-typography-body2-font-size",X.fontSize,"14px"),zt=e.FtCssVariable.extend("--ft-typography-body2-font-weight",X.fontWeight,"normal"),St=e.FtCssVariable.extend("--ft-typography-body2-letter-spacing",X.letterSpacing,"0.252px"),Ot=e.FtCssVariable.extend("--ft-typography-body2-line-height",X.lineHeight,"1.4"),Ct=e.FtCssVariable.extend("--ft-typography-body2-text-transform",X.textTransform,"inherit"),Et={fontFamily:e.FtCssVariable.extend("--ft-typography-caption-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-caption-font-size",X.fontSize,"12px"),fontWeight:e.FtCssVariable.extend("--ft-typography-caption-font-weight",X.fontWeight,"normal"),letterSpacing:e.FtCssVariable.extend("--ft-typography-caption-letter-spacing",X.letterSpacing,"0.396px"),lineHeight:e.FtCssVariable.extend("--ft-typography-caption-line-height",X.lineHeight,"1.33"),textTransform:e.FtCssVariable.extend("--ft-typography-caption-text-transform",X.textTransform,"inherit")},Dt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-family",q),Bt=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-size",X.fontSize,"10px"),Ft=e.FtCssVariable.extend("--ft-typography-breadcrumb-font-weight",X.fontWeight,"normal"),It=e.FtCssVariable.extend("--ft-typography-breadcrumb-letter-spacing",X.letterSpacing,"0.33px"),jt=e.FtCssVariable.extend("--ft-typography-breadcrumb-line-height",X.lineHeight,"1.6"),Nt=e.FtCssVariable.extend("--ft-typography-breadcrumb-text-transform",X.textTransform,"inherit"),At=e.FtCssVariable.extend("--ft-typography-overline-font-family",q),Mt=e.FtCssVariable.extend("--ft-typography-overline-font-size",X.fontSize,"10px"),Tt=e.FtCssVariable.extend("--ft-typography-overline-font-weight",X.fontWeight,"normal"),Zt=e.FtCssVariable.extend("--ft-typography-overline-letter-spacing",X.letterSpacing,"1.5px"),Rt=e.FtCssVariable.extend("--ft-typography-overline-line-height",X.lineHeight,"1.6"),_t=e.FtCssVariable.extend("--ft-typography-overline-text-transform",X.textTransform,"uppercase"),Ut={fontFamily:e.FtCssVariable.extend("--ft-typography-button-font-family",q),fontSize:e.FtCssVariable.extend("--ft-typography-button-font-size",X.fontSize,"14px"),fontWeight:e.FtCssVariable.extend("--ft-typography-button-font-weight",X.fontWeight,"600"),letterSpacing:e.FtCssVariable.extend("--ft-typography-button-letter-spacing",X.letterSpacing,"1.246px"),lineHeight:e.FtCssVariable.extend("--ft-typography-button-line-height",X.lineHeight,"1.15"),textTransform:e.FtCssVariable.extend("--ft-typography-button-text-transform",X.textTransform,"uppercase")},Ht=i.css`
|
|
14
14
|
.ft-typography--title {
|
|
15
15
|
font-family: ${Y};
|
|
16
16
|
font-size: ${J};
|
|
@@ -344,8 +344,10 @@ const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
344
344
|
<slot @slotchange=${()=>this.requestUpdate()} ?hidden=${"material"!==this.variant}></slot>
|
|
345
345
|
</i>
|
|
346
346
|
`}get textContent(){var t,e;return null!==(e=null===(t=this.slottedContent)||void 0===t?void 0:t.assignedNodes().map((t=>t.textContent)).join("").trim())&&void 0!==e?e:""}getIcon(){var t,e;let o=this.textContent;return this.variant===ue.file_format?null!==(t=ce[o.toUpperCase()])&&void 0!==t?t:o:this.variant===ue.fluid_topics?null!==(e=he[o.toUpperCase()])&&void 0!==e?e:o:i.nothing}}ve.elementDefinitions={},ve.styles=i.css`
|
|
347
|
-
:host
|
|
347
|
+
:host {
|
|
348
348
|
display: inline-block;
|
|
349
|
+
}
|
|
350
|
+
:host, i.ft-icon {
|
|
349
351
|
width: ${be.size};
|
|
350
352
|
height: ${be.size};
|
|
351
353
|
text-align: center;
|
|
@@ -376,7 +378,7 @@ const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
376
378
|
.ft-icon--material {
|
|
377
379
|
font-family: ${be.materialFontFamily}, "Material Icons", sans-serif;
|
|
378
380
|
}
|
|
379
|
-
`,xe([o.property()],ve.prototype,"variant",void 0),xe([o.query("slot")],ve.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ve);var ge=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class ye 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}))}}ye.elementDefinitions={},ge([o.property({type:String})],ye.prototype,"label",void 0),ge([o.property({type:Object,converter:t=>t})],ye.prototype,"value",void 0),ge([o.property({type:Boolean,reflect:!0})],ye.prototype,"selected",void 0);const me={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class $e 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,l,r;let a=this.hasOptionsMenuOpen,p=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,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":p,"ft-select--options-displayed":a,"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`
|
|
381
|
+
`,xe([o.property()],ve.prototype,"variant",void 0),xe([o.query("slot")],ve.prototype,"slottedContent",void 0),e.customElement("ft-icon")(ve);var ge=function(t,e,i,o){for(var n,l=arguments.length,s=l<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,r=t.length-1;r>=0;r--)(n=t[r])&&(s=(l<3?n(s):l>3?n(e,i,s):n(e,i))||s);return l>3&&s&&Object.defineProperty(e,i,s),s};class ye 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}))}}ye.elementDefinitions={},ge([o.property({type:String})],ye.prototype,"label",void 0),ge([o.property({type:Object,converter:t=>t})],ye.prototype,"value",void 0),ge([o.property({type:Boolean,reflect:!0})],ye.prototype,"selected",void 0);const me={labelSize:e.FtCssVariable.create("--ft-select-label-size","SIZE","11px"),selectedOptionSize:e.FtCssVariable.create("--ft-select-selected-option-size","SIZE","14px"),verticalSpacing:e.FtCssVariable.create("--ft-select-vertical-spacing","SIZE","4px"),optionsHeight:e.FtCssVariable.create("--ft-select-options-height","SIZE","unset"),selectedOptionColor:e.FtCssVariable.extend("--ft-select-selected-option-color",e.designSystemVariables.colorOnSurface),helperColor:e.FtCssVariable.extend("--ft-select-helper-color",e.designSystemVariables.colorOnSurfaceMedium),optionsColor:e.FtCssVariable.extend("--ft-select-options-color",e.designSystemVariables.colorOnSurface),optionsZIndex:e.FtCssVariable.create("--ft-select-options-z-index","NUMBER","3"),colorSurface:e.FtCssVariable.external(e.designSystemVariables.colorSurface,"Design system"),colorOnSurfaceDisabled:e.FtCssVariable.external(e.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:e.FtCssVariable.external(e.designSystemVariables.colorPrimary,"Design system"),borderRadiusS:e.FtCssVariable.external(e.designSystemVariables.borderRadiusS,"Design system"),elevation02:e.FtCssVariable.external(e.designSystemVariables.elevation02,"Design system"),colorError:e.FtCssVariable.external(e.designSystemVariables.colorError,"Design system")};class $e 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,l,r;let a=this.hasOptionsMenuOpen,p=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,d={"ft-select":!0,"ft-select--filled":!this.outlined,"ft-select--outlined":this.outlined,"ft-select--disabled":p,"ft-select--options-displayed":a,"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`
|
|
380
382
|
<div class="${s.classMap(d)}" part="container">
|
|
381
383
|
<div class="ft-select--main-panel" part="main-panel">
|
|
382
384
|
<ft-input-label text="${this.label}"
|
|
@@ -546,6 +548,8 @@ const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
546
548
|
|
|
547
549
|
.ft-select--options-displayed .ft-select--options {
|
|
548
550
|
display: block;
|
|
551
|
+
max-height: ${me.optionsHeight};
|
|
552
|
+
overflow-y: auto;
|
|
549
553
|
}
|
|
550
554
|
|
|
551
555
|
.ft-select--option {
|
|
@@ -884,6 +888,7 @@ const U=Symbol.for(""),H=t=>{var e,i;if((null===(e=t)||void 0===e?void 0:e.r)===
|
|
|
884
888
|
box-sizing: border-box;
|
|
885
889
|
border: none;
|
|
886
890
|
pointer-events: auto;
|
|
891
|
+
line-height: 0;
|
|
887
892
|
|
|
888
893
|
--ft-button-internal-font-size: ${Me.fontSize};
|
|
889
894
|
--ft-button-internal-line-height: calc(var(--ft-button-internal-font-size) + 2px);
|