@fluid-topics/ft-filter 1.1.12 → 1.1.13
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-filter.css.d.ts +2 -0
- package/build/ft-filter.css.js +4 -2
- package/build/ft-filter.light.js +53 -52
- package/build/ft-filter.min.js +55 -54
- package/package.json +10 -10
package/build/ft-filter.css.d.ts
CHANGED
|
@@ -6,5 +6,7 @@ export declare const FtFilterCssVariables: {
|
|
|
6
6
|
colorSurface: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
7
7
|
transitionDuration: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
8
8
|
transitionTimingFunction: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
|
+
labelColor: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
10
|
+
labelFontSize: import("@fluid-topics/ft-wc-utils").FtCssVariable;
|
|
9
11
|
};
|
|
10
12
|
export declare const styles: import("lit").CSSResult[];
|
package/build/ft-filter.css.js
CHANGED
|
@@ -10,6 +10,8 @@ export const FtFilterCssVariables = {
|
|
|
10
10
|
colorSurface: FtCssVariableFactory.external(designSystemVariables.colorSurface, "Design system"),
|
|
11
11
|
transitionDuration: FtCssVariableFactory.external(designSystemVariables.transitionDuration, "Design system"),
|
|
12
12
|
transitionTimingFunction: FtCssVariableFactory.external(designSystemVariables.transitionTimingFunction, "Design system"),
|
|
13
|
+
labelColor: FtCssVariableFactory.extend("--ft-filter-label-color", "", designSystemVariables.colorOnSurface),
|
|
14
|
+
labelFontSize: FtCssVariableFactory.extend("--ft-filter-label-font-size", "", FtTypographyCssVariables.fontSize, "14px"),
|
|
13
15
|
};
|
|
14
16
|
export const styles = [
|
|
15
17
|
FtTypographyCaption,
|
|
@@ -27,7 +29,6 @@ export const styles = [
|
|
|
27
29
|
flex-direction: column;
|
|
28
30
|
max-height: 100%;
|
|
29
31
|
max-width: 100%;
|
|
30
|
-
color: ${FtFilterCssVariables.colorOnSurface};
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
.ft-filter--header {
|
|
@@ -37,7 +38,6 @@ export const styles = [
|
|
|
37
38
|
flex-shrink: 0;
|
|
38
39
|
padding: 0 10px;
|
|
39
40
|
margin-bottom: 8px;
|
|
40
|
-
${setVariable(FtTypographyCssVariables.fontSize, "14px")};
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.ft-filter--header ft-button {
|
|
@@ -51,6 +51,8 @@ export const styles = [
|
|
|
51
51
|
flex-shrink: 1;
|
|
52
52
|
flex-grow: 1;
|
|
53
53
|
word-break: break-word;
|
|
54
|
+
color: ${FtFilterCssVariables.labelColor};
|
|
55
|
+
font-size: ${FtFilterCssVariables.labelFontSize};
|
|
54
56
|
${setVariable(FtTypographyCssVariables.lineHeight, "22px")};
|
|
55
57
|
${setVariable(FtTypographyCssVariables.fontWeight, "bold")};
|
|
56
58
|
}
|
package/build/ft-filter.light.js
CHANGED
|
@@ -535,7 +535,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
535
535
|
@focusin=${this.onHover}
|
|
536
536
|
@focusout=${this.onOut}
|
|
537
537
|
@touchstart=${this.onTouch}>
|
|
538
|
-
<slot part="slot"></slot>
|
|
538
|
+
<slot part="slot" @click=${this.onClick}></slot>
|
|
539
539
|
<div part="tooltip" role="tooltip" inert
|
|
540
540
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
541
541
|
?hidden=${!this.visible}>
|
|
@@ -545,7 +545,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
545
545
|
</div>
|
|
546
546
|
</div>
|
|
547
547
|
</div>
|
|
548
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Te(this.slottedElement,this.tooltip,{platform:{...Ge,getOffsetParent:t=>Ge.getOffsetParent(t,Pe)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:i,placement:r}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...s}=oe(t,o),c={x:e,y:i},f=await pe(o,s),p=ae(ee(r)),h=re(p);let d=c[h],y=c[p];if(n){const t="y"===h?"bottom":"right";d=te(d+f["y"===h?"top":"left"],d,d-f[t])}if(a){const t="y"===p?"bottom":"right";y=te(y+f["y"===p?"top":"left"],y,y-f[t])}const g=l.fn({...o,[h]:d,[p]:y});return{...g,data:{x:g.x-e,y:g.y-i}}}}),de({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}qe.elementDefinitions={"ft-typography":yo},qe.styles=Po,Xe([i.property()],qe.prototype,"text",void 0),Xe([i.property({type:Boolean})],qe.prototype,"manual",void 0),Xe([i.property({type:Boolean})],qe.prototype,"inline",void 0),Xe([i.property({type:Number})],qe.prototype,"delay",void 0),Xe([i.property()],qe.prototype,"position",void 0),Xe([i.queryAssignedNodes()],qe.prototype,"slotNodes",void 0),Xe([i.query(".ft-tooltip--container")],qe.prototype,"container",void 0),Xe([i.query(".ft-tooltip")],qe.prototype,"tooltip",void 0),Xe([i.query(".ft-tooltip--content")],qe.prototype,"tooltipContent",void 0),Xe([i.state()],qe.prototype,"visible",void 0),Xe([i.eventOptions({passive:!0})],qe.prototype,"onTouch",null),Xe([i.eventOptions({passive:!0})],qe.prototype,"onHover",null),Xe([i.eventOptions({passive:!0})],qe.prototype,"onOut",null),o.customElement("ft-tooltip")(qe),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(_e||(_e={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ve||(Ve={})),new Map([...["abw"].map((t=>[t,Ve.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ve.AUDIO])),...["avi"].map((t=>[t,Ve.AVI])),...["chm","xhs"].map((t=>[t,Ve.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ve.CODE])),...["csv"].map((t=>[t,Ve.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ve.DITA])),...["epub"].map((t=>[t,Ve.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ve.EXCEL])),...["flac"].map((t=>[t,Ve.FLAC])),...["gif"].map((t=>[t,Ve.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ve.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ve.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ve.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ve.JPEG])),...["json"].map((t=>[t,Ve.JSON])),...["m4a","m4p"].map((t=>[t,Ve.M4A])),...["mov","qt"].map((t=>[t,Ve.MOV])),...["mp3"].map((t=>[t,Ve.MP3])),...["mp4","m4v"].map((t=>[t,Ve.MP4])),...["ogg","oga"].map((t=>[t,Ve.OGG])),...["pdf","ps"].map((t=>[t,Ve.PDF])),...["png"].map((t=>[t,Ve.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ve.POWERPOINT])),...["rar"].map((t=>[t,Ve.RAR])),...["stp"].map((t=>[t,Ve.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ve.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ve.VIDEO])),...["wav"].map((t=>[t,Ve.WAV])),...["wma"].map((t=>[t,Ve.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ve.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ve.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ve.YAML])),...["zip"].map((t=>[t,Ve.ZIP]))]),Ve.ABW,Ve.AUDIO,Ve.AVI,Ve.CHM,Ve.CODE,Ve.CSV,Ve.DITA,Ve.EPUB,Ve.EXCEL,Ve.FLAC,Ve.GIF,Ve.GZIP,Ve.HTML,Ve.IMAGE,Ve.JPEG,Ve.JSON,Ve.M4A,Ve.MOV,Ve.MP3,Ve.MP4,Ve.OGG,Ve.PDF,Ve.PNG,Ve.POWERPOINT,Ve.RAR,Ve.STP,Ve.TEXT,Ve.UNKNOWN,Ve.VIDEO,Ve.WAV,Ve.WMA,Ve.WORD,Ve.XML,Ve.YAML,Ve.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ye||(Ye={}));var Je=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Qe extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ye).includes(this.variant)?this.variant:Ye.fluid_topics,o=t!==Ye.material||!!this.value;return e.html`
|
|
548
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(t)}contentAvailableCallback(t){super.contentAvailableCallback(t),["visible","text"].some((o=>t.has(o)))&&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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",Te(this.slottedElement,this.tooltip,{platform:{...Ge,getOffsetParent:t=>Ge.getOffsetParent(t,Pe)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(o){const{x:e,y:i,placement:r}=o,{mainAxis:n=!0,crossAxis:a=!1,limiter:l={fn:t=>{let{x:o,y:e}=t;return{x:o,y:e}}},...s}=oe(t,o),c={x:e,y:i},f=await pe(o,s),p=ae(ee(r)),h=re(p);let d=c[h],y=c[p];if(n){const t="y"===h?"bottom":"right";d=te(d+f["y"===h?"top":"left"],d,d-f[t])}if(a){const t="y"===p?"bottom":"right";y=te(y+f["y"===p?"top":"left"],y,y-f[t])}const g=l.fn({...o,[h]:d,[p]:y});return{...g,data:{x:g.x-e,y:g.y-i}}}}),de({allowedPlacements:[this.position]})]}).then((({x:t,y:o})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${o}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,o){return Math.max(t,Math.min(0,-o))}}qe.elementDefinitions={"ft-typography":yo},qe.styles=Po,Xe([i.property()],qe.prototype,"text",void 0),Xe([i.property({type:Boolean})],qe.prototype,"manual",void 0),Xe([i.property({type:Boolean})],qe.prototype,"inline",void 0),Xe([i.property({type:Number})],qe.prototype,"delay",void 0),Xe([i.property()],qe.prototype,"position",void 0),Xe([i.queryAssignedNodes()],qe.prototype,"slotNodes",void 0),Xe([i.query(".ft-tooltip--container")],qe.prototype,"container",void 0),Xe([i.query(".ft-tooltip")],qe.prototype,"tooltip",void 0),Xe([i.query(".ft-tooltip--content")],qe.prototype,"tooltipContent",void 0),Xe([i.state()],qe.prototype,"visible",void 0),Xe([i.eventOptions({passive:!0})],qe.prototype,"onTouch",null),Xe([i.eventOptions({passive:!0})],qe.prototype,"onHover",null),Xe([i.eventOptions({passive:!0})],qe.prototype,"onOut",null),Xe([i.eventOptions({passive:!0})],qe.prototype,"onClick",null),o.customElement("ft-tooltip")(qe),function(t){t.THUMBS_DOWN="",t.THUMBS_DOWN_PLAIN="",t.THUMBS_UP="",t.THUMBS_UP_PLAIN="",t.STAR="",t.STAR_PLAIN="",t.DESKTOP="",t.LIFE_RING="",t.GLOBE="",t.PIGGY_BANK="",t.TABLET_LANDSCAPE="",t.TABLET_PORTRAIT="",t.MOBILE_LANDSCAPE="",t.MOBILE_PORTRAIT="",t.ARROW_RIGHT_TO_LINE="",t.THIN_ARROW_UP="",t.CONTEXTUAL="",t.CHART_SIMPLE="",t.BARS_PROGRESS="",t.LINE_CHART="",t.STACKED_CHART="",t.BOOK_OPEN_GEAR="",t.BOOK_OPEN_GEAR_SLASH="",t.DIAGRAM_SUNBURST="",t.DIAGRAM_SANKEY="",t.UNSTRUCTURED_DOC="",t.RESET="",t.THIN_ARROW_LEFT="",t.THIN_ARROW_RIGHT="",t.MY_COLLECTIONS="",t.OFFLINE_SETTINGS="",t.MY_LIBRARY="",t.RATE_PLAIN="",t.RATE="",t.FEEDBACK_PLAIN="",t.PAUSE="",t.PLAY="",t.RELATIVES_PLAIN="",t.RELATIVES="",t.SHORTCUT_MENU="",t.PRINT="",t.DEFAULT_ROLES="",t.ACCOUNT_SETTINGS="",t.ONLINE="",t.OFFLINE="",t.UPLOAD="",t.BOOK_PLAIN="",t.SYNC="",t.SHARED_PBK="",t.COLLECTIONS="",t.SEARCH_IN_PUBLICATION="",t.BOOKS="",t.LOCKER="",t.ARROW_DOWN="",t.ARROW_LEFT="",t.ARROW_RIGHT="",t.ARROW_UP="",t.SAVE="",t.MAILS_AND_NOTIFICATIONS="",t.DOT="",t.MINUS="",t.PLUS="",t.FILTERS="",t.STRIPE_ARROW_RIGHT="",t.STRIPE_ARROW_LEFT="",t.ATTACHMENTS="",t.ADD_BOOKMARK="",t.BOOKMARK="",t.EXPORT="",t.MENU="",t.TAG="",t.TAG_PLAIN="",t.COPY_TO_CLIPBOARD="",t.COLUMNS="",t.ARTICLE="",t.CLOSE_PLAIN="",t.CHECK_PLAIN="",t.LOGOUT="",t.SIGN_IN="",t.THIN_ARROW="",t.TRIANGLE_BOTTOM="",t.TRIANGLE_LEFT="",t.TRIANGLE_RIGHT="",t.TRIANGLE_TOP="",t.FACET_HAS_DESCENDANT="",t.MINUS_PLAIN="",t.PLUS_PLAIN="",t.INFO="",t.ICON_EXPAND="",t.ICON_COLLAPSE="",t.ADD_TO_PBK="",t.ALERT="",t.ADD_ALERT="",t.BACK_TO_SEARCH="",t.DOWNLOAD="",t.EDIT="",t.FEEDBACK="",t.MODIFY_PBK="",t.SCHEDULED="",t.SEARCH="",t.SHARE="󨃱",t.TOC="",t.WRITE_UGC="",t.TRASH="",t.EXTLINK="",t.EXTLINK_LIGHT="",t.CALENDAR="",t.BOOK="",t.DOWNLOAD_PLAIN="",t.CHECK="",t.TOPICS="",t.EYE="",t.EYE_SLASH="",t.DISC="",t.CIRCLE="",t.SHARED="",t.SORT_UNSORTED="",t.SORT_UP="",t.SORT_DOWN="",t.WORKING="",t.CLOSE="",t.ZOOM_OUT="",t.ZOOM_IN="",t.ZOOM_REALSIZE="",t.ZOOM_FULLSCREEN="",t.ADMIN_RESTRICTED="",t.ADMIN_THEME="",t.WARNING="",t.CONTEXT="",t.SEARCH_HOME="",t.STEPS="",t.HOME="",t.TRANSLATE="",t.USER="",t.ADMIN="",t.ANALYTICS="",t.ADMIN_KHUB="",t.ADMIN_USERS="",t.ADMIN_INTEGRATION="",t.ADMIN_PORTAL="",t.COMMENT_QUESTION="",t.COMMENT_QUESTION_PLAIN="",t.MESSAGE_BOT="",t.PIP="",t.PIP_WIDE="",t.EXPAND_WIDE="",t.X_MARK=""}(_e||(_e={})),function(t){t.UNKNOWN="",t.ABW="",t.AUDIO="",t.AVI="",t.CHM="",t.CODE="",t.CSV="",t.DITA="",t.EPUB="",t.EXCEL="",t.FLAC="",t.GIF="",t.GZIP="",t.HTML="",t.IMAGE="",t.JPEG="",t.JSON="",t.M4A="",t.MOV="",t.MP3="",t.MP4="",t.OGG="",t.PDF="",t.PNG="",t.POWERPOINT="",t.RAR="",t.STP="",t.TEXT="",t.VIDEO="",t.WAV="",t.WMA="",t.WORD="",t.XML="",t.YAML="",t.ZIP=""}(Ve||(Ve={})),new Map([...["abw"].map((t=>[t,Ve.ABW])),...["3gp","act","aiff","aac","amr","au","awb","dct","dss","dvf","gsm","iklax","ivs","mmf","mpc","msv","opus","ra","rm","raw","sln","tta","vox","wv"].map((t=>[t,Ve.AUDIO])),...["avi"].map((t=>[t,Ve.AVI])),...["chm","xhs"].map((t=>[t,Ve.CHM])),...["java","py","php","php3","php4","php5","js","javascript","rb","rbw","c","cpp","cxx","h","hh","hpp","hxx","sh","bash","zsh","tcsh","ksh","csh","vb","scala","pl","prl","perl","groovy","ceylon","aspx","jsp","scpt","applescript","bas","bat","lua","jsp","mk","cmake","css","sass","less","m","mm","xcodeproj"].map((t=>[t,Ve.CODE])),...["csv"].map((t=>[t,Ve.CSV])),...["dita","ditamap","ditaval"].map((t=>[t,Ve.DITA])),...["epub"].map((t=>[t,Ve.EPUB])),...["xls","xlt","xlm","xlsx","xlsm","xltx","xltm","xlsb","xla","xlam","xll","xlw"].map((t=>[t,Ve.EXCEL])),...["flac"].map((t=>[t,Ve.FLAC])),...["gif"].map((t=>[t,Ve.GIF])),...["gzip","x-gzip","giz","gz","tgz"].map((t=>[t,Ve.GZIP])),...["html","htm","xhtml"].map((t=>[t,Ve.HTML])),...["ai","vml","xps","img","cpt","psd","psp","xcf","svg","svg+xml","bmp","bpg","ppm","pgm","pbm","pnm","rif","tif","tiff","webp","wmf"].map((t=>[t,Ve.IMAGE])),...["jpeg","jpg","jpe"].map((t=>[t,Ve.JPEG])),...["json"].map((t=>[t,Ve.JSON])),...["m4a","m4p"].map((t=>[t,Ve.M4A])),...["mov","qt"].map((t=>[t,Ve.MOV])),...["mp3"].map((t=>[t,Ve.MP3])),...["mp4","m4v"].map((t=>[t,Ve.MP4])),...["ogg","oga"].map((t=>[t,Ve.OGG])),...["pdf","ps"].map((t=>[t,Ve.PDF])),...["png"].map((t=>[t,Ve.PNG])),...["ppt","pot","pps","pptx","pptm","potx","potm","ppam","ppsx","ppsm","sldx","sldm"].map((t=>[t,Ve.POWERPOINT])),...["rar"].map((t=>[t,Ve.RAR])),...["stp"].map((t=>[t,Ve.STP])),...["txt","rtf","md","mdown"].map((t=>[t,Ve.TEXT])),...["webm","mkv","flv","vob","ogv","ogg","drc","mng","wmv","yuv","rm","rmvb","asf","mpg","mp2","mpeg","mpe","mpv","m2v","svi","3gp","3g2","mxf","roq","nsv"].map((t=>[t,Ve.VIDEO])),...["wav"].map((t=>[t,Ve.WAV])),...["wma"].map((t=>[t,Ve.WMA])),...["doc","dot","docx","docm","dotx","dotm","docb"].map((t=>[t,Ve.WORD])),...["xml","xsl","rdf"].map((t=>[t,Ve.XML])),...["yaml","yml","x-yaml"].map((t=>[t,Ve.YAML])),...["zip"].map((t=>[t,Ve.ZIP]))]),Ve.ABW,Ve.AUDIO,Ve.AVI,Ve.CHM,Ve.CODE,Ve.CSV,Ve.DITA,Ve.EPUB,Ve.EXCEL,Ve.FLAC,Ve.GIF,Ve.GZIP,Ve.HTML,Ve.IMAGE,Ve.JPEG,Ve.JSON,Ve.M4A,Ve.MOV,Ve.MP3,Ve.MP4,Ve.OGG,Ve.PDF,Ve.PNG,Ve.POWERPOINT,Ve.RAR,Ve.STP,Ve.TEXT,Ve.UNKNOWN,Ve.VIDEO,Ve.WAV,Ve.WMA,Ve.WORD,Ve.XML,Ve.YAML,Ve.ZIP,function(t){t.fluid_topics="fluid-topics",t.file_format="file-format",t.material="material"}(Ye||(Ye={}));var Je=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Qe extends o.FtLitElement{constructor(){super(...arguments),this.resolvedIcon=e.nothing}render(){const t=this.variant&&Object.values(Ye).includes(this.variant)?this.variant:Ye.fluid_topics,o=t!==Ye.material||!!this.value;return e.html`
|
|
549
549
|
<i class="ft-icon ft-icon--${t}" part="icon icon-${t}">
|
|
550
550
|
${a.unsafeHTML(this.resolvedIcon)}
|
|
551
551
|
<slot ?hidden=${o}></slot>
|
|
@@ -798,7 +798,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
798
798
|
width: ${tt.smallIconOnlyWidth};
|
|
799
799
|
padding: unset;
|
|
800
800
|
}
|
|
801
|
-
`,o.noTextSelect];var ai=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class li extends ei{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?V.caption1medium:V.body2medium}}li.styles=[o.safariEllipsisFix,ni],ai([i.property({type:Boolean})],li.prototype,"primary",void 0),ai([i.property({type:Boolean})],li.prototype,"secondary",void 0),ai([i.property({type:Boolean})],li.prototype,"tertiary",void 0),ai([i.property({type:Boolean})],li.prototype,"neutral",void 0),ai([i.property({type:Boolean})],li.prototype,"small",void 0),o.customElement("ft-button")(ri),o.customElement("ftds-button")(li);const si=o.FtCssVariableFactory.extend("--ft-checkbox-text-color","",o.designSystemVariables.colorOnSurfaceHigh),ci=o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),
|
|
801
|
+
`,o.noTextSelect];var ai=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class li extends ei{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?V.caption1medium:V.body2medium}}li.styles=[o.safariEllipsisFix,ni],ai([i.property({type:Boolean})],li.prototype,"primary",void 0),ai([i.property({type:Boolean})],li.prototype,"secondary",void 0),ai([i.property({type:Boolean})],li.prototype,"tertiary",void 0),ai([i.property({type:Boolean})],li.prototype,"neutral",void 0),ai([i.property({type:Boolean})],li.prototype,"small",void 0),o.customElement("ft-button")(ri),o.customElement("ftds-button")(li);const si=o.FtCssVariableFactory.extend("--ft-checkbox-text-color","",o.designSystemVariables.colorOnSurfaceHigh),ci=o.FtCssVariableFactory.extend("--ft-checkbox-font-size","",it.fontSize),fi=o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),pi=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnPrimary,"Design system"),hi=o.FtCssVariableFactory.extend("--ft-checkbox-border-color","",o.designSystemVariables.colorOnSurfaceMedium),di=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),yi=e.css`
|
|
802
802
|
* {
|
|
803
803
|
box-sizing: border-box;
|
|
804
804
|
}
|
|
@@ -806,6 +806,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
806
806
|
.ft-checkbox {
|
|
807
807
|
box-sizing: border-box;
|
|
808
808
|
color: ${si};
|
|
809
|
+
font-size: ${ci};
|
|
809
810
|
|
|
810
811
|
display: inline-flex;
|
|
811
812
|
align-items: center;
|
|
@@ -813,7 +814,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
813
814
|
}
|
|
814
815
|
|
|
815
816
|
.ft-checkbox--disabled {
|
|
816
|
-
color: ${
|
|
817
|
+
color: ${di};
|
|
817
818
|
}
|
|
818
819
|
|
|
819
820
|
input {
|
|
@@ -837,26 +838,26 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
837
838
|
|
|
838
839
|
.ft-checkbox--box {
|
|
839
840
|
display: flex;
|
|
840
|
-
border: 2px solid ${
|
|
841
|
+
border: 2px solid ${hi};
|
|
841
842
|
border-radius: 2px;
|
|
842
843
|
|
|
843
844
|
width: 18px;
|
|
844
845
|
height: 18px;
|
|
845
846
|
|
|
846
|
-
color: ${
|
|
847
|
+
color: ${pi};
|
|
847
848
|
}
|
|
848
849
|
|
|
849
850
|
|
|
850
851
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
851
852
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
852
|
-
border-color: ${
|
|
853
|
-
background-color: ${
|
|
853
|
+
border-color: ${fi};
|
|
854
|
+
background-color: ${fi};
|
|
854
855
|
}
|
|
855
856
|
|
|
856
857
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
857
|
-
border-color: ${
|
|
858
|
+
border-color: ${di};
|
|
858
859
|
background-color: transparent;
|
|
859
|
-
color: ${
|
|
860
|
+
color: ${di};
|
|
860
861
|
}
|
|
861
862
|
|
|
862
863
|
.ft-checkbox--checkmark {
|
|
@@ -875,7 +876,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
875
876
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
876
877
|
opacity: 1;
|
|
877
878
|
}
|
|
878
|
-
`;var
|
|
879
|
+
`;var gi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ui extends o.FtLitElement{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return e.html`
|
|
879
880
|
<label class="${n.classMap(t)}" for="checkbox-input">
|
|
880
881
|
<div class="ft-checkbox--box-container">
|
|
881
882
|
<ft-ripple
|
|
@@ -901,14 +902,14 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
901
902
|
<slot></slot>
|
|
902
903
|
</ft-typography>
|
|
903
904
|
</label>
|
|
904
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),null===(o=this.ripple)||void 0===o||o.setupFor(this.container)}}
|
|
905
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),null===(o=this.ripple)||void 0===o||o.setupFor(this.container)}}ui.elementDefinitions={"ft-ripple":Fo,"ft-typography":yo},ui.styles=yi,gi([i.property()],ui.prototype,"name",void 0),gi([i.property({type:Boolean,reflect:!0})],ui.prototype,"checked",void 0),gi([i.property({type:Boolean})],ui.prototype,"indeterminate",void 0),gi([i.property({type:Boolean})],ui.prototype,"disabled",void 0),gi([i.query(".ft-checkbox")],ui.prototype,"container",void 0),gi([i.query("ft-ripple")],ui.prototype,"ripple",void 0),o.customElement("ft-checkbox")(ui);const bi=o.FtCssVariableFactory.extend("--ft-radio-text-color","",o.designSystemVariables.colorOnSurfaceHigh),mi=o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),xi=(o.FtCssVariableFactory.external(o.designSystemVariables.colorOnPrimary,"Design system"),o.FtCssVariableFactory.extend("--ft-radio-border-color","",o.designSystemVariables.colorOnSurfaceMedium)),vi=o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),Oi=e.css`
|
|
905
906
|
* {
|
|
906
907
|
box-sizing: border-box;
|
|
907
908
|
}
|
|
908
909
|
|
|
909
910
|
.ft-radio {
|
|
910
911
|
box-sizing: border-box;
|
|
911
|
-
color: ${
|
|
912
|
+
color: ${bi};
|
|
912
913
|
|
|
913
914
|
display: inline-flex;
|
|
914
915
|
align-items: center;
|
|
@@ -916,7 +917,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
916
917
|
}
|
|
917
918
|
|
|
918
919
|
.ft-radio--disabled {
|
|
919
|
-
color: ${
|
|
920
|
+
color: ${vi};
|
|
920
921
|
}
|
|
921
922
|
|
|
922
923
|
input {
|
|
@@ -939,7 +940,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
939
940
|
}
|
|
940
941
|
|
|
941
942
|
.ft-radio--box {
|
|
942
|
-
border: 2px solid ${
|
|
943
|
+
border: 2px solid ${xi};
|
|
943
944
|
border-radius: 50%;
|
|
944
945
|
|
|
945
946
|
display: flex;
|
|
@@ -952,7 +953,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
952
953
|
|
|
953
954
|
.ft-radio--box:after {
|
|
954
955
|
content: " ";
|
|
955
|
-
background-color: ${
|
|
956
|
+
background-color: ${mi};
|
|
956
957
|
|
|
957
958
|
border-radius: 50%;
|
|
958
959
|
|
|
@@ -964,7 +965,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
964
965
|
}
|
|
965
966
|
|
|
966
967
|
.ft-radio--checked .ft-radio--box {
|
|
967
|
-
border-color: ${
|
|
968
|
+
border-color: ${mi};
|
|
968
969
|
}
|
|
969
970
|
|
|
970
971
|
|
|
@@ -973,14 +974,14 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
973
974
|
}
|
|
974
975
|
|
|
975
976
|
.ft-radio--disabled .ft-radio--box {
|
|
976
|
-
border-color: ${
|
|
977
|
+
border-color: ${vi};
|
|
977
978
|
background-color: transparent;
|
|
978
979
|
}
|
|
979
980
|
|
|
980
981
|
.ft-radio--disabled .ft-radio--box:after {
|
|
981
|
-
background-color: ${
|
|
982
|
+
background-color: ${vi};
|
|
982
983
|
}
|
|
983
|
-
`;var
|
|
984
|
+
`;var Ni=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class $i extends CustomEvent{constructor(t,o){super("change",{detail:{value:t,checked:o},bubbles:!0,composed:!0})}}class Si extends o.FtLitElement{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return e.html`
|
|
984
985
|
<div class="${n.classMap(t)}">
|
|
985
986
|
<div class="ft-radio--box-container">
|
|
986
987
|
<ft-ripple
|
|
@@ -1005,16 +1006,16 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1005
1006
|
</ft-typography>
|
|
1006
1007
|
</label>
|
|
1007
1008
|
</div>
|
|
1008
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
1009
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new $i(this.value,this.checked))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),null===(o=this.ripple)||void 0===o||o.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new $i(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Si.elementDefinitions={"ft-ripple":Fo,"ft-typography":yo},Si.styles=Oi,Ni([i.property()],Si.prototype,"value",void 0),Ni([i.property()],Si.prototype,"name",void 0),Ni([i.property({type:Boolean,reflect:!0})],Si.prototype,"checked",void 0),Ni([i.property({type:Boolean})],Si.prototype,"disabled",void 0),Ni([i.query(".ft-radio")],Si.prototype,"container",void 0),Ni([i.query("ft-ripple")],Si.prototype,"ripple",void 0),Ni([i.query("input")],Si.prototype,"input",void 0);const wi=e.css`
|
|
1009
1010
|
:host {
|
|
1010
1011
|
display: contents;
|
|
1011
1012
|
}
|
|
1012
|
-
`;var
|
|
1013
|
+
`;var Ci=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class ki extends o.FtLitElement{constructor(){super(...arguments),this.name=""}render(){return e.html`
|
|
1013
1014
|
<slot @slotchange=${this.onSlotChange}
|
|
1014
1015
|
@change=${this.onChange}
|
|
1015
1016
|
@keydown=${this.onKeyDown}
|
|
1016
1017
|
></slot>
|
|
1017
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((o=>o.checked=t.detail.value===o.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let o=this.findFtRadio(t),e=this.radioButtons.indexOf(o)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let o=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[o>this.radioButtons.length-1?0:o].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)}}
|
|
1018
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((o=>o.checked=t.detail.value===o.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let o=this.findFtRadio(t),e=this.radioButtons.indexOf(o)-1;this.radioButtons[e<0?this.radioButtons.length-1:e].select();break}case"ArrowDown":case"ArrowRight":{let o=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[o>this.radioButtons.length-1?0:o].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)}}ki.elementDefinitions={},ki.styles=wi,Ci([i.property()],ki.prototype,"name",void 0),Ci([i.queryAssignedElements()],ki.prototype,"radioButtons",void 0),o.customElement("ft-radio")(Si),o.customElement("ft-radio-group")(ki);const Ii={borderRadiusM:o.FtCssVariableFactory.external(o.designSystemVariables.borderRadiusM,"Design system"),colorOutline:o.FtCssVariableFactory.external(o.designSystemVariables.colorOutline,"Design system"),colorOnSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceDisabled,"Design system"),colorPrimary:o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),colorOnPrimary:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnPrimary,"Design system"),fontFamily:o.FtCssVariableFactory.external(zt.fontFamily,"Body2 typography"),fontSize:o.FtCssVariableFactory.external(zt.fontSize,"Body2 typography"),fontWeight:o.FtCssVariableFactory.external(zt.fontWeight,"Body2 typography"),letterSpacing:o.FtCssVariableFactory.external(zt.letterSpacing,"Body2 typography"),lineHeight:o.FtCssVariableFactory.external(zt.lineHeight,"Body2 typography"),textTransform:o.FtCssVariableFactory.external(zt.textTransform,"Body2 typography")},Ri=e.css`
|
|
1018
1019
|
.ft-filter-level--container {
|
|
1019
1020
|
display: flex;
|
|
1020
1021
|
flex-direction: column;
|
|
@@ -1028,14 +1029,14 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1028
1029
|
flex-shrink: 0;
|
|
1029
1030
|
text-decoration: none;
|
|
1030
1031
|
position: relative;
|
|
1031
|
-
border-radius: ${
|
|
1032
|
+
border-radius: ${Ii.borderRadiusM};
|
|
1032
1033
|
overflow: hidden;
|
|
1033
1034
|
display: flex;
|
|
1034
1035
|
align-items: center;
|
|
1035
1036
|
padding: 4px 4px;
|
|
1036
1037
|
gap: 4px;
|
|
1037
1038
|
cursor: pointer;
|
|
1038
|
-
color: ${
|
|
1039
|
+
color: ${Ii.colorOnSurface};
|
|
1039
1040
|
}
|
|
1040
1041
|
|
|
1041
1042
|
.ft-filter-level--go-back:focus {
|
|
@@ -1064,7 +1065,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1064
1065
|
}
|
|
1065
1066
|
|
|
1066
1067
|
ft-button {
|
|
1067
|
-
${o.setVariable(Ro.color,
|
|
1068
|
+
${o.setVariable(Ro.color,Ii.colorOnSurface)};
|
|
1068
1069
|
}
|
|
1069
1070
|
|
|
1070
1071
|
ft-radio, ft-checkbox {
|
|
@@ -1078,9 +1079,9 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1078
1079
|
|
|
1079
1080
|
.ft-filter-level--no-values {
|
|
1080
1081
|
margin: 10px 0;
|
|
1081
|
-
color: ${
|
|
1082
|
+
color: ${Ii.colorOnSurfaceMedium};
|
|
1082
1083
|
}
|
|
1083
|
-
`;var
|
|
1084
|
+
`;var Ei=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Li extends o.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,o;return null!==(o=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==o?o: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 o=t.slice(0,this.limit);return e.html`
|
|
1084
1085
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
1085
1086
|
${null==this.parent?null:e.html`
|
|
1086
1087
|
<div tabindex="0"
|
|
@@ -1144,7 +1145,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1144
1145
|
@change=${t=>t.stopPropagation()}>
|
|
1145
1146
|
${t.renderOption?t.renderOption:t.label}
|
|
1146
1147
|
</ft-radio>
|
|
1147
|
-
`}onRadioKeyUp(t,o){o.selected&&" "===t.key&&this.optionsChanged(t,o)}optionsChanged(t,o){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:o}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
1148
|
+
`}onRadioKeyUp(t,o){o.selected&&" "===t.key&&this.optionsChanged(t,o)}optionsChanged(t,o){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:o}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}Li.elementDefinitions={"ft-button":ri,"ft-ripple":Fo,"ft-typography":yo,"ft-checkbox":ui,"ft-icon":Qe,"ft-radio":Si},Li.styles=Ri,Ei([i.property({type:String})],Li.prototype,"filterId",void 0),Ei([i.property({type:Object})],Li.prototype,"parent",void 0),Ei([i.property({type:Array})],Li.prototype,"options",void 0),Ei([i.property({type:Boolean})],Li.prototype,"multivalued",void 0),Ei([i.property({type:Boolean})],Li.prototype,"disabled",void 0),Ei([i.property({type:Boolean})],Li.prototype,"hideSelectedOptions",void 0),Ei([i.property({type:Boolean})],Li.prototype,"preventNavigation",void 0),Ei([i.property({type:String})],Li.prototype,"filter",void 0),Ei([i.property({type:String})],Li.prototype,"moreValuesButtonLabel",void 0),Ei([i.property({type:String})],Li.prototype,"noValuesLabel",void 0),Ei([i.property({type:Number})],Li.prototype,"displayedValuesLimit",void 0),Ei([i.query(".ft-filter-level--container")],Li.prototype,"container",void 0),Ei([i.state()],Li.prototype,"displayedPages",void 0);const Wi={buttonsColor:o.FtCssVariableFactory.extend("--ft-snap-scroll-buttons-color","",o.designSystemVariables.colorPrimary),buttonsZIndex:o.FtCssVariableFactory.create("--ft-snap-scroll-buttons-z-index","","COLOR","1"),gap:o.FtCssVariableFactory.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system")},Ui=e.css`
|
|
1148
1149
|
.ft-snap-scroll {
|
|
1149
1150
|
box-sizing: border-box;
|
|
1150
1151
|
position: relative;
|
|
@@ -1179,7 +1180,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1179
1180
|
flex-wrap: nowrap;
|
|
1180
1181
|
align-items: flex-start;
|
|
1181
1182
|
justify-content: flex-start;
|
|
1182
|
-
gap: ${
|
|
1183
|
+
gap: ${Wi.gap};
|
|
1183
1184
|
}
|
|
1184
1185
|
|
|
1185
1186
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1222,11 +1223,11 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1222
1223
|
.ft-snap-scroll--next {
|
|
1223
1224
|
position: absolute;
|
|
1224
1225
|
display: flex;
|
|
1225
|
-
z-index: ${
|
|
1226
|
+
z-index: ${Wi.buttonsZIndex};
|
|
1226
1227
|
opacity: 1;
|
|
1227
1228
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1228
1229
|
${o.setVariable(Ro.backgroundColor,"transparent")};
|
|
1229
|
-
${o.setVariable(Ro.color,
|
|
1230
|
+
${o.setVariable(Ro.color,Wi.buttonsColor)};
|
|
1230
1231
|
}
|
|
1231
1232
|
|
|
1232
1233
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1239,37 +1240,37 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1239
1240
|
top: 0;
|
|
1240
1241
|
left: -1px;
|
|
1241
1242
|
bottom: 0;
|
|
1242
|
-
background: linear-gradient(to right, ${
|
|
1243
|
+
background: linear-gradient(to right, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1243
1244
|
}
|
|
1244
1245
|
|
|
1245
1246
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1246
1247
|
top: -1px;
|
|
1247
1248
|
left: 0;
|
|
1248
1249
|
right: 0;
|
|
1249
|
-
background: linear-gradient(to bottom, ${
|
|
1250
|
+
background: linear-gradient(to bottom, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1250
1251
|
}
|
|
1251
1252
|
|
|
1252
1253
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1253
1254
|
top: 0;
|
|
1254
1255
|
right: -1px;
|
|
1255
1256
|
bottom: 0;
|
|
1256
|
-
background: linear-gradient(to left, ${
|
|
1257
|
+
background: linear-gradient(to left, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1257
1258
|
}
|
|
1258
1259
|
|
|
1259
1260
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1260
1261
|
left: 0;
|
|
1261
1262
|
right: 0;
|
|
1262
1263
|
bottom: -1px;
|
|
1263
|
-
background: linear-gradient(to top, ${
|
|
1264
|
+
background: linear-gradient(to top, ${Wi.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1264
1265
|
}
|
|
1265
1266
|
|
|
1266
1267
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1267
1268
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1268
1269
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1269
1270
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1270
|
-
background-color: ${
|
|
1271
|
+
background-color: ${Wi.colorSurface};
|
|
1271
1272
|
}
|
|
1272
|
-
`;var
|
|
1273
|
+
`;var zi=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ki extends CustomEvent{constructor(t,o){super("current-element-change",{detail:{index:t,element:o}})}}class Zi extends o.FtLitElement{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new o.Debouncer(200),this.updateScrollDebouncer=new o.Debouncer(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let o=this.elements[t];if(o){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,e=this.contentSlot[this.scrollAttribute]+this.prevSize;(o[this.offsetAttribute]<e||o[this.offsetAttribute]+o[this.sizeAttribute]>t)&&this.scrollToElement(o)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=n.classMap({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":o.isSafari}),i=this.controls&&this.withScroll;return e.html`
|
|
1273
1274
|
<div part="container" class="${t}">
|
|
1274
1275
|
<ft-button
|
|
1275
1276
|
class="ft-snap-scroll--previous"
|
|
@@ -1293,7 +1294,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1293
1294
|
@click=${this.next}
|
|
1294
1295
|
></ft-button>
|
|
1295
1296
|
</div>
|
|
1296
|
-
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1297
|
+
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new Ki(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var o;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(o=this.listenedContainer)||void 0===o||o.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const o=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<o&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var o,e;t&&(this.horizontal?null===(o=this.contentSlot)||void 0===o||o.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(e=this.contentSlot)||void 0===e||e.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,o;this.elements=null!==(o=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==o?o:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let o=0;o<this.elements.length;o++)(t<0||this.getDistanceFromStart(this.elements[o])<this.getDistanceFromStart(this.elements[t]))&&(t=o);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const o=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-o)}}Zi.elementDefinitions={"ft-button":ri},Zi.styles=Ui,zi([i.property({type:Boolean})],Zi.prototype,"horizontal",void 0),zi([i.property({type:Boolean})],Zi.prototype,"hideScrollbar",void 0),zi([i.property({type:Boolean})],Zi.prototype,"controls",void 0),zi([i.property({type:Boolean})],Zi.prototype,"limitSize",void 0),zi([i.state()],Zi.prototype,"elements",void 0),zi([i.state()],Zi.prototype,"currentElement",void 0),zi([i.state()],Zi.prototype,"withScroll",void 0),zi([i.state()],Zi.prototype,"startReached",void 0),zi([i.state()],Zi.prototype,"endReached",void 0),zi([i.query(".ft-snap-scroll--content")],Zi.prototype,"contentSlot",void 0),o.customElement("ft-snap-scroll")(Zi);const Bi={colorOutline:o.FtCssVariableFactory.external(o.designSystemVariables.colorOutline,"Design system"),colorOnSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurface,"Design system"),colorOnSurfaceMedium:o.FtCssVariableFactory.external(o.designSystemVariables.colorOnSurfaceMedium,"Design system"),colorPrimary:o.FtCssVariableFactory.external(o.designSystemVariables.colorPrimary,"Design system"),colorSurface:o.FtCssVariableFactory.external(o.designSystemVariables.colorSurface,"Design system"),transitionDuration:o.FtCssVariableFactory.external(o.designSystemVariables.transitionDuration,"Design system"),transitionTimingFunction:o.FtCssVariableFactory.external(o.designSystemVariables.transitionTimingFunction,"Design system"),labelColor:o.FtCssVariableFactory.extend("--ft-filter-label-color","",o.designSystemVariables.colorOnSurface),labelFontSize:o.FtCssVariableFactory.extend("--ft-filter-label-font-size","",it.fontSize,"14px")},Fi=[ao,e.css`
|
|
1297
1298
|
:host {
|
|
1298
1299
|
display: flex;
|
|
1299
1300
|
max-height: 100%;
|
|
@@ -1306,7 +1307,6 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1306
1307
|
flex-direction: column;
|
|
1307
1308
|
max-height: 100%;
|
|
1308
1309
|
max-width: 100%;
|
|
1309
|
-
color: ${Zi.colorOnSurface};
|
|
1310
1310
|
}
|
|
1311
1311
|
|
|
1312
1312
|
.ft-filter--header {
|
|
@@ -1316,7 +1316,6 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1316
1316
|
flex-shrink: 0;
|
|
1317
1317
|
padding: 0 10px;
|
|
1318
1318
|
margin-bottom: 8px;
|
|
1319
|
-
${o.setVariable(it.fontSize,"14px")};
|
|
1320
1319
|
}
|
|
1321
1320
|
|
|
1322
1321
|
.ft-filter--header ft-button {
|
|
@@ -1330,6 +1329,8 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1330
1329
|
flex-shrink: 1;
|
|
1331
1330
|
flex-grow: 1;
|
|
1332
1331
|
word-break: break-word;
|
|
1332
|
+
color: ${Bi.labelColor};
|
|
1333
|
+
font-size: ${Bi.labelFontSize};
|
|
1333
1334
|
${o.setVariable(it.lineHeight,"22px")};
|
|
1334
1335
|
${o.setVariable(it.fontWeight,"bold")};
|
|
1335
1336
|
}
|
|
@@ -1342,8 +1343,8 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1342
1343
|
padding: 0 10px;
|
|
1343
1344
|
overflow: hidden;
|
|
1344
1345
|
height: 32px;
|
|
1345
|
-
transition: height ${
|
|
1346
|
-
margin ${
|
|
1346
|
+
transition: height ${Bi.transitionDuration} ${Bi.transitionTimingFunction},
|
|
1347
|
+
margin ${Bi.transitionDuration} ${Bi.transitionTimingFunction};
|
|
1347
1348
|
transition-delay: 500ms;
|
|
1348
1349
|
}
|
|
1349
1350
|
|
|
@@ -1356,15 +1357,15 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1356
1357
|
display: block;
|
|
1357
1358
|
width: 100%;
|
|
1358
1359
|
border-radius: 4px;
|
|
1359
|
-
border: 1px solid ${
|
|
1360
|
+
border: 1px solid ${Bi.colorOutline};
|
|
1360
1361
|
padding: 4px;
|
|
1361
|
-
background-color: ${
|
|
1362
|
-
color: ${
|
|
1363
|
-
outline-color: ${
|
|
1362
|
+
background-color: ${Bi.colorSurface};
|
|
1363
|
+
color: ${Bi.colorOnSurface};
|
|
1364
|
+
outline-color: ${Bi.colorPrimary};
|
|
1364
1365
|
}
|
|
1365
1366
|
|
|
1366
1367
|
input::placeholder {
|
|
1367
|
-
color: ${
|
|
1368
|
+
color: ${Bi.colorOnSurfaceMedium};
|
|
1368
1369
|
}
|
|
1369
1370
|
|
|
1370
1371
|
input:placeholder-shown {
|
|
@@ -1380,7 +1381,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1380
1381
|
}
|
|
1381
1382
|
|
|
1382
1383
|
.ft-filter--separator {
|
|
1383
|
-
border-top: 1px solid ${
|
|
1384
|
+
border-top: 1px solid ${Bi.colorOutline};
|
|
1384
1385
|
margin: 4px 10px;
|
|
1385
1386
|
}
|
|
1386
1387
|
|
|
@@ -1405,7 +1406,7 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1405
1406
|
slot:not([name]) {
|
|
1406
1407
|
display: none;
|
|
1407
1408
|
}
|
|
1408
|
-
`];var
|
|
1409
|
+
`];var Di=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Ai extends CustomEvent{constructor(t){super("change",{detail:t})}}class Hi extends o.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 o.Debouncer(300),this.changeDebouncer=new o.Debouncer(10),this.lastDispatchedValues=[]}get flatOptions(){return o.flatDeep(this.options,(t=>{var o;return null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get childrenFilteredFlatOptions(){return o.flatDeep(this.options,(t=>{var o;return t.selected?[]:null!==(o=t.subOptions)&&void 0!==o?o:[]}))}get selectedValues(){return this.childrenFilteredFlatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),o=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,i=this.filterPlaceHolder.replace("{0}",this.label);return e.html`
|
|
1409
1410
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1410
1411
|
part="container">
|
|
1411
1412
|
${this.label||t?e.html`
|
|
@@ -1477,6 +1478,6 @@ const G=Symbol.for(""),T=t=>{if(t?.r===G)return t?._$litStatic$},P=t=>({_$litSta
|
|
|
1477
1478
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1478
1479
|
noValuesLabel="${this.noValuesLabel}"
|
|
1479
1480
|
></ft-filter-level>
|
|
1480
|
-
`}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 o;t.stopPropagation();const e=this.flatOptions.find((o=>o.value===t.detail.value));e.selected=!e.selected;const i=t=>{var o;t!==e&&(t.selected=!1),null===(o=t.subOptions)||void 0===o||o.forEach(i)};this.multivalued?null===(o=e.subOptions)||void 0===o||o.forEach(i):this.options.forEach(i),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;o.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new
|
|
1481
|
+
`}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 o;t.stopPropagation();const e=this.flatOptions.find((o=>o.value===t.detail.value));e.selected=!e.selected;const i=t=>{var o;t!==e&&(t.selected=!1),null===(o=t.subOptions)||void 0===o||o.forEach(i)};this.multivalued?null===(o=e.subOptions)||void 0===o||o.forEach(i):this.options.forEach(i),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;o.deepEqual(this.lastDispatchedValues,t)||(this.dispatchEvent(new Ai(t)),this.lastDispatchedValues=t)}updateOptionsFromSlot(t){t.stopPropagation(),this.options=this.slotElement.assignedElements().map((t=>t)),this.optionsChanged()}onFilterChange(){var t,o;this.filter=null!==(o=null===(t=this.filterInput)||void 0===t?void 0:t.value)&&void 0!==o?o:""}updateScroll(){this.valuesContainer&&(this.withScroll=this.valuesContainer.scrollHeight>this.valuesContainer.clientHeight)}}Hi.elementDefinitions={"ft-button":ri,"ft-filter-level":Li,"ft-snap-scroll":Zi,"ft-typography":yo},Hi.styles=Fi,Di([i.property({type:String})],Hi.prototype,"id",void 0),Di([i.property({type:String})],Hi.prototype,"label",void 0),Di([i.property({type:String})],Hi.prototype,"filterPlaceHolder",void 0),Di([i.property({type:String})],Hi.prototype,"clearButtonLabel",void 0),Di([i.property({type:String})],Hi.prototype,"moreValuesButtonLabel",void 0),Di([i.property({type:String})],Hi.prototype,"noValuesLabel",void 0),Di([o.jsonProperty([])],Hi.prototype,"options",void 0),Di([i.property({type:Boolean})],Hi.prototype,"multivalued",void 0),Di([i.property({type:Boolean})],Hi.prototype,"disabled",void 0),Di([i.property({type:Boolean})],Hi.prototype,"raiseSelectedOptions",void 0),Di([i.property({type:Number})],Hi.prototype,"displayedValuesLimit",void 0),Di([i.property({type:Boolean})],Hi.prototype,"hideClearButton",void 0),Di([i.query(".ft-filter--slot")],Hi.prototype,"slotElement",void 0),Di([i.query(".ft-filter--container")],Hi.prototype,"container",void 0),Di([i.query(".ft-filter--values")],Hi.prototype,"valuesContainer",void 0),Di([i.query(".ft-filter--levels")],Hi.prototype,"levelsContainer",void 0),Di([i.state()],Hi.prototype,"lastLevelHasHiddenvalues",void 0),Di([i.query(".ft-filter--filter input")],Hi.prototype,"filterInput",void 0),Di([i.queryAll(".ft-filter--levels ft-filter-level")],Hi.prototype,"levels",void 0),Di([i.state()],Hi.prototype,"withScroll",void 0),Di([i.state()],Hi.prototype,"filter",void 0),Di([i.state()],Hi.prototype,"slideIn",void 0),Di([i.state()],Hi.prototype,"slideOut",void 0);var ji=function(t,o,e,i){for(var r,n=arguments.length,a=n<3?o:null===i?i=Object.getOwnPropertyDescriptor(o,e):i,l=t.length-1;l>=0;l--)(r=t[l])&&(a=(n<3?r(a):n>3?r(o,e,a):r(o,e))||a);return n>3&&a&&Object.defineProperty(o,e,a),a};class Gi extends o.FtLitElement{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return e.html`
|
|
1481
1482
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1482
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1483
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}Gi.elementDefinitions={},ji([i.property({type:String})],Gi.prototype,"label",void 0),ji([i.property({type:Object,converter:t=>t})],Gi.prototype,"value",void 0),ji([i.property({type:Boolean,reflect:!0})],Gi.prototype,"selected",void 0),ji([i.property({type:Object})],Gi.prototype,"subOptions",void 0),ji([o.jsonProperty({})],Gi.prototype,"renderOption",void 0),ji([i.query(".ft-filter-option--slot")],Gi.prototype,"slotElement",void 0),o.customElement("ft-filter")(Hi),o.customElement("ft-filter-option")(Gi),t.FtFilter=Hi,t.FtFilterChangeEvent=Ai,t.FtFilterCssVariables=Bi,t.FtFilterLevelCssVariables=Ii,t.FtFilterOption=Gi,t.levelStyles=Ri,t.styles=Fi}({},ftGlobals.wcUtils,ftGlobals.lit,ftGlobals.litDecorators,ftGlobals.litRepeat,ftGlobals.litClassMap,ftGlobals.litUnsafeHTML);
|
package/build/ft-filter.min.js
CHANGED
|
@@ -668,7 +668,7 @@ const Ni=1,$i=2,Ci=t=>(...e)=>({_$litDirective$:t,values:e});class ki{constructo
|
|
|
668
668
|
@focusin=${this.onHover}
|
|
669
669
|
@focusout=${this.onOut}
|
|
670
670
|
@touchstart=${this.onTouch}>
|
|
671
|
-
<slot part="slot"></slot>
|
|
671
|
+
<slot part="slot" @click=${this.onClick}></slot>
|
|
672
672
|
<div part="tooltip" role="tooltip" inert
|
|
673
673
|
class="ft-tooltip ft-tooltip--${this.validPosition}"
|
|
674
674
|
?hidden=${!this.visible}>
|
|
@@ -678,13 +678,13 @@ const Ni=1,$i=2,Ci=t=>(...e)=>({_$litDirective$:t,values:e});class ki{constructo
|
|
|
678
678
|
</div>
|
|
679
679
|
</div>
|
|
680
680
|
</div>
|
|
681
|
-
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",dn(this.slottedElement,this.tooltip,{platform:{...pn,getOffsetParent:t=>pn.getOffsetParent(t,un)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=wr(t,e),c={x:o,y:i},f=await Wr(e,l),h=Rr(Nr(r)),p=Cr(h);let d=c[p],u=c[h];if(n){const t="y"===p?"bottom":"right";d=Sr(d+f["y"===p?"top":"left"],d,d-f[t])}if(a){const t="y"===h?"bottom":"right";u=Sr(u+f["y"===h?"top":"left"],u,u-f[t])}const y=s.fn({...e,[p]:d,[h]:u});return{...y,data:{x:y.x-o,y:y.y-i}}}}),Fr({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),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())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}bn.elementDefinitions={"ft-typography":wi},bn.styles=dr,gn([$()],bn.prototype,"text",void 0),gn([$({type:Boolean})],bn.prototype,"manual",void 0),gn([$({type:Boolean})],bn.prototype,"inline",void 0),gn([$({type:Number})],bn.prototype,"delay",void 0),gn([$()],bn.prototype,"position",void 0),gn([
|
|
681
|
+
`}updated(t){t.has("visible")&&this.visible&&this.resetTooltipContent(),super.updated(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(){var t;this.resetTooltipContent(),this.tooltip&&this.slottedElement&&(this.tooltip.style.left="",this.tooltip.style.top="",dn(this.slottedElement,this.tooltip,{platform:{...pn,getOffsetParent:t=>pn.getOffsetParent(t,un)},middleware:[(t={crossAxis:!0},void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:o,y:i,placement:r}=e,{mainAxis:n=!0,crossAxis:a=!1,limiter:s={fn:t=>{let{x:e,y:o}=t;return{x:e,y:o}}},...l}=wr(t,e),c={x:o,y:i},f=await Wr(e,l),h=Rr(Nr(r)),p=Cr(h);let d=c[p],u=c[h];if(n){const t="y"===p?"bottom":"right";d=Sr(d+f["y"===p?"top":"left"],d,d-f[t])}if(a){const t="y"===h?"bottom":"right";u=Sr(u+f["y"===h?"top":"left"],u,u-f[t])}const y=s.fn({...e,[p]:d,[h]:u});return{...y,data:{x:y.x-o,y:y.y-i}}}}),Fr({allowedPlacements:[this.position]})]}).then((({x:t,y:e})=>{this.tooltip&&(this.tooltip.style.left=`${t}px`,this.tooltip.style.top=`${e}px`)}))),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())}onClick(){this.manual||(this.revealDebouncer.cancel(),this.hide())}correctOutOfWindowPixels(t,e){return Math.max(t,Math.min(0,-e))}}bn.elementDefinitions={"ft-typography":wi},bn.styles=dr,gn([$()],bn.prototype,"text",void 0),gn([$({type:Boolean})],bn.prototype,"manual",void 0),gn([$({type:Boolean})],bn.prototype,"inline",void 0),gn([$({type:Number})],bn.prototype,"delay",void 0),gn([$()],bn.prototype,"position",void 0),gn([
|
|
682
682
|
/**
|
|
683
683
|
* @license
|
|
684
684
|
* Copyright 2017 Google LLC
|
|
685
685
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
686
686
|
*/
|
|
687
|
-
function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return R(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}()],bn.prototype,"slotNodes",void 0),gn([E(".ft-tooltip--container")],bn.prototype,"container",void 0),gn([E(".ft-tooltip")],bn.prototype,"tooltip",void 0),gn([E(".ft-tooltip--content")],bn.prototype,"tooltipContent",void 0),gn([C()],bn.prototype,"visible",void 0),gn([k({passive:!0})],bn.prototype,"onTouch",null),gn([k({passive:!0})],bn.prototype,"onHover",null),gn([k({passive:!0})],bn.prototype,"onOut",null),W("ft-tooltip")(bn);
|
|
687
|
+
function(t){return(e,o)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return R(0,0,{get(){const e=this.renderRoot?.querySelector(r);return e?.assignedNodes(t)??[]}})}}()],bn.prototype,"slotNodes",void 0),gn([E(".ft-tooltip--container")],bn.prototype,"container",void 0),gn([E(".ft-tooltip")],bn.prototype,"tooltip",void 0),gn([E(".ft-tooltip--content")],bn.prototype,"tooltipContent",void 0),gn([C()],bn.prototype,"visible",void 0),gn([k({passive:!0})],bn.prototype,"onTouch",null),gn([k({passive:!0})],bn.prototype,"onHover",null),gn([k({passive:!0})],bn.prototype,"onOut",null),gn([k({passive:!0})],bn.prototype,"onClick",null),W("ft-tooltip")(bn);
|
|
688
688
|
/**
|
|
689
689
|
* @license
|
|
690
690
|
* Copyright 2017 Google LLC
|
|
@@ -943,7 +943,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
943
943
|
width: ${Ie.smallIconOnlyWidth};
|
|
944
944
|
padding: unset;
|
|
945
945
|
}
|
|
946
|
-
`,He];var In=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ln extends kn{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?co.caption1medium:co.body2medium}}Ln.styles=[je,Un],In([$({type:Boolean})],Ln.prototype,"primary",void 0),In([$({type:Boolean})],Ln.prototype,"secondary",void 0),In([$({type:Boolean})],Ln.prototype,"tertiary",void 0),In([$({type:Boolean})],Ln.prototype,"neutral",void 0),In([$({type:Boolean})],Ln.prototype,"small",void 0),W("ft-button")(En),W("ftds-button")(Ln);const Wn=Ce.extend("--ft-checkbox-text-color","",Le.colorOnSurfaceHigh),zn=Ce.external(Le.colorPrimary,"Design system"),
|
|
946
|
+
`,He];var In=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Ln extends kn{constructor(){super(...arguments),this.primary=!1,this.secondary=!1,this.tertiary=!1,this.neutral=!1,this.small=!1}get buttonClasses(){return{"ft-button":!0,"ft-button--primary":this.primary,"ft-button--secondary":this.secondary,"ft-button--tertiary":this.tertiary||!this.primary&&!this.secondary&&!this.neutral,"ft-button--neutral":this.neutral,"ft-button--large":!this.small,"ft-button--small":this.small,"ft-button--icon-only":!this.hasTextContent(),"ft-button--trailing-icon":this.trailingIcon,"ft-button--loading":this.trailingIcon,"ft-no-text-select":!0,"ft-button--no-icon":!this.icon}}get typographyVariant(){return this.small?co.caption1medium:co.body2medium}}Ln.styles=[je,Un],In([$({type:Boolean})],Ln.prototype,"primary",void 0),In([$({type:Boolean})],Ln.prototype,"secondary",void 0),In([$({type:Boolean})],Ln.prototype,"tertiary",void 0),In([$({type:Boolean})],Ln.prototype,"neutral",void 0),In([$({type:Boolean})],Ln.prototype,"small",void 0),W("ft-button")(En),W("ftds-button")(Ln);const Wn=Ce.extend("--ft-checkbox-text-color","",Le.colorOnSurfaceHigh),zn=Ce.extend("--ft-checkbox-font-size","",po.fontSize),Fn=Ce.external(Le.colorPrimary,"Design system"),Kn=Ce.external(Le.colorOnPrimary,"Design system"),Bn=Ce.extend("--ft-checkbox-border-color","",Le.colorOnSurfaceMedium),Zn=Ce.external(Le.colorOnSurfaceDisabled,"Design system"),Dn=$t`
|
|
947
947
|
* {
|
|
948
948
|
box-sizing: border-box;
|
|
949
949
|
}
|
|
@@ -951,6 +951,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
951
951
|
.ft-checkbox {
|
|
952
952
|
box-sizing: border-box;
|
|
953
953
|
color: ${Wn};
|
|
954
|
+
font-size: ${zn};
|
|
954
955
|
|
|
955
956
|
display: inline-flex;
|
|
956
957
|
align-items: center;
|
|
@@ -958,7 +959,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
958
959
|
}
|
|
959
960
|
|
|
960
961
|
.ft-checkbox--disabled {
|
|
961
|
-
color: ${
|
|
962
|
+
color: ${Zn};
|
|
962
963
|
}
|
|
963
964
|
|
|
964
965
|
input {
|
|
@@ -982,26 +983,26 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
982
983
|
|
|
983
984
|
.ft-checkbox--box {
|
|
984
985
|
display: flex;
|
|
985
|
-
border: 2px solid ${
|
|
986
|
+
border: 2px solid ${Bn};
|
|
986
987
|
border-radius: 2px;
|
|
987
988
|
|
|
988
989
|
width: 18px;
|
|
989
990
|
height: 18px;
|
|
990
991
|
|
|
991
|
-
color: ${
|
|
992
|
+
color: ${Kn};
|
|
992
993
|
}
|
|
993
994
|
|
|
994
995
|
|
|
995
996
|
.ft-checkbox--checked .ft-checkbox--box,
|
|
996
997
|
.ft-checkbox--indeterminate .ft-checkbox--box {
|
|
997
|
-
border-color: ${
|
|
998
|
-
background-color: ${
|
|
998
|
+
border-color: ${Fn};
|
|
999
|
+
background-color: ${Fn};
|
|
999
1000
|
}
|
|
1000
1001
|
|
|
1001
1002
|
.ft-checkbox--disabled .ft-checkbox--box {
|
|
1002
|
-
border-color: ${
|
|
1003
|
+
border-color: ${Zn};
|
|
1003
1004
|
background-color: transparent;
|
|
1004
|
-
color: ${
|
|
1005
|
+
color: ${Zn};
|
|
1005
1006
|
}
|
|
1006
1007
|
|
|
1007
1008
|
.ft-checkbox--checkmark {
|
|
@@ -1020,7 +1021,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1020
1021
|
.ft-checkbox--indeterminate .ft-checkbox--checkmark {
|
|
1021
1022
|
opacity: 1;
|
|
1022
1023
|
}
|
|
1023
|
-
`;var
|
|
1024
|
+
`;var An=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Mn extends Me{constructor(){super(...arguments),this.name="",this.checked=!1,this.indeterminate=!1,this.disabled=!1}render(){const t={"ft-checkbox":!0,"ft-checkbox--checked":this.checked,"ft-checkbox--indeterminate":this.indeterminate,"ft-checkbox--disabled":this.disabled};return se`
|
|
1024
1025
|
<label class="${rr(t)}" for="checkbox-input">
|
|
1025
1026
|
<div class="ft-checkbox--box-container">
|
|
1026
1027
|
<ft-ripple
|
|
@@ -1046,14 +1047,14 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1046
1047
|
<slot></slot>
|
|
1047
1048
|
</ft-typography>
|
|
1048
1049
|
</label>
|
|
1049
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}
|
|
1050
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.indeterminate=!1,this.dispatchEvent(new CustomEvent("change",{detail:this.checked}))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}}Mn.elementDefinitions={"ft-ripple":ar,"ft-typography":wi},Mn.styles=Dn,An([$()],Mn.prototype,"name",void 0),An([$({type:Boolean,reflect:!0})],Mn.prototype,"checked",void 0),An([$({type:Boolean})],Mn.prototype,"indeterminate",void 0),An([$({type:Boolean})],Mn.prototype,"disabled",void 0),An([E(".ft-checkbox")],Mn.prototype,"container",void 0),An([E("ft-ripple")],Mn.prototype,"ripple",void 0),W("ft-checkbox")(Mn);const Pn=Ce.extend("--ft-radio-text-color","",Le.colorOnSurfaceHigh),Hn=Ce.external(Le.colorPrimary,"Design system"),jn=(Ce.external(Le.colorOnPrimary,"Design system"),Ce.extend("--ft-radio-border-color","",Le.colorOnSurfaceMedium)),Tn=Ce.external(Le.colorOnSurfaceDisabled,"Design system"),_n=$t`
|
|
1050
1051
|
* {
|
|
1051
1052
|
box-sizing: border-box;
|
|
1052
1053
|
}
|
|
1053
1054
|
|
|
1054
1055
|
.ft-radio {
|
|
1055
1056
|
box-sizing: border-box;
|
|
1056
|
-
color: ${
|
|
1057
|
+
color: ${Pn};
|
|
1057
1058
|
|
|
1058
1059
|
display: inline-flex;
|
|
1059
1060
|
align-items: center;
|
|
@@ -1061,7 +1062,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1061
1062
|
}
|
|
1062
1063
|
|
|
1063
1064
|
.ft-radio--disabled {
|
|
1064
|
-
color: ${
|
|
1065
|
+
color: ${Tn};
|
|
1065
1066
|
}
|
|
1066
1067
|
|
|
1067
1068
|
input {
|
|
@@ -1084,7 +1085,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1084
1085
|
}
|
|
1085
1086
|
|
|
1086
1087
|
.ft-radio--box {
|
|
1087
|
-
border: 2px solid ${
|
|
1088
|
+
border: 2px solid ${jn};
|
|
1088
1089
|
border-radius: 50%;
|
|
1089
1090
|
|
|
1090
1091
|
display: flex;
|
|
@@ -1097,7 +1098,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1097
1098
|
|
|
1098
1099
|
.ft-radio--box:after {
|
|
1099
1100
|
content: " ";
|
|
1100
|
-
background-color: ${
|
|
1101
|
+
background-color: ${Hn};
|
|
1101
1102
|
|
|
1102
1103
|
border-radius: 50%;
|
|
1103
1104
|
|
|
@@ -1109,7 +1110,7 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1109
1110
|
}
|
|
1110
1111
|
|
|
1111
1112
|
.ft-radio--checked .ft-radio--box {
|
|
1112
|
-
border-color: ${
|
|
1113
|
+
border-color: ${Hn};
|
|
1113
1114
|
}
|
|
1114
1115
|
|
|
1115
1116
|
|
|
@@ -1118,14 +1119,14 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1118
1119
|
}
|
|
1119
1120
|
|
|
1120
1121
|
.ft-radio--disabled .ft-radio--box {
|
|
1121
|
-
border-color: ${
|
|
1122
|
+
border-color: ${Tn};
|
|
1122
1123
|
background-color: transparent;
|
|
1123
1124
|
}
|
|
1124
1125
|
|
|
1125
1126
|
.ft-radio--disabled .ft-radio--box:after {
|
|
1126
|
-
background-color: ${
|
|
1127
|
+
background-color: ${Tn};
|
|
1127
1128
|
}
|
|
1128
|
-
`;var
|
|
1129
|
+
`;var Gn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Vn extends CustomEvent{constructor(t,e){super("change",{detail:{value:t,checked:e},bubbles:!0,composed:!0})}}class Yn extends Me{constructor(){super(...arguments),this.value="",this.name="",this.checked=!1,this.disabled=!1}render(){const t={"ft-radio":!0,"ft-radio--checked":this.checked,"ft-radio--disabled":this.disabled};return se`
|
|
1129
1130
|
<div class="${rr(t)}">
|
|
1130
1131
|
<div class="ft-radio--box-container">
|
|
1131
1132
|
<ft-ripple
|
|
@@ -1150,22 +1151,22 @@ class mn extends ki{constructor(t){if(super(t),this.et=it,t.type!==$i)throw Erro
|
|
|
1150
1151
|
</ft-typography>
|
|
1151
1152
|
</label>
|
|
1152
1153
|
</div>
|
|
1153
|
-
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new
|
|
1154
|
+
`}onChange(t){t.stopPropagation(),this.checked=t.target.checked,this.dispatchEvent(new Vn(this.value,this.checked))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),null===(e=this.ripple)||void 0===e||e.setupFor(this.container)}select(){this.checked=!0,this.dispatchEvent(new Vn(this.value,this.checked)),this.focus()}focus(){var t;null===(t=this.input)||void 0===t||t.focus()}}Yn.elementDefinitions={"ft-ripple":ar,"ft-typography":wi},Yn.styles=_n,Gn([$()],Yn.prototype,"value",void 0),Gn([$()],Yn.prototype,"name",void 0),Gn([$({type:Boolean,reflect:!0})],Yn.prototype,"checked",void 0),Gn([$({type:Boolean})],Yn.prototype,"disabled",void 0),Gn([E(".ft-radio")],Yn.prototype,"container",void 0),Gn([E("ft-ripple")],Yn.prototype,"ripple",void 0),Gn([E("input")],Yn.prototype,"input",void 0);const Jn=$t`
|
|
1154
1155
|
:host {
|
|
1155
1156
|
display: contents;
|
|
1156
1157
|
}
|
|
1157
|
-
`;var
|
|
1158
|
+
`;var qn=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class Xn extends Me{constructor(){super(...arguments),this.name=""}render(){return se`
|
|
1158
1159
|
<slot @slotchange=${this.onSlotChange}
|
|
1159
1160
|
@change=${this.onChange}
|
|
1160
1161
|
@keydown=${this.onKeyDown}
|
|
1161
1162
|
></slot>
|
|
1162
|
-
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),o=this.radioButtons.indexOf(e)-1;this.radioButtons[o<0?this.radioButtons.length-1:o].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].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)}}
|
|
1163
|
+
`}onSlotChange(){this.radioButtons.forEach((t=>t.name=this.name))}onChange(t){t.stopPropagation(),this.radioButtons.forEach((e=>e.checked=t.detail.value===e.value)),this.dispatchEvent(new CustomEvent("change",{detail:t.detail.value})),this.focusCurrentValue()}onKeyDown(t){switch(t.key){case"ArrowUp":case"ArrowLeft":{let e=this.findFtRadio(t),o=this.radioButtons.indexOf(e)-1;this.radioButtons[o<0?this.radioButtons.length-1:o].select();break}case"ArrowDown":case"ArrowRight":{let e=this.radioButtons.indexOf(this.findFtRadio(t))+1;this.radioButtons[e>this.radioButtons.length-1?0:e].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)}}Xn.elementDefinitions={},Xn.styles=Jn,qn([$()],Xn.prototype,"name",void 0),qn([
|
|
1163
1164
|
/**
|
|
1164
1165
|
* @license
|
|
1165
1166
|
* Copyright 2021 Google LLC
|
|
1166
1167
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1167
1168
|
*/
|
|
1168
|
-
function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return R(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}()],
|
|
1169
|
+
function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return R(0,0,{get(){const e=this.renderRoot?.querySelector(n),o=e?.assignedElements(t)??[];return void 0===r?o:o.filter((t=>t.matches(r)))}})}}()],Xn.prototype,"radioButtons",void 0),W("ft-radio")(Yn),W("ft-radio-group")(Xn);const Qn={borderRadiusM:Ce.external(Le.borderRadiusM,"Design system"),colorOutline:Ce.external(Le.colorOutline,"Design system"),colorOnSurface:Ce.external(Le.colorOnSurface,"Design system"),colorOnSurfaceMedium:Ce.external(Le.colorOnSurfaceMedium,"Design system"),colorOnSurfaceDisabled:Ce.external(Le.colorOnSurfaceDisabled,"Design system"),colorPrimary:Ce.external(Le.colorPrimary,"Design system"),colorOnPrimary:Ce.external(Le.colorOnPrimary,"Design system"),fontFamily:Ce.external(jo.fontFamily,"Body2 typography"),fontSize:Ce.external(jo.fontSize,"Body2 typography"),fontWeight:Ce.external(jo.fontWeight,"Body2 typography"),letterSpacing:Ce.external(jo.letterSpacing,"Body2 typography"),lineHeight:Ce.external(jo.lineHeight,"Body2 typography"),textTransform:Ce.external(jo.textTransform,"Body2 typography")},ta=$t`
|
|
1169
1170
|
.ft-filter-level--container {
|
|
1170
1171
|
display: flex;
|
|
1171
1172
|
flex-direction: column;
|
|
@@ -1179,14 +1180,14 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1179
1180
|
flex-shrink: 0;
|
|
1180
1181
|
text-decoration: none;
|
|
1181
1182
|
position: relative;
|
|
1182
|
-
border-radius: ${
|
|
1183
|
+
border-radius: ${Qn.borderRadiusM};
|
|
1183
1184
|
overflow: hidden;
|
|
1184
1185
|
display: flex;
|
|
1185
1186
|
align-items: center;
|
|
1186
1187
|
padding: 4px 4px;
|
|
1187
1188
|
gap: 4px;
|
|
1188
1189
|
cursor: pointer;
|
|
1189
|
-
color: ${
|
|
1190
|
+
color: ${Qn.colorOnSurface};
|
|
1190
1191
|
}
|
|
1191
1192
|
|
|
1192
1193
|
.ft-filter-level--go-back:focus {
|
|
@@ -1215,7 +1216,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1215
1216
|
}
|
|
1216
1217
|
|
|
1217
1218
|
ft-button {
|
|
1218
|
-
${ke(Ji.color,
|
|
1219
|
+
${ke(Ji.color,Qn.colorOnSurface)};
|
|
1219
1220
|
}
|
|
1220
1221
|
|
|
1221
1222
|
ft-radio, ft-checkbox {
|
|
@@ -1229,9 +1230,9 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1229
1230
|
|
|
1230
1231
|
.ft-filter-level--no-values {
|
|
1231
1232
|
margin: 10px 0;
|
|
1232
|
-
color: ${
|
|
1233
|
+
color: ${Qn.colorOnSurfaceMedium};
|
|
1233
1234
|
}
|
|
1234
|
-
`;var
|
|
1235
|
+
`;var ea=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class oa extends Me{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,e;return null!==(e=null===(t=this.container)||void 0===t?void 0:t.scrollHeight)&&void 0!==e?e: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 e=t.slice(0,this.limit);return se`
|
|
1235
1236
|
<div class="ft-filter-level--container ${this.disabled?"ft-filter--disabled":""}">
|
|
1236
1237
|
${null==this.parent?null:se`
|
|
1237
1238
|
<div tabindex="0"
|
|
@@ -1295,7 +1296,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1295
1296
|
@change=${t=>t.stopPropagation()}>
|
|
1296
1297
|
${t.renderOption?t.renderOption:t.label}
|
|
1297
1298
|
</ft-radio>
|
|
1298
|
-
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}
|
|
1299
|
+
`}onRadioKeyUp(t,e){e.selected&&" "===t.key&&this.optionsChanged(t,e)}optionsChanged(t,e){t.stopPropagation(),this.dispatchEvent(new CustomEvent("change",{detail:e}))}displayLevel(t){this.dispatchEvent(new CustomEvent("display-level",{detail:t}))}}oa.elementDefinitions={"ft-button":En,"ft-ripple":ar,"ft-typography":wi,"ft-checkbox":Mn,"ft-icon":Nn,"ft-radio":Yn},oa.styles=ta,ea([$({type:String})],oa.prototype,"filterId",void 0),ea([$({type:Object})],oa.prototype,"parent",void 0),ea([$({type:Array})],oa.prototype,"options",void 0),ea([$({type:Boolean})],oa.prototype,"multivalued",void 0),ea([$({type:Boolean})],oa.prototype,"disabled",void 0),ea([$({type:Boolean})],oa.prototype,"hideSelectedOptions",void 0),ea([$({type:Boolean})],oa.prototype,"preventNavigation",void 0),ea([$({type:String})],oa.prototype,"filter",void 0),ea([$({type:String})],oa.prototype,"moreValuesButtonLabel",void 0),ea([$({type:String})],oa.prototype,"noValuesLabel",void 0),ea([$({type:Number})],oa.prototype,"displayedValuesLimit",void 0),ea([E(".ft-filter-level--container")],oa.prototype,"container",void 0),ea([C()],oa.prototype,"displayedPages",void 0);const ia={buttonsColor:Ce.extend("--ft-snap-scroll-buttons-color","",Le.colorPrimary),buttonsZIndex:Ce.create("--ft-snap-scroll-buttons-z-index","","COLOR","1"),gap:Ce.create("--ft-snap-scroll-gap","","SIZE","0"),colorSurface:Ce.external(Le.colorSurface,"Design system")},ra=$t`
|
|
1299
1300
|
.ft-snap-scroll {
|
|
1300
1301
|
box-sizing: border-box;
|
|
1301
1302
|
position: relative;
|
|
@@ -1330,7 +1331,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1330
1331
|
flex-wrap: nowrap;
|
|
1331
1332
|
align-items: flex-start;
|
|
1332
1333
|
justify-content: flex-start;
|
|
1333
|
-
gap: ${
|
|
1334
|
+
gap: ${ia.gap};
|
|
1334
1335
|
}
|
|
1335
1336
|
|
|
1336
1337
|
.ft-snap-scroll--hide-scrollbar .ft-snap-scroll--content::-webkit-scrollbar {
|
|
@@ -1373,11 +1374,11 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1373
1374
|
.ft-snap-scroll--next {
|
|
1374
1375
|
position: absolute;
|
|
1375
1376
|
display: flex;
|
|
1376
|
-
z-index: ${
|
|
1377
|
+
z-index: ${ia.buttonsZIndex};
|
|
1377
1378
|
opacity: 1;
|
|
1378
1379
|
transition: background-color .5s ease-in-out, opacity .5s ease-in-out, z-index .5s ease-in-out;
|
|
1379
1380
|
${ke(Ji.backgroundColor,"transparent")};
|
|
1380
|
-
${ke(Ji.color,
|
|
1381
|
+
${ke(Ji.color,ia.buttonsColor)};
|
|
1381
1382
|
}
|
|
1382
1383
|
|
|
1383
1384
|
.ft-snap-scroll--previous[hidden],
|
|
@@ -1390,37 +1391,37 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1390
1391
|
top: 0;
|
|
1391
1392
|
left: -1px;
|
|
1392
1393
|
bottom: 0;
|
|
1393
|
-
background: linear-gradient(to right, ${
|
|
1394
|
+
background: linear-gradient(to right, ${ia.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1394
1395
|
}
|
|
1395
1396
|
|
|
1396
1397
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous {
|
|
1397
1398
|
top: -1px;
|
|
1398
1399
|
left: 0;
|
|
1399
1400
|
right: 0;
|
|
1400
|
-
background: linear-gradient(to bottom, ${
|
|
1401
|
+
background: linear-gradient(to bottom, ${ia.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1401
1402
|
}
|
|
1402
1403
|
|
|
1403
1404
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next {
|
|
1404
1405
|
top: 0;
|
|
1405
1406
|
right: -1px;
|
|
1406
1407
|
bottom: 0;
|
|
1407
|
-
background: linear-gradient(to left, ${
|
|
1408
|
+
background: linear-gradient(to left, ${ia.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1408
1409
|
}
|
|
1409
1410
|
|
|
1410
1411
|
.ft-snap-scroll--vertical .ft-snap-scroll--next {
|
|
1411
1412
|
left: 0;
|
|
1412
1413
|
right: 0;
|
|
1413
1414
|
bottom: -1px;
|
|
1414
|
-
background: linear-gradient(to top, ${
|
|
1415
|
+
background: linear-gradient(to top, ${ia.colorSurface} 50%, var(--ft-snap-scroll-transparent-color));
|
|
1415
1416
|
}
|
|
1416
1417
|
|
|
1417
1418
|
.ft-snap-scroll--horizontal .ft-snap-scroll--previous:hover,
|
|
1418
1419
|
.ft-snap-scroll--horizontal .ft-snap-scroll--next:hover,
|
|
1419
1420
|
.ft-snap-scroll--vertical .ft-snap-scroll--previous:hover,
|
|
1420
1421
|
.ft-snap-scroll--vertical .ft-snap-scroll--next:hover {
|
|
1421
|
-
background-color: ${
|
|
1422
|
+
background-color: ${ia.colorSurface};
|
|
1422
1423
|
}
|
|
1423
|
-
`;var
|
|
1424
|
+
`;var na=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class aa extends CustomEvent{constructor(t,e){super("current-element-change",{detail:{index:t,element:e}})}}class sa extends Me{constructor(){super(...arguments),this.horizontal=!1,this.hideScrollbar=!1,this.controls=!1,this.limitSize=!1,this.elements=[],this.currentElement=0,this.withScroll=!1,this.startReached=!0,this.endReached=!0,this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight",this.updateScrollCallback=()=>this.onScroll(),this.resizeObserver=new ResizeObserver((()=>this.scheduleUpdateScroll())),this.scrollDebouncer=new e(200),this.updateScrollDebouncer=new e(100)}scrollToIndex(t){this.scrollToElement(this.elements[t])}scrollIndexIntoView(t){let e=this.elements[t];if(e){const t=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.nextSize,o=this.contentSlot[this.scrollAttribute]+this.prevSize;(e[this.offsetAttribute]<o||e[this.offsetAttribute]+e[this.sizeAttribute]>t)&&this.scrollToElement(e)}}previous(){this.scrollToElement(this.elements[Math.max(0,this.closestIndexFromStart()-1)])}next(){this.scrollToElement(this.elements[Math.min(this.closestIndexFromStart()+1,this.elements.length-1)])}render(){const t=rr({"ft-snap-scroll":!0,"ft-snap-scroll--horizontal":this.horizontal,"ft-snap-scroll--vertical":!this.horizontal,"ft-snap-scroll--hide-scrollbar":this.hideScrollbar,"ft-snap-scroll--limit-size":this.limitSize,"ft-snap-scroll--safari-fix":io}),e=this.controls&&this.withScroll;return se`
|
|
1424
1425
|
<div part="container" class="${t}">
|
|
1425
1426
|
<ft-button
|
|
1426
1427
|
class="ft-snap-scroll--previous"
|
|
@@ -1444,7 +1445,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1444
1445
|
@click=${this.next}
|
|
1445
1446
|
></ft-button>
|
|
1446
1447
|
</div>
|
|
1447
|
-
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new
|
|
1448
|
+
`}update(t){super.update(t),t.has("horizontal")&&(this.horizontal?(this.offsetAttribute="offsetLeft",this.scrollAttribute="scrollLeft",this.sizeAttribute="clientWidth",this.scrollSizeAttribute="scrollWidth"):(this.offsetAttribute="offsetTop",this.scrollAttribute="scrollTop",this.sizeAttribute="clientHeight",this.scrollSizeAttribute="scrollHeight")),t.has("currentElement")&&this.dispatchEvent(new aa(this.currentElement,this.elements[this.currentElement]))}contentAvailableCallback(t){var e;super.contentAvailableCallback(t),this.contentSlot&&this.listenedContainer!==this.contentSlot&&(this.resizeObserver.observe(this.contentSlot),this.listenedContainer&&this.listenedContainer.removeEventListener("scroll",this.updateScrollCallback),this.listenedContainer=this.contentSlot,null===(e=this.listenedContainer)||void 0===e||e.addEventListener("scroll",this.updateScrollCallback))}onScroll(){this.scrollDebouncer.run((()=>this.snap())),this.scheduleUpdateScroll()}snap(){let t=this.closestElementFromStart();if(null!=t){const e=this.getDistanceFromStart(t);Math.abs(this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]-this.contentSlot[this.scrollSizeAttribute])<e&&(t=this.lastElement),this.scrollToElement(t)}}scrollToElement(t){var e,o;t&&(this.horizontal?null===(e=this.contentSlot)||void 0===e||e.scrollTo({left:this.getOffset(t)-this.controlsSize,behavior:"smooth"}):null===(o=this.contentSlot)||void 0===o||o.scrollTo({top:this.getOffset(t)-this.controlsSize,behavior:"smooth"}),this.currentElement=this.elements.indexOf(t))}onSlotChange(){var t,e;this.elements=null!==(e=null===(t=this.contentSlot)||void 0===t?void 0:t.assignedElements().map((t=>t)))&&void 0!==e?e:[],this.scheduleUpdateScroll()}closestElementFromStart(){return this.elements[this.closestIndexFromStart()]}closestIndexFromStart(){let t=-1;for(let e=0;e<this.elements.length;e++)(t<0||this.getDistanceFromStart(this.elements[e])<this.getDistanceFromStart(this.elements[t]))&&(t=e);return t}scheduleUpdateScroll(){this.updateScrollDebouncer.run((()=>this.updateScroll()))}updateScroll(){null!=this.contentSlot?(this.withScroll=this.contentSlot[this.scrollSizeAttribute]>this.contentSlot[this.sizeAttribute],this.startReached=0===this.contentSlot[this.scrollAttribute],this.endReached=this.contentSlot[this.scrollAttribute]+this.contentSlot[this.sizeAttribute]+1>=this.contentSlot[this.scrollSizeAttribute]):(this.withScroll=!1,this.startReached=!0,this.endReached=!0)}get lastElement(){return this.elements[this.elements.length-1]}get firstElementOffset(){let t=this.elements[0];return t?t[this.offsetAttribute]:0}get controlsSize(){return this.controls?36:0}get nextSize(){return this.endReached?0:this.controlsSize}get prevSize(){return this.startReached?0:this.controlsSize}getOffset(t){return t[this.offsetAttribute]-this.firstElementOffset}getDistanceFromStart(t){const e=t===this.elements[0]?0:this.controlsSize;return Math.abs(this.getOffset(t)-this.contentSlot[this.scrollAttribute]-e)}}sa.elementDefinitions={"ft-button":En},sa.styles=ra,na([$({type:Boolean})],sa.prototype,"horizontal",void 0),na([$({type:Boolean})],sa.prototype,"hideScrollbar",void 0),na([$({type:Boolean})],sa.prototype,"controls",void 0),na([$({type:Boolean})],sa.prototype,"limitSize",void 0),na([C()],sa.prototype,"elements",void 0),na([C()],sa.prototype,"currentElement",void 0),na([C()],sa.prototype,"withScroll",void 0),na([C()],sa.prototype,"startReached",void 0),na([C()],sa.prototype,"endReached",void 0),na([E(".ft-snap-scroll--content")],sa.prototype,"contentSlot",void 0),W("ft-snap-scroll")(sa);const la={colorOutline:Ce.external(Le.colorOutline,"Design system"),colorOnSurface:Ce.external(Le.colorOnSurface,"Design system"),colorOnSurfaceMedium:Ce.external(Le.colorOnSurfaceMedium,"Design system"),colorPrimary:Ce.external(Le.colorPrimary,"Design system"),colorSurface:Ce.external(Le.colorSurface,"Design system"),transitionDuration:Ce.external(Le.transitionDuration,"Design system"),transitionTimingFunction:Ce.external(Le.transitionTimingFunction,"Design system"),labelColor:Ce.extend("--ft-filter-label-color","",Le.colorOnSurface),labelFontSize:Ce.extend("--ft-filter-label-font-size","",po.fontSize,"14px")},ca=[gi,$t`
|
|
1448
1449
|
:host {
|
|
1449
1450
|
display: flex;
|
|
1450
1451
|
max-height: 100%;
|
|
@@ -1457,7 +1458,6 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1457
1458
|
flex-direction: column;
|
|
1458
1459
|
max-height: 100%;
|
|
1459
1460
|
max-width: 100%;
|
|
1460
|
-
color: ${sa.colorOnSurface};
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
1463
|
.ft-filter--header {
|
|
@@ -1467,7 +1467,6 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1467
1467
|
flex-shrink: 0;
|
|
1468
1468
|
padding: 0 10px;
|
|
1469
1469
|
margin-bottom: 8px;
|
|
1470
|
-
${ke(po.fontSize,"14px")};
|
|
1471
1470
|
}
|
|
1472
1471
|
|
|
1473
1472
|
.ft-filter--header ft-button {
|
|
@@ -1481,6 +1480,8 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1481
1480
|
flex-shrink: 1;
|
|
1482
1481
|
flex-grow: 1;
|
|
1483
1482
|
word-break: break-word;
|
|
1483
|
+
color: ${la.labelColor};
|
|
1484
|
+
font-size: ${la.labelFontSize};
|
|
1484
1485
|
${ke(po.lineHeight,"22px")};
|
|
1485
1486
|
${ke(po.fontWeight,"bold")};
|
|
1486
1487
|
}
|
|
@@ -1493,8 +1494,8 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1493
1494
|
padding: 0 10px;
|
|
1494
1495
|
overflow: hidden;
|
|
1495
1496
|
height: 32px;
|
|
1496
|
-
transition: height ${
|
|
1497
|
-
margin ${
|
|
1497
|
+
transition: height ${la.transitionDuration} ${la.transitionTimingFunction},
|
|
1498
|
+
margin ${la.transitionDuration} ${la.transitionTimingFunction};
|
|
1498
1499
|
transition-delay: 500ms;
|
|
1499
1500
|
}
|
|
1500
1501
|
|
|
@@ -1507,15 +1508,15 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1507
1508
|
display: block;
|
|
1508
1509
|
width: 100%;
|
|
1509
1510
|
border-radius: 4px;
|
|
1510
|
-
border: 1px solid ${
|
|
1511
|
+
border: 1px solid ${la.colorOutline};
|
|
1511
1512
|
padding: 4px;
|
|
1512
|
-
background-color: ${
|
|
1513
|
-
color: ${
|
|
1514
|
-
outline-color: ${
|
|
1513
|
+
background-color: ${la.colorSurface};
|
|
1514
|
+
color: ${la.colorOnSurface};
|
|
1515
|
+
outline-color: ${la.colorPrimary};
|
|
1515
1516
|
}
|
|
1516
1517
|
|
|
1517
1518
|
input::placeholder {
|
|
1518
|
-
color: ${
|
|
1519
|
+
color: ${la.colorOnSurfaceMedium};
|
|
1519
1520
|
}
|
|
1520
1521
|
|
|
1521
1522
|
input:placeholder-shown {
|
|
@@ -1531,7 +1532,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1531
1532
|
}
|
|
1532
1533
|
|
|
1533
1534
|
.ft-filter--separator {
|
|
1534
|
-
border-top: 1px solid ${
|
|
1535
|
+
border-top: 1px solid ${la.colorOutline};
|
|
1535
1536
|
margin: 4px 10px;
|
|
1536
1537
|
}
|
|
1537
1538
|
|
|
@@ -1556,7 +1557,7 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1556
1557
|
slot:not([name]) {
|
|
1557
1558
|
display: none;
|
|
1558
1559
|
}
|
|
1559
|
-
`];var
|
|
1560
|
+
`];var fa=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ha extends CustomEvent{constructor(t){super("change",{detail:t})}}class pa extends Me{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 e(300),this.changeDebouncer=new e(10),this.lastDispatchedValues=[]}get flatOptions(){return I(this.options,(t=>{var e;return null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get childrenFilteredFlatOptions(){return I(this.options,(t=>{var e;return t.selected?[]:null!==(e=t.subOptions)&&void 0!==e?e:[]}))}get selectedValues(){return this.childrenFilteredFlatOptions.filter((t=>t.selected)).map((t=>t.value))}render(){const t=this.flatOptions.some((t=>t.selected)),e=this.withScroll||this.filter||this.lastLevelHasHiddenvalues,o=this.filterPlaceHolder.replace("{0}",this.label);return se`
|
|
1560
1561
|
<div class="ft-filter--container ${this.disabled?"ft-filter--disabled":""}"
|
|
1561
1562
|
part="container">
|
|
1562
1563
|
${this.label||t?se`
|
|
@@ -1628,6 +1629,6 @@ function(t){return(e,o)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}
|
|
|
1628
1629
|
.exportpartsPrefixes=${["values","available-values"]}
|
|
1629
1630
|
noValuesLabel="${this.noValuesLabel}"
|
|
1630
1631
|
></ft-filter-level>
|
|
1631
|
-
`}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 o=this.flatOptions.find((e=>e.value===t.detail.value));o.selected=!o.selected;const i=t=>{var e;t!==o&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(i)};this.multivalued?null===(e=o.subOptions)||void 0===e||e.forEach(i):this.options.forEach(i),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;L(this.lastDispatchedValues,t)||(this.dispatchEvent(new
|
|
1632
|
+
`}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 o=this.flatOptions.find((e=>e.value===t.detail.value));o.selected=!o.selected;const i=t=>{var e;t!==o&&(t.selected=!1),null===(e=t.subOptions)||void 0===e||e.forEach(i)};this.multivalued?null===(e=o.subOptions)||void 0===e||e.forEach(i):this.options.forEach(i),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;L(this.lastDispatchedValues,t)||(this.dispatchEvent(new ha(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)}}pa.elementDefinitions={"ft-button":En,"ft-filter-level":oa,"ft-snap-scroll":sa,"ft-typography":wi},pa.styles=ca,fa([$({type:String})],pa.prototype,"id",void 0),fa([$({type:String})],pa.prototype,"label",void 0),fa([$({type:String})],pa.prototype,"filterPlaceHolder",void 0),fa([$({type:String})],pa.prototype,"clearButtonLabel",void 0),fa([$({type:String})],pa.prototype,"moreValuesButtonLabel",void 0),fa([$({type:String})],pa.prototype,"noValuesLabel",void 0),fa([z([])],pa.prototype,"options",void 0),fa([$({type:Boolean})],pa.prototype,"multivalued",void 0),fa([$({type:Boolean})],pa.prototype,"disabled",void 0),fa([$({type:Boolean})],pa.prototype,"raiseSelectedOptions",void 0),fa([$({type:Number})],pa.prototype,"displayedValuesLimit",void 0),fa([$({type:Boolean})],pa.prototype,"hideClearButton",void 0),fa([E(".ft-filter--slot")],pa.prototype,"slotElement",void 0),fa([E(".ft-filter--container")],pa.prototype,"container",void 0),fa([E(".ft-filter--values")],pa.prototype,"valuesContainer",void 0),fa([E(".ft-filter--levels")],pa.prototype,"levelsContainer",void 0),fa([C()],pa.prototype,"lastLevelHasHiddenvalues",void 0),fa([E(".ft-filter--filter input")],pa.prototype,"filterInput",void 0),fa([function(t){return(e,o)=>R(0,0,{get(){return(this.renderRoot??(U??=document.createDocumentFragment())).querySelectorAll(t)}})}(".ft-filter--levels ft-filter-level")],pa.prototype,"levels",void 0),fa([C()],pa.prototype,"withScroll",void 0),fa([C()],pa.prototype,"filter",void 0),fa([C()],pa.prototype,"slideIn",void 0),fa([C()],pa.prototype,"slideOut",void 0);var da=function(t,e,o,i){for(var r,n=arguments.length,a=n<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,o):i,s=t.length-1;s>=0;s--)(r=t[s])&&(a=(n<3?r(a):n>3?r(e,o,a):r(e,o))||a);return n>3&&a&&Object.defineProperty(e,o,a),a};class ua extends Me{constructor(){super(...arguments),this.label="",this.value=null,this.selected=!1,this.subOptions=[]}render(){return se`
|
|
1632
1633
|
<slot class="ft-filter-option--slot" @slotchange=${this.updateSubOptionsFromSlot}></slot>
|
|
1633
|
-
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}
|
|
1634
|
+
`}updateSubOptionsFromSlot(t){t.stopPropagation(),this.subOptions=this.slotElement.assignedElements().map((t=>t))}update(t){super.update(t),this.dispatchEvent(new CustomEvent("option-change",{detail:this,bubbles:!0}))}}ua.elementDefinitions={},da([$({type:String})],ua.prototype,"label",void 0),da([$({type:Object,converter:t=>t})],ua.prototype,"value",void 0),da([$({type:Boolean,reflect:!0})],ua.prototype,"selected",void 0),da([$({type:Object})],ua.prototype,"subOptions",void 0),da([z({})],ua.prototype,"renderOption",void 0),da([E(".ft-filter-option--slot")],ua.prototype,"slotElement",void 0),W("ft-filter")(pa),W("ft-filter-option")(ua),t.FtFilter=pa,t.FtFilterChangeEvent=ha,t.FtFilterCssVariables=la,t.FtFilterLevelCssVariables=Qn,t.FtFilterOption=ua,t.levelStyles=ta,t.styles=ca}({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-filter",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.13",
|
|
4
4
|
"description": "Flat selector for multivalued or monovalued filters",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-button": "1.1.
|
|
23
|
-
"@fluid-topics/ft-checkbox": "1.1.
|
|
24
|
-
"@fluid-topics/ft-icon": "1.1.
|
|
25
|
-
"@fluid-topics/ft-radio": "1.1.
|
|
26
|
-
"@fluid-topics/ft-ripple": "1.1.
|
|
27
|
-
"@fluid-topics/ft-snap-scroll": "1.1.
|
|
28
|
-
"@fluid-topics/ft-typography": "1.1.
|
|
29
|
-
"@fluid-topics/ft-wc-utils": "1.1.
|
|
22
|
+
"@fluid-topics/ft-button": "1.1.13",
|
|
23
|
+
"@fluid-topics/ft-checkbox": "1.1.13",
|
|
24
|
+
"@fluid-topics/ft-icon": "1.1.13",
|
|
25
|
+
"@fluid-topics/ft-radio": "1.1.13",
|
|
26
|
+
"@fluid-topics/ft-ripple": "1.1.13",
|
|
27
|
+
"@fluid-topics/ft-snap-scroll": "1.1.13",
|
|
28
|
+
"@fluid-topics/ft-typography": "1.1.13",
|
|
29
|
+
"@fluid-topics/ft-wc-utils": "1.1.13",
|
|
30
30
|
"lit": "3.1.0"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "6678af642af51eb1590bccbeeb0de8cbc5938ab1"
|
|
33
33
|
}
|